Crates.io | evm-rpc-canister-types |
lib.rs | evm-rpc-canister-types |
version | |
source | src |
created_at | 2024-06-21 13:57:15.942736 |
updated_at | 2025-01-23 15:49:01.267503 |
description | Types for interacting with the EVM RPC canister. |
homepage | https://github.com/letmejustputthishere/chain-fusion-starter |
repository | https://github.com/letmejustputthishere/chain-fusion-starter |
max_upload_size | |
id | 1279570 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
didc
to generate the rust bindings from the evm rpc canister did filedidc bind --target rs evm_rpc.did > interface.rs
call_with_payment128
to functions that expect cyclesDebug
and Clone
trait for types for convenience7hfb6-caaaa-aaaar-qadga-cai
)
"evm_rpc": {
"type": "custom",
"candid": "https://github.com/internet-computer-protocol/evm-rpc-canister/releases/latest/download/evm_rpc.did",
"wasm": "https://github.com/internet-computer-protocol/evm-rpc-canister/releases/latest/download/evm_rpc.wasm.gz",
"remote": {
"id": {
"ic": "7hfb6-caaaa-aaaar-qadga-cai"
}
},
"specified_id": "7hfb6-caaaa-aaaar-qadga-cai",
"init_arg": "(record { logFilter = opt variant { HideAll }})"
}
EvmRpcCanister
struct to initiate the canister with your own canister id
pub const CANISTER_ID: Principal =
Principal::from_slice(b"\x00\x00\x00\x00\x02\x30\x00\xCC\x01\x01"); // 7hfb6-caaaa-aaaar-qadga-cai
pub const EVM_RPC: EvmRpcCanister = EvmRpcCanister(CANISTER_ID);
[dependencies]
evm_rpc_canister_types = 0.1
use evm_rpc_canister_types::{
BlockTag, GetBlockByNumberResult, GetLogsArgs, GetLogsResult, HttpOutcallError,
MultiGetBlockByNumberResult, MultiGetLogsResult, RejectionCode, RpcError, EVM_RPC,
};
EVM_RPC
struct exposes the EVM RPC canisters interface and is used to make inter canister calls to it
let (result,) = EVM_RPC
.eth_get_block_by_number(rpc_providers, None, block_tag, cycles)
.await
.expect("Call failed");