SIP-0054: Integrate Mynt with Zero

SIP-0054 Zero - Mynt integration new logic contracts are deployed but 3 out of 5 contracts cannot be verified on the block explorers (tenderly, rsk explorer and blockscout) due to some technical issues.
We think that these are due to discrepancies in the ways the compiler flattens the contracts (puts all structured contracts inheritances in one big flattened contract) and how the explorers do it - there are very small differences in the resulting bytecode. The affected contracts are BorrowerOperations, TroveManager, TroveManagerRedeemOps.

While we cannot finish the verification on the explorers for now, it is always possible to verify these contracts manually by following these steps:

  1. Clone the repo at the time of the mainnet contracts deployment: update SIPs 0054 & 0055 args in the scripts · DistributedCollective/zero@80c13db · GitHub

  2. Run yarn install to setup the repository

  3. Run hardhat compile (or alternatively using directly the solc v0.6.11 with optimization switched on and having optimisation option set to 100) from CLI (console) which will compile all the contracts with the same settings for the compiler and optimisation that were at the time of the deployment

  4. the packages/contracts/artifacts folder with all the compiled contracts will be generated

  5. The contracts deployment bytecode can be found in the field “deployedBytecode” respectively:
    packages/contracts/artifacts/contracts/BorrowerOperations.sol/BorrowerOperations.json;
    packages/contracts/artifacts/contracts/TroveManager.sol/TroveManager.json;
    packages/contracts/artifacts/contracts/TroveManagerRedeemOps.sol/TroveManagerRedeemOps.json;

  6. Now the deployed bytecodes onchain (addresses are listed in SIPS/SIP-0054.md at 98ef8487537ff7956fbfd0699d4c852fb932c4c3 · DistributedCollective/SIPS · GitHub) and compiled contracts can be compared to make sure that the code at the deployment commit 100% matches

1 Like