-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: move from BigNumber to BigInt #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment
// This is to align the bits to the total bytes | ||
// See https://github.com/FuelLabs/fuel-specs/blob/master/specs/protocol/abi.md#unsigned-integers | ||
length: number; | ||
baseType: string; | ||
baseType: TType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename it to BaseType
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@AlicanC Should we add this to the typedoc list? |
Yeah, nice catch. |
This PR:
@fuel-ts/math
which has some utilities for working with bigints. This is a copy from Ethers v6 and we can move to their package when that's out of beta.@ethersproject/bignumber
and uses native bigints instead.Notes:
transactions
package, instead of changing all BigNumbers to BigInts, I changed the ones lte u32 to justnumber
. They are mostly lengths and indexes and those are natively represtented as numbers and not bigints in JS so this makes our APIs more convenient.