lindy-labs / opus_contracts

Opus Source Code
https://opus.money
Other
0 stars 0 forks source link

feat[script]: mainnet deployment #589

Closed tserg closed 4 months ago

tserg commented 4 months ago

This PR adds the deployment script for mainnet.

The differences from devnet and Sepolia are:

  1. The admin address does not transmute any USDC to CASH in the deployment script.
  2. The deployment address transfers admin rights to the multisig, grants the default admin role to the multisig and renounces the default admin role.
  3. A call is made to the Seer to update prices at the end of deployment.

I have manually tested (2) and having the pending admin accept the admin transfer on devnet locally.

A checklist before running the deployment script:

tserg commented 4 months ago

We should also remove MAX_FEE from each call and let sncast estimate it automatically. For cleanliness, I think this is better done in a follow-up PR.

tserg commented 4 months ago

Heh, when reviewing, I realized we'll than have to call accept_admin manually on all modules from the multisig 😬 At least I don't know if there's a way how to do a mutlicall on a multisig.

I wanted to mention this too but forgot :smile: I did a cursory search earlier in the week and did not see anything related to constructing a multicall for an Argent multisig.

Does sncast do the fee estimation correctly? Didn't we have a problem with that? FWIW, I think using the MAX_FEE constant is ok.

Oh right, we can leave it as it is since it is easy to change MAX_FEE anyway.