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

No routes found on V2 #640

Open
HernanSebastian opened this issue Aug 5, 2024 · 1 comment
Open

No routes found on V2 #640

HernanSebastian opened this issue Aug 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@HernanSebastian
Copy link

HernanSebastian commented Aug 5, 2024

Hi, gm.

I have a DEGA/USDT pair in V2, and when I want to make the swap, it can't find the route.

Bug Description:

I am using is: https://api.uniswap.org/v1/quote

Error: Request failed with status code 404 {
  status: 404,
  headers: Object [AxiosHeaders] {
    'content-type': 'application/json',
    'content-length': '63',
    connection: 'keep-alive',
    date: 'Mon, 05 Aug 2024 14:52:36 GMT',
    'access-control-allow-credentials': 'true',
    'x-amzn-requestid': 'b806091d-a783-4760-8c1b-d8307e69e55b',
    'x-amzn-remapped-x-amzn-requestid': '050c9ad6-6eaf-41cc-9767-e3279b87e57b',
    'access-control-allow-origin': '*',
    'x-amzn-remapped-content-length': '63',
    'access-control-allow-headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
    'x-amzn-remapped-connection': 'keep-alive',
    'x-amzn-remapped-date': 'Mon, 05 Aug 2024 14:52:36 GMT',
    via: '1.1 02a2bd1a95c9e133cb6af71565738388.cloudfront.net (CloudFront), 1.1 c8701ffd48172b6722f4e4dcc9b9de74.cloudfront.net (CloudFront)',
    'x-amz-apigw-id': 'cCkQEECAiYcEUJw=',
    'x-amzn-trace-id': 'Root=1-66b0e733-7469e0434e2efdee15f2a0ab',
    'x-amz-cf-pop': 'CMH68-P4, EZE50-P5',
    'x-cache': 'Error from cloudfront',
    'x-amz-cf-id': 'wF0pgRdyx72h22iP1auw139GzIcA5fsG7rdS_DUhs2-UH7WXT7TPwg=='
  },
  data: { detail: 'No route found', errorCode: 'NO_ROUTE', id: '0dc06' }
}

Steps to Reproduce:

  1. Go to:
    image
    image

Header

http://localhost:3000/v1/quote?protocols=v2%2Cv3%2Cmixed&tokenInAddress=0x97aeE01ed2aabAd9F54692f94461AE761D225f17&tokenInChainId=1&tokenOutAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&tokenOutChainId=1&amount=100000000000&type=exactOut
Request Method:
GET
Status Code:
404 Not Found
Remote Address:
[::1]:3000
Referrer Policy:
strict-origin-when-cross-origin

Payload

protocols=v2%2Cv3%2Cmixed&tokenInAddress=0x97aeE01ed2aabAd9F54692f94461AE761D225f17&tokenInChainId=1&tokenOutAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&tokenOutChainId=1&amount=100000000000&type=exactOut

Response

{"error":"Request failed with status code 404","details":"Forbidden"}

Expected Behavior:

Headers

http://localhost:3000/v1/quote?protocols=v2%2Cv3%2Cmixed&tokenInAddress=0xdAC17F958D2ee523a2206206994597C13D831ec7&tokenInChainId=1&tokenOutAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&tokenOutChainId=1&amount=100000000000&type=exactOut
Request Method:
GET
Status Code:
200 OK
Remote Address:
[::1]:3000
Referrer Policy:
strict-origin-when-cross-origin

Response

{
    "blockNumber": "20463480",
    "amount": "100000000000",
    "amountDecimals": "100000",
    "quote": "99951857408",
    "quoteDecimals": "99951.857408",
    "quoteGasAdjusted": "99959914754",
    "quoteGasAdjustedDecimals": "99959.914754",
    "gasUseEstimateQuote": "8057346",
    "gasUseEstimateQuoteDecimals": "8.057346",
    "gasUseEstimate": "128000",
    "gasUseEstimateUSD": "8.054520395799792029",
    "simulationStatus": "UNATTEMPTED",
    "simulationError": false,
    "gasPriceWei": "25594229672",
    "route": [
        [
            {
                "type": "v3-pool",
                "address": "0x3416cF6C708Da44DB2624D63ea0AAef7113527C6",
                "tokenIn": {
                    "chainId": 1,
                    "decimals": "6",
                    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
                    "symbol": "USDT"
                },
                "tokenOut": {
                    "chainId": 1,
                    "decimals": "6",
                    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                    "symbol": "USDC"
                },
                "fee": "100",
                "liquidity": "27434318991664723",
                "sqrtRatioX96": "79204984106994137681171909172",
                "tickCurrent": "-6",
                "amountIn": "99951857408",
                "amountOut": "100000000000"
            }
        ]
    ],
    "routeString": "[V3] 100.00% = USDT -- 0.01% [0x3416cF6C708Da44DB2624D63ea0AAef7113527C6] --> USDC",
    "quoteId": "b0185",
    "hitsCachedRoutes": true
}
@HernanSebastian HernanSebastian added the bug Something isn't working label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@HernanSebastian and others