Module precompile_utils::solidity::codec
source · Expand description
Solidity encoding following the Contract ABI Specification
Re-exports§
pub use bytes::BoundedBytes;
pub use bytes::BoundedString;
pub use bytes::UnboundedBytes;
pub use bytes::UnboundedString;
pub use native::Address;
pub use native::BoundedVec;
pub use self::encode_arguments as encode_return_value;
pub use self::encode_arguments as encode_event_data;
pub use self::decode_arguments as decode_return_value;
pub use self::decode_arguments as decode_event_data;
Modules§
Structs§
- Adapter to parse data as a first type then convert it to another one. Useful for old precompiles in which Solidity arguments where set larger than the needed Rust type.
- Wrapper around an EVM input slice.
- A UTF-8–encoded, growable string.
- Help build an EVM input/output data.
Traits§
- Data that can be encoded/encoded followiong the Solidity ABI Specification.
Functions§
- Decode the value from its Solidity ABI format. If
T
is a tuple every element is decoded without a prefixed offset. It matches the encoding of Solidity function arguments and return value, or event data. - Encode the value into its Solidity ABI format. If
T
is a tuple every element is encoded without a prefixed offset. It matches the encoding of Solidity function arguments and return value, or event data. - Encode the value as the arguments of a Solidity function with given selector. If
T
is a tuple each member represents an argument of the function. - Extracts the selector from the start of the input, or returns
None
if the input is too short.