full-blockchain-solidity-course-py icon indicating copy to clipboard operation
full-blockchain-solidity-course-py copied to clipboard

Lesson 10 : Gas estimation failed

Open Karlus44 opened this issue 2 years ago • 4 comments

Hello, I have this message : ValueError: Gas estimation failed: 'execution reverted' when I want to run my deposit function. Any help would be greatly appreciated. My code can be found here: https://github.com/Karlus44/aave_brownie_py It differs from the Patrick Collin's code in the following points:

  • I didn't do well with the Kovan faucets in my browser, and at the same time I realised that in the first part of the course I had been trying the https://v3-test.aave.com/ where I could use my rinkeby ether. That's how I decided to keep using Aave V3 and my rinkeby ETH. Now, sadly, there is for now no ETH market in the V3, so right now my tests are only with rinkeby.
  • In the V3, the name of the function is not "deposit", but "supply" and some other names may be differents. Yet I believe I did things carefully. Anyway, the supply function is the one that gives me an error.
  • The previous function (approve_erc20) did work well, the transaction is here in rinkeby: 0xb3b9d55928c767f1cd3f4f775e6030ad1457fe4ff2454c397992b18aba8ae8a5

Karlus44 avatar Mar 26 '22 15:03 Karlus44

An edit: I've been trying to code the next function: get_borrowable_data, which returns me: You have 0 worth of ETH deposited. You have 0 worth of ETH borrowed. You can borrow 0 worth of ETH. That means the program can't read correctly my account. And if it believes I have 0 ETH, certainly my function supply can't work...

Karlus44 avatar Mar 26 '22 17:03 Karlus44

But the questions remains, why my function get_borrowable_data (and actually getUserAccountData) doesn't work ?

Karlus44 avatar Mar 28 '22 13:03 Karlus44

Hello @Karlus44 , I also have the same error, but I have ETH in my account...

blackyinsol avatar Apr 20 '22 09:04 blackyinsol

@blackyinsol you mean your get_borrowable_data function detects your ETH in your account ?

Karlus44 avatar Apr 20 '22 10:04 Karlus44