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

Incorrect output of computePoolAddress function #42

Open
just2102 opened this issue Jun 12, 2024 · 0 comments
Open

Incorrect output of computePoolAddress function #42

just2102 opened this issue Jun 12, 2024 · 0 comments

Comments

@just2102
Copy link

just2102 commented Jun 12, 2024

import { FeeAmount, computePoolAddress } from "@uniswap/v3-sdk";

const tokenA = {
    "chainId": 1,
    "decimals": 18,
    "symbol": "ARB",
    "name": "Arbitrum",
    "isNative": false,
    "isToken": true,
    "address": "0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1"
}
const tokenB = {
    "chainId": 1,
    "decimals": 6,
    "symbol": "USDC",
    "name": "USD Coin",
    "isNative": false,
    "isToken": true,
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}

const fee = FeeAmount.MEDIUM

const chainId = 1

const currentPoolAddress = computePoolAddress({
      factoryAddress: getFactoryAddress(chainId),
      tokenA,
      tokenB,
      fee,
      chainId,
    });

output:

0xEbD785B899b3DdCDE792D04e3d849d10d5Db7555

this pool address is wrong, last transaction was executed more than 400 days ago:
https://etherscan.io/address/0xEbD785B899b3DdCDE792D04e3d849d10d5Db7555#tokentxns

If we try to computePoolAddress for Arbitrum One, it outputs a non-existing contract address (0xD47449fdB21761F11796216Ce5a8F3ABDE7aff22)

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