TypeChain icon indicating copy to clipboard operation
TypeChain copied to clipboard

Wrong big number instance type

Open featherbits opened this issue 7 years ago • 7 comments

Generated types references bignumber.js but in reality bn.js is used by ethereum.

featherbits avatar Jan 30 '19 10:01 featherbits

I also propose to change all instances of BigNumber in the generated truffle-contracts to BN for truffle types generation after https://github.com/ethereum-ts/truffle-typings/pull/7 has been merged.

Also, the import { BN } from "bignumber.js" line can then be deleted, as BN is then declared in truffle-typings.

sebastianst avatar Feb 04 '19 12:02 sebastianst

Are you talking about web3-1.0.0 target? which version of web3 do you use exactly?

krzkaczor avatar Feb 08 '19 15:02 krzkaczor

Target was truffle. Not sure exactly any more which version it was.

featherbits avatar Feb 08 '19 16:02 featherbits

For me: node v11.9.0, web3 1.0.0-beta.43, typescript 3.3.1, truffle v5.0.2 and truffle-typings 1.0.6.

sebastianst avatar Feb 08 '19 16:02 sebastianst

Where is this at? Is this now completed because of ethereum-ts/truffle-typings#7? it does declare import BN.

jaredswarts55 avatar Jul 29 '19 13:07 jaredswarts55

It's still not addressed AFAIK. @jaredswarts55 feel free to contribute if you have time.

krzkaczor avatar Jul 29 '19 14:07 krzkaczor

Should be fixed in v2. Releated; https://github.com/ethereum-ts/TypeChain/issues/211

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

krzkaczor avatar May 03 '20 10:05 krzkaczor