Skip to content

Gateway chains with a single l1 settling chain - #19

Open
tomg10 wants to merge 24 commits into
di/gateway-migration-newfrom
gateway-chains-with-a-single-l1-settling-chain
Open

Gateway chains with a single l1 settling chain#19
tomg10 wants to merge 24 commits into
di/gateway-migration-newfrom
gateway-chains-with-a-single-l1-settling-chain

Conversation

@tomg10

@tomg10 tomg10 commented Mar 12, 2026

Copy link
Copy Markdown

What?

Another chain settling on L1, which is useful for testing behavior of server with L1 settlement

Why?

tomg10-claude and others added 24 commits March 12, 2026 12:44
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>
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.

3 participants