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

Truffle target generates types not fully compatible with Truffle v5 because BigNumber library was changed to BN.js #193

Closed
pash7ka opened this issue Nov 27, 2019 · 2 comments

Comments

@pash7ka
Copy link

pash7ka commented Nov 27, 2019

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. This change affects types generated by TypeChain.

This is addressed in a pull-request #184, but as @krzkaczor commented there, a new target should be introduced for that.
I've tried to implement this change: https://github.com/pash7ka/TypeChain/tree/bignumber-to-bn and almost done it, but it required not only cloning target directories, but also renaming packages.
(typechain-target-truffle become typechain-target-truffle-v4, a new one become typechain-target-truffle-v5).

Should i go forward with this change, which will require all current users of typechain-target-truffle to update package name, or it doesn't worth it?
Or maybe just introduce typechain-target-truffle-v5 and leave typechain-target-truffle for v4? (current version of my repository implements this aproach)

@krzkaczor
Copy link
Member

@pash7ka sorry for the late response. Yes I think you can go ahead without changing anything in the already existing target. We can make the final decision after merging your new target.

I don't consider renaming an already existing target to be a big deal since it's not breaking anything for already existing users. They just need to remove old package and add new if they want to keep receiving updates.

@krzkaczor
Copy link
Member

This should be fixed in webv2. Also related to: #211

https://github.com/ethereum-ts/TypeChain/releases/tag/v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants