Skip to main content

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.superaichain.ai \
--private-key $PRIVATE_KEY

Verify on Blockscout:

forge verify-contract <address> src/MyContract.sol:MyContract \
--verifier blockscout \
--verifier-url https://scan-testnet.superaichain.ai/api

Hardhat

// hardhat.config.ts
export default {
networks: {
superTestnet: {
url: 'https://rpc-testnet.superaichain.ai',
chainId: 8848,
accounts: [process.env.PRIVATE_KEY!],
},
},
etherscan: {
apiKey: { superTestnet: 'blockscout' },
customChains: [{
network: 'superTestnet',
chainId: 8848,
urls: {
apiURL: 'https://scan-testnet.superaichain.ai/api',
browserURL: 'https://scan-testnet.superaichain.ai',
},
}],
},
};
npx hardhat run scripts/deploy.ts --network superTestnet
npx hardhat verify --network superTestnet <address> <constructorArgs...>

Remix

Set the injected provider to Super AI Chain Testnet (after adding the network), then deploy as usual.

Verification notes

  • Blockscout runs a smart-contract-verifier microservice that fetches the matching solc automatically.
  • Match the exact compiler settings: Foundry 0.8.20 defaults to shanghai EVM version (not paris); older OpenZeppelin/solc 0.5.x standard-input must omit metadata.bytecodeHash.

Next steps