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
Required Methods§
Sourcefn abi_encode_output(&self, values: &[DynSolValue]) -> Result<Vec<u8>>
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.
Sourcefn abi_decode_output(
&self,
data: &[u8],
validate: bool,
) -> Result<Vec<DynSolValue>>
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.