legacyEip712Encode method
Legacy EIP-712 encoding for numeric values (BigInt).
Optionally keeps the size unchanged based on the keepSize
parameter.
Implementation
@override
EncoderResult legacyEip712Encode(
AbiParameter params, BigInt input, bool keepSize) {
_ABIValidator.isValidNumber(params.type, input);
final size = _ABIUtils.numericSize(params.type) ?? 32;
return EncoderResult(
isDynamic: false,
encoded: BigintUtils.toBytes(input.toUnsigned(size * 8),
length: keepSize ? 32 : size),
name: params.name);
}