Execution reverted during call: This transaction will likely revert. If you wish to broadcast, include `allow_revert:True`
Asked Answered
K

6

7

I'm trying to make a transaction to create an NFT collectible and the transaction gets reverted with the message: Gas estimation failed: 'execution reverted'. This transaction will likely revert. If you wish to broadcast, you must set the gas limit manually. when I add the max gas limit it stills revert.

Kessel answered 20/2, 2022 at 13:28 Comment(2)
Do you have enough funds for the gas?Bogor
Yes that's wasn't the issue in my caseKessel
M
8

I had the same issue. After 2 hours lost I found the problem. I was using the wrong version of vrf coordinator. As you can see on the following, I was viewing the VRF v2 guide but my code was using the vrf v1 and thus I was using the wrong contract address and keyhash. In order to fix it, I clicked on VRF v1 guide, and I retrieved the contract address and keyhash from there. Now it is working. https://docs.chain.link/docs/vrf-contracts/ enter image description here

Meeting answered 21/2, 2022 at 20:38 Comment(2)
@Kessel :), don't forget to marked the response as accepted answer :)Gynaeco
perfect answer! you save my day. thanks so much!Psychoneurotic
G
1

If you have enough funds for gas, then probably there's issue with the function that you call. That function seems to fall so there's the gas estimation failed message as you see.

Grainger answered 20/2, 2022 at 15:55 Comment(0)
J
1

The following setting in brownie-config.yaml worked for me:

settings:
  gas_limit: "100000000000"
Jiles answered 21/2, 2022 at 10:11 Comment(0)
E
0

I had no problem after I set gasPrice to 100000000000000000 (I picked any random value).

creating_tx = advanced_collectible.createCollectible({"from": account, "gasPrice": 100000000000000000})
Elongate answered 16/3, 2022 at 15:38 Comment(0)
W
0

Another reason why the issue you're experiencing may be happening is the lack of funds. Ensure that you have enough ETH and LINK in your wallet. Both can be obtained from the ChainLink faucet.

Winkler answered 20/7, 2022 at 0:32 Comment(0)
I
0

The author must have changed the title of the qestion? "allow_revert" is a parameter which brownie recognizes (follow the error code and see the '...brownie\network\account.py' folder ~ lines 600-750. So you can include it in a transaction, e.g.

reqeustRandomWord(...,{"from": account, "gas_limit": 3000000, "allow_revert": True}))

Unfortunately what you'll likely find in response (should it revert) is something like

Accessing `TransactionReceipt.revert_msg` on a reverted transaction requires the `debug_traceTransaction` RPC endpoint, but the node client does not support it or has not made it available.

So its a node provider problem not a brownie problem. For a long time I was frustrated with brownie because it hid specified revert messages which makes debugging very difficult. As I understand it infura does not return specific revert messages. I think Alchemy does but have yet to find a way to configure brownie to use alchemy as a node provider....

Inexcusable answered 31/5, 2023 at 1:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.