public override byte[] Encode(object arg, bool packed) { if (arg is BigRational input) { if (_denominator != input.Denominator) { throw new AbiException(AbiEncodingExceptionMessage); } return(Int256.Encode(input.Numerator, packed)); } throw new AbiException(AbiEncodingExceptionMessage); }