decode method

  1. @override
Object decode(
  1. Uint8List encoded
)
override

Decode ABI encoded byte array to dart values from ABI type schemes @param encoded byte array of ABI encoding @throws IllegalArgumentException if encoded byte array cannot match with ABI encoding rules

Implementation

@override
Object decode(Uint8List encoded) {
  if (encoded.length != byteLength()) {
    throw ArgumentError(
        'cannot decode abi address, address byte length should be 32');
  }

  return Address(publicKey: encoded);
}