Proxy Contracts

A Proxy smart contract contains the Storage for an upgradable contract that allows you to modify its logic post-deployment.

A smart contract is made up of (1) persistent state/storage, and (2) logic defined for how this state can be mutated. Upgrading a smart contract means changing the logic defined for how the smart contract’s state can be mutated.

An “upgradeable smart contract” is two smart contracts considered together as one system:

  • Proxy smart contract: The smart contract whose state/storage we’re concerned with.
  • Implementation smart contract: A stateless smart contract that defines the logic for how the proxy smart contract’s state can be mutated.

To upgrade the smart contract, simply deploy a new implementation contract and call the upgrade function on the proxy contract to upgrade to the new implementation.