Closed rvanasa closed 4 weeks ago
@rvanasa @THLO I started to look into a bit more details as to what this would entail and came up with the following rough plan (please feel free to comment/challenge any point or suggest alternative)
Usage of cketh_common
in production code as of 04505cce853362ff1b8ea4954028333f54394419
use cketh_common::eth_rpc_client::providers::RpcApi;
hereuse cketh_common::{ eth_rpc::{ into_nat, Block, FeeHistory, GetLogsParam, Hash, LogEntry, ProviderError, RpcError, SendRawTransactionResult, ValidationError, }, eth_rpc_client::{ providers::{RpcApi, RpcService}, requests::GetTransactionCountParams, EthRpcClient as CkEthRpcClient, MultiCallError, RpcConfig, RpcTransport, }, lifecycle::EthereumNetwork }
hereuse cketh_common::eth_rpc_client::providers::{EthMainnetService, EthSepoliaService, L2MainnetService}
; hereuse cketh_common::eth_rpc::{HttpOutcallError, ProviderError, RpcError, ValidationError};
hereuse cketh_common::{ eth_rpc::{Block, FeeHistory, LogEntry, RpcError}, eth_rpc_client::{providers::RpcService, RpcConfig}, logs::INFO};
hereuse cketh_common::logs::{Log, Priority, Sort};
hereuse cketh_common::{ eth_rpc::ProviderError, eth_rpc_client::providers::{ EthMainnetService, EthSepoliaService, L2MainnetService, RpcApi, RpcService, }, logs::INFO};
hereuse cketh_common::{ ::eth_rpc::RpcError, eth_rpc_client::providers::{ EthMainnetService, EthSepoliaService, L2MainnetService, RpcApi, RpcService, } };
hereuse cketh_common::{ address::Address, eth_rpc::Hash, eth_rpc::{into_nat, FixedSizeData, ValidationError}, numeric::BlockNumber };
herecketh_common::eth_rpc::BlockSpec
herecketh_common::eth_rpc::GetLogsParam
herecketh_common::eth_rpc::LogEntry
herecketh_common::eth_rpc_client::responses::TransactionReceipt
herecketh_common::eth_rpc::FeeHistoryParams
herecketh_common::eth_rpc_client::requests::GetTransactionCountParams
hereuse cketh_common::eth_rpc::ValidationError;
herecketh_common
is the usage of EthRpcClient
, which contains all the logic for HTTPs outcalls (the EVM-RPC canisters method doing HTTPs outcalls, e.g., eth_fee_history
, delegate to EthRpcClient
).EthRpcClient
cketh_common
(e.g., FeeHistory
, LogEntry
, but not EthRpcClient
), into this repository. As part of this effort I think it would be useful
CheckedAmountOf
(independent of the EVM-RPC canister) since this is also used by the ckETH minter (alternatively, integrate it into the phantom_newtype
crate).EthRpcClient
.cketh_common
The current EVM RPC implementation reuses logic from a fork of the ckETH minter canister codebase. Removing this dependency would speed up development and improve testability of the canister.