-
Notifications
You must be signed in to change notification settings - Fork 378
Add truffle v5 target, switch from BigNumber to BN #196
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
Conversation
Truffle (at least version 5.0.x) use `BN` internally, not BigNumber.
Replace BigNumber with BN.js
…get-truffle-v5, because @ character is not allowed in package names.
…get-truffle-v5, because @ character is not allowed in package names.
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.
Isn't truffle@5 using web3@1 under the hood? Does it mean it has the same api? Can we somehow reuse the generated types between packages?
@@ -0,0 +1,21 @@ | |||
# Typechain target Truffle |
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.
can u add here Truffle@5
or something?
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.
done
Yes, they use web3@1 under the hood, but they've created their own wrappers around it. |
@pash7ka oh, makes sense. I will finish CR today 👍 |
Merged to tmp branch for now - it needs a little bit more work. Thanks for this @pash7ka @MicahZoltu ! 🎉 |
As mentioned in issue #193 and pull requst #184, with v5.0.0 truffle moved from Web3.js v0.x to v1.x. One of major change in it: use of BN.js instead of bignumber.js.
With this pull request i've introduced
typechain-target-truffle-v5
based on @MicahZoltu pr #184.