Skip to content

05 · Faucet

Claim test 0G, then watch the balance move.

Install Foundry first with the curl installer, then export ADDRESS and curl the RPC for chain id and balance.

01

Read it from a terminal

  1. 01

    Install Foundry

    Start with the installer: curl -L https://foundry.paradigm.xyz | bash, then foundryup.

  2. 02

    Export the address

    Then export ADDRESS=0xYOUR_ADDRESS and curl the RPC for chain id and balance.

  3. 03

    Read result

    eth_chainId comes back as hex. eth_getBalance comes back as wei, also hex.

Install Foundry first. Open a new terminal after foundryup so cast is on PATH.

Then export the address and curl the RPC. On Windows use curl.exe. PowerShell aliases the word curl to Invoke-WebRequest, which will not send this request the same way.

What result means

Chain id 0x40da is Galileo, decimal 16602. Mainnet is 0x4115, decimal 16661. The balance field is wei. 0x16345785d8a0000 is 0.1 0G. A zero result means the claim has not landed on this address yet.
Turn a hex wei result into 0G
# 0xde0b6b3a7640000 is 1 0G (10^18 wei)
cast from-wei "$(cast to-dec 0xde0b6b3a7640000)"

If curl still returns 0x0, the wallet was not on chain id 16602 when it claimed, or the address in the command is not the address that received the faucet transfer. Check https://chainscan-galileo.0g.ai.

02

Three balances people mix up

Testnet gas

Free 0G on Galileo. It pays gas and nothing else. No market value, and it will not spend on mainnet.

Mainnet 0G

The real token. Buy or bridge it. The current routes live at get.0g.ai so this page does not keep a stale list.

Compute credit

Pays providers for inference. A funded wallet does not create this balance. Top up in Private Computer, or deposit with the CLI.

The native token is 0G

Older docs say A0GI. That name is retired. Ask faucets, explorers, and scripts for 0G. Wrapped 0G is w0G.
03

Add 0G to the wallet

An injected wallet gets a confirmation with the RPC, chain id, and symbol filled in. If the browser has no wallet, add a custom network with the fields under each button. Remove any old 0G testnet entry first so Galileo does not collide with a retired chain id.

Use the decimal chain id

Galileo is 16602, which is hex 0x40da. Mainnet is 16661, which is hex 0x4115. Pass those hex values to wallet_addEthereumChain. A digest that prints 0x40EA or 0x412D is not these chain ids.

0G-Galileo-Testnet

Chain id 16602

Manual network
Network name: 0G-Galileo-Testnet
Chain ID: 16602 (0x40da)
RPC URL: https://evmrpc-testnet.0g.ai
Currency symbol: 0G
Decimals: 18
Block explorer: https://chainscan-galileo.0g.ai

0G Mainnet

Chain id 16661

Manual network
Network name: 0G Mainnet
Chain ID: 16661 (0x4115)
RPC URL: https://evmrpc.0g.ai
Currency symbol: 0G
Decimals: 18
Block explorer: https://chainscan.0g.ai
04

Claim Galileo testnet 0G

Connect the wallet on Galileo and claim from the canonical faucet first. The published daily amount on the Galileo overview is 0.1 0G, which is enough for most contract tests. If the main faucet already served that address today, use the Google Cloud faucet. Limits move. If the faucet page disagrees with this sentence, trust the faucet.

  1. Switch the wallet to 0G-Galileo-Testnet before you connect.
  2. Claim to the same address you will paste into the balance reader.
  3. Wait for the transaction, then read the balance. A second claim the same day often fails on purpose.
  4. Need more than the public limit for a hackathon? Ask in the 0G Discord. Do not script the faucet.
05

Or read it in the browser

This asks the same RPC for eth_chainId, eth_getBalance, and eth_blockNumber. It does not ask for a signature and it cannot move tokens. The terminal blocks under the result stay in curl-then-cast order.

Same address, from a terminal. The first block is curl. cast is underneath it, for after Foundry is installed.

06

This faucet does not fill compute credit

After the test wallet has gas, a compute app still needs its own balance. Private Computer takes a card or a 0G top-up at https://pc.0g.ai. The wallet CLI creates a ledger on the first deposit. The documented minimum that creates it is 3 0G:

Compute ledger
npm install -g @0gfoundation/0g-compute-ts-sdk
0g-compute-cli setup-network
0g-compute-cli login
0g-compute-cli deposit --amount 3
0g-compute-cli get-account

Node 20 or newer is required. deposit spends the 0G the CLI is logged into. Do not point it at a key you use anywhere else, and do not paste that key into this portal. get-account is the balance check for credit, the way cast balance is the check for gas.