Closed lamman1820 closed 3 years ago
Hey you are using mainnet contract address which are not correct on rinkeby!
As you see > https://rinkeby.etherscan.io/address/0x1985365e9f78359a9B6AD760e32412f4a445E862 is not a contract but on mainnet > https://etherscan.io/address/0x1985365e9f78359a9B6AD760e32412f4a445E862
same with fun token see > https://rinkeby.etherscan.io/address/0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b is not a contract but on mainnet > https://etherscan.io/address/0x419D0d8BdD9aF5e606Ae2232ed285Aff190E711b
If you want to use testnets you have to use the correct token addresses for what you want to swap. In your code snippet if you change
chainId: ChainId.RINKEBY to chainId: ChainId.MAINNET
Then the quotes will work.
I try to get the trade information but it always shows the error: invalid from or to contract tokens.
Please help to check it.
Thanks