Chain

EVM-compatible L1, tuned for AI apps.

Built on CometBFT with sub-second finality and up to 11K TPS per shard. Deploy Solidity contracts with the toolchains you already know, Hardhat and Foundry.

Add to wallet

§ 01 · Network Config

The public endpoints below are intended for development. For production traffic, use a third-party provider listed below.

Testnet

0G-Galileo-Testnet

Mainnet

0G Mainnet

§ 02 · Deploy a contract

0G Chain runs the EVM. Any Solidity contract compiled for the cancun hard fork with Solidity 0.8.19 will deploy unchanged.

Recommended

Start from the 0G Deployment Scripts

Ready-to-run Hardhat and Foundry deployment scripts with verified configs for Galileo testnet and mainnet, plus an example contract. Clone, set a private key, and deploy.

Clone starter kit

Or follow the 6 steps below to wire it up yourself.

01

Add 0G Chain to your wallet

text
# use the one-click buttons above, or add manually in MetaMask / Rabby
# Testnet chainId 16602, Mainnet chainId 16661
# currency 0G, decimals 18
02

Get tokens

text
# testnet: claim 0.1 0G per day from faucet.0g.ai
# mainnet: bridge or buy 0G and send to your wallet
03

Install your framework

bash
# Hardhat
npm install --save-dev hardhat
# or Foundry (one-time)
curl -L https://foundry.paradigm.xyz | bash
foundryup
04

Configure the network

ts
// hardhat.config.ts
export default {
solidity: {
version: "0.8.19",
settings: {
evmVersion: "cancun",
optimizer: { enabled: true, runs: 200 },
},
},
networks: {
testnet: {
url: "https://evmrpc-testnet.0g.ai",
chainId: 16602,
accounts: [process.env.PRIVATE_KEY!],
},
mainnet: {
url: "https://evmrpc.0g.ai",
chainId: 16661,
accounts: [process.env.PRIVATE_KEY!],
},
},
}
05

Deploy

bash
# Hardhat
npx hardhat run scripts/deploy.ts --network testnet
# Foundry
forge create --rpc-url https://evmrpc-testnet.0g.ai \
--private-key $PRIVATE_KEY \
--evm-version cancun \
src/MyToken.sol:MyToken
06

Verify on Chain Scan

text
# open chainscan-galileo.0g.ai (testnet) or chainscan.0g.ai (mainnet)
# paste your contract address and submit source for verification

Gotcha

Pin your toolchain to evmVersion: cancun and Solidity 0.8.19. Newer EVM versions may not verify on the explorer.

§ 03 · Deep dive

§ 04 · Built on Chain

View showcase →