TypeChain
TypeChain copied to clipboard
Possibility of enabling structs for truffle-v5 target?
Based on this comment (and my own experience using the tool), structs do not get compiled for the truffle-v5 target: https://github.com/ethereum-ts/TypeChain/blob/f63bbe3504bb82eec2d683850998d8547b05f825/packages/target-truffle-v5-test/test/DataTypesView.test.ts#L35
I'm wondering what would need to change to permit struct generation in truffle-v5 and whether it's possible to reenable this feature. Thanks!
Hey @jnaviask
It seems like this comment is outdated. Now tests use solidity: 0.6.4
. AFAIR I had a problem getting structs to work with truffle and hence the comment.
If you have a working code example of Truffle-v5 with structs in JS, you can paste it here and actually fixing it shouldn't be that difficult so I encourage you to give it a try.
Pretty much any contract should work. I was trying to get it working with these Moloch contracts https://github.com/MolochVentures/moloch/tree/master/v1_contracts and it simply omits the struct definitions when I compile to typescript targeting truffle-v5. I can give the fix a shot later today or Monday, hopefully just uncommenting those lines should do the trick.
any updates on this?
Any news?