Enum ethers::abi::token::Token[]

pub enum Token {
    Address(H160),
    FixedBytes(Vec<u8, Global>),
    Bytes(Vec<u8, Global>),
    Int(U256),
    Uint(U256),
    Bool(bool),
    String(String),
    FixedArray(Vec<Token, Global>),
    Array(Vec<Token, Global>),
    Tuple(Vec<Token, Global>),
}
Expand description

Ethereum ABI params.

Variants

Address(H160)

Tuple Fields

0: H160

Address.

solidity name: address Encoded to left padded [0u8; 32].

FixedBytes(Vec<u8, Global>)

Tuple Fields

0: Vec<u8, Global>

Vector of bytes with known size.

solidity name eg.: bytes8, bytes32, bytes64, bytes1024 Encoded to right padded [0u8; ((N + 31) / 32) * 32].

Bytes(Vec<u8, Global>)

Tuple Fields

0: Vec<u8, Global>

Vector of bytes of unknown size.

solidity name: bytes Encoded in two parts. Init part: offset of ’closing part`. Closing part: encoded length followed by encoded right padded bytes.

Int(U256)

Tuple Fields

0: U256

Signed integer.

solidity name: int

Uint(U256)

Tuple Fields

0: U256

Unisnged integer.

solidity name: uint

Bool(bool)

Tuple Fields

0: bool

Boolean value.

solidity name: bool Encoded as left padded [0u8; 32], where last bit represents boolean value.

String(String)

Tuple Fields

0: String

String.

solidity name: string Encoded in the same way as bytes. Must be utf8 compliant.

FixedArray(Vec<Token, Global>)

Tuple Fields

Array with known size.

solidity name eg.: int[3], bool[3], address[][8] Encoding of array is equal to encoding of consecutive elements of array.

Array(Vec<Token, Global>)

Tuple Fields

Array of params with unknown size.

solidity name eg. int[], bool[], address[5][]

Tuple(Vec<Token, Global>)

Tuple Fields

Tuple of params of variable types.

solidity name: tuple

Implementations

Check whether the type of the token matches the given parameter type.

Numeric types (Int and Uint) type check if the size of the token type is of greater or equal size than the provided parameter type.

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Converts token to…

Check if all the types of the tokens match the given parameter types.

Check if the token is a dynamic type resulting in prefixed encoding

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts a Token into expected type.

Converts a specified type back into token.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Creates a new instance from parsed ABI tokens.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

Convert to list of tokens

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more