From 22c082f358d191ff86d577792cfbb7eb0084f252 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 3 Sep 2026 19:41:59 +0200 Subject: [PATCH 1/2] fix(scripts): correct the Sepolia Mode route, Celo Sepolia l1ChainId 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) Claude-Session: https://claude.ai/code/session_01BV3qNR96Ua8UoNkm3pTfY7 --- .../staking/celo/globals_celo_sepolia.json | 1 + .../staking/deploy_10_set_deposit_processors.js | 12 +++++++++++- scripts/deployment/staking/globals_sepolia.json | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/deployment/staking/celo/globals_celo_sepolia.json b/scripts/deployment/staking/celo/globals_celo_sepolia.json index 13577727..46f072f7 100644 --- a/scripts/deployment/staking/celo/globals_celo_sepolia.json +++ b/scripts/deployment/staking/celo/globals_celo_sepolia.json @@ -8,6 +8,7 @@ "blockscoutURL": "https://celo-alfajores.blockscout.com", "gasPriceInGwei": "2", "olasAddress": "0xaCFfAe8e57Ec6E394Eb1b41939A8CF7892DbDc51", + "l1ChainId": "1", "serviceStakingFactoryAddress": "0x1c2cD884127b080F940b7546c1e9aaf525b1FA55", "bridgeMediatorAddress": "0x397125902ED2cA2d42104F621f448A2cE1bC8Fb7", "celoL2CrossDomainMessengerAddress": "0x4200000000000000000000000000000000000007", diff --git a/scripts/deployment/staking/deploy_10_set_deposit_processors.js b/scripts/deployment/staking/deploy_10_set_deposit_processors.js index ecab6bf3..77a6b10f 100644 --- a/scripts/deployment/staking/deploy_10_set_deposit_processors.js +++ b/scripts/deployment/staking/deploy_10_set_deposit_processors.js @@ -1,4 +1,14 @@ /*global process*/ +/* + * NOTE: this script does NOT register the Mode processor. + * + * Mode's L1 processor is deployed at step 11, after this step runs, so its address does not exist + * yet here. `deploy_10_set_deposit_processors.sh` is the current equivalent and registers all eight + * routes including Mode; prefer it. A chain left unregistered resolves to a zero processor and + * reverts the claim - in the batch path it takes the other chains' claims down with it - so a + * fresh deployment that uses this script must register Mode separately afterwards. + */ + const { ethers } = require("hardhat"); const { LedgerSigner } = require("@anders-t/ethers-ledger"); @@ -36,7 +46,7 @@ async function main() { // Get all the contracts const arbitrumDepositProcessorL1 = await ethers.getContractAt("ArbitrumDepositProcessorL1", arbitrumDepositProcessorL1Address); const baseDepositProcessorL1 = await ethers.getContractAt("OptimismDepositProcessorL1", baseDepositProcessorL1Address); - const celoDepositProcessorL1 = await ethers.getContractAt("WormholeDepositProcessorL1", celoDepositProcessorL1Address); + const celoDepositProcessorL1 = await ethers.getContractAt("OptimismDepositProcessorL1", celoDepositProcessorL1Address); const gnosisDepositProcessorL1 = await ethers.getContractAt("GnosisDepositProcessorL1", gnosisDepositProcessorL1Address); const optimismDepositProcessorL1 = await ethers.getContractAt("OptimismDepositProcessorL1", optimismDepositProcessorL1Address); const polygonDepositProcessorL1 = await ethers.getContractAt("PolygonDepositProcessorL1", polygonDepositProcessorL1Address); diff --git a/scripts/deployment/staking/globals_sepolia.json b/scripts/deployment/staking/globals_sepolia.json index 17b80317..61bc1a6d 100644 --- a/scripts/deployment/staking/globals_sepolia.json +++ b/scripts/deployment/staking/globals_sepolia.json @@ -32,8 +32,8 @@ "baseDepositProcessorL1Address": "0xfB646D8fB41369574274469654f761c18e1160C9", "modeL1StandardBridgeProxyAddress": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", "modeL1CrossDomainMessengerProxyAddress": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", - "modeOLASAddress": "0x01B8b6384298D4848E3BE63D4C9D17830EeE488A", - "modeL2TargetChainId": "84532", + "modeOLASAddress": "0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9", + "modeL2TargetChainId": "919", "modeDepositProcessorL1Address": "0x93504d2275998a4fCa666000A906067648edC723", "wormholeL1CoreAddress": "0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78", "wormholeL1TokenRelayerAddress": "0xDB5492265f6038831E89f495670FF909aDe94bd9", From af387027f19a1f8ec8b25a95519387d927c9c814 Mon Sep 17 00:00:00 2001 From: David Minarsch Date: Thu, 3 Sep 2026 19:59:24 +0200 Subject: [PATCH 2/2] fix(scripts): revert the Mode Sepolia OLAS change - the target settles 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) Claude-Session: https://claude.ai/code/session_01BV3qNR96Ua8UoNkm3pTfY7 --- scripts/deployment/staking/globals_sepolia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deployment/staking/globals_sepolia.json b/scripts/deployment/staking/globals_sepolia.json index 61bc1a6d..fe5a6c13 100644 --- a/scripts/deployment/staking/globals_sepolia.json +++ b/scripts/deployment/staking/globals_sepolia.json @@ -32,7 +32,7 @@ "baseDepositProcessorL1Address": "0xfB646D8fB41369574274469654f761c18e1160C9", "modeL1StandardBridgeProxyAddress": "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1", "modeL1CrossDomainMessengerProxyAddress": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef", - "modeOLASAddress": "0xcfD1D50ce23C46D3Cf6407487B2F8934e96DC8f9", + "modeOLASAddress": "0x01B8b6384298D4848E3BE63D4C9D17830EeE488A", "modeL2TargetChainId": "919", "modeDepositProcessorL1Address": "0x93504d2275998a4fCa666000A906067648edC723", "wormholeL1CoreAddress": "0x4a8bc80Ed5a4067f1CCf107057b8270E0cC11A78",