Trait alloy_dyn_abi::FunctionExt

source ·
pub trait FunctionExt: JsonAbiExt + Sealed {
    // Required methods
    fn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>;
    fn abi_decode_output(
        &self,
        data: &[u8],
        validate: bool
    ) -> Result<Vec<DynSolValue>>;
}
Expand description

Provide ABI encoding and decoding for the Function type.

This trait is sealed and cannot be implemented for types outside of this crate. It is implemented only for Function.

Required Methods§

source

fn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>

ABI-encodes the given values.

Note that, contrary to abi_encode_input, this method does not prefix the return data with the function selector.

§Errors

This function will return an error if the given values do not match the expected input types.

source

fn abi_decode_output( &self, data: &[u8], validate: bool ) -> Result<Vec<DynSolValue>>

ABI-decodes the given data according to this functions’s output types.

This method does not check for any prefixes or selectors.

Implementations on Foreign Types§

source§

impl FunctionExt for Function

source§

fn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>

source§

fn abi_decode_output( &self, data: &[u8], validate: bool ) -> Result<Vec<DynSolValue>>

Implementors§