You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following Claude written summary outlines how we deployed the contracts to Plataberget and tested the deposit/withdrawal flow.
As we did not have a full fledged devnet (ie. no L2 nodes, etc), the withdrawal test impersonated the proposer created a permissioned game, fast forwarded the chain and finalized the withdrawal.
Deployed a fresh chain (L2 chain ID 78216) to glamsterdam-devnet-8 ("Plataberget", L1 chain ID 7091047534) with op-deployer built from jm/glamsterdam-test, then exercised the full deposit → prove → finalize withdrawal lifecycle (finalization rehearsed on an anvil fork; the real withdrawal matures 2026-09-02).
Commands run (2026-08-26)
All cast/op-deployer traffic ran through a local logging proxy at http://127.0.0.1:18545 that forwards to https://rpc.glamsterdam-devnet-8.ethpandaops.io/ with a curl user-agent and retries on 502 — Cloudflare 502s cast's own user-agent.
Deployment
just build
Builds the contracts, embeds the branch's forge artifacts into op-deployer, and builds bin/op-deployer. Two Go fixes were needed on the branch first (op-deployer: trust the node-reported fork block hash, op-deployer: pad broadcast gas limits for unmodeled state gas).
Deploys all implementation contracts plus the OPCM. The OptimismPortal impl needed 35.4M gas (EIP-8037 state gas), fine under reservoir semantics since the execution portion stays below the EIP-7825 cap.
Creates the intent (then hand-edited: opcmAddress from the bootstrap output, all roles = the EOA, standard EIP-1559 params — full file below) and deploys the chain through the OPCM — proxies, super permissioned dispute game, L2 genesis.
Runs the deployed OPCMStandardValidator against the new chain. Returned only SCKDG-SHAPE,SCKDG-10 (no permissionless super game registered — expected, apply is permissioned-only).
Derives the L2ToL1MessagePasser storage slot for sentMessages[withdrawalHash] (mapping at slot 0), then the secure-trie path (keccak of the slot) used as the MPT key.
Hand-encodes a single-leaf Merkle-Patricia trie: RLP list of the hex-prefix-encoded 64-nibble path and value 0x01. Its keccak is the message passer storage root, and the leaf itself is the entire inclusion proof.
Encodes the super-root preimage (0x01 ‖ uint64 timestamp ‖ uint256 chainId ‖ outputRoot) used as the game's extraData; its keccak is the game's root claim.
Deposits 1 ETH through the OptimismPortal (emits TransactionDeposited); the ETH funds the portal so the later withdrawal payout has liquidity. Tx: 0xb22bbade8131cc04ee02cf1b82d8be43c6771abf38412ce5addc0ffe05bb7a20.
Forks the devnet locally and unlocks the EOA so fork transactions need no key. (Note: anvil executes cancun gas semantics under an Amsterdam label — fine here, since this tests contract logic, not gas.)
Proves the withdrawal against game index 0: the portal verifies the output-root preimage against the game's per-chain root claim and the MPT inclusion proof against the storage root.
Fast-forwards 7 days + 1 hour (covering both delays) and finalizes; verified EOA +0.5 ETH, portal −0.5 ETH, finalizedWithdrawals[hash] = true, and a second finalize reverts OptimismPortal_AlreadyFinalized.
Same create and prove as the rehearsal, but signed and sent to the live devnet — starting the real 7-day maturity clock (game create 0x055aaa4ab8ad541f6613e380e7eec3ca2d0932e28360c07479b829298809cc86, prove 0x778b5f6481204e8d2bc6278cc0d20ac871befbe088b33a155999d99303adfb62). Finalize is runnable from unix 1788397584 (≈ 2026-09-02):
Prerequisites: branch jm/glamsterdam-test (includes the two op-deployer fixes above), a funded EOA on glamsterdam-devnet-8, foundry's cast/anvil, and a UA-spoofing proxy in front of the public RPC (or equivalent retries).
.deployer/plataberget/intent.toml — the only hand-edited op-deployer input (bootstrap takes everything via flags; opcmAddress comes from the bootstrap implementations outfile):
.deployer/plataberget/withdrawal/params.env — every value the withdrawal commands reference (all derivable from the construction commands above; recorded here so the exact live-chain withdrawal can be finalized/inspected):
Other addresses referenced: VALIDATOR=0x46bee3284bc41691752e20a99116c43917e383ec (OPCMStandardValidator), SYSCFG=0xba443c19dc92a8d1f15923bf8f8b0f525047179d (SystemConfig proxy). The full deployment address set is in the op-deployer outfiles (bootstrap_superchain.json, bootstrap_implementations.json, plataberget/state.json).
Caveat: the game's super root is synthetic (hand-built single-leaf message passer trie; no real L2 exists). Once it finalizes in the AnchorStateRegistry it becomes the anchor for future games on this chain — fine for a throwaway test chain.
Activity
maurelian commentedon Aug 28, 2026
The following Claude written summary outlines how we deployed the contracts to Plataberget and tested the deposit/withdrawal flow.
As we did not have a full fledged devnet (ie. no L2 nodes, etc), the withdrawal test impersonated the proposer created a permissioned game, fast forwarded the chain and finalized the withdrawal.
Deployed a fresh chain (L2 chain ID 78216) to glamsterdam-devnet-8 ("Plataberget", L1 chain ID 7091047534) with op-deployer built from
jm/glamsterdam-test, then exercised the full deposit → prove → finalize withdrawal lifecycle (finalization rehearsed on an anvil fork; the real withdrawal matures 2026-09-02).Commands run (2026-08-26)
All
cast/op-deployer traffic ran through a local logging proxy athttp://127.0.0.1:18545that forwards tohttps://rpc.glamsterdam-devnet-8.ethpandaops.io/with a curl user-agent and retries on 502 — Cloudflare 502s cast's own user-agent.Deployment
Builds the contracts, embeds the branch's forge artifacts into op-deployer, and builds
bin/op-deployer. Two Go fixes were needed on the branch first (op-deployer: trust the node-reported fork block hash,op-deployer: pad broadcast gas limits for unmodeled state gas)../bin/op-deployer bootstrap superchain \ --l1-rpc-url http://127.0.0.1:18545 \ --artifacts-locator embedded \ --superchain-proxy-admin-owner $EOA --guardian $EOA \ --no-verify --outfile .deployer/bootstrap_superchain.jsonDeploys SuperchainConfig (impl + proxy) and the superchain ProxyAdmin — required on a fresh L1 before implementations can be bootstrapped.
./bin/op-deployer bootstrap implementations \ --l1-rpc-url http://127.0.0.1:18545 \ --artifacts-locator embedded \ --superchain-config-proxy 0xbbed762e39bc32b12dac0d9e2f0fc5ffa9c054ef \ --superchain-proxy-admin 0x6579cabfcf54327c3195f3b4a1fa2f15e18251b9 \ --upgrade-controller $EOA --challenger $EOA \ --no-verify --outfile .deployer/bootstrap_implementations.jsonDeploys all implementation contracts plus the OPCM. The OptimismPortal impl needed 35.4M gas (EIP-8037 state gas), fine under reservoir semantics since the execution portion stays below the EIP-7825 cap.
./bin/op-deployer init --intent-type custom --l1-chain-id 7091047534 \ --l2-chain-ids 78216 --workdir .deployer/plataberget ./bin/op-deployer apply --l1-rpc-url http://127.0.0.1:18545 --workdir .deployer/platabergetCreates the intent (then hand-edited:
opcmAddressfrom the bootstrap output, all roles = the EOA, standard EIP-1559 params — full file below) and deploys the chain through the OPCM — proxies, super permissioned dispute game, L2 genesis.Runs the deployed OPCMStandardValidator against the new chain. Returned only
SCKDG-SHAPE,SCKDG-10(no permissionless super game registered — expected, apply is permissioned-only).Withdrawal parameter construction
WHASH=$(cast keccak $(cast abi-encode 'f(uint256,address,address,uint256,uint256,bytes)' 0 $EOA $EOA 500000000000000000 100000 0x))Computes the withdrawal hash exactly as
Hashing.hashWithdrawaldoes: keccak of the ABI-encoded (nonce, sender, target, value, gasLimit, data) tuple.Derives the L2ToL1MessagePasser storage slot for
sentMessages[withdrawalHash](mapping at slot 0), then the secure-trie path (keccak of the slot) used as the MPT key.Hand-encodes a single-leaf Merkle-Patricia trie: RLP list of the hex-prefix-encoded 64-nibble path and value
0x01. Its keccak is the message passer storage root, and the leaf itself is the entire inclusion proof.OUTROOT=$(cast keccak $(cast abi-encode 'f(bytes32,bytes32,bytes32,bytes32)' 0x0000000000000000000000000000000000000000000000000000000000000000 $SR $SROOT $BH))Builds the output root per
Hashing.hashOutputRootProoffrom (version 0, arbitrary state root, our storage root, arbitrary block hash).Encodes the super-root preimage (
0x01 ‖ uint64 timestamp ‖ uint256 chainId ‖ outputRoot) used as the game's extraData; its keccak is the game's root claim.Deposit (real devnet)
Deposits 1 ETH through the OptimismPortal (emits
TransactionDeposited); the ETH funds the portal so the later withdrawal payout has liquidity. Tx:0xb22bbade8131cc04ee02cf1b82d8be43c6771abf38412ce5addc0ffe05bb7a20.Fork rehearsal (anvil)
anvil --fork-url http://127.0.0.1:18545 --port 8546 cast rpc anvil_impersonateAccount $EOAForks the devnet locally and unlocks the EOA so fork transactions need no key. (Note: anvil executes cancun gas semantics under an Amsterdam label — fine here, since this tests contract logic, not gas.)
Reads the game bond (0) and the two delays gating finalization (7 days proof maturity, 3.5 days game finality).
Creates the SUPER_PERMISSIONED dispute game carrying the synthetic super root. This game type resolves DEFENDER_WINS at creation.
Proves the withdrawal against game index 0: the portal verifies the output-root preimage against the game's per-chain root claim and the MPT inclusion proof against the storage root.
Fast-forwards 7 days + 1 hour (covering both delays) and finalizes; verified EOA +0.5 ETH, portal −0.5 ETH,
finalizedWithdrawals[hash] = true, and a second finalize revertsOptimismPortal_AlreadyFinalized.Queue on the real devnet
Same create and prove as the rehearsal, but signed and sent to the live devnet — starting the real 7-day maturity clock (game create
0x055aaa4ab8ad541f6613e380e7eec3ca2d0932e28360c07479b829298809cc86, prove0x778b5f6481204e8d2bc6278cc0d20ac871befbe088b33a155999d99303adfb62). Finalize is runnable from unix 1788397584 (≈ 2026-09-02):Inputs needed to re-execute
Prerequisites: branch
jm/glamsterdam-test(includes the two op-deployer fixes above), a funded EOA on glamsterdam-devnet-8, foundry'scast/anvil, and a UA-spoofing proxy in front of the public RPC (or equivalent retries)..deployer/plataberget/intent.toml— the only hand-edited op-deployer input (bootstrap takes everything via flags;opcmAddresscomes from thebootstrap implementationsoutfile):.deployer/plataberget/withdrawal/params.env— every value the withdrawal commands reference (all derivable from the construction commands above; recorded here so the exact live-chain withdrawal can be finalized/inspected):Other addresses referenced:
VALIDATOR=0x46bee3284bc41691752e20a99116c43917e383ec(OPCMStandardValidator),SYSCFG=0xba443c19dc92a8d1f15923bf8f8b0f525047179d(SystemConfig proxy). The full deployment address set is in the op-deployer outfiles (bootstrap_superchain.json,bootstrap_implementations.json,plataberget/state.json).Caveat: the game's super root is synthetic (hand-built single-leaf message passer trie; no real L2 exists). Once it finalizes in the AnchorStateRegistry it becomes the anchor for future games on this chain — fine for a throwaway test chain.
maurelian commentedon Aug 28, 2026
Also running the StandardValidator:
SCKDG-SHAPE,SCKDG-10 are OK, because the permissionless super game is absent.