Gateway chains with a single l1 settling chain - #19
Open
tomg10 wants to merge 24 commits into
Open
Conversation
Add a new chain (ID 6567) that settles directly on L1, not through the gateway. The chain is created, initialized, and has its L1 deposit tx generated within the same Anvil session as the gateway-settling chains. Its config is written to the default/ directory. Changes: - GatewaySetup gains an l1_settling_chains field - init_ecosystem creates and initializes L1-settling chains after user chains but before gateway migration - write_l1_settling_configs generates deposit txs and writes config.yaml, wallets.yaml, contracts.yaml to default/ - script() passes l1_settling_chains=["6567"] for v31.0 gateway setup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use chain ID in filenames (config_{id}.yaml, wallets_{id}.yaml,
contracts_{id}.yaml) to avoid collisions with multiple L1-settling
chains
- Replace getattr duck-typing with get_l1_settling_chains() method
on the base class, consistent with the hook-based strategy pattern
- Add clarifying comment on the seed-then-patch config writing flow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the two-step seed-then-patch approach with a single _write_l1_chain_config that reads contract addresses and operator keys and writes the complete config YAML directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Other chains use pre-existing template files patched by update_chain_config_yaml. Restore the same pattern here: the seed file acts as the template (since 6567 has no committed one yet), then update_chain_config_yaml fills in dynamic values identically to every other chain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract _create_and_init_chain() to deduplicate the create/fund/init sequence used by both user chains and L1-settling chains - Add comment explaining why l1_settling_chains are not passed when USE_GATEWAY=false (all user chains already settle on L1) - Document default/ directory dual purpose: read as CTM config source by ctm set-ctm-contracts, later written to with L1-settling configs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ngle-l1-settling-chain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Another chain settling on L1, which is useful for testing behavior of server with L1 settlement
Why?