Minting, Staking (and many other write precompile methods) underestimate MaxGas and fail Out-of-gas using web3 libs: MMask, Blockscout or Remix... #726
Labels
bug
Something isn't working
Grooming Needed
Extra attention is needed
High Priority
Proposed to focus on this when other tasks are present
The Gas Estimation of ALL web3 libraries is insufficient for most calls to the EVM, either to the precompiles directly, or to contracts that use the precompiles.
To reproduce the error, follow [1] or [2] below. Note that in [1] incorrectly reported that the issue happens in MMask, but not in other web3 libraries. This is not correct. It happens in all cases. The reason for the comment in [1] may be due to the fact that when using some of those libraries, the maxGas is already set high enough in some config file.
Probably the reason for this bug is the same as the reason for this other reported bug
ACCEPTANCE:
References:
[1]
#695
[2]
Try minting with https://sigma.explorer.laosnetwork.io/address/0x82FBe06F69c12fF804BB79D6F47d7CC4B6cFa164?tab=write_contract
If you don't do anything, it fails because the maxGas estimated by Metamask is 33K (approx)
If you manually edit MMask to use up to 35K, it works, and it ends up costing about 34K: 0x2042f02fe71e0179cff41a59f85276ddeea2bc9fc27abc87fdfde1b85c400725
In MMask you need to try to execute the TX, then click on the "edit gas" when gas settings are proposed, then Advanced --> Edit Max Gas
The nice behaviour should be that MMask estimates better, so standad online tools work out of the box.
The text was updated successfully, but these errors were encountered: