Skip to content

Smart Contracts Incremental Deployment Technique

Miao ZhiCheng edited this page Aug 22, 2023 · 2 revisions

The objective of the smart contracts incremental deployment is to avoid deploy the "effecitvely" same binary on-chain.

The core logic sits in ops-scripts/libs/common:codeChanged.

The major challenges are:

  • Immutable value holes set during construction time. Without handling this case, the logic contract will not match binary-wise the deployed contract. This is resolved by retroactively holing the values.
  • External library holes.

It is worth noting that, this code change detection maybe only work to the best-effort degree, if the logic fails the consequence is extra deployment gas cost.

Additionally, it seems this endeavor is only relevant (dollar gas cost) on the Ethereum mainnet. We have not found ecosystem-wide tooling for this.

Clone this wiki locally