cast to read the chain ID, block height, and finalized head.
Network details
1. Install cast
cast is Foundry’s command-line tool for EVM networks. Check whether it is
already installed:
On Windows, run the installer from Git Bash or WSL. See the
Foundry installation guide
for other installation methods.
2. Create an RPC endpoint
- Sign in to the Metal console.
- Complete billing setup using the test card shown in the console. Testnet uses sandbox billing and grants $50 of RPC credit after setup.
- Open Endpoints and select + New endpoint.
- Give it a name, and select the testnet network.
- Select Create endpoint, then copy the Endpoint URL.
RPC credit pays for requests through your endpoint. It stays in the console’s
billing account. Fund your blockchain address separately with test *USDZ from
the faucet to pay for transfers and transaction gas.
Sandbox billing uses test cards and makes no real charges.
METAL_RPC_URL, replacing the placeholder below:
3. Verify the connection
Read the chain ID:63825. Then read the current block number:
4. Read finality
Metal exposes its finalized block throughconsensus_status:
head and finalized block pointers. You will use the
finalized block to confirm settlement after sending your first transfer.
5. Verify with curl
Any JSON-RPC client can connect:0xf951.
Make your first transfer
Create test accounts, get *USDZ, and send a transfer through your endpoint.