Skip to main content

Module evm

Module evm 

Source
Expand description

HyperEVM and the Arbitrum side of the bridge: typed JSON-RPC, ABI, RLP, EIP-1559 transactions, HyperCore’s read precompiles and CoreWriter actions. Sans-IO; quantities are exact integers (U256) and amounts convert to crate::utils::Dec. Chain ids come from crate::client::Network.

Re-exports§

pub use abi::AbiError;
pub use abi::Function;
pub use abi::Kind;
pub use abi::Param;
pub use abi::Token;
pub use corewriter::Action;
pub use corewriter::BadAction;
pub use corewriter::CORE_WRITER;
pub use corewriter::RawAction;
pub use precompiles::Read;
pub use precompiles::ReadError;
pub use records::Block;
pub use records::BlockTransactions;
pub use records::FeeHistory;
pub use records::Log;
pub use records::Receipt;
pub use records::Transaction;
pub use rpc::BlockTag;
pub use rpc::CallRequest;
pub use rpc::ErrorKind;
pub use rpc::LogFilter;
pub use rpc::NodeError;
pub use rpc::Query;
pub use rpc::Revert;
pub use rpc::Rpc;
pub use rpc::RpcError;
pub use rpc::eth;
pub use tx::AccessItem;
pub use tx::Call;
pub use tx::Eip1559;
pub use tx::Fees;
pub use tx::create_address;
pub use tx::tx_hash;
pub use u256::B256;
pub use u256::BadAmount;
pub use u256::BadQuantity;
pub use u256::NATIVE_DECIMALS;
pub use u256::U256;

Modules§

abi
Solidity’s ABI encoding: integers to 256 bits, addresses, booleans, bytesN, bytes, strings, arrays and nested tuples. Types are read from their human-readable form, and every value and word is checked against its type.
corewriter
CoreWriter, the write path from HyperEVM to HyperCore: a system contract at 0x3333...3333 (CoreWriter.sol in the docs):
precompiles
HyperCore’s read precompiles: HyperCore state read from HyperEVM by an eth_call to 0x...0800 through 0x...0814, as L1Read.sol in Hyperliquid’s docs declares them.
records
Receipts, transactions, blocks, logs and fee history as JSON-RPC answers them. Quantities are exact integers; a block’s gas used ratio, the one float a node writes, is kept as the digits it wrote.
rlp
Recursive length prefix, the encoding a transaction is hashed and sent in, and the one a CREATE address is derived from. Only encoding: nothing here reads one back.
rpc
Typed Ethereum JSON-RPC: each method is a Query that writes its request body and reads its answer, and Rpc sends one over an Http to HyperEVM (Network::evm_rpc_url) or any Arbitrum node.
tx
EIP-1559 transactions, type 2, for HyperEVM and for Arbitrum: a call, or a contract creation when there is no to.
u256
Exact 256-bit integers, the EVM’s word: balances and fees in wei, gas prices, ABI integers, and the native coin’s 18 decimals. JSON-RPC writes them as quantities, 0x and hex digits without leading zeros. Nothing here passes through a float.