-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sushi swaprouter contract address in Etherscan #2
Comments
Same here, can't seem to find it anywhere |
@Samboy76 You probably either figured it out by this time or gave up trying, but here's the solution for anyone struggling with this in the future: there is no router, however, you don't actually need one. If you go over to the sushiswap website, go to the pools index, filter by SushiswapV3, and then by the pair you want, and click to navigate to the pool's details, you should see a hash at the end of the url in your browser's address bar. That hash is the pool address. The whole purpose of having the swap router is being able to obtain the pool address for a given pair, so taking these steps solves the problem of not having the router. Though you'll need to manually write down the address of every pool you want to use somewhere in your code, like in some .env file you can read from. The pools rarely ever change addresses so I guess this should be a good solution. |
I remain corrected: the swap router is not meant to give you a pool address. The factory is. But regardless of that, and I apologize for the confusion, you can still work around the lack of the swap router address. You can grab the pool address as per my instructions in my last comment, and then go over to Etherscan (or Arbiscan, or BscScan...whatever suits the network you're using) and grab the pool ABI from there. That's all you need. Once you have the Abi, you can manually instantiate a contract using ethers.js or whatever library you're using, and have all the fucntionality that would otherwise have been provided by the swap router. |
Hello, cannot find this swaprouter V3 address anywhere in the sushi.com documentation section of deployment contract addresses. It only has one though for QuoterV2 but not for SwapRouter. Can you share this with me?
The text was updated successfully, but these errors were encountered: