diff --git a/lib/cron/cache-config.ts b/lib/cron/cache-config.ts index 1cc942649c..aa278c4d22 100644 --- a/lib/cron/cache-config.ts +++ b/lib/cron/cache-config.ts @@ -161,6 +161,8 @@ export const v4SubgraphUrlOverride = (chainId: ChainId) => { return `https://api.aws-us-east-1.goldsky.com/c/uniswap2/gn/subgraphs/id/${process.env.GOLD_SKY_OPTIMISM_V4_ID}` case ChainId.MONAD: return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v4-monad/prod/gn` + case ChainId.TEMPO: + return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v4-tempo/prod/gn` case ChainId.XLAYER: return `https://gateway.thegraph.com/api/subgraphs/id/${process.env.GRAPH_XLAYER_V4_ID}` case ChainId.AVALANCHE: @@ -204,6 +206,8 @@ export const v3SubgraphUrlOverride = (chainId: ChainId) => { return `https://api.aws-us-east-1.goldsky.com/c/uniswap2/gn/subgraphs/id/${process.env.GOLD_SKY_SONEIUM_V3_ID}` case ChainId.MONAD: return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v3-monad/prod/gn` + case ChainId.TEMPO: + return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v3-tempo/prod/gn` case ChainId.XLAYER: return `https://gateway.thegraph.com/api/subgraphs/id/${process.env.GRAPH_XLAYER_V3_ID}` case ChainId.LINEA: @@ -243,6 +247,8 @@ export const v2SubgraphUrlOverride = (chainId: ChainId) => { return `https://api.aws-us-east-1.goldsky.com/c/uniswap/gn/subgraphs/id/${process.env.GOLD_SKY_SONEIUM_V2_ID}` case ChainId.MONAD: return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v2-monad/prod/gn` + case ChainId.TEMPO: + return `https://api.goldsky.com/api/private/${process.env.GOLD_SKY_API_KEY}/subgraphs/uniswap-v2-tempo/prod/gn` case ChainId.XLAYER: return `https://gateway.thegraph.com/api/subgraphs/id/${process.env.GRAPH_XLAYER_V2_ID}` case ChainId.LINEA: @@ -473,6 +479,21 @@ export const chainProtocols = [ process.env.GOLD_SKY_BEARER_TOKEN ), }, + { + protocol: Protocol.V3, + chainId: ChainId.TEMPO, + timeout: 90000, + provider: new V3SubgraphProvider( + ChainId.TEMPO, + 3, + 90000, + true, + v3TrackedEthThreshold, + v3UntrackedUsdThreshold, + v3SubgraphUrlOverride(ChainId.TEMPO), + process.env.GOLD_SKY_BEARER_TOKEN + ), + }, { protocol: Protocol.V3, chainId: ChainId.XLAYER, @@ -700,6 +721,22 @@ export const chainProtocols = [ process.env.GOLD_SKY_BEARER_TOKEN ), }, + { + protocol: Protocol.V2, + chainId: ChainId.TEMPO, + timeout: 90000, + provider: new V2SubgraphProvider( + ChainId.TEMPO, + 3, + 90000, + true, + 1000, + v2TrackedEthThreshold, + v2UntrackedUsdThreshold, + v2SubgraphUrlOverride(ChainId.TEMPO), + process.env.GOLD_SKY_BEARER_TOKEN + ), + }, { protocol: Protocol.V2, chainId: ChainId.XLAYER, @@ -957,6 +994,23 @@ export const chainProtocols = [ process.env.GOLD_SKY_BEARER_TOKEN ), }, + { + protocol: Protocol.V4, + chainId: ChainId.TEMPO, + timeout: 90000, + provider: new V4SubgraphProvider( + ChainId.TEMPO, + 3, + 90000, + true, + v4TrackedEthThreshold, + v4BaseZoraTrackedEthThreshold, + HOOKS_FOR_V4_SUBGRAPH_LOW_TVL_FILTERING, + v4UntrackedUsdThreshold, + v4SubgraphUrlOverride(ChainId.TEMPO), + process.env.GOLD_SKY_BEARER_TOKEN + ), + }, { protocol: Protocol.V4, chainId: ChainId.XLAYER, diff --git a/lib/util/defaultBlocksToLiveRoutesDB.ts b/lib/util/defaultBlocksToLiveRoutesDB.ts index 5f0e790ae1..fd4ca0b2ec 100644 --- a/lib/util/defaultBlocksToLiveRoutesDB.ts +++ b/lib/util/defaultBlocksToLiveRoutesDB.ts @@ -56,4 +56,5 @@ export const DEFAULT_BLOCKS_TO_LIVE_ROUTES_DB: { [chain in ChainId]: number } = [ChainId.SONEIUM]: 60, [ChainId.XLAYER]: 60, [ChainId.LINEA]: 60, + [ChainId.TEMPO]: 60, } diff --git a/lib/util/extraV4FeeTiersTickSpacingsHookAddresses.ts b/lib/util/extraV4FeeTiersTickSpacingsHookAddresses.ts index 8c5f3ba56c..2059e9e091 100644 --- a/lib/util/extraV4FeeTiersTickSpacingsHookAddresses.ts +++ b/lib/util/extraV4FeeTiersTickSpacingsHookAddresses.ts @@ -53,4 +53,5 @@ export const EXTRA_V4_FEE_TICK_SPACINGS_HOOK_ADDRESSES: { [chain in ChainId]: Ar [ChainId.SONEIUM]: emptyV4FeeTickSpacingsHookAddresses, [ChainId.XLAYER]: emptyV4FeeTickSpacingsHookAddresses, [ChainId.LINEA]: emptyV4FeeTickSpacingsHookAddresses, + [ChainId.TEMPO]: emptyV4FeeTickSpacingsHookAddresses, } diff --git a/lib/util/hooksAddressesAllowlist.ts b/lib/util/hooksAddressesAllowlist.ts index cc79de6cf4..67dea24e10 100644 --- a/lib/util/hooksAddressesAllowlist.ts +++ b/lib/util/hooksAddressesAllowlist.ts @@ -367,4 +367,5 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array } = [ChainId.SONEIUM]: [ADDRESS_ZERO], [ChainId.XLAYER]: [ADDRESS_ZERO, AEGIS_V3], [ChainId.LINEA]: [ADDRESS_ZERO], + [ChainId.TEMPO]: [ADDRESS_ZERO], } diff --git a/lib/util/newCachedRoutesRolloutPercent.ts b/lib/util/newCachedRoutesRolloutPercent.ts index 62d006d189..13fd35252e 100644 --- a/lib/util/newCachedRoutesRolloutPercent.ts +++ b/lib/util/newCachedRoutesRolloutPercent.ts @@ -38,4 +38,5 @@ export const NEW_CACHED_ROUTES_ROLLOUT_PERCENT: { [chain in ChainId]: number } = [ChainId.SONEIUM]: 100, [ChainId.XLAYER]: 100, [ChainId.LINEA]: 100, + [ChainId.TEMPO]: 100, } diff --git a/lib/util/onChainQuoteProviderConfigs.ts b/lib/util/onChainQuoteProviderConfigs.ts index 34d218d162..89c8b7f7dd 100644 --- a/lib/util/onChainQuoteProviderConfigs.ts +++ b/lib/util/onChainQuoteProviderConfigs.ts @@ -1194,6 +1194,7 @@ export const NEW_QUOTER_DEPLOY_BLOCK: { [chainId in ChainId]: number } = { [ChainId.SONEIUM]: -1, [ChainId.XLAYER]: -1, [ChainId.LINEA]: -1, + [ChainId.TEMPO]: -1, } // 0 threshold means it's not deployed yet @@ -1231,6 +1232,7 @@ export const LIKELY_OUT_OF_GAS_THRESHOLD: { [chainId in ChainId]: number } = { [ChainId.SONEIUM]: 0, [ChainId.XLAYER]: 0, [ChainId.LINEA]: 0, + [ChainId.TEMPO]: 0, } // TODO: Move this new addresses to SOR diff --git a/lib/util/tenderlyNewEndpointRolloutPercent.ts b/lib/util/tenderlyNewEndpointRolloutPercent.ts index 92a48c0767..839d8d9ea3 100644 --- a/lib/util/tenderlyNewEndpointRolloutPercent.ts +++ b/lib/util/tenderlyNewEndpointRolloutPercent.ts @@ -34,4 +34,5 @@ export const TENDERLY_NEW_ENDPOINT_ROLLOUT_PERCENT: { [chain in ChainId]: number [ChainId.SONEIUM]: 100, [ChainId.XLAYER]: 100, [ChainId.LINEA]: 100, + [ChainId.TEMPO]: 100, } diff --git a/package-lock.json b/package-lock.json index 4ad6c623e0..88299ed52f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", "@uniswap/router-sdk": "^2.6.0", - "@uniswap/sdk-core": "^7.11.0", + "@uniswap/sdk-core": "^7.12.0", "@uniswap/smart-order-router": "4.31.8", "@uniswap/smart-wallet-sdk": "^2.1.1", "@uniswap/token-lists": "^1.0.0-beta.33", @@ -4520,9 +4520,9 @@ } }, "node_modules/@uniswap/sdk-core": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-7.11.0.tgz", - "integrity": "sha512-wI1jz/zf23Yzoms8JsiYWN3M5r2QIlPSljRnEDc/ubk7wDlKxAmt5/AIaHbxZa4dISJKD83mtprhPQYDy2iSOg==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-7.12.0.tgz", + "integrity": "sha512-IXWEtkOjfMgVOke3ed9hRRAIDDGMwf0RUMeAl1iiRf3eN0GA4XUaV7sEfU82pTuk6QUohm5J0qXxwGcNuT1kNg==", "dependencies": { "@ethersproject/address": "^5.0.2", "@ethersproject/bytes": "^5.7.0", @@ -28158,9 +28158,9 @@ } }, "@uniswap/sdk-core": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-7.11.0.tgz", - "integrity": "sha512-wI1jz/zf23Yzoms8JsiYWN3M5r2QIlPSljRnEDc/ubk7wDlKxAmt5/AIaHbxZa4dISJKD83mtprhPQYDy2iSOg==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-7.12.0.tgz", + "integrity": "sha512-IXWEtkOjfMgVOke3ed9hRRAIDDGMwf0RUMeAl1iiRf3eN0GA4XUaV7sEfU82pTuk6QUohm5J0qXxwGcNuT1kNg==", "requires": { "@ethersproject/address": "^5.0.2", "@ethersproject/bytes": "^5.7.0", diff --git a/package.json b/package.json index 05365aeee5..9e913f49ce 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", "@uniswap/router-sdk": "^2.6.0", - "@uniswap/sdk-core": "^7.11.0", + "@uniswap/sdk-core": "^7.12.0", "@uniswap/smart-order-router": "4.31.8", "@uniswap/smart-wallet-sdk": "^2.1.1", "@uniswap/token-lists": "^1.0.0-beta.33", diff --git a/test/mocha/e2e/quote.test.ts b/test/mocha/e2e/quote.test.ts index 03fa2016ba..b0fbe27230 100644 --- a/test/mocha/e2e/quote.test.ts +++ b/test/mocha/e2e/quote.test.ts @@ -3409,6 +3409,7 @@ describe('quote', function () { [ChainId.SONEIUM]: () => USDC_ON(ChainId.SONEIUM), [ChainId.XLAYER]: () => USDC_ON(ChainId.XLAYER), [ChainId.LINEA]: () => null, + [ChainId.TEMPO]: () => null, } const TEST_ERC20_2: { [chainId in ChainId]: () => Token | null } = { @@ -3446,6 +3447,7 @@ describe('quote', function () { [ChainId.SONEIUM]: () => WNATIVE_ON(ChainId.SONEIUM), [ChainId.XLAYER]: () => WNATIVE_ON(ChainId.XLAYER), [ChainId.LINEA]: () => null, + [ChainId.TEMPO]: () => null, } // TODO: Find valid pools/tokens on optimistic kovan and polygon mumbai. We skip those tests for now.