celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
684 stars 360 forks source link

Support devchain with L2 already transitioned #11103

Open martinvol opened 4 days ago

martinvol commented 4 days ago

Currently the devchain is created with latest contracts in the commit it is built. The devtooling team ready wants to start working on celi/contractkit changes that require an L2 enabled.

It could be acheived by, after the job that builds L1 (current one) finishes, applying a second set of migrations that:

  1. import the state into a new anvil version.
  2. Sets the bytecode of proxyAdminAddress (0x4200000000000000000000000000000000000018) (this enables the transition)
  3. Calls functions to fully enable the contract (for example CeloDistributionSchedule.activate(...))
  4. Exports a new state that it's L2.
arthurgousset commented 3 days ago

Extra context from Slack

arthurgousset commented 2 days ago

Starting to work on this today.