Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
- Deploy a simple smart contract to Monad mainnet using Hardhat
- Verify contracts on MonadExplorer (Sourcify) and Monadscan (Etherscan-based)
- Alternative deployment using Foundry
- Understand what Monad’s fast finality means for deployment
Prerequisites
- Chainstack account with a Monad node endpoint
- Node.js v16+ (for Hardhat) or Foundry installed
- Basic Solidity knowledge
- MON tokens for gas fees
Overview
Monad is EVM-compatible at the bytecode level, so your existing Ethereum development tools work without modification. The main differences you’ll notice:- Fast finality: Your deployment is finalized within about a second of being included in a block
- No reorganizations after finality: Once the deployment’s block is finalized, your contract address is permanent
- 150M block gas limit: Large contracts fit in a single block
Deploy with Hardhat
Set up the project
Create a new directory and initialize a Hardhat project:Configure environment variables
Create a.env file in your project root:
.env
Configure Hardhat for Monad
Replace the contents ofhardhat.config.js:
hardhat.config.js
Write the smart contract
Createcontracts/Counter.sol:
contracts/Counter.sol
Create the deployment script
Createscripts/deploy.js:
scripts/deploy.js
Deploy the contract
Run the deployment:Verify on Monadscan
Verify using the Etherscan-compatible API:CONTRACT_ADDRESS with your deployed address. The 0 is the constructor argument (initial count).
Verify on MonadExplorer (Sourcify)
Verify using Sourcify:Deploy with Foundry
Foundry offers faster compilation and a streamlined CLI experience.Set up the project
Write the contract
Replacesrc/Counter.sol:
src/Counter.sol
Deploy with forge
Verify on MonadExplorer (Sourcify)
Verify on Monadscan
Interact with your contract
After deployment, interact with your contract using cast (Foundry) or a script.Using cast
Using ethers.js
Monad-specific notes
Key differences from other EVM chains:
- Fast finality: A block is finalized within about a second of being proposed. A receipt read at the
latesttag comes from a proposed block; to confirm that a deployment is final, check that its block number is at or below thefinalizedblock. - No pending state: Transactions go directly from submitted to confirmed. The mempool works differently than Ethereum.
- High throughput: You can deploy multiple contracts in rapid succession without congestion.
- Same tooling: All Ethereum tools (Hardhat, Foundry, Remix, etc.) work without modification.
Block explorers
After deployment, view your contract on:- MonadExplorer (BlockVision):
https://monadexplorer.com/address/CONTRACT_ADDRESS - Monadscan:
https://monadscan.com/address/CONTRACT_ADDRESS - MonVision:
https://monvision.io/address/CONTRACT_ADDRESS
Troubleshooting
Verification fails with “contract not found”
Wait 10-15 seconds after deployment before verifying. Monad’s fast finality means the contract is deployed quickly, but explorers may need time to index it.Gas estimation errors
Monad has a 150M gas limit per block. If you’re hitting gas errors, check:- Your contract isn’t infinite looping
- Constructor logic is reasonable
- You have enough MON for gas fees
RPC connection issues
Ensure your Chainstack endpoint is correct and includes the full URL with any authentication.Next steps
Now that you can deploy and verify contracts, you can:- Build more complex smart contracts
- Create a frontend to interact with your contract
- Set up continuous deployment pipelines
- Explore Monad’s high-throughput capabilities with batch transactions