Enum ethabi::Token [] [src]

pub enum Token {
    Address(Address),
    FixedBytes(FixedBytes),
    Bytes(Bytes),
    Int(Hash),
    Uint(Hash),
    Bool(bool),
    String(String),
    FixedArray(Vec<Token>),
    Array(Vec<Token>),
}

Ethereum ABI params.

Variants

Address.

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

Vector of bytes with known size.

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

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.

Signed integer.

solidity name: int

Unisnged integer.

solidity name: uint

Boolean value.

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

String.

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

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 of params with unknown size.

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

Methods

impl Token
[src]

[src]

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.

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

Converts token to...

[src]

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

Trait Implementations

impl Debug for Token
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Token
[src]

[src]

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

[src]

This method tests for !=.

impl Clone for Token
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for Token
[src]

[src]

Formats the value using the given formatter. Read more