Skip to content
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

This tool doesn't deploy V3 Swap Router #12

Open
alexeyyakimovich opened this issue Jan 10, 2023 · 3 comments · Fixed by TimeleapLabs/deploy-v3#2 · May be fixed by #15
Open

This tool doesn't deploy V3 Swap Router #12

alexeyyakimovich opened this issue Jan 10, 2023 · 3 comments · Fixed by TimeleapLabs/deploy-v3#2 · May be fixed by #15

Comments

@alexeyyakimovich
Copy link

I'm going through this tutorial: https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps

I want to test full scenario in my private testnet.

Using this tool i'm only get V2 Swap Router.

@BisonDee
Copy link

We have just run across this issue (or similar) as well. The SwapRouter contract deployed appears to be from the swap-router-contracts repo using this interface which is missing the deadline variable.

It is unclear to me if the swap-router-contracts repo is deprecated, but the v3-periphery repo also has this interface - named a little differently but it is the interface that matches what is deployed to Ethereum L1 networks.

Given this mismatch, our experience with deploy-v3 is that it produces deployments that are incompatible with those on L1. Will try out the hardhat version, but the "official" documents on new chain deployments reference this codebase.

@lj92458
Copy link

lj92458 commented Apr 20, 2023

@BisonDee
So, what is the final conclusion? We cann't deploy SwapRouter ? why?

@lj92458
Copy link

lj92458 commented Apr 21, 2023

@alexeyyakimovich @BisonDee
If we want to call contract swapRouter.exactInputSingle directly on celo, we must use the correct abi:
import SwapRouter02Abi from '@uniswap/swap-router-contracts/artifacts/contracts/V3SwapRouter.sol/V3SwapRouter.json' assert {type: 'json'} , and the params object for exactInputSinglem method need not have deadline properties. That means params should have 7 properties, not 8. See also How to swap Celo tokens on Uniswap programmatically with code , this example has 2 bugs, which have mentioned above.

Other wise, if we want to use js function swaprouter.swapCallParameters on celo, we must create a ts file which is named swapRouter02.ts : copy this code to swapRouter02.ts , then delete all the deadline properties, and use the correct abi:
import SwapRouter02Abi from '@uniswap/swap-router-contracts/artifacts/contracts/V3SwapRouter.sol/V3SwapRouter.json' assert {type: 'json'}

AlexRamRam added a commit to AlexRamRam/deploy-v3 that referenced this issue Jul 21, 2023
Fix Uniswap#12

Signed-off-by: Alexander Jung <[email protected]>
@AlexRamRam AlexRamRam linked a pull request Jul 21, 2023 that will close this issue
AlexRamRam added a commit to AlexRamRam/deploy-v3 that referenced this issue Jul 21, 2023
Fix Uniswap#12

Signed-off-by: Alexander Jung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants