evm-rpc

Call Ethereum and EVM chains from IC canisters via the EVM RPC canister.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/phukrit7171/Relationship-Smart-Contract-ICP --skill evm-rpc-phukrit7171
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evm-rpc
Source: https://github.com/phukrit7171/Relationship-Smart-Contract-ICP/tree/main/.agents/skills/evm-rpc
Command: npx skills add https://github.com/phukrit7171/Relationship-Smart-Contract-ICP --skill evm-rpc-phukrit7171

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires evm_rpc_client, evm_rpc_types, ic-canister-runtime, ic-cdk, candid, serde_json.

What problem does it solve? Internet Computer canisters cannot natively reach Ethereum or other EVM chains, and wiring up individual RPC providers with API keys, consensus handling, and cycle accounting is error-prone. This Skill shows how to use the EVM RPC canister and the evm_rpc_client crate to make consensus-verified JSON-RPC calls from Rust canisters without bridges, oracles, or API keys. ## Core Features & Use Cases - Typed and raw JSON-RPC calls: Query balances, blocks, transaction receipts, and logs using the typed evm_rpc_client API or raw JSON-RPC payloads. - Multi-provider consensus: Fan requests out to providers like Alchemy, Ankr, and PublicNode with configurable threshold consensus to tolerate provider disagreement. - ERC-20 reads and signed transactions: Read token balances via eth_call and broadcast pre-signed transactions with eth_sendRawTransaction. - Use Case: Build a Rust canister that checks a user's ETH balance on mainnet, reads their USDC balance on Arbitrum, and submits a threshold-ECDSA-signed transaction, all through one system canister. ## Quick Start Ask the AI to add an EVM RPC integration to your Rust canister that fetches the latest Ethereum block using the evm_rpc_client crate with threshold consensus.

Frequently Asked Questions about evm-rpc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Ethereum from an Internet Computer canister?

Use the EVM RPC canister, a system canister that proxies JSON-RPC calls to EVM chains via HTTPS outcalls. From Rust, the evm_rpc_client crate provides a typed client that handles cycle attachment, encoding, and multi-provider consensus without API keys.

How many cycles do EVM RPC calls cost?

A practical starting budget is 10 billion cycles per call, with unused cycles refunded. Typical calls cost 100M-1B cycles depending on provider count and response size; use the requestCost method to get an exact estimate before calling.

Which chains does the EVM RPC canister support?

It supports Ethereum Mainnet, Ethereum Sepolia, Arbitrum One, Base Mainnet, and Optimism Mainnet through built-in RpcServices variants. Any other EVM-compatible chain can be reached using the Custom variant with a specified chain ID and provider URL.

Why does my EVM RPC call fail with inconsistent results?

The default Equality consensus requires all providers to return identical responses, which fails for queries like eth_getBlockByNumber(Latest) when providers are on different blocks. Use ConsensusStrategy::Threshold with 2-of-3 agreement and handle both Consistent and Inconsistent result variants.

Can the EVM RPC canister sign and send transactions?

No, the EVM RPC canister only broadcasts transactions and does not sign them. You must sign the transaction yourself using threshold ECDSA via the IC management canister, then pass the raw signed bytes to eth_sendRawTransaction.

Should I deploy my own EVM RPC canister on mainnet?

No, on mainnet use the DFINITY-maintained canister at 7hfb6-caaaa-aaaar-qadga-cai. Deploying your own copy from the pre-built WASM is only needed for local development, since the local replica does not have the canister pre-installed.