encode method

  1. @override
Uint8List encode(
  1. Object value
)
override

Implementation

@override
Uint8List encode(Object value) {
  if (value is String) {
    final address = Address.parse(value);
    return leftPadBytes(address.bytes, SolidityType.int32Size);
  }
  if (value is Address) {
    return leftPadBytes(value.bytes, SolidityType.int32Size);
  }
  throw Exception(
    'Invalid value for type "$this": $value (${value.runtimeType})',
  );
}