From 4df723b70306d49d9c2d4f0c887ef7395237da15 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 17 Oct 2024 15:19:26 -0400 Subject: [PATCH] add unichain sepolia --- networks.json | 6 ++++++ src/utils/chains.ts | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/networks.json b/networks.json index 822ddcb7..932d6897 100644 --- a/networks.json +++ b/networks.json @@ -76,5 +76,11 @@ "address": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c", "startBlock": 3518270 } + }, + "unichain-sepolia": { + "Factory": { + "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", + "startBlock": 0 + } } } diff --git a/src/utils/chains.ts b/src/utils/chains.ts index 692c8399..6a236021 100644 --- a/src/utils/chains.ts +++ b/src/utils/chains.ts @@ -17,6 +17,7 @@ export enum ChainId { ZORA_MAINNET = 7777777, WORLDCHAIN_MAINNET = 480, SEPOLIA = 11155111, + UNICHAIN_SEPOLIA = 1301, } // subgraph does not support string enums, hence these constants @@ -33,6 +34,7 @@ const ZKSYNC_ERA_NETWORK_NAME = 'zksync-era' const ZORA_MAINNET_NETWORK_NAME = 'zora-mainnet' const WORLDCHAIN_MAINNET_NETWORK_NAME = 'worldchain-mainnet' const SEPOLIA_NETWORK_NAME = 'sepolia' +const UNICHAIN_SEPOLIA_NETWORK_NAME = 'unichain-sepolia' // Note: All token and pool addresses should be lowercased! export class SubgraphConfig { @@ -456,6 +458,24 @@ export function getSubgraphConfig(): SubgraphConfig { poolsToSkip: [], poolMappings: [], } + } else if (selectedNetwork == UNICHAIN_SEPOLIA_NETWORK_NAME) { + return { + factoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984', + stablecoinWrappedNativePoolAddress: '0xE87b0A6C6611119deCF5C4e9203E1c46F561BdAE', // USDC/WETH + stablecoinIsToken0: true, + wrappedNativeAddress: '0x4200000000000000000000000000000000000006', // WETH + minimumNativeLocked: BigDecimal.fromString('1'), + stablecoinAddresses: [ + '0x31d0220469e10c4E71834a79b1f276d740d3768F', // USDC + ], + whitelistTokens: [ + '0x4200000000000000000000000000000000000006', // WETH + '0x31d0220469e10c4E71834a79b1f276d740d3768F', // USDC + ], + tokenOverrides: [], + poolsToSkip: [], + poolMappings: [], + } } else { throw new Error('Unsupported Network') }