Skip to content

Conversation

@TucksonDev
Copy link
Contributor

This PR adds instructions to predeploy the RollupCreator factory contracts through the genesis.json file. Creating all templates and the factory contract usually involves sending multiple transactions which slows down the starting process for the testnode environment. Predeploying these contracts should speed up the initialization process.

This PR only adds the factory contracts and doesn't modify the current initialization flow, since the pinned nitro-contracts version uses Create2 to deploy the factory contracts. Since these contracts are already deployed, the script only fetches the relevant contracts from the chain.

If in the future, contracts are deployed to different addresses (because the code is modified), the new predeploys file can be obtained by running the script added in this PR: OffchainLabs/nitro-contracts#403

Here are further improvement points, in case we want to continue down this path:

  • Predeploy L3 rollup contracts (and all its variants)
  • Predeploy TokenBridge factory contracts (for the L2 and the L3)
  • Predeploy the created Rollup (shouldn't speed up the process too much, since that's only a couple of transactions)
  • Predeploy the created TokenBridge (same reasoning as above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants