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