-
Notifications
You must be signed in to change notification settings - Fork 5k
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
methods.call() returns anonymousFunction()
recursively
#2411
Comments
Hey, This happens because I'm checking if this is a state changing method or not and will return the correct method then (call/send). |
I am noticing behavior on call() that seems to be related, and I'm working on creating an issue. If I use the call() method repeatedly in sequence such as in a for loop, the call doesn't execute, or it seems to lock up my node tests. Doesn't help if I use a call's callback argument, or use await on a call method, I get same results. |
@nivida I use call on state changing methods when I want to get the expected response before executing it. A dry run of a state changing method. |
@klivin that's exactly the issue is about. Dry-run of state changing methods |
For version 1.0.0.48 I am getting an...
contract.methods.setAllowance(address, qty).call({from: address})
.then(result => {
}); The method is a state call with logic - I want to check that no requires are firing prior to a user submitting a send request. Alternatively utilising the callback functionality results in the callback never returning. e.g. contract.methods.setAllowance(address, qty).call({from: address}, (error, result) => {
// never executed
console.log("RESULT", result);
console.log("ERR", error);
}); |
This is a very important use case for us as well. This is the result of a change in one of the recent versions, right @nivida ? In 1.0.0-beta.37 this used to work. Is there a plan for adding back this functionality? |
Steps before creating an issue:
call()
first to see what will be returning and only then make asend()
For some reason it doesn't execute and it always returns:
the funny thing if I call the
result
it will always return same thing, so even if I callresult()()()()()
- the outcome is alwaysfunction anonymousFunction()
-->
Versions
"web3": "^1.0.0-beta.46",
Workaround
encodeABI()
web3.eth.call
The text was updated successfully, but these errors were encountered: