pub struct Contract { /* private fields */ }Expand description
Bound contract for making eth_call.
PHASE C BLOCKER: call() and try_call() are stubs returning fake values. They need graph-node’s EthereumAdapter (or the HostFn interface) to make real eth_call RPC requests. This requires:
- Access to the chain adapter via HostFn[] passed through MappingContext
- The block pointer for the call context
- ABI encoding/decoding of function args and return values
Until Phase C wiring, any handler using Contract.call/try_call will get wrong results. The transpiler’s call-graph analysis already marks these handlers as unsupported (WASM fallback), so stubs are never hit in practice.
Tests for contract calls are also blocked on Phase C — they require a running Ethereum node or mock adapter.
Implementations§
Source§impl Contract
impl Contract
pub fn bind(contract_type: &str, address: &Address) -> Self
Sourcepub fn call(&self, _method: &str, _args: &[DecodedParam]) -> DecodedParam
pub fn call(&self, _method: &str, _args: &[DecodedParam]) -> DecodedParam
STUB: Always returns zero. Phase C will wire to EthereumAdapter via HostFn.
Sourcepub fn try_call(&self, _method: &str, _args: &[DecodedParam]) -> CallResult
pub fn try_call(&self, _method: &str, _args: &[DecodedParam]) -> CallResult
STUB: Always returns reverted. Phase C will wire to EthereumAdapter via HostFn.
Auto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnsafeUnpin for Contract
impl UnwindSafe for Contract
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more