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
parameter that embeds EVM address (160 bits, H160)
Bool
(non-strict) parameter that embeds boolean value, stored as single Bytes32 value, encoded as bytes of “true” or “false” string
Bytes
parameter that embeds array of bytes (dynamic size)
Bytes32
parameter that embeds single 256 bits value
Date
(non-strict) parameter that embeds date value, stored as single Bytes32 value, encoded as bytes ISO-8601 string
Int256
parameter that embeds signed 256 bits value (there is no type of I256 in Ethereum primitives)
String
parameter that embeds UTF-8 string (dynamic size)
String32
(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
parameter that embeds unsigned 256 bits value
Implementations§
Source§impl Param
impl Param
Sourcepub fn get_value(&self) -> String
pub fn get_value(&self) -> String
returns value of the parameter as string (for debugging purposes only)
Sourcepub fn get_char(&self) -> char
pub fn get_char(&self) -> char
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 in solidity
Sourcepub fn is_fixed_size(&self) -> bool
pub fn is_fixed_size(&self) -> bool
returns whether the size of the parameter value is fixed