Module abi

Source
Expand description

Extensions to the ethabi API.

Adapted from Gnosis’ ethcontract-rs.

Re-exports§

pub use struct_def::SolStruct;
pub use ethabi;

Modules§

ethereum_types
param_type
Function and event param types.
struct_def
Solidity struct definition parsing support
token
ABI param and parsing for it.

Structs§

Abi
API building calls to contracts ABI.
AbiObject
Contract ABI and optional bytecode as JSON object
AbiParser
A parser that turns a “human readable abi” into a Abi
Component
Either an input/output or a nested component of an input/output
Constructor
Contract constructor specification.
Contract
API building calls to contracts ABI.
Event
Contract event.
EventParam
Event param specification.
Events
Contract events iterator.
Function
Contract function specification.
Functions
Contract functions iterator.
HumanReadableParser
InvalidOutputType
Item
Log
Decoded log.
LogParam
Decoded log param.
Param
Function param.
RawAbi
Contract ABI as a list of items where each item can be a function, constructor or event
RawLog
Ethereum log.
RawTopicFilter
Raw topic filter.
TopicFilter
Topic filter.
TupleParam
Tuple params specification

Enums§

AbiError
ABI codec related errors
EncodePackedError
An error thrown by encode_packed.
Error
Ethabi errors
JsonAbi
Represents contract ABI input variants
ParamType
Function and event param types.
ParseError
Error that can occur during human readable parsing
StateMutability
Whether a function modifies or reads blockchain state
Token
Ethereum ABI params.
Topic
Acceptable topic possibilities.

Traits§

AbiArrayType
Additional trait for types that can appear in arrays
AbiDecode
Trait for ABI decoding
AbiEncode
Trait for ABI encoding
AbiType
A trait for types that can be represented in the Ethereum ABI.
Detokenize
Output type possible to deserialize from Contract ABI
ErrorExt
Extension trait for ethabi::AbiError.
EventExt
Extension trait for ethabi::Event.
FunctionExt
Extension trait for ethabi::Function.
FunctionOutputDecoder
Contract functions generated by ethabi-derive
LogFilter
Common filtering functions that are available for any event.
ParseLog
trait common to things (events) that have an associated Log type that can be parsed from a RawLog
Tokenizable
Simplified output type for single value.
TokenizableItem
Marker trait for Tokenizable types that are can tokenized to and from a Token::Array and Token:FixedArray.
Tokenize
Convert types into Tokens.

Functions§

decode
Decodes ABI compliant vector of bytes into vector of tokens described by types param. Returns ok, even if some data left to decode
decode_whole
Decodes ABI compliant vector of bytes into vector of tokens described by types param. Fails, if some data left to decode
encode
Encodes vector of tokens into ABI compliant vector of bytes.
encode_packed
Encodes the given tokens into an ABI compliant vector of bytes.
long_signature
Returns the full Keccak-256 hash of the signature of the given params
minimum_size
Returns the minimum number of bytes that ty takes up in the ABI.
parse_abi
Parses a “human readable abi” string vector
parse_abi_str
Parses a “human readable abi” string
short_signature
Returns the first four bytes of the Keccak-256 hash of the signature of the given params

Type Aliases§

Address
ABI address.
Bytes
ABI bytes.
FixedBytes
ABI fixed bytes.
Hash
Commonly used FixedBytes of size 32
Int
ABI signed integer.
Result
Ethabi result type
Uint
ABI unsigned integer.
Word
ABI word.