ExternalContractFunctionWithValuesAndOutputs.decode constructor

ExternalContractFunctionWithValuesAndOutputs.decode({
  1. required ExternalContractFunctionWithValues function,
  2. required List<FunctionParam> outputs,
  3. required Uint8List data,
  4. StateMutability? stateMutability,
})

Implementation

factory ExternalContractFunctionWithValuesAndOutputs.decode({
  required ExternalContractFunctionWithValues function,
  required List<FunctionParam> outputs,
  required Uint8List data,
  StateMutability? stateMutability,
}) {
  final decodedOutputs = decodeDataField(
    data: data,
    params: outputs,
  );

  return ExternalContractFunctionWithValuesAndOutputs._(
    name: function.name,
    parameters: function.parameters,
    outputs: decodedOutputs,
    outputTypes: outputs,
    stateMutability: stateMutability,
  );
}