In web3.js version 0.x:
The web3 module automatically determines the use of call
or sendTransaction
based on the method type.
So for example, instead of doing:
myContractInstance.myMethod.call(...)
You can do:
myContractInstance.myMethod(...)
In web3.js version 1.0, this no longer seems possible.
For the example above, you need to do:
myContractInstance.methods.myMethod.call(...)
So every function call becomes "lengthier", and in addition, the code which I have already written is not easily portable.
Is there any available wrapper for web3.js version 1.0, which allows using the same syntax as in web3.js version 0.x?
The relevant documentation for web3 v0.x is here.
The relevant documentation for web3 v1.0 is here.
Thank you!