dappuniversity / price-bot

397 stars 392 forks source link

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. #16

Open canberk17 opened 3 years ago

canberk17 commented 3 years ago

when I try to check the price of other tokens like CFI, MAHA, GRT, XED it gives me the following error. Did anyone encounter this so far?

Listening on 5000 Checking prices... 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.

cipherzzz commented 3 years ago

if they aren't in the pools you will get this. for instance, if you use the uniswapv2 and try to use the eth address you will get this because uniswapv2 only uses weth @canberk17

royjosefsson commented 3 years ago

I'm very new to this. I haven't changed the code whatsoever, how come i've getting this error?

aurelticot commented 3 years ago

I'm very new to this. I haven't changed the code whatsoever, how come i've getting this error?

@royjosefsson check your RPC_URL, the example is on ropsten network but the exchange addresses are for the mainnet. Use a mainnet infura node.

GitCulture commented 2 years ago

I'm very new to this. I haven't changed the code whatsoever, how come i've getting this error?

@royjosefsson check your RPC_URL, the example is on ropsten network but the exchange addresses are for the mainnet. Use a mainnet infura node.

So I cant test it first on ropsten ? I tryid to change addres with that from ropsten testnet but it wont work ... same error like above