legacyEip712Encode method
Legacy EIP-712 encoding for boolean values.
Optionally keeps the size unchanged based on the keepSize
parameter.
Implementation
@override
EncoderResult legacyEip712Encode(
AbiParameter params, bool input, bool keepSize) {
if (keepSize) {
return abiEncode(params, input);
}
final bytes = List<int>.filled(1, 0);
bytes[0] = input ? 1 : 0;
return EncoderResult(isDynamic: false, encoded: bytes, name: params.name);
}