Open PatrickAlphaC opened 3 years ago
I had the same error on remix when actually trying to do @PatrickAlphaC's tutorial on chainlink VRF. Turns out the error was due to wrong chainlink token addresses and coordinator addresses in the solidity contract. I copied the example for Kovan testnet but was deploying on Matic mumbai testnet. When I fixed the contract code with right addresses and redeployed., the issue went away. Hopefully this info will save a few hours of debugging for the next person who is in my situation :)
I had the same error on remix when actually trying to do @PatrickAlphaC's tutorial on chainlink VRF. Turns out the error was due to wrong chainlink token addresses and coordinator addresses in the solidity contract. I copied the example for Kovan testnet but was deploying on Matic mumbai testnet. When I fixed the contract code with right addresses and redeployed., the issue went away. Hopefully this info will save a few hours of debugging for the next person who is in my situation :)
Thank you so much!
Here's the link to the price feed (Goerli Testnet): https://docs.chain.link/data-feeds/price-feeds/addresses#Goerli%20Testnet
Right now, when I try to call a function that has some sort of "bad math" or uses some token that I don't have enough of, it gives a very arbitrary
gas estimation failed
error.It would be great if it gave a little insight into where the issue was being made. For example, if I deploy this contract on Kovan: https://remix.ethereum.org/#version=soljson-v0.6.6+commit.6c089d02.js&optimize=false&evmVersion=null&gist=536123b71478ad4442cfc4278e8de577
And then hit
requestVolumeData
, there isn't any insight into why it's failing. In this case, the contract needed to have some LINK it in.Additionally
Maybe another work around for working with oracles at least, would be to have a
Deploy and Fund
button, that callsapprove
on an ERC20 and sends the contract some token as well.