Expand description
Extensions to the ethabi
API.
Adapted from Gnosis’ ethcontract-rs
.
Re-exports§
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.
- Event
Param - Event param specification.
- Events
- Contract events iterator.
- Function
- Contract function specification.
- Functions
- Contract functions iterator.
- Human
Readable Parser - Invalid
Output Type - 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.
- RawTopic
Filter - Raw topic filter.
- Topic
Filter - Topic filter.
- Tuple
Param - Tuple params specification
Enums§
- AbiError
- ABI codec related errors
- Encode
Packed Error - An error thrown by
encode_packed
. - Error
- Ethabi errors
- JsonAbi
- Represents contract ABI input variants
- Param
Type - Function and event param types.
- Parse
Error - Error that can occur during human readable parsing
- State
Mutability - Whether a function modifies or reads blockchain state
- Token
- Ethereum ABI params.
- Topic
- Acceptable topic possibilities.
Traits§
- AbiArray
Type - 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
- Error
Ext - Extension trait for
ethabi::AbiError
. - Event
Ext - Extension trait for
ethabi::Event
. - Function
Ext - Extension trait for
ethabi::Function
. - Function
Output Decoder - Contract functions generated by ethabi-derive
- LogFilter
- Common filtering functions that are available for any event.
- Parse
Log - trait common to things (events) that have an associated
Log
type that can be parsed from aRawLog
- Tokenizable
- Simplified output type for single value.
- Tokenizable
Item - Marker trait for
Tokenizable
types that are can tokenized to and from aToken::Array
andToken:FixedArray
. - Tokenize
- Convert types into
Token
s.
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