Skip to content

Add MegaETH deployment and verification support#1

Open
fabiaz84 wants to merge 1 commit intomainfrom
megaeth
Open

Add MegaETH deployment and verification support#1
fabiaz84 wants to merge 1 commit intomainfrom
megaeth

Conversation

@fabiaz84
Copy link
Copy Markdown

@fabiaz84 fabiaz84 commented Mar 4, 2026

  • foundry.toml: megaeth rpc_endpoints and etherscan (chain 4326)
  • script/bao-factory:
    • MegaETH verify via Etherscan API v2 (direct API, chainid=4326)
    • --verify: verify-only for bootstrap implementation
    • --verify-contract : verify any contract (e.g. after impl deploy)
    • PATH handling for Foundry (cast/forge) when not on PATH
    • Portable grep (-oE) for macOS/BSD
    • NEXT STEPS: explorer URLs for megaeth, typos fixed, verify-contract hint
  • README: prerequisites (git submodules), MegaETH env vars and verify flow, verify-only and implementation upgrade for megaeth, ./script/bao-factory in examples

- foundry.toml: megaeth rpc_endpoints and etherscan (chain 4326)
- script/bao-factory:
  - MegaETH verify via Etherscan API v2 (direct API, chainid=4326)
  - --verify: verify-only for bootstrap implementation
  - --verify-contract <addr> <path>: verify any contract (e.g. after impl deploy)
  - PATH handling for Foundry (cast/forge) when not on PATH
  - Portable grep (-oE) for macOS/BSD
  - NEXT STEPS: explorer URLs for megaeth, typos fixed, verify-contract hint
- README: prerequisites (git submodules), MegaETH env vars and verify flow,
  verify-only and implementation upgrade for megaeth, ./script/bao-factory in examples

Made-with: Cursor
export PATH="$FOUNDRY_BIN:$PATH"
fi
fi

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't thin we should be adding knowledge of where foundry is installed into the factory deploy script - it should just call it and fail if it is not installed

./script/bao-factory --deploy --network mainnet --account <deployer> --etherscan <API_KEY>
```

For **MegaETH** (chain ID 4326), set in your environment and use `--network megaeth`:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should say in .env not environment

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.

2 participants