dappuniversity / price-bot

397 stars 392 forks source link

Error when checking ETH USDT pair #15

Open RarebatDeveloper opened 3 years ago

RarebatDeveloper commented 3 years ago

Having error while checking ETH USDT pair price. No issue on the other token. Anybody encountered this issue?

canberk17 commented 3 years ago

I am having a similar issue when I try to check the price of MAHA, CFI, GRT it gives me this error: Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.

RarebatDeveloper commented 3 years ago

Turns out that it is due to uniswap problem when reading the USDT price, i managed to isolate and figured out it is due to this line of code: const uniswapResult = await exchangeContract.methods.getEthToTokenInputPrice(inputAmount).call()

Now i am not sure what should i change already. Any idea?

cipherzzz commented 3 years ago

@RarebatDeveloper see - https://github.com/dappuniversity/price-bot/issues/16