Mocking upgradeable contracts in unit tests

Aside from the benefits of using OpenZeppelin SDK upgradeable contracts, some reasons to not create a contract as upgradeable:

  1. There is a gas overhead for using a Proxy.
  2. OpenZeppelin SDK contracts (post Istanbul) can't receive Ether from other contracts via transfer: OpenZeppelin upgradeable contracts affected by Istanbul hardfork
  3. Some entity needs to control upgrading a contract. Whether this is a single account, a multi-sig, a DAO or some other mechanism. (See Upgrades governance for using a multi-sig). This process for upgrading should be clearly explained to users under what circumstances it can occur.
1 Like