Skip to content

Reverting problem #147

Answered by alymurtazamemon
rileymross asked this question in Q&A
Jun 5, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

@rileymross

If you send the value less than the required then your amount will not deduct only the gas charges will be deducted from the account.

Suppose, in the require statement you need the value to be more than 1 ETH, and the total gas is 50000.

Now when you click the fundMe function with the value <= 1 ETH, then this value will not be deducted from the account, only the gas price from calling the function will deduct, let's say now the gas will be remaining 40000 (example) and revert back to account.

And like this example, if we have any computation (in this example, assigning a number a value of 5) then the gas cost for that also will be deducted.

Hope it clears your query, if so pl…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rileymross
Comment options

@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

Answer selected by rileymross
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants