Type Alias Address

Source
pub type Address = H160;
Expand description

A Solidity compatible address type.

§Note

This is a type alias for the H160 type used for addresses in pallet-revive.

Aliased Type§

struct Address(pub [u8; 20]);

Fields§

§0: [u8; 20]

Trait Implementations§

Source§

impl SolDecode for Address

Source§

type SolType = H160

Equivalent Solidity ABI type representation.
Source§

fn from_sol_type(value: Self::SolType) -> Result<Self, Error>

Converts to Self from Self::SolType.
Source§

const SOL_NAME: &'static str = <<Self::SolType as SolTypeDecode>::AlloyType as AlloySolType>::SOL_NAME

Name of equivalent Solidity ABI type.
Source§

fn decode(data: &[u8]) -> Result<Self, Error>

Solidity ABI decode into this type.
Source§

impl SolEncode<'_> for Address

Source§

type SolType = H160

Equivalent Solidity ABI type representation. Read more
Source§

fn to_sol_type(&self) -> Self::SolType

Converts from Self to Self::SolType via either a borrow (if possible), or a possibly expensive conversion otherwise.
Source§

const SOL_NAME: &'static str = <<Self::SolType as SolTypeEncode>::AlloyType as AlloySolType>::SOL_NAME

Name of equivalent Solidity ABI type.
Source§

fn encode(&'a self) -> Vec<u8>

Solidity ABI encode the value.
Source§

fn encode_topic<H>(&'a self, hasher: H) -> [u8; 32]
where H: Fn(&[u8], &mut [u8; 32]),

Solidity ABI encode the value as a topic (i.e. an indexed event parameter).
Source§

impl SolTopicEncode for Address

Source§

fn encode_topic<H>(&self, _: H) -> [u8; 32]
where H: Fn(&[u8], &mut [u8; 32]),

Solidity ABI encode the value as a topic (i.e. an indexed event parameter).
Source§

fn topic_preimage(&self, buffer: &mut Vec<u8>)

Encode this type as input bytes for the hasher, when this type is member of a complex topic type (e.g. a member of array or struct/tuple).
Source§

fn default_topic_preimage(buffer: &mut Vec<u8>)

Self::topic_preimage equivalent for the default value representation of this type.
Source§

fn topic_preimage_size(&self) -> usize

Size in bytes of the Self::topic_preimage encoding of this type.
Source§

fn default_topic_preimage_size() -> usize

Self::topic_preimage_size equivalent for the default value representation of this type.
Source§

impl SolTypeDecode for Address

Source§

type AlloyType = Address

Equivalent Solidity ABI type from [alloy_sol_types].
Source§

fn detokenize( token: <Self::AlloyType as AlloySolType>::Token<'_>, ) -> Result<Self, Error>

Detokenizes this type’s value from the given token.
Source§

fn decode(data: &[u8]) -> Result<Self, Error>

Solidity ABI decode into this type.
Source§

impl SolTypeEncode for Address

Source§

const DEFAULT_VALUE: Self::DefaultType = {transmute(0x0000000000000001): <primitive_types::H160 as sol::types::SolTokenType>::DefaultType}

An encodable representation of the default value for this type.
Source§

type AlloyType = Address

Equivalent Solidity ABI type from [alloy_sol_types].
Source§

fn tokenize(&self) -> Self::TokenType<'_>

Tokenizes the given value into a Self::AlloyType token.
Source§

fn encode(&self) -> Vec<u8>

Solidity ABI encode the value.
Source§

impl AccountIdGuard for Address