Trait MulticallItem

Source
pub trait MulticallItem {
    type Decoder: SolCall;

    // Required methods
    fn value(&self) -> U256;
    fn target(&self) -> Address;
    fn input(&self) -> Bytes;

    // Provided method
    fn into_call(self, allow_failure: bool) -> CallItem<Self::Decoder>
       where Self: Sized { ... }
}
Expand description

A trait that is to be implemented by a type that can be distilled to a singular contract call item.

Required Associated Types§

Source

type Decoder: SolCall

Decoder for the return data of the call.

Required Methods§

Source

fn value(&self) -> U256

Returns the value to send with the call.

Source

fn target(&self) -> Address

The target address of the call.

Source

fn input(&self) -> Bytes

ABI-encoded input data for the call.

Provided Methods§

Source

fn into_call(self, allow_failure: bool) -> CallItem<Self::Decoder>
where Self: Sized,

Converts self to a CallItem while specifying whether it can fail.

Implementors§