decodeFunction method

List<Object> decodeFunction(
  1. Uint8List encoded
)

Implementation

List<Object> decodeFunction(Uint8List encoded) {
  final signature = FunctionEntry.extractSignature(encoded);
  try {
    final f = entries.firstWhere((entry) =>
        entry.type == AbiEntryType.function &&
        entry.encodeSignature().hex == signature.hex);
    return f.decode(encoded);
  } on StateError {
    throw Exception('Function does not exist');
  }
}