Differences between the three deploy options (regular, upgradeable, minimal proxy)

Great work! Any place I can find more detailed explanation about the differences between these 3 deploy options? Especially, curious about the difference between minimal and regular ones.

1 Like

Hi @maxweng,

Welcome to the community :wave:

The three types of contracts that can be deployed with the OpenZeppelin CLI are as follows:

  1. Regular contracts are non-upgradeable.

  2. Upgradeable contracts consist of a logic contract, a proxy contract and optionally a ProxyAdmin contract. The proxy points to the logic contract and can be updated to change to a new logic contract.
    To learn more see: How Upgrades Work

  3. Minimal proxy contracts consist of a logic contract and a minimal proxy, the minimal proxy cannot be changed. We can use these when we need multiple copies of the one contract, where we deploy the logic contract once and multiple minimal proxies.
    To learn more see: Deep dive into the Minimal Proxy contract

Thanks for the detailed explanations! So, if my contract will be only one instance and I don’t need to upgrade it later, I guess the regular one is the way to go, right?

1 Like

Hi @maxweng,

Yes, if you are only deploying one contract, don’t want to be able to upgrade, then regular is the way to go.

If you haven’t already, as part of developing a smart contract, I suggest looking at:

Got it. Looks like for your latest version Truffle is not needed for testing.

1 Like

Hi @maxweng,

You can use OpenZeppelin Test Environment for testing with the test runner of your choice: https://docs.openzeppelin.com/learn/writing-automated-tests
https://docs.openzeppelin.com/test-environment/

You can use OpenZeppelin Test Helpers with OpenZeppelin Test Environment or Truffle Test.