fix(scripts): correct the Sepolia Mode chain Id, Celo Sepolia l1ChainId and the Celo processor ABI - #356
Conversation
…and the Celo processor ABI The Mode row in the staking Sepolia globals was cloned from the Base row and never updated: it repeated Base's L2 target chain Id (84532, which is Base Sepolia) and Base's L2 OLAS address. Mode Sepolia is 919, and the deployed Mode Sepolia target settles against 0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9 - read from its immutable olas() - so a routed allocation could not have been deposited or redeemed. Both values now match the deployed target. The Celo Sepolia globals had no l1ChainId at all, so the target deployment passed null for that constructor argument and could not run; coercing it to zero fails too, since DefaultTargetDispenserL2 rejects a zero. Added as "1", matching every sibling globals file and the value the deployed Mode Sepolia target actually carries. deploy_10_set_deposit_processors.js attached a WormholeDepositProcessorL1 ABI to the Celo processor. The deployed Celo processor is Optimism-style - verified on-chain: it has no wormholeRelayer() and its target exposes receiveMessage rather than receiveWormholeMessages - and deploy_05_celo_deposit_processor.sh deploys OptimismDepositProcessorL1. Corrected the ABI to match. Also documents why that script cannot register the Mode processor: Mode is deployed at step 11, after it runs. The .sh equivalent registers all eight routes and is the one to prefer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV3qNR96Ua8UoNkm3pTfY7
| "modeL1CrossDomainMessengerProxyAddress": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", | ||
| "modeOLASAddress": "0x01B8b6384298D4848E3BE63D4C9D17830EeE488A", | ||
| "modeL2TargetChainId": "84532", | ||
| "modeOLASAddress": "0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9", |
There was a problem hiding this comment.
There was a problem hiding this comment.
You're right, and I've reverted it — thank you for catching it.
Confirmed on Mode Sepolia: 0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9 reads name() = "Aave Token", symbol() = "AAVE", 5,835 bytes of code. I took it from the deployed target's immutable olas() and treated "what is deployed" as "what is correct". The target is misconfigured, so copying its value into the L1 side propagated the error instead of fixing it.
Checking further, neither side of that route is right:
| address | Mode Sepolia | Base Sepolia | Ethereum Sepolia |
|---|---|---|---|
0x01B8b6384298D4848E3BE63D4C9D17830EeE488A (old modeOLASAddress, also baseOLASAddress) |
no code | no code | — |
0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9 (target's olas()) |
AAVE | — | — |
0xeb2725bD76f6b1569Cf1484fCa0f2D55714A085d (L1 olasAddress) |
— | — | ERC20TokenOwnerless, exists |
So the processor was told to bridge to an address with no code, and the target settles against AAVE. There is no OLAS on Mode Sepolia to point either at, and the target's olas is immutable — the route cannot be made correct by editing globals. It needs an OLAS deployed on Mode Sepolia and the target redeployed against it.
I've left modeOLASAddress as it was and kept only the chain Id correction (84532 → 919), which is unambiguous.
One thing worth a separate look: baseOLASAddress is the same 0x01B8…488A and has no code on Base Sepolia either, so the Base Sepolia route may have the same problem. That was not in the original report and I have not changed it.
…s against AAVE The deployed Mode Sepolia target's olas() is 0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9, which on Mode Sepolia is Aave Token, symbol AAVE, not OLAS. Copying it into the L1 side propagated the error rather than fixing it. Neither side of that route is right. The old value, 0x01B8b6384298D4848E3BE63D4C9D17830EeE488A, has no code on Mode Sepolia at all, so the processor was told to bridge to nothing; the target settles against the wrong token. There is no OLAS deployed on Mode Sepolia to point either at, and the target's olas is immutable, so the route cannot be corrected by editing globals - it needs an OLAS deployment and a target redeploy. Leaves modeOLASAddress as it was and keeps only the chain Id correction, which is unambiguous. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV3qNR96Ua8UoNkm3pTfY7
Three deployment-script defects. None affects a running contract; each would affect a fresh or repeated deployment.
Sepolia Mode target chain Id was Base's
globals_sepolia.jsonsetmodeL2TargetChainIdto84532— Base Sepolia — the same value asbaseL2TargetChainId.setDepositProcessorChainIdsstores one processor per chain Id, so the second registration overwrote the first and Base claims would route through the Mode processor. Mode Sepolia is919.Celo Sepolia globals had no
l1ChainIdThe target deployment reads it and passed
nullfor the fifth constructor argument, so it could not run; coercing to0fails too, becauseDefaultTargetDispenserL2rejects a zero source chain. Added as"1", matching every sibling globals file and the value the deployed Mode Sepolia target carries.deploy_10attached the wrong ABI to the Celo processorIt used
WormholeDepositProcessorL1for a processor that is Optimism-style. Verified on-chain: the live Celo processor has nowormholeRelayer(), and its target exposesreceiveMessage(bytes)rather thanreceiveWormholeMessages(...).deploy_05_celo_deposit_processor.shalready deploysOptimismDepositProcessorL1; only the registration step disagreed.Documented rather than changed
deploy_10_set_deposit_processors.jscannot register the Mode processor, because Mode is deployed at step 11 — after it runs.deploy_10_set_deposit_processors.shis the newer equivalent and registers all eight routes. Rather than reorder a numbered sequence, the JS now says so, and says what happens if used alone: an unregistered chain resolves to a zero processor and reverts the claim, taking the rest of a batch with it. The live Dispenser has all eight routes mapped, so nothing is affected today.The Mode Sepolia token, which this PR does not fix
An earlier revision of this branch changed
modeOLASAddressto the deployed target'solas(). That was wrong and is reverted — on Mode Sepolia that address is Aave Token, so the target is misconfigured and copying its value propagated the error.Neither side of the route is right:
0x01B8b6384298D4848E3BE63D4C9D17830EeE488A(modeOLASAddress, alsobaseOLASAddress)0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9(target'solas())The processor is told to bridge to an address with no code; the target settles against AAVE. There is no OLAS on Mode Sepolia to point either at, and the target's
olasis immutable — so this needs an OLAS deployment and a target redeploy, not a globals edit.Related, and not previously reported:
baseOLASAddressis that same address and has no code on Base Sepolia either, so the Base Sepolia route may have the same problem. Not changed here.