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

feat: update subgraph and pool manager address #831

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cron/cache-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ChainId } from '@uniswap/sdk-core'
export const v4SubgraphUrlOverride = (chainId: ChainId) => {
switch (chainId) {
case ChainId.SEPOLIA:
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-sepolia-test/api`
return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v4-sepolia-test/version/v0.0.16/api`
default:
return undefined
}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"@uniswap/router-sdk": "^1.10.0",
"@uniswap/sdk-core": "^5.3.0",
"@types/semver": "^7.5.8",
"@uniswap/smart-order-router": "3.48.0",
"@uniswap/smart-order-router": "3.49.0",
"@uniswap/token-lists": "^1.0.0-beta.33",
"@uniswap/universal-router-sdk": "^3.0.2",
"@uniswap/v2-sdk": "^4.3.2",
Expand Down
20 changes: 13 additions & 7 deletions test/mocha/e2e/quote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
USDC_NATIVE_OPTIMISM,
USDC_NATIVE_POLYGON,
USDT_MAINNET,
V4_SEPOLIA_TEST_OP,
V4_SEPOLIA_TEST_USDC,
V4_SEPOLIA_TEST_A,
V4_SEPOLIA_TEST_B,
WBTC_MAINNET,
} from '@uniswap/smart-order-router'
import {
Expand Down Expand Up @@ -2485,7 +2485,7 @@ describe('quote', function () {
[ChainId.MAINNET]: () => USDC_ON(1),
[ChainId.GOERLI]: () => USDC_ON(ChainId.GOERLI),
[ChainId.SEPOLIA]: () => USDC_ON(ChainId.SEPOLIA),
[ChainId.SEPOLIA]: () => V4_SEPOLIA_TEST_OP,
[ChainId.SEPOLIA]: () => V4_SEPOLIA_TEST_A,
[ChainId.OPTIMISM]: () => USDC_ON(ChainId.OPTIMISM),
[ChainId.OPTIMISM]: () => USDC_NATIVE_OPTIMISM,
[ChainId.OPTIMISM_GOERLI]: () => USDC_ON(ChainId.OPTIMISM_GOERLI),
Expand Down Expand Up @@ -2518,7 +2518,7 @@ describe('quote', function () {
[ChainId.MAINNET]: () => DAI_ON(1),
[ChainId.GOERLI]: () => DAI_ON(ChainId.GOERLI),
[ChainId.SEPOLIA]: () => DAI_ON(ChainId.SEPOLIA),
[ChainId.SEPOLIA]: () => V4_SEPOLIA_TEST_USDC,
[ChainId.SEPOLIA]: () => V4_SEPOLIA_TEST_B,
[ChainId.OPTIMISM]: () => DAI_ON(ChainId.OPTIMISM),
[ChainId.OPTIMISM_GOERLI]: () => DAI_ON(ChainId.OPTIMISM_GOERLI),
[ChainId.OPTIMISM_SEPOLIA]: () => USDC_ON(ChainId.OPTIMISM_SEPOLIA),
Expand Down Expand Up @@ -2568,7 +2568,7 @@ describe('quote', function () {
const wrappedNative = WNATIVE_ON(chain)

it(`${wrappedNative.symbol} -> erc20`, async () => {
if (chain === ChainId.SEPOLIA && erc1.equals(V4_SEPOLIA_TEST_OP)) {
if (chain === ChainId.SEPOLIA && erc1.equals(V4_SEPOLIA_TEST_A)) {
// there's no WETH/USDC v4 pool on Sepolia
return
}
Expand Down Expand Up @@ -2707,7 +2707,7 @@ describe('quote', function () {
}
})
it(`has quoteGasAdjusted values`, async () => {
if (chain === ChainId.SEPOLIA) {
if (chain === ChainId.SEPOLIA && !erc1.equals(V4_SEPOLIA_TEST_A)) {
// Sepolia doesn't have sufficient liquidity on DAI pools yet
return
}
Expand All @@ -2725,10 +2725,16 @@ describe('quote', function () {
type,
}

const headers = {
'x-universal-router-version': '2.0',
}

const queryParams = qs.stringify(quoteReq)

try {
const response: AxiosResponse<QuoteResponse> = await axios.get<QuoteResponse>(`${API}?${queryParams}`)
const response: AxiosResponse<QuoteResponse> = await axios.get<QuoteResponse>(`${API}?${queryParams}`, {
headers: headers,
})
const {
data: { quoteDecimals, quoteGasAdjustedDecimals },
status,
Expand Down
Loading