Function fuels_core::code_gen::functions_gen::expand_function
source · pub fn expand_function(
function: &ABIFunction,
types: &HashMap<usize, TypeDeclaration>
) -> Result<TokenStream, Error>
Expand description
Functions used by the Abigen to expand functions defined in an ABI spec.
Transforms a function defined in ABIFunction
into a TokenStream
that represents that same function signature as a Rust-native function
declaration.
The actual logic inside the function is the function method_hash
under
Contract
, which is responsible for encoding
the function selector and the function parameters that will be used
in the actual contract call.