Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Suggestion: make truffle-contract more strict when interacting with its methods #1455
Let's say we have a contract instance
What is the recommended way to interact with the contract? According to the docs, the latter seems to be the newest api of web3 1.0.0. If that's so, why can we still do the former? Backwards compatibility?
It's confusing because there are many examples on StackExchange and on many other websites showing a ton of different ways to achieve the same thing. More often than not, standardisation is a good thing.
After doing more investigation, I now understand that truffle-contract was developed in the first place to have a promise-based version of the old callback-based Contract class found in the 0.20.6 version of the web3 library.
As web3 ^1.0.0 implemented Promises and PromiEvents, wouldn't it make sense to nuke out truffle-contract? At least for me, the process of upgrading to truffle ^5.0.0 has been highly problematic specifically because of this inconsistency.
Practically speaking, I posit that there would be much less confusion if Truffle injects
referenced this issue
Dec 8, 2018
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem.