Open Developer5600 opened 2 years ago
The info I was getting from uniswap was a mainnet pool despite being connected to Ropsten in my metamask. Hm. How do I find the pool for WETH-USDC on Ropsten?
I found https://ropsten.etherscan.io/address/0x1F98431c8aD98523631AE4a59f267346ea31F984#code and using values 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (USDC Ropsten) 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 (WETH Ropsten) and 3000 for the pool rate I got "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8"
this still always reverts.
My transaction always reverts with this contract.
I have tried both of these for pools: //address WETHUSDCPool = 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640; from https://etherscan.io/address/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640#readContract -- this looks like the right pool from searching
address WETHUSDCPool = 0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8; //?? linked from uniswap from https://info.uniswap.org/#/pools/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d -- this one I get from UNISWAP
but both pool addresses revert on this line
which the docs say will revert if there are no reserves available.
What's wrong with my code?
How can I consult the V3 Pool on Ropsten for Price Oracle? I need this to work on Ropsten before I deploy a mainnet! Is there another reliable Oracle contract I can use?