diff --git a/bin/app.ts b/bin/app.ts index 3067bd96ca..860cfee0e5 100644 --- a/bin/app.ts +++ b/bin/app.ts @@ -204,26 +204,22 @@ export class RoutingAPIPipeline extends Stack { // Avalanche // 'INFURA_43114', 'QUICKNODE_43114', - 'NIRVANA_43114', // BNB 'QUICKNODE_56', // Base 'QUICKNODE_8453', // 'INFURA_8453', 'ALCHEMY_8453', - 'NIRVANA_8453', // Sepolia // 'INFURA_11155111', 'ALCHEMY_11155111', // Arbitrum // 'INFURA_42161', 'QUICKNODE_42161', - 'NIRVANA_42161', 'ALCHEMY_42161', // Ethereum // 'INFURA_1', 'QUICKNODE_1', - 'NIRVANA_1', 'ALCHEMY_1', 'QUICKNODERETH_1', // Blast @@ -234,6 +230,10 @@ export class RoutingAPIPipeline extends Stack { // ZkSync 'QUICKNODE_324', 'ALCHEMY_324', + // WorldChain, + 'ALCHEMY_480', + // AstroChain Sepolia, + 'QUICKNODE_1301', // unirpc - serves all chains 'UNIRPC_0', ] @@ -380,27 +380,23 @@ const jsonRpcProviders = { // Avalanche // INFURA_43114: process.env.INFURA_43114!, QUICKNODE_43114: process.env.QUICKNODE_43114!, - NIRVANA_43114: process.env.NIRVANA_43114!, // BNB QUICKNODE_56: process.env.QUICKNODE_56!, // Base QUICKNODE_8453: process.env.QUICKNODE_8453!, // INFURA_8453: process.env.INFURA_8453!, ALCHEMY_8453: process.env.ALCHEMY_8453!, - NIRVANA_8453: process.env.NIRVANA_8453!, // Sepolia // INFURA_11155111: process.env.INFURA_11155111!, ALCHEMY_11155111: process.env.ALCHEMY_11155111!, // Arbitrum // INFURA_42161: process.env.INFURA_42161!, QUICKNODE_42161: process.env.QUICKNODE_42161!, - NIRVANA_42161: process.env.NIRVANA_42161!, ALCHEMY_42161: process.env.ALCHEMY_42161!, // Ethereum // INFURA_1: process.env.INFURA_1!, QUICKNODE_1: process.env.QUICKNODE_1!, QUICKNODERETH_1: process.env.QUICKNODERETH_1!, - NIRVANA_1: process.env.NIRVANA_1!, ALCHEMY_1: process.env.ALCHEMY_1!, // Blast QUICKNODE_81457: process.env.QUICKNODE_81457!, @@ -410,6 +406,10 @@ const jsonRpcProviders = { // ZkSync QUICKNODE_324: process.env.QUICKNODE_324!, ALCHEMY_324: process.env.ALCHEMY_324!, + // WorldChain, + ALCHEMY_480: process.env.ALCHEMY_480!, + // AstroChain Sepolia, + QUICKNODE_1301: process.env.QUICKNODE_1301!, // unirpc - serves all chains UNIRPC_0: process.env.UNIRPC_0!, } diff --git a/bin/stacks/routing-lambda-stack.ts b/bin/stacks/routing-lambda-stack.ts index f58725ba72..b99628801d 100644 --- a/bin/stacks/routing-lambda-stack.ts +++ b/bin/stacks/routing-lambda-stack.ts @@ -122,7 +122,7 @@ export class RoutingLambdaStack extends cdk.NestedStack { description: 'Routing Lambda', environment: { - VERSION: '26', + VERSION: '27', NODE_OPTIONS: '--enable-source-maps', POOL_CACHE_BUCKET: poolCacheBucket.bucketName, POOL_CACHE_BUCKET_3: poolCacheBucket3.bucketName, diff --git a/lib/config/rpcProviderProdConfig.json b/lib/config/rpcProviderProdConfig.json index 5856863346..dc5d7c6669 100644 --- a/lib/config/rpcProviderProdConfig.json +++ b/lib/config/rpcProviderProdConfig.json @@ -107,5 +107,23 @@ "providerInitialWeights": [1], "providerUrls": ["QUICKNODE_324"], "providerNames": ["QUICKNODE"] + }, + { + "chainId": 480, + "useMultiProviderProb": 1, + "latencyEvaluationSampleProb": 0.01, + "healthCheckSampleProb": 0.01, + "providerInitialWeights": [1], + "providerUrls": ["ALCHEMY_480"], + "providerNames": ["ALCHEMY"] + }, + { + "chainId": 1301, + "useMultiProviderProb": 1, + "latencyEvaluationSampleProb": 0.01, + "healthCheckSampleProb": 0.01, + "providerInitialWeights": [1], + "providerUrls": ["QUICKNODE_1301"], + "providerNames": ["QUICKNODE"] } ] diff --git a/lib/cron/cache-config.ts b/lib/cron/cache-config.ts index 88bbf21e2f..bf0d0b6182 100644 --- a/lib/cron/cache-config.ts +++ b/lib/cron/cache-config.ts @@ -35,6 +35,10 @@ export const v3SubgraphUrlOverride = (chainId: ChainId) => { return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v3-base/api` case ChainId.CELO: return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v3-celo/api` + case ChainId.WORLDCHAIN: + return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v3-worldchain/api` + case ChainId.ASTROCHAIN_SEPOLIA: + return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v3-astrochain-sepolia/api` default: return undefined } @@ -58,6 +62,10 @@ export const v2SubgraphUrlOverride = (chainId: ChainId) => { return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-blast/api` case ChainId.BASE: return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-base/api` + case ChainId.WORLDCHAIN: + return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-worldchain/api` + case ChainId.ASTROCHAIN_SEPOLIA: + return `https://subgraph.satsuma-prod.com/${process.env.ALCHEMY_QUERY_KEY}/uniswap/uniswap-v2-astrochain-sepolia/api` default: return undefined } diff --git a/lib/dashboards/rpc-providers-widgets-factory.ts b/lib/dashboards/rpc-providers-widgets-factory.ts index bc861831ed..08e0a4b614 100644 --- a/lib/dashboards/rpc-providers-widgets-factory.ts +++ b/lib/dashboards/rpc-providers-widgets-factory.ts @@ -20,9 +20,12 @@ const ID_TO_PROVIDER = (id: ChainId): string => { case ChainId.CELO: case ChainId.BNB: case ChainId.BASE: + case ChainId.ASTROCHAIN_SEPOLIA: return ProviderName.QUIKNODE case ChainId.CELO_ALFAJORES: return ProviderName.FORNO + case ChainId.WORLDCHAIN: + return ProviderName.ALCHEMY default: return ProviderName.UNKNOWN } diff --git a/lib/graphql/graphql-provider.ts b/lib/graphql/graphql-provider.ts index 51dc0b7042..491da7a8d0 100644 --- a/lib/graphql/graphql-provider.ts +++ b/lib/graphql/graphql-provider.ts @@ -55,6 +55,12 @@ export class UniGraphQLProvider implements IUniGraphQLProvider { return 'BLAST' case ChainId.ZORA: return 'ZORA' + case ChainId.ZKSYNC: + return 'ZKSYNC' + case ChainId.WORLDCHAIN: + return 'WORLDCHAIN' + case ChainId.ASTROCHAIN_SEPOLIA: + return 'ASTROCHAIN' default: throw new Error(`UniGraphQLProvider._chainIdToGraphQLChainName unsupported ChainId: ${chainId}`) } diff --git a/lib/handlers/injector-sor.ts b/lib/handlers/injector-sor.ts index 139a27a413..b6bae7b33f 100644 --- a/lib/handlers/injector-sor.ts +++ b/lib/handlers/injector-sor.ts @@ -100,6 +100,8 @@ export const SUPPORTED_CHAINS: ChainId[] = [ ChainId.BLAST, ChainId.ZORA, ChainId.ZKSYNC, + ChainId.WORLDCHAIN, + ChainId.ASTROCHAIN_SEPOLIA, ] const DEFAULT_TOKEN_LIST = 'https://gateway.ipfs.io/ipns/tokens.uniswap.org' @@ -347,6 +349,8 @@ export abstract class InjectorSOR extends Injector< case ChainId.BLAST: case ChainId.ZORA: case ChainId.ZKSYNC: + case ChainId.WORLDCHAIN: + case ChainId.ASTROCHAIN_SEPOLIA: const currentQuoteProvider = new OnChainQuoteProvider( chainId, provider, @@ -461,6 +465,8 @@ export abstract class InjectorSOR extends Injector< ChainId.BNB, ChainId.AVALANCHE, ChainId.BLAST, + ChainId.WORLDCHAIN, + ChainId.ASTROCHAIN_SEPOLIA, ] const v4Supported = [ChainId.SEPOLIA] diff --git a/lib/handlers/quote/util/quote-provider-traffic-switch-configuration.ts b/lib/handlers/quote/util/quote-provider-traffic-switch-configuration.ts index 9e2968f55b..18395ec9a9 100644 --- a/lib/handlers/quote/util/quote-provider-traffic-switch-configuration.ts +++ b/lib/handlers/quote/util/quote-provider-traffic-switch-configuration.ts @@ -99,6 +99,15 @@ export const QUOTE_PROVIDER_TRAFFIC_SWITCH_CONFIGURATION = ( switchExactOutPercentage: 100, samplingExactOutPercentage: 0, } as QuoteProviderTrafficSwitchConfiguration + // worldchain and astrochain sepolia don't have the view-only quoter yet, so we can shadow sample 0.1% of traffic + case ChainId.WORLDCHAIN: + case ChainId.ASTROCHAIN_SEPOLIA: + return { + switchExactInPercentage: 0.0, + samplingExactInPercentage: 0.1, + switchExactOutPercentage: 0.0, + samplingExactOutPercentage: 0.1, + } as QuoteProviderTrafficSwitchConfiguration // If we accidentally switch a traffic, we have the protection to shadow sample only 0.1% of traffic default: return { diff --git a/lib/handlers/shared.ts b/lib/handlers/shared.ts index 79ee5375cb..e1f016f3ac 100644 --- a/lib/handlers/shared.ts +++ b/lib/handlers/shared.ts @@ -49,6 +49,8 @@ export const DEFAULT_ROUTING_CONFIG_BY_CHAIN = (chainId: ChainId): AlphaRouterCo } case ChainId.BASE: case ChainId.OPTIMISM: + case ChainId.WORLDCHAIN: + case ChainId.ASTROCHAIN_SEPOLIA: return { v2PoolSelection: { topN: 3, diff --git a/lib/rpc/utils.ts b/lib/rpc/utils.ts index 4e68c136c3..5fe6ecb1a7 100644 --- a/lib/rpc/utils.ts +++ b/lib/rpc/utils.ts @@ -18,6 +18,10 @@ export function chainIdToNetworkName(networkId: ChainId): string { return 'avalanchec' case ChainId.BASE: return 'base' + case ChainId.WORLDCHAIN: + return 'worldchain' + case ChainId.ASTROCHAIN_SEPOLIA: + return 'astrochain-sepolia' default: return 'ethereum' } @@ -60,22 +64,6 @@ export function generateProviderUrl(key: string, value: string, chainId: number) case 'INFURA_81457': { return `https://blast-mainnet.infura.io/v3/${tokens[0]}` } - // Nirvana - case 'NIRVANA_43114': { - return `https://avax.nirvanalabs.xyz/${tokens[0]}/ext/bc/C/rpc?apikey=${tokens[1]}` - } - case 'NIRVANA_10': { - return `https://optimism.nirvanalabs.xyz/${tokens[0]}?apikey=${tokens[1]}` - } - case 'NIRVANA_8453': { - return `https://base.nirvanalabs.xyz/${tokens[0]}?apikey=${tokens[1]}` - } - case 'NIRVANA_42161': { - return `https://arb.nirvanalabs.xyz/${tokens[0]}?apikey=${tokens[1]}` - } - case 'NIRVANA_1': { - return `https://ethereum.nirvanalabs.xyz/${tokens[0]}?apikey=${tokens[1]}` - } // Quicknode case 'QUICKNODE_43114': { return `https://${tokens[0]}.avalanche-mainnet.quiknode.pro/${tokens[1]}/ext/bc/C/rpc/` @@ -110,6 +98,9 @@ export function generateProviderUrl(key: string, value: string, chainId: number) case 'QUICKNODE_324': { return `https://${tokens[0]}.zksync-mainnet.quiknode.pro/${tokens[1]}` } + case 'QUICKNODE_1301': { + return `${tokens[0]}` + } // QuickNode RETH case 'QUICKNODERETH_1': { return `https://${tokens[0]}.quiknode.pro/${tokens[1]}` @@ -136,6 +127,9 @@ export function generateProviderUrl(key: string, value: string, chainId: number) case 'ALCHEMY_324': { return `https://zksync-mainnet.g.alchemy.com/v2/${tokens[0]}` } + case 'ALCHEMY_480': { + return `https://worldchain-mainnet.g.alchemy.com/v2/${tokens[0]}` + } } throw new Error(`Unknown provider-chainId pair: ${key}`) } diff --git a/lib/util/onChainQuoteProviderConfigs.ts b/lib/util/onChainQuoteProviderConfigs.ts index cc8633a60a..f6b2783593 100644 --- a/lib/util/onChainQuoteProviderConfigs.ts +++ b/lib/util/onChainQuoteProviderConfigs.ts @@ -42,6 +42,16 @@ export const RETRY_OPTIONS: { [chainId: number]: AsyncRetry.Options | undefined minTimeout: 100, maxTimeout: 1000, }, + [ChainId.WORLDCHAIN]: { + retries: 2, + minTimeout: 100, + maxTimeout: 1000, + }, + [ChainId.ASTROCHAIN_SEPOLIA]: { + retries: 2, + minTimeout: 100, + maxTimeout: 1000, + }, } export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol: string]: { [chainId: number]: BatchParams } } = { @@ -97,6 +107,18 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol: string]: { [cha gasLimitPerCall: 4_000_000, quoteMinSuccessRate: 0.1, }, + // TODO: once worldchain has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.WORLDCHAIN]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, + // TODO: once astrochain-sepolia has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.ASTROCHAIN_SEPOLIA]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, }, [Protocol.MIXED]: { ...constructSameBatchParamsMap(DEFAULT_BATCH_PARAMS), @@ -145,6 +167,18 @@ export const OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol: string]: { [cha gasLimitPerCall: 4_000_000, quoteMinSuccessRate: 0.1, }, + // TODO: once worldchain has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.WORLDCHAIN]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, + // TODO: once astrochain-sepolia has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.ASTROCHAIN_SEPOLIA]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, }, } @@ -201,6 +235,18 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol: string]: { gasLimitPerCall: 4_000_000, quoteMinSuccessRate: 0.1, }, + // TODO: once worldchain has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.WORLDCHAIN]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, + // TODO: once astrochain-sepolia has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.ASTROCHAIN_SEPOLIA]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, }, [Protocol.MIXED]: { ...constructSameBatchParamsMap(DEFAULT_BATCH_PARAMS), @@ -249,6 +295,18 @@ export const NON_OPTIMISTIC_CACHED_ROUTES_BATCH_PARAMS: { [protocol: string]: { gasLimitPerCall: 4_000_000, quoteMinSuccessRate: 0.1, }, + // TODO: once worldchain has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.WORLDCHAIN]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, + // TODO: once astrochain-sepolia has view-quoter, optimize muilcallChunk and gasLimitPerCall + [ChainId.ASTROCHAIN_SEPOLIA]: { + multicallChunk: 80, + gasLimitPerCall: 1_200_000, + quoteMinSuccessRate: 0.1, + }, }, } @@ -278,6 +336,14 @@ export const GAS_ERROR_FAILURE_OVERRIDES: { [chainId: number]: FailureOverrides gasLimitOverride: 6_000_000, multicallChunk: 10, }, + [ChainId.WORLDCHAIN]: { + gasLimitOverride: 3_000_000, + multicallChunk: 45, + }, + [ChainId.ASTROCHAIN_SEPOLIA]: { + gasLimitOverride: 3_000_000, + multicallChunk: 45, + }, } export const SUCCESS_RATE_FAILURE_OVERRIDES: { [chainId: number]: FailureOverrides } = { @@ -306,6 +372,14 @@ export const SUCCESS_RATE_FAILURE_OVERRIDES: { [chainId: number]: FailureOverrid gasLimitOverride: 6_000_000, multicallChunk: 10, }, + [ChainId.WORLDCHAIN]: { + gasLimitOverride: 3_000_000, + multicallChunk: 45, + }, + [ChainId.ASTROCHAIN_SEPOLIA]: { + gasLimitOverride: 3_000_000, + multicallChunk: 45, + }, } export const BLOCK_NUMBER_CONFIGS: { [chainId: number]: BlockNumberConfig } = { @@ -342,6 +416,22 @@ export const BLOCK_NUMBER_CONFIGS: { [chainId: number]: BlockNumberConfig } = { rollbackBlockOffset: -10, }, }, + [ChainId.WORLDCHAIN]: { + baseBlockOffset: -25, + rollback: { + enabled: true, + attemptsBeforeRollback: 1, + rollbackBlockOffset: -20, + }, + }, + [ChainId.ASTROCHAIN_SEPOLIA]: { + baseBlockOffset: -25, + rollback: { + enabled: true, + attemptsBeforeRollback: 1, + rollbackBlockOffset: -20, + }, + }, } // block -1 means it's never deployed @@ -371,6 +461,8 @@ export const NEW_QUOTER_DEPLOY_BLOCK: { [chainId in ChainId]: number } = { [ChainId.ROOTSTOCK]: -1, [ChainId.BLAST]: 2370179, [ChainId.ZKSYNC]: 35982078, + [ChainId.WORLDCHAIN]: -1, + [ChainId.ASTROCHAIN_SEPOLIA]: -1, } // 0 threshold means it's not deployed yet @@ -399,6 +491,8 @@ export const LIKELY_OUT_OF_GAS_THRESHOLD: { [chainId in ChainId]: number } = { [ChainId.ROOTSTOCK]: 0, [ChainId.BLAST]: 17540 * 2, // 17540 is the single tick.cross cost on blast. We multiply by 2 to be safe, [ChainId.ZKSYNC]: 17540 * 2, // 17540 is the single tick.cross cost on zkSync. We multiply by 2 to be safe + [ChainId.WORLDCHAIN]: 0, + [ChainId.ASTROCHAIN_SEPOLIA]: 0, } // TODO: Move this new addresses to SOR diff --git a/package-lock.json b/package-lock.json index 73cd5518f8..efda4fa87f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,14 +26,14 @@ "@types/stats-lite": "^2.2.0", "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.4.0", - "@uniswap/smart-order-router": "4.3.1", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", + "@uniswap/smart-order-router": "4.4.0", "@uniswap/token-lists": "^1.0.0-beta.33", - "@uniswap/universal-router-sdk": "^3.1.2", - "@uniswap/v2-sdk": "^4.3.2", + "@uniswap/universal-router-sdk": "^3.3.0", + "@uniswap/v2-sdk": "^4.6.0", "@uniswap/v3-periphery": "^1.4.4", - "@uniswap/v3-sdk": "^3.14.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "async-retry": "^1.3.1", "aws-cdk-lib": "^2.137.0", @@ -4718,22 +4718,22 @@ } }, "node_modules/@uniswap/router-sdk": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@uniswap/router-sdk/-/router-sdk-1.12.1.tgz", - "integrity": "sha512-n6ugqB54z/b24Wr6wKU39FlFHTj4KNSpksp3CAFNVOIN8l6PmVOIq3lkABcRyewUHGxgu5WCKGd36bU4UiHqaQ==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@uniswap/router-sdk/-/router-sdk-1.14.0.tgz", + "integrity": "sha512-5Lt3jv2fSpy67xlRAaYHfRbQYiYMivIaq1bpKyNXSjkoPWmPSZE0Hz4F/Jm/jLWX/sx6U3QbgAlg1VGSf8FuRA==", "dependencies": { "@ethersproject/abi": "^5.5.0", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.0", - "@uniswap/v2-sdk": "^4.3.2", - "@uniswap/v3-sdk": "^3.11.2", + "@uniswap/v2-sdk": "^4.6.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.0" } }, "node_modules/@uniswap/sdk-core": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-5.4.0.tgz", - "integrity": "sha512-L8wxC2aC+kIo4Xq1vXWYOiql3CmC/jrXTYpqqCBAI0/ODUomrBY76jSajzqWEEqnTGC67nI8+Hl7aEhA5/UVBg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-5.8.0.tgz", + "integrity": "sha512-TiG8P3BOHph0JuwvfBSnkSjLYPDqGNR/iScUDr8ZCo1dqIEzasrw9yFgpirTveVfW85aQ6It/daZIvz2bght9A==", "dependencies": { "@ethersproject/address": "^5.0.2", "@ethersproject/bytes": "^5.7.0", @@ -4750,22 +4750,22 @@ } }, "node_modules/@uniswap/smart-order-router": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-4.3.1.tgz", - "integrity": "sha512-Y66sTtt89v4FNbXEvce6BEMXvTVJWOJ2iEQgTMtwZY940f664z70s3XQBoeyFf644QFfe8w0NQ6BqDfUvCkXIw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-4.4.0.tgz", + "integrity": "sha512-C7GnmzxjeBfJnTg6m/6vSldB8ZrNaqEAPCLknYhGHR0uk91BJShgAYIzcQu2rIcFaq5qGS9jAotdWDaEN1VR0g==", "dependencies": { "@eth-optimism/sdk": "^3.2.2", "@types/brotli": "^1.3.4", "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.4.0", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.1", "@uniswap/token-lists": "^1.0.0-beta.31", "@uniswap/universal-router": "^1.6.0", - "@uniswap/universal-router-sdk": "^3.1.2", - "@uniswap/v2-sdk": "^4.3.2", - "@uniswap/v3-sdk": "^3.13.0", + "@uniswap/universal-router-sdk": "^3.3.0", + "@uniswap/v2-sdk": "^4.6.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "async-retry": "^1.3.1", "await-timeout": "^1.1.1", @@ -4847,19 +4847,19 @@ } }, "node_modules/@uniswap/universal-router-sdk": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-3.1.2.tgz", - "integrity": "sha512-nLfN/xGyDc8aS9kcVpf9i0POFWnb4pieHsRiOdjxVuing1KyPbKyXZIjxFQjBKfjG3BmTOiYfL9hT+q71f/FtA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-3.3.0.tgz", + "integrity": "sha512-9QYfcfS+ZKZ0Lbk+ToAZ0MBBEyXlfNnaPMCJz8J1sIbPTTHL5nVWmHmxl+KnM6nLT6sQMf+ecsgZ+UOZDNRuiQ==", "dependencies": { "@openzeppelin/contracts": "4.7.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/universal-router": "2.0.0-beta.1", "@uniswap/v2-core": "^1.0.1", - "@uniswap/v2-sdk": "^4.4.1", + "@uniswap/v2-sdk": "^4.6.0", "@uniswap/v3-core": "1.0.0", - "@uniswap/v3-sdk": "^3.13.1", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "bignumber.js": "^9.0.2", "ethers": "^5.7.0" @@ -4905,13 +4905,13 @@ } }, "node_modules/@uniswap/v2-sdk": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@uniswap/v2-sdk/-/v2-sdk-4.4.1.tgz", - "integrity": "sha512-mU0YNgpm7Nmh3RSlcltluYVECdBcfQQIIQIDCM49Rog8ZnW4wp5QqEYkVjgAuqdu1mwLkMDMQUhzhtC0Z2Df6g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-sdk/-/v2-sdk-4.6.0.tgz", + "integrity": "sha512-eXx5kpuSJB21pRe8cUuoBADpfTww/Ifadp7Ue50yugMBPDzIZ8896d1DSQ/bTIfZYhx5tKmM9Zg2sAMh53dNkg==", "dependencies": { "@ethersproject/address": "^5.0.2", "@ethersproject/solidity": "^5.0.9", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "tiny-invariant": "^1.1.0", "tiny-warning": "^1.0.3" }, @@ -4948,13 +4948,13 @@ "integrity": "sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==" }, "node_modules/@uniswap/v3-sdk": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/@uniswap/v3-sdk/-/v3-sdk-3.14.0.tgz", - "integrity": "sha512-/fnHYnCpzp8Ruwn9/Tm2Xv2oSykNajwCRwgfdD0K/2euwdlKaNCMpGqCP1XZsugLbEEemCNjFpc3i6YAk2IdYg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@uniswap/v3-sdk/-/v3-sdk-3.17.0.tgz", + "integrity": "sha512-5j8UyAQoLVghVphqjkOoIVmpvtOuTJuV5yDAygNGYU3BGl3RJzvd2P9s0heuEA2hjty7k3ucqt8j1+buUKUlNg==", "dependencies": { "@ethersproject/abi": "^5.5.0", "@ethersproject/solidity": "^5.0.9", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.0", "@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-staker": "1.0.0", @@ -28420,22 +28420,22 @@ } }, "@uniswap/router-sdk": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@uniswap/router-sdk/-/router-sdk-1.12.1.tgz", - "integrity": "sha512-n6ugqB54z/b24Wr6wKU39FlFHTj4KNSpksp3CAFNVOIN8l6PmVOIq3lkABcRyewUHGxgu5WCKGd36bU4UiHqaQ==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@uniswap/router-sdk/-/router-sdk-1.14.0.tgz", + "integrity": "sha512-5Lt3jv2fSpy67xlRAaYHfRbQYiYMivIaq1bpKyNXSjkoPWmPSZE0Hz4F/Jm/jLWX/sx6U3QbgAlg1VGSf8FuRA==", "requires": { "@ethersproject/abi": "^5.5.0", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.0", - "@uniswap/v2-sdk": "^4.3.2", - "@uniswap/v3-sdk": "^3.11.2", + "@uniswap/v2-sdk": "^4.6.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.0" } }, "@uniswap/sdk-core": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-5.4.0.tgz", - "integrity": "sha512-L8wxC2aC+kIo4Xq1vXWYOiql3CmC/jrXTYpqqCBAI0/ODUomrBY76jSajzqWEEqnTGC67nI8+Hl7aEhA5/UVBg==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@uniswap/sdk-core/-/sdk-core-5.8.0.tgz", + "integrity": "sha512-TiG8P3BOHph0JuwvfBSnkSjLYPDqGNR/iScUDr8ZCo1dqIEzasrw9yFgpirTveVfW85aQ6It/daZIvz2bght9A==", "requires": { "@ethersproject/address": "^5.0.2", "@ethersproject/bytes": "^5.7.0", @@ -28449,22 +28449,22 @@ } }, "@uniswap/smart-order-router": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-4.3.1.tgz", - "integrity": "sha512-Y66sTtt89v4FNbXEvce6BEMXvTVJWOJ2iEQgTMtwZY940f664z70s3XQBoeyFf644QFfe8w0NQ6BqDfUvCkXIw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@uniswap/smart-order-router/-/smart-order-router-4.4.0.tgz", + "integrity": "sha512-C7GnmzxjeBfJnTg6m/6vSldB8ZrNaqEAPCLknYhGHR0uk91BJShgAYIzcQu2rIcFaq5qGS9jAotdWDaEN1VR0g==", "requires": { "@eth-optimism/sdk": "^3.2.2", "@types/brotli": "^1.3.4", "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.4.0", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.1", "@uniswap/token-lists": "^1.0.0-beta.31", "@uniswap/universal-router": "^1.6.0", - "@uniswap/universal-router-sdk": "^3.1.2", - "@uniswap/v2-sdk": "^4.3.2", - "@uniswap/v3-sdk": "^3.13.0", + "@uniswap/universal-router-sdk": "^3.3.0", + "@uniswap/v2-sdk": "^4.6.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "async-retry": "^1.3.1", "await-timeout": "^1.1.1", @@ -28536,19 +28536,19 @@ } }, "@uniswap/universal-router-sdk": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-3.1.2.tgz", - "integrity": "sha512-nLfN/xGyDc8aS9kcVpf9i0POFWnb4pieHsRiOdjxVuing1KyPbKyXZIjxFQjBKfjG3BmTOiYfL9hT+q71f/FtA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@uniswap/universal-router-sdk/-/universal-router-sdk-3.3.0.tgz", + "integrity": "sha512-9QYfcfS+ZKZ0Lbk+ToAZ0MBBEyXlfNnaPMCJz8J1sIbPTTHL5nVWmHmxl+KnM6nLT6sQMf+ecsgZ+UOZDNRuiQ==", "requires": { "@openzeppelin/contracts": "4.7.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/universal-router": "2.0.0-beta.1", "@uniswap/v2-core": "^1.0.1", - "@uniswap/v2-sdk": "^4.4.1", + "@uniswap/v2-sdk": "^4.6.0", "@uniswap/v3-core": "1.0.0", - "@uniswap/v3-sdk": "^3.13.1", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "bignumber.js": "^9.0.2", "ethers": "^5.7.0" @@ -28584,13 +28584,13 @@ "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==" }, "@uniswap/v2-sdk": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@uniswap/v2-sdk/-/v2-sdk-4.4.1.tgz", - "integrity": "sha512-mU0YNgpm7Nmh3RSlcltluYVECdBcfQQIIQIDCM49Rog8ZnW4wp5QqEYkVjgAuqdu1mwLkMDMQUhzhtC0Z2Df6g==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-sdk/-/v2-sdk-4.6.0.tgz", + "integrity": "sha512-eXx5kpuSJB21pRe8cUuoBADpfTww/Ifadp7Ue50yugMBPDzIZ8896d1DSQ/bTIfZYhx5tKmM9Zg2sAMh53dNkg==", "requires": { "@ethersproject/address": "^5.0.2", "@ethersproject/solidity": "^5.0.9", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "tiny-invariant": "^1.1.0", "tiny-warning": "^1.0.3" } @@ -28620,13 +28620,13 @@ } }, "@uniswap/v3-sdk": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/@uniswap/v3-sdk/-/v3-sdk-3.14.0.tgz", - "integrity": "sha512-/fnHYnCpzp8Ruwn9/Tm2Xv2oSykNajwCRwgfdD0K/2euwdlKaNCMpGqCP1XZsugLbEEemCNjFpc3i6YAk2IdYg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@uniswap/v3-sdk/-/v3-sdk-3.17.0.tgz", + "integrity": "sha512-5j8UyAQoLVghVphqjkOoIVmpvtOuTJuV5yDAygNGYU3BGl3RJzvd2P9s0heuEA2hjty7k3ucqt8j1+buUKUlNg==", "requires": { "@ethersproject/abi": "^5.5.0", "@ethersproject/solidity": "^5.0.9", - "@uniswap/sdk-core": "^5.3.1", + "@uniswap/sdk-core": "^5.8.0", "@uniswap/swap-router-contracts": "^1.3.0", "@uniswap/v3-periphery": "^1.1.1", "@uniswap/v3-staker": "1.0.0", diff --git a/package.json b/package.json index 20142b610d..e8e7f244bf 100644 --- a/package.json +++ b/package.json @@ -84,15 +84,15 @@ "@types/stats-lite": "^2.2.0", "@uniswap/default-token-list": "^11.13.0", "@uniswap/permit2-sdk": "^1.3.0", - "@uniswap/router-sdk": "^1.12.1", - "@uniswap/sdk-core": "^5.4.0", + "@uniswap/router-sdk": "^1.14.0", + "@uniswap/sdk-core": "^5.8.0", "@types/semver": "^7.5.8", - "@uniswap/smart-order-router": "4.3.1", + "@uniswap/smart-order-router": "4.4.0", "@uniswap/token-lists": "^1.0.0-beta.33", - "@uniswap/universal-router-sdk": "^3.1.2", - "@uniswap/v2-sdk": "^4.3.2", + "@uniswap/universal-router-sdk": "^3.3.0", + "@uniswap/v2-sdk": "^4.6.0", "@uniswap/v3-periphery": "^1.4.4", - "@uniswap/v3-sdk": "^3.14.0", + "@uniswap/v3-sdk": "^3.17.0", "@uniswap/v4-sdk": "^1.6.3", "async-retry": "^1.3.1", "aws-cdk-lib": "^2.137.0", diff --git a/test/mocha/e2e/quote.test.ts b/test/mocha/e2e/quote.test.ts index 02f6ce01f9..30ce866f97 100644 --- a/test/mocha/e2e/quote.test.ts +++ b/test/mocha/e2e/quote.test.ts @@ -25,6 +25,7 @@ import { V4_SEPOLIA_TEST_A, V4_SEPOLIA_TEST_B, WBTC_MAINNET, + WLD_WORLDCHAIN, } from '@uniswap/smart-order-router' import { PERMIT2_ADDRESS, @@ -2515,6 +2516,8 @@ describe('quote', function () { [ChainId.ROOTSTOCK]: () => USDC_ON(ChainId.ROOTSTOCK), [ChainId.BLAST]: () => USDB_BLAST, [ChainId.ZKSYNC]: () => USDC_ON(ChainId.ZKSYNC), + [ChainId.WORLDCHAIN]: () => USDC_ON(ChainId.WORLDCHAIN), + [ChainId.ASTROCHAIN_SEPOLIA]: () => USDC_ON(ChainId.ASTROCHAIN_SEPOLIA), } const TEST_ERC20_2: { [chainId in ChainId]: () => Token | null } = { @@ -2543,6 +2546,8 @@ describe('quote', function () { [ChainId.ROOTSTOCK]: () => WNATIVE_ON(ChainId.ROOTSTOCK), [ChainId.BLAST]: () => WNATIVE_ON(ChainId.BLAST), [ChainId.ZKSYNC]: () => WNATIVE_ON(ChainId.ZKSYNC), + [ChainId.WORLDCHAIN]: () => WLD_WORLDCHAIN, + [ChainId.ASTROCHAIN_SEPOLIA]: () => WNATIVE_ON(ChainId.ASTROCHAIN_SEPOLIA), } // TODO: Find valid pools/tokens on optimistic kovan and polygon mumbai. We skip those tests for now. @@ -2556,7 +2561,8 @@ describe('quote', function () { // We will follow up supporting ZORA and ROOTSTOCK c != ChainId.ZORA_SEPOLIA && c != ChainId.ROOTSTOCK && - c != ChainId.GOERLI + c != ChainId.GOERLI && + c != ChainId.ASTROCHAIN_SEPOLIA )) { for (const type of TRADE_TYPES) { const erc1 = TEST_ERC20_1[chain]() @@ -2577,7 +2583,12 @@ describe('quote', function () { } // Current WETH/USDB pool (https://blastscan.io/address/0xf52b4b69123cbcf07798ae8265642793b2e8990c) has low WETH amount - const amount = chain === ChainId.BLAST ? (type === 'exactOut' ? '0.002' : '0.01') : '1' + const amount = + chain === ChainId.BLAST || chain === ChainId.WORLDCHAIN || chain === ChainId.ASTROCHAIN_SEPOLIA + ? type === 'exactOut' + ? '0.002' + : '0.01' + : '1' const quoteReq: QuoteQueryParams = { tokenInAddress: wrappedNative.address, @@ -2633,8 +2644,7 @@ describe('quote', function () { } }) - // TODO: re-enable sepolia v4 route e2e test, once SOR and routing-api updates the pool manager and state view contract address - it.skip(`${erc1.symbol} -> ${erc2.symbol}`, async () => { + it(`${erc1.symbol} -> ${erc2.symbol}`, async () => { if (chain === ChainId.SEPOLIA) { // Sepolia doesn't have sufficient liquidity on DAI pools yet return @@ -2673,7 +2683,12 @@ describe('quote', function () { const native = NATIVE_CURRENCY[chain] it(`${native} -> erc20`, async () => { - if (chain === ChainId.BLAST || chain === ChainId.ZORA || chain === ChainId.ZKSYNC) { + if ( + chain === ChainId.BLAST || + chain === ChainId.ZORA || + chain === ChainId.ZKSYNC || + chain === ChainId.ASTROCHAIN_SEPOLIA + ) { // Blast doesn't have DAI or USDC yet // Zora doesn't have DAI // Zksync doesn't have liquid USDC/DAI pool yet diff --git a/test/mocha/unit/rpc/GlobalRpcProviders.test.ts b/test/mocha/unit/rpc/GlobalRpcProviders.test.ts index 469efe2fde..7225fdb82d 100644 --- a/test/mocha/unit/rpc/GlobalRpcProviders.test.ts +++ b/test/mocha/unit/rpc/GlobalRpcProviders.test.ts @@ -249,10 +249,8 @@ describe('GlobalRpcProviders', () => { process.env = { INFURA_43114: 'key0', QUICKNODE_43114: 'host1,key1', - NIRVANA_43114: 'host2,key2', INFURA_10: 'key3', QUICKNODE_10: 'host3,key3', - NIRVANA_10: 'host4,key4', ALCHEMY_10: 'key5', INFURA_42220: 'key6', QUICKNODE_42220: 'host7,key7', @@ -263,16 +261,13 @@ describe('GlobalRpcProviders', () => { INFURA_8453: 'key12', QUICKNODE_8453: 'host13,key13', ALCHEMY_8453: 'key14', - NIRVANA_8453: 'host15,key15', INFURA_11155111: 'key16', ALCHEMY_11155111: 'key17', INFURA_42161: 'key18', QUICKNODE_42161: 'host19,key19', - NIRVANA_42161: 'host20,key20', ALCHEMY_42161: 'key21', INFURA_1: 'key22', QUICKNODE_1: 'host23,key23', - NIRVANA_1: 'host24,key24', ALCHEMY_1: 'key25', QUICKNODE_81457: 'host26,key26', INFURA_81457: 'key27', @@ -308,8 +303,7 @@ describe('GlobalRpcProviders', () => { ).get(ChainId.ARBITRUM_ONE)!! expect(arbitrumRpcProvider['providers'][0].url).equal('https://arbitrum-mainnet.infura.io/v3/key18') expect(arbitrumRpcProvider['providers'][1].url).equal('https://host19.arbitrum-mainnet.quiknode.pro/key19') - expect(arbitrumRpcProvider['providers'][2].url).equal('https://arb.nirvanalabs.xyz/host20?apikey=key20') - expect(arbitrumRpcProvider['providers'][3].url).equal('https://arb-mainnet-fast.g.alchemy.com/v2/key21') + expect(arbitrumRpcProvider['providers'][2].url).equal('https://arb-mainnet-fast.g.alchemy.com/v2/key21') const baseRpcProvider = GlobalRpcProviders.getGlobalUniRpcProviders( log, @@ -320,7 +314,6 @@ describe('GlobalRpcProviders', () => { expect(baseRpcProvider['providers'][0].url).equal('https://host13.base-mainnet.quiknode.pro/key13') expect(baseRpcProvider['providers'][1].url).equal('https://base-mainnet.infura.io/v3/key12') expect(baseRpcProvider['providers'][2].url).equal('https://base-mainnet-fast.g.alchemy.com/v2/key14') - expect(baseRpcProvider['providers'][3].url).equal('https://base.nirvanalabs.xyz/host15?apikey=key15') const ethRpcProvider = GlobalRpcProviders.getGlobalUniRpcProviders( log, @@ -330,8 +323,7 @@ describe('GlobalRpcProviders', () => { ).get(ChainId.MAINNET)!! expect(ethRpcProvider['providers'][0].url).equal('https://mainnet.infura.io/v3/key22') expect(ethRpcProvider['providers'][1].url).equal('https://host23.quiknode.pro/key23') - expect(ethRpcProvider['providers'][2].url).equal('https://ethereum.nirvanalabs.xyz/host24?apikey=key24') - expect(ethRpcProvider['providers'][3].url).equal('https://eth-mainnet-fast.g.alchemy.com/v2/key25') + expect(ethRpcProvider['providers'][2].url).equal('https://eth-mainnet-fast.g.alchemy.com/v2/key25') const blastRpcProvider = GlobalRpcProviders.getGlobalUniRpcProviders( log, diff --git a/test/mocha/unit/rpc/ProdConfig.test.ts b/test/mocha/unit/rpc/ProdConfig.test.ts index 918e98edd0..2c6a2d1208 100644 --- a/test/mocha/unit/rpc/ProdConfig.test.ts +++ b/test/mocha/unit/rpc/ProdConfig.test.ts @@ -79,14 +79,14 @@ describe('ProdConfig', () => { it('test getRpcGatewayEnabledChainIdProviderNamePairs', () => { const enabledChains: Map = getRpcGatewayEnabledChains(TEST_PROD_CONFIG) expect(enabledChains.get(ChainId.CELO)).to.have.members(['QUICKNODE', 'INFURA']) - expect(enabledChains.get(ChainId.AVALANCHE)).to.have.members(['INFURA', 'QUICKNODE', 'NIRVANA']) + expect(enabledChains.get(ChainId.AVALANCHE)).to.have.members(['INFURA', 'QUICKNODE']) expect(enabledChains.get(ChainId.BNB)).to.have.members(['QUICKNODE']) expect(enabledChains.get(ChainId.OPTIMISM)).to.have.members(['INFURA', 'QUICKNODE', 'ALCHEMY']) expect(enabledChains.get(ChainId.SEPOLIA)).to.have.members(['INFURA', 'ALCHEMY']) expect(enabledChains.get(ChainId.POLYGON)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY']) - expect(enabledChains.get(ChainId.ARBITRUM_ONE)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY', 'NIRVANA']) - expect(enabledChains.get(ChainId.BASE)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY', 'NIRVANA']) - expect(enabledChains.get(ChainId.MAINNET)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY', 'NIRVANA', 'UNIRPC']) + expect(enabledChains.get(ChainId.ARBITRUM_ONE)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY']) + expect(enabledChains.get(ChainId.BASE)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY']) + expect(enabledChains.get(ChainId.MAINNET)).to.have.members(['QUICKNODE', 'INFURA', 'ALCHEMY', 'UNIRPC']) expect(enabledChains.get(ChainId.BLAST)).to.have.members(['QUICKNODE', 'INFURA']) }) diff --git a/test/mocha/unit/rpc/rpcProviderTestProdConfig.json b/test/mocha/unit/rpc/rpcProviderTestProdConfig.json index b6f1ab2150..443d3b41b8 100644 --- a/test/mocha/unit/rpc/rpcProviderTestProdConfig.json +++ b/test/mocha/unit/rpc/rpcProviderTestProdConfig.json @@ -9,9 +9,9 @@ { "chainId": 43114, "useMultiProviderProb": 1, - "providerInitialWeights": [1, 0, 0], - "providerUrls": ["INFURA_43114", "QUICKNODE_43114", "NIRVANA_43114"], - "providerNames": ["INFURA", "QUICKNODE", "NIRVANA"] + "providerInitialWeights": [1, 0], + "providerUrls": ["INFURA_43114", "QUICKNODE_43114"], + "providerNames": ["INFURA", "QUICKNODE"] }, { "chainId": 56, @@ -44,23 +44,23 @@ { "chainId": 42161, "useMultiProviderProb": 1, - "providerInitialWeights": [1, 1, 1, 1], - "providerUrls": ["INFURA_42161", "QUICKNODE_42161", "NIRVANA_42161", "ALCHEMY_42161"], - "providerNames": ["INFURA", "QUICKNODE", "NIRVANA", "ALCHEMY"] + "providerInitialWeights": [1, 1, 1], + "providerUrls": ["INFURA_42161", "QUICKNODE_42161", "ALCHEMY_42161"], + "providerNames": ["INFURA", "QUICKNODE", "ALCHEMY"] }, { "chainId": 8453, "useMultiProviderProb": 1, - "providerInitialWeights": [1, 0, 0, 0], - "providerUrls": ["QUICKNODE_8453", "INFURA_8453", "ALCHEMY_8453", "NIRVANA_8453"], - "providerNames": ["QUICKNODE", "INFURA", "ALCHEMY", "NIRVANA"] + "providerInitialWeights": [1, 0, 0], + "providerUrls": ["QUICKNODE_8453", "INFURA_8453", "ALCHEMY_8453"], + "providerNames": ["QUICKNODE", "INFURA", "ALCHEMY"] }, { "chainId": 1, "useMultiProviderProb": 1, - "providerInitialWeights": [1, 0, 0, 0, 0], - "providerUrls": ["INFURA_1", "QUICKNODE_1", "NIRVANA_1", "ALCHEMY_1", "UNIRPC_0"], - "providerNames": ["INFURA", "QUICKNODE", "NIRVANA", "ALCHEMY", "UNIRPC"] + "providerInitialWeights": [1, 0, 0, 0], + "providerUrls": ["INFURA_1", "QUICKNODE_1", "ALCHEMY_1", "UNIRPC_0"], + "providerNames": ["INFURA", "QUICKNODE", "ALCHEMY", "UNIRPC"] }, { "chainId": 81457, diff --git a/test/utils/tokens.ts b/test/utils/tokens.ts index 5d44104623..36fc7a32b6 100644 --- a/test/utils/tokens.ts +++ b/test/utils/tokens.ts @@ -15,6 +15,7 @@ import { log, NodeJSCache, USDC_ARBITRUM, + USDC_ASTROCHAIN_SEPOLIA, USDC_AVAX, USDC_BASE, USDC_BASE_GOERLI, @@ -26,6 +27,7 @@ import { USDC_POLYGON, USDC_POLYGON_MUMBAI, USDC_SEPOLIA, + USDC_WORLDCHAIN, USDC_ZORA, USDCE_ZKSYNC, USDT_ARBITRUM, @@ -138,6 +140,10 @@ export const USDC_ON = (chainId: ChainId): Token => { return USDC_ZORA case ChainId.ZKSYNC: return USDCE_ZKSYNC + case ChainId.WORLDCHAIN: + return USDC_WORLDCHAIN + case ChainId.ASTROCHAIN_SEPOLIA: + return USDC_ASTROCHAIN_SEPOLIA default: throw new Error(`Chain id: ${chainId} not supported`) }