Crate pint_abi

Crate pint_abi 

Source
Expand description

Encoding, decoding and other helpers for working with the Pint Essential ABI.

Modules§

decode
key
Items related to key construction.
types
Both Pint ABI and Essential protocol types.

Macros§

gen_from_file
Generate all items from an ABI JSON file at the given path.
gen_from_str
Generate all items from a raw ABI JSON string.

Structs§

TooManyWords
Attempted to Decode an instance of a type from a slice containing more Words than necessary.

Enums§

DecodeError
Any error that might occur during a call to decode.
FromPathError
Errors that might occur when loading a ContractABI or Contract from a path.

Traits§

Decode
A trait for decoding types from Essential Words in a manner compatible with Pint’s ABI.
Encode
A trait for encoding types as Essential Words in a manner compatible with Pint’s ABI.
Read
Allows for reading words from a source, largely inspired by std::io::Read.
Write
A trait for writing essential Words into buffers or streams.

Functions§

contract_from_path
Shorthand for loading a Contract from a given JSON file path.
decode
Shorthand for decoding an instance of T from a slice of Essential Words.
encode
Shorthand for encoding the given value into a Vec of Essential Words.
find_predicate
Given a Contract and its associated ContractABI, find and return the predicate with the given name.
from_path
Shorthand for loading the ContractABI from a given ABI JSON file path.