LocalContractFunctionWithValuesAndOutputs.decode constructor

LocalContractFunctionWithValuesAndOutputs.decode({
  1. required LocalContractFunctionWithValues function,
  2. required Uint8List data,
})

Implementation

factory LocalContractFunctionWithValuesAndOutputs.decode({
  required LocalContractFunctionWithValues function,
  required Uint8List data,
}) {
  final decodedOutputs = decodeDataField(
    data: data,
    params: function.outputTypes,
  );

  return LocalContractFunctionWithValuesAndOutputs(
    name: function.name,
    parameters: function.parameters,
    outputs: decodedOutputs,
    stateMutability: function.stateMutability,
  );
}