所有链

Avalanche

已上线EVMhttpswss

Avalanche 已在 TheRPC 上通过统一端点 avalanche.therpc.io/<YOUR_KEY> 提供服务。与您现有集成的 JSON-RPC schema 完全相同 — 只需替换 host 即可。

立即试用

通过 TheRPC 文档代理发起实时请求。此演示无需 API 密钥。

curl https://avalanche.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'

网络

网络Chain ID浏览器端点
Mainnet0xa86asnowtrace.ioavalanche.therpc.io
wallet_addEthereumChain
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0xa86a',
chainName: 'Avalanche',
rpcUrls: ['https://avalanche.therpc.io/<YOUR_KEY>'],
nativeCurrency: {
name: 'AVAX',
symbol: 'AVAX',
decimals: 18,
},
blockExplorerUrls: ['https://snowtrace.io'],
}],
});