Smart Contract Deploy & Verify
Deploy contracts exactly as you would on BSC — only the network config changes.
Foundry
forge create src/MyContract.sol:MyContract \
--rpc-url https://rpc-testnet.mo.fit \
--private-key $PRIVATE_KEY
Verify on Blockscout:
forge verify-contract <address> src/MyContract.sol:MyContract \
--verifier blockscout \
--verifier-url https://scan-testnet.mo.fit/api
Hardhat
// hardhat.config.ts
export default {
networks: {
moTestnet: {
url: 'https://rpc-testnet.mo.fit',
chainId: 6688,
accounts: [process.env.PRIVATE_KEY!],
},
},
etherscan: {
apiKey: { moTestnet: 'blockscout' },
customChains: [{
network: 'moTestnet',
chainId: 6688,
urls: {
apiURL: 'https://scan-testnet.mo.fit/api',
browserURL: 'https://scan-testnet.mo.fit',
},
}],
},
};
npx hardhat run scripts/deploy.ts --network moTestnet
npx hardhat verify --network moTestnet <address> <constructorArgs...>
Remix
Set the injected provider to Mo Chain Testnet (after adding the network), then deploy as usual.
Verification notes
- Blockscout runs a
smart-contract-verifiermicroservice that fetches the matchingsolcautomatically. - Match the exact compiler settings: Foundry 0.8.20 defaults to
shanghaiEVM version (notparis); older OpenZeppelin/solc 0.5.x standard-input must omitmetadata.bytecodeHash.