Skip to main content

Crate ethexe_ethereum

Crate ethexe_ethereum 

Source
Expand description

§ethexe-ethereum

Ethereum contract-interaction layer for the ethexe system: typed Rust wrappers around the ethexe Solidity contracts (Router, Mirror, WrappedVara, Middleware), built on the alloy client stack.

Consumed by ethexe-observer, ethexe-consensus, ethexe-cli, ethexe-service, and ethexe-sdk; depends on ethexe-common, gsigner, and gprimitives. This is purely a client/binding layer: it does not execute Gear programs (ethexe-processor), watch the chain (ethexe-observer), implement consensus (ethexe-consensus), or persist data (ethexe-db).

§Usage

Build a client with EthereumBuilder, then call methods on the returned Ethereum:

use ethexe_ethereum::{Ethereum, EthereumBuilder};

let ethereum = EthereumBuilder::default()
    .router_address(Ethereum::DEFAULT_ROUTER_ADDRESS.into())
    .signer(signer)
    .sender_address(sender)
    .build()
    .await?;

let router = ethereum.router(); // Router.sol write handle
let mirror = ethereum.mirror(Default::default()); // per-program Mirror.sol handle
mirror.send_message(vec![], 0).await?;

§Public API

Each contract handle also vends a read-only query counterpart (RouterQuery, MirrorQuery, WVaraQuery, MiddlewareQuery); Router, Mirror, and WVara additionally vend event-filter builders.

§Invariants

Modules§

abi
deploy
middleware
mirror
primitives
router
wvara

Structs§

Ethereum
EthereumBuilder

Traits§

IntoBlockId
A helping trait for converting various types into alloy::eips::BlockId.
TryGetReceipt

Type Aliases§

AlloyProvider