pub enum Param {
    Address {
        name: String,
        value: H160,
    },
    Bool {
        name: String,
        value: bool,
    },
    Bytes {
        name: String,
        value: Vec<u8>,
    },
    Bytes32 {
        name: String,
        value: U256,
    },
    Date {
        name: String,
        year: i32,
        month: u32,
        day: u32,
    },
    Int256 {
        name: String,
        value: U256,
        sign: i32,
    },
    String {
        name: String,
        value: String,
    },
    String32 {
        name: String,
        value: String,
    },
    Uint256 {
        name: String,
        value: U256,
    },
}
Expand description

Atomic parameter in the Airnode ABI

Variants

Address

Fields

name: String
value: H160

parameter that embeds EVM address (160 bits, H160)

Bool

Fields

name: String
value: bool

(non-strict) parameter that embeds boolean value, stored as single Bytes32 value, encoded as bytes of “true” or “false” string

Bytes

Fields

name: String
value: Vec<u8>

parameter that embeds array of bytes (dynamic size)

Bytes32

Fields

name: String
value: U256

parameter that embeds single 256 bits value

Date

Fields

name: String
year: i32
month: u32
day: u32

(non-strict) parameter that embeds date value, stored as single Bytes32 value, encoded as bytes ISO-8601 string

Int256

Fields

name: String
value: U256
sign: i32

parameter that embeds signed 256 bits value (there is no type of I256 in Ethereum primitives)

String

Fields

name: String
value: String

parameter that embeds UTF-8 string (dynamic size)

String32

Fields

name: String
value: String

(non-strict) parameter that embeds string as single Bytes32 value. The length of the string should not exceed 32 bytes it will be decoded correctly if this is non-empty valid Utf-8 string

Uint256

Fields

name: String
value: U256

parameter that embeds unsigned 256 bits value

Implementations

returns name of the parameter

returns value of the parameter as string (for debugging purposes only)

returns character of the parameter for encoding

  • Upper case letters refer to dynamically sized types
  • Lower case letters refer to statically sized types
  • String32 is encoded into Bytes32

returns whether the size of the parameter value is fixed

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

Deserialize this value from the given Serde deserializer. 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 !=.

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

Performs the conversion.

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

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.