Skip to content
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

migrate BigNumber to BigInt #18

Open
ahmedali8 opened this issue Jul 5, 2023 · 4 comments
Open

migrate BigNumber to BigInt #18

ahmedali8 opened this issue Jul 5, 2023 · 4 comments
Labels
effort: high Large or difficult task. priority: 2 We will do our best to deal with this. type: refactor Change that neither fixes a bug nor adds a feature. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.

Comments

@ahmedali8
Copy link

Hi @PaulRBerg, would like to open a PR for this, if you think it's a good idea to migrate as ethers now use bigint in v6.

@PaulRBerg
Copy link
Owner

Yeah, go for it, thanks very much!

@ahmedali8
Copy link
Author

I think there are two possible ways, correct me if I'm wrong please.

  1. we use such technique for toBn and fromBn:

return parseFixed(xs, decimals).toBigInt()

return parseFixed(xs, decimals);

  1. we rewrite the implementation of parseFixed for bigint

https://github.com/ethers-io/ethers.js/blob/ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b/packages/bignumber/src.ts/fixednumber.ts#L70

What do you suggest?

@PaulRBerg
Copy link
Owner

@ahmedali8 I'm unfortunately tied up with my work at Sablier V2 and not able to provide implementation feedback at the moment

@ahmedali8
Copy link
Author

No worries @PaulRBerg, do let me know whenever you get time. I'll use a workaround for my task as of now. Thanks!

@PaulRBerg PaulRBerg added work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect. effort: high Large or difficult task. priority: 2 We will do our best to deal with this. type: refactor Change that neither fixes a bug nor adds a feature. and removed feature labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: high Large or difficult task. priority: 2 We will do our best to deal with this. type: refactor Change that neither fixes a bug nor adds a feature. work: complex Probe-sense-respond. The relationship between cause and effect can only be perceived in retrospect.
Projects
None yet
Development

No branches or pull requests

2 participants