Skip to content

feat(bridge): Ethereum mainnet sender deployment script#87

Merged
ByteYue merged 1 commit intomainfrom
deploy_sender_mainner
Apr 23, 2026
Merged

feat(bridge): Ethereum mainnet sender deployment script#87
ByteYue merged 1 commit intomainfrom
deploy_sender_mainner

Conversation

@ByteYue
Copy link
Copy Markdown
Contributor

@ByteYue ByteYue commented Apr 23, 2026

Summary

  • Adds scripts/eth-mainnet-sender/DeployBridge.s.sol — single-broadcast forge script that deploys GravityPortal + GBridgeSender to Ethereum mainnet and hands ownership of both to a Safe multisig via Ownable2Step.transferOwnership() in the same broadcast.
  • Script hard-codes the verified mainnet G token (0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649), enforces chainid == 1 (with an ALLOW_NON_MAINNET=1 escape for fork tests), and runs 7 post-deploy invariant asserts.
  • Adds a minimal script-side README.md that points to the full operator runbook in mono-grav/docs/mainnet/ETH-BRIDGE-SENDER-DEPLOYMENT.md.

Design notes

  • Deployer EOA is temporary owner for the duration of the script only; transferOwnership runs in the same broadcast immediately after each deploy, so the EOA window is effectively zero.
  • feeRecipient is set directly to the multisig in the constructor, so even if the EOA window were attacked, any withdrawFees() still routes ETH to the multisig.
  • GBridgeSender receives the GravityPortal address from the same script context, eliminating manual transcription risk.

Test plan

  • forge build clean on Solc 0.8.30 with via_ir
  • Fork dry-run on https://ethereum-rpc.publicnode.com — 4 txs simulated, 7 invariants pass, deployment JSON produced
  • Gas estimate ~1.73M; at 30 gwei ≈ 0.05 ETH deployer budget
  • Real mainnet deploy (requires multisig address + final fee values — tracked in the runbook)

🤖 Generated with Claude Code

Adds scripts/eth-mainnet-sender/ with a single-broadcast forge script
that deploys GravityPortal + GBridgeSender and immediately hands
ownership of both to a Safe multisig via Ownable2Step.transferOwnership.
Includes chainid==1 guard, 7 post-deploy invariant asserts, and a
minimal README pointing at the full ceremony runbook in mono-grav.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ByteYue ByteYue merged commit dd4772d into main Apr 23, 2026
3 checks passed
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.

1 participant