所有链

Optimism

已上线EVMhttpswss

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

立即试用

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

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

网络

网络Chain ID浏览器端点
Mainnet0xaoptimistic.etherscan.iooptimism.therpc.io
wallet_addEthereumChain
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0xa',
chainName: 'Optimism',
rpcUrls: ['https://optimism.therpc.io/<YOUR_KEY>'],
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18,
},
blockExplorerUrls: ['https://optimistic.etherscan.io'],
}],
});