Hi, I'm getting this error when I want to estimateGas for a transaction:

{ code: 13, message: 'execution simulation failed: status = 106' }

Anybody knows what it can be?

Dec 21, 2021, 1:11 AM
According to https://github.com/iotexproject/iotex-core/blob/master/api/api.go , my guess (I'm not familiar with Go), is that on line 1555, there is no revert message. The only cases I'm familiar with, where there is no revert message, is on the new compilers that have built-in "safe math". They don't return a revert message when there is overflow/underflow/div-by-zero/etc. This is why I started using unchecked { MY_CODE } and do my own checking and revert with specific messages. It's more time consuming initially and you need to really know what you're doing when it comes to integer arithmetic, but I feel it saves time and headaches in the long run.
Dec 21, 2021, 2:38 AM
Yea means your tx failed
It won’t be able to be successfully executed it will revert
Dec 21, 2021, 3:48 AM
Do you have an example of a transaction calling a method of a smart contract using web3js?
Dec 21, 2021, 4:12 AM
unfortuantely no, i dont use web3.js. But they should be easy enough to find on google. Note that this sort of issue tends to be a problem with the smart contract you're calling, not your use of the library thats calling it
Dec 21, 2021, 5:59 AM
awesome, thanks
Dec 21, 2021, 6:02 AM
Sure thing, good luck!
Dec 21, 2021, 6:02 AM
Thanks. How did you know I was using IoTeX?
Dec 21, 2021, 8:10 AM
It was the only google search matching what I considered an odd phrase: "execution simulation failed" I had never seen it before.
Dec 21, 2021, 10:02 AM
πŸ‘ŒπŸ‘ŒπŸ‘Œ
Dec 21, 2021, 12:52 PM

Β© 2024 Draquery.com All rights reserved.