Adds a jsonBigIntMember decorator for use with bigints and TypedJSON
ABIEncoding didn't have to be touched, since we never relied on the AbiEncodable implementation of BigInteger and manually passed them as ["uint256", ourBigInteger] or ["uint64", ourBigInteger]. Every ourBigInteger is now of type bigint, which can be natively encoded by ethers.utils.defaultAbiCoder. We previously casted our BigInteger like this:
The encoding of BigNumber and bigint by ethers.utils.defaultAbiCoder are equivalent, so that is the reason why we only needed to change the bigint encoding for JSON.
bigint
wrapper typeBigInteger
.jsonBigIntMember
decorator for use withbigint
s andTypedJSON
AbiEncodable
implementation ofBigInteger
and manually passed them as["uint256", ourBigInteger]
or["uint64", ourBigInteger]
. EveryourBigInteger
is now of typebigint
, which can be natively encoded byethers.utils.defaultAbiCoder
. We previously casted ourBigInteger
like this:The encoding of
BigNumber
andbigint
byethers.utils.defaultAbiCoder
are equivalent, so that is the reason why we only needed to change thebigint
encoding for JSON.