This repository has been archived by the owner on May 2, 2022. It is now read-only.
Gas estimation value on ContractTrapped
prevents call execution
#101
Labels
bug
Something isn't working
If a contract contains an assertion which fails by default ‒ i.e. the contract traps for the RPC which does the gas estimation ‒ then the gas estimation goes crazy and the call cannot be executed with default settings. This does not happen in the polkadot-js UI.
Assertions in contracts are typically used to make sure that the contract execution is reverted. I've uploaded a minimal contract, which you can use for reproduction here: assertfalse.contract.zip.
It just contains a constructor and this method:
When you open the "Execute assertfalse (instance)" page the gas estimation will be set to a red
It's not possible to execute the method with these settings, the "Call" button is disabled. If the "Max Gas Allowed" is set manually it works.
In the polkadot-js UI it works fine:
My hunch is that there is maybe some default value which is used on
ContractTrapped
returned by the RPC and this one is way too large?The text was updated successfully, but these errors were encountered: