Bitcoin Forum
June 15, 2024, 12:46:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Warning! Error encountered during contract execution [execution reverted]  (Read 60 times)
newnft (OP)
Newbie
*
Offline Offline

Activity: 38
Merit: 0


View Profile
May 01, 2022, 06:00:28 PM
 #1

i created ICO smart contract with remix
everything is fine


i try to send eth to the smart contract but i get this
 Warning! Error encountered during contract execution [execution reverted]


tried many times always i get same error

vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
May 01, 2022, 06:05:48 PM
 #2

Try to post the full tx id, maybe we can take a look deeper at it.
Odusko
Hero Member
*****
Offline Offline

Activity: 938
Merit: 513


Defend Bitcoin and its PoW: bitcoincleanup.com


View Profile WWW
May 01, 2022, 06:26:10 PM
 #3

Try to post the full tx id, maybe we can take a look deeper at it.
I don't think the transaction was send to the blockchain and will not generate tx I use to get a similar error response on my wallet most especially on ddapp uni swap when I want to execute a transaction I use to get a similar error response to may be due to network congestion or low gas fees just go through the advance setting on your wallet and try adjusting the fee or wait till the network is less congested and try again.

▄▄▄███████▄▄▄
▄█████████████████▄▄
▄██
█████████▀██▀████████
████████▀
░░░░▀░░██████████
███████████▌░░▄▄▄░░░▀████████
███████
█████░░░███▌░░░█████████
███
████████░░░░░░░░░░▄█████████
█████████▀░░░▄████░░░░█████████
███
████▄▄░░░░▀▀▀░░░░▄████████
█████
███▌▄█░░▄▄▄▄█████████
▀████
██████▄██
██████████▀
▀▀█████████████████▀▀
▀▀▀███████▀▀
.
.BitcoinCleanUp.com.


















































.
.     Debunking Bitcoin's Energy Use     .
███████████████████████████████
███████████████████████████████
███████████████████████████████
███████▀█████████▀▀▀▀█▀████████
███████▌░▀▀████▀░░░░░░░▄███████
███████▀░░░░░░░░░░░░░░▐████████
████████▄░░░░░░░░░░░░░█████████
████████▄░░░░░░░░░░░▄██████████
███████▀▀▀░░░░░░░▄▄████████████
█████████▄▄▄▄▄▄████████████████
███████████████████████████████
███████████████████████████████
███████████████████████████████
...#EndTheFUD...
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
May 01, 2022, 07:50:46 PM
 #4

Try to post the full tx id, maybe we can take a look deeper at it.
I don't think the transaction was send to the blockchain and will not generate tx I use to get a similar error response on my wallet most especially on ddapp uni swap when I want to execute a transaction I use to get a similar error response~
That is another possibility, but execution reverted errors in some cases do get included in a transaction.

We can't know for sure since OP using a custom smart contract. I don't know what is wrong, whether on the user side or not. But I suspect it is rather how OP smart contract behaves. It would be much better if @OP gives more information regarding tx if any, or a specific part of the code.
JeromeTash
Legendary
*
Offline Offline

Activity: 2184
Merit: 1214


Heisenberg


View Profile
May 01, 2022, 08:53:11 PM
 #5

It would be better if you posted more details.

Meanwhile, there are so many threads about such an error on Reddit if you make a full search. You could come up with a quick answer.

You could try debugging using the instructions and tools listed here - https://docs.kaleido.io/developers/debugging

█████████████████████████
██
█████▀▀███████▀▀███████
█████▀░░▄███████▄░░▀█████
██▀░░██████▀░▀████░░▀██
██▀░░▀▀▀████████████░░▀██
██░░█▄████▀▀███▀█████░░██
██░░███▄▄███████▀▀███░░██
██░░█████████████████░░██
██▄░░████▄▄██████▄▄█░░▄██
██▄░░██████▄░░████░░▄██
█████▄░░▀███▌░░▐▀░░▄█████
███████▄▄███████▄▄███████
█████████████████████████
.
.ROOBET 2.0..██████.IIIIIFASTER & SLEEKER.██████.
|

█▄█
▀█▀
████▄▄██████▄▄████
█▄███▀█░░█████░░█▀███▄█
▀█▄▄░▐█████████▌▄▄█▀
██▄▄█████████▄▄████▌
██████▄▄████████
█▀▀████████████████
██████
█████████████
██
█▀▀██████████████
▀▀▀███████████▀▀▀▀
|.
    PLAY NOW    
serjent05
Legendary
*
Offline Offline

Activity: 2870
Merit: 1258


View Profile
May 01, 2022, 09:12:15 PM
 #6

there is also the same kind of error lurking in reddit,

You can try to check them and see if they will fix your problem.

The transaction is reverted, so the ETH/tokens/... never left your account in the first place. The ETH you paid for gas is not returned however.

Increase the gas limit, not the gas price. The gas limit is how much gas a transaction can use in total, and the gas price is how much you pay per unit of gas. More info on gas can be found here (https://support.mycrypto.com/general-knowledge/ethereum-blockchain/what-is-gas), if you're interested.

So generally execution reverted means the transaction was canceled due to slippage. Every transaction has a slippage % and if that % is exceeded the transaction is reverted. Yes you paid the gas fee for it, because the miner did "work" but had to reverse the outcome.

Usually this happens for a few reasons:

Your transaction waited too long to execute (gas price was too low), and the price deviated too much between the time the transaction was initiated and when it was processed).

You tried to swap an amount that was large relative to the size of the pool, i.e. a small cap coin where your swap represents like 10% of the liquidity pool, which caused the price to fluctuate and exceed the slippage %.

The market was very volatile at the time of your transaction, in which case the slippage % was set too low.

https://ethereum.stackexchange.com/questions/87475/how-to-fix-warning-error-encountered-during-contract-execution-out-of-gas

https://forum.moralis.io/t/warning-error-encountered-during-contract-execution-reverted/901





That is another possibility, but execution reverted errors in some cases do get included in a transaction.

We can't know for sure since OP using a custom smart contract. I don't know what is wrong, whether on the user side or not. But I suspect it is rather how OP smart contract behaves. It would be much better if @OP gives more information regarding tx if any, or a specific part of the code.

If everything about slippage, and gas fee don't solve the problem, I think this ↑↑↑

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!