Questions tagged [revert]
The revert tag has no summary.
62 questions
0 votes
0 answers
10 views
Revert condition for zeroMinting is not working properly?
So, basically I was learning from updraft and i came across this issue. This is my DecStblCoin.sol file // weth: erc20 version of ethereum // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; ...
1 vote
0 answers
17 views
How does revert propagation work in nested contract calls?
In the Ethereum whitepaper, it says: “If a message execution runs out of gas, then that message's execution, and all other executions triggered by that execution, revert, but parent executions do not ...
0 votes
1 answer
62 views
Incomplete USDT address on Ether network
If the sent address is missing the last character (and it is not valid address) will it be sent back to original sender (reverted). Is there any process for fixing?
0 votes
1 answer
39 views
Foundry test: script fails, direct call passes
I am getting reverts for the following integration test script. The confusing part is that when I directly use the fundMe variable in integration-test file, and directly call contract functions for ...
0 votes
1 answer
60 views
How can I capture the receipt and gas used in ethers.js after an expected failed transaction?
I'm using ethers.js to interact with my smart contract and send a transaction. However, when the transaction fails (reverts), I can't access the receipt or the gas used, because ethers.js throws an ...
0 votes
0 answers
54 views
Web3py and Uniswap issue, transacction reverted
import json from web3 import Web3 # Set up your connection to Ethereum infura_url = 'https://sepolia.infura.io/v3/apikey' web3 = Web3(Web3.HTTPProvider(infura_url)) if not web3.is_connected(): ...
0 votes
2 answers
485 views
swapExactTokensForTokens error TRANSFER_FROM_FAILED even after approval?
I've read almost every question on here referencing uniswapv2 swapExactTokensForTokens and I'm still getting the same error (below). Here are the specifics: Environment: local node Infrastructure: ...
0 votes
1 answer
138 views
Forge Test Contract Transfer EvmError: Revert
Context Trying to run through the same tests for the default contract for Hardhat's basic Lock.sol, and getting errors with .transfer. Tested this in Remix and the functionality works, but under the ...
0 votes
1 answer
77 views
External call recipient can consume all transaction gas
External call recipients consume all transaction gas, leading to transaction reversion. How to Prevent this?
0 votes
1 answer
42 views
Error: call revert exception in Hardhat test for Lottery Contract
I'm encountering an issue while running unit tests for my Lottery smart contract using Hardhat. The error occurs during the "before each" hook, specifically when trying to call the '...
0 votes
1 answer
48 views
weth address reverting overflow / underflow
My code is giving revert error overflow and underflow when I tried to interact with the weth token directly on blast chain, I’ve also imported safemath library which didn’t resolve the issue but if I ...
1 vote
0 answers
36 views
Catch internal revert
Is it possible to catch a revert in like an internal decoding? For example: function mint( bytes memory data_, address owner_ ) returns(uint) { ... (AmountsIn memory amts, ...
0 votes
1 answer
90 views
Solidity Debug: Require statement reverts with no error when met, but prints error when not met
Apologies if the title is a little confusing. I'm new to programming in Solidity, and I think there's just some fundamental misunderstanding I'm having on this code, and I'm unable to fix it until I ...
1 vote
1 answer
40 views
Contract reverts at deploy when sending 2 ethers
This contract deploys fine when no value is added and get reverted when I try to send 2 ether on the remix VM.......which is exactly the opposite of what I expected or should be happening. I retraced ...
0 votes
1 answer
79 views
Transaction is getting reverted on calling bookRoom() function
I'm deploying my contract by passing these constructor params: (["Hotel Red","Hotel Radisson"],[1,2],[12,13],[3300000000000000,3500000000000000],[12,13]) The contract is getting ...