aave / aave-utilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: cannot estimate gas; transaction may fail or may require manual gas limit

pranavkirtani opened this issue · comments

Bug Report

Package name / version

Description

Error: cannot estimate gas; transaction may fail or may require manual gas limit

Steps to reproduce

After calling supply as mentioned in readme and after erc20 approval, when i try to trigger supply by calling ts.tx(), i get gas estimation error

Expected behavior

Environment

  • OS: [e.g., OSX 10.13.4, Windows 10]
  • Node/npm version: [e.g., Node 8/npm 5]
  • Browser: [e.g., Chrome]

Additional context / screenshots

same thing is happening for me

Hi @pranavkirtani, could you provide a code snippet? I was able to push a transaction using v3 without error;

You are most likely passing in the incorrect contracts. Look here for the UiPoolDataProviderV3 and PoolAddressesProvider-[network] address's. Here is a repo I've been building that successfully uses this library to create borrow and supply positions (still working on other features) I'm adding more of the needed contract address but it works on mumbai.

I'm facing the same problem when executing the tx from borrow method, but i was able to run supply method.

Plus seems like the snippet in readme is wrong for borrow(v3)

Gas estimation error is a generic error for a failing transactions. Most common issues can be:

  • Invalid asset address
  • Insufficient balance

If you have a failed txHash we can debug the exact error.