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

deadline parameter is no longer exists in SwapRouter02 contract #234

Open
thkdog opened this issue Jan 9, 2025 · 0 comments
Open

deadline parameter is no longer exists in SwapRouter02 contract #234

thkdog opened this issue Jan 9, 2025 · 0 comments

Comments

@thkdog
Copy link

thkdog commented Jan 9, 2025

Have you ever use the v3-sdk?

  const options: SwapOptions = {
    slippageTolerance: new Percent(50, 10_000), // 50 bips, or 0.50%
    deadline: Math.floor(Date.now() / 1000) + 60 * 20, // 20 minutes from the current Unix time
    recipient: walletAddress,
  }

  const methodParameters = SwapRouter.swapCallParameters(trade, options)

The exactInputSingle transaction built by the swapCallParameters in sdk-v3 will cause contract error, I checked the parameters in the contract used by the sdk
https://github.com/Uniswap/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/interfaces/ISwapRouter.sol#L15, there is deadline parameter.

But there is no deadline on the live contract https://etherscan.io/address/0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45#writeContract

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

No branches or pull requests

1 participant