mega deploy
Thedeploy command (also aliased as mega create) deploys a smart contract with Foundry’s forge create.
Usage
Arguments
Network options
When
--rpc-url is supplied, Mega CLI checks the endpoint’s chain ID against the selected --network before deployment. This prevents accidental deployment to the wrong chain.
Common options
Mega CLI passes supported deployment options to
forge create. See the
Forge documentation for the underlying command.Examples
Deploy locally
The network defaults tolocal. If no wallet option is provided locally, Mega CLI uses Anvil’s first development account.
Deploy to MegaETH testnet
Deploy to MegaETH mainnet
Use a custom RPC
--network still determines the expected chain ID.

