-
Notifications
You must be signed in to change notification settings - Fork 27
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
Not having call
for transaction method is a mistake.
#57
Comments
I can look into this for next patch release. In the meantime, the call method should be present on the object, even if not exposed through the TypeScript interface. Underlying it's a Tx object: So with appropriate casting you should be able to use it without tonnes of hackery. |
@xf00f Thank you for the feedback.
Is this what you meant? I'm not sure - as if the underlying implementation changes, this would still compile and fail only at runtime... |
Would it be a good idea to change the references to
The references to
|
The fact that a
contract.methods.aTransactionMethod(args...).send()
is available but not acontract.methods.aTransactionMethod(args...).call()
is a big problem for us, as it is very common practice to run acall
"blank" before performing a realsend
transaction.The reason behind this sort of choice is that
revert
messages cannot be read when they occur on asend
- they can only be read when usingcall
using direct bytecode ABI encoding.An example of what this led us to do:
We have to call it like this:
This is really cumbersome - it would be great to have access to
call
even on transaction methods exactly like web3 and truffle do - allowing for shooting "blanks".Please expose the option to
call
methods of contracts that are transactions.The text was updated successfully, but these errors were encountered: