diff --git a/networks.json b/networks.json index 822ddcb7..03efcbc4 100644 --- a/networks.json +++ b/networks.json @@ -53,6 +53,18 @@ "startBlock": 0 } }, + "unichain-mainnet": { + "Factory": { + "address": "0x1f98400000000000000000000000000000000003", + "startBlock": 0 + } + }, + "unichain-sepolia": { + "Factory": { + "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", + "startBlock": 0 + } + }, "zksync-era": { "Factory": { "address": "0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422", diff --git a/src/utils/chains.ts b/src/utils/chains.ts index a4c47133..6511ebce 100644 --- a/src/utils/chains.ts +++ b/src/utils/chains.ts @@ -17,6 +17,8 @@ export enum ChainId { ZORA_MAINNET = 7777777, WORLDCHAIN_MAINNET = 480, SEPOLIA = 11155111, + UNICHAIN = 130, + UNICHAIN_SEPOLIA = 1301, } // subgraph does not support string enums, hence these constants @@ -33,6 +35,8 @@ 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_NETWORK_NAME = 'unichain-mainnet' +const UNICHAIN_SEPOLIA_NETWORK_NAME = 'unichain-sepolia' // Note: All token and pool addresses should be lowercased! export class SubgraphConfig { @@ -456,6 +460,44 @@ export function getSubgraphConfig(): SubgraphConfig { poolsToSkip: [], poolMappings: [], } + } else if (selectedNetwork == UNICHAIN_NETWORK_NAME) { + return { + factoryAddress: '0x1f98400000000000000000000000000000000003', + stablecoinWrappedNativePoolAddress: '0x65081cb48d74a32e9ccfed75164b8c09972dbcf1', // USDC/WETH 0.05% + stablecoinIsToken0: true, + wrappedNativeAddress: '0x4200000000000000000000000000000000000006', // WETH + minimumNativeLocked: BigDecimal.fromString('1'), + stablecoinAddresses: [ + '0x078d782b760474a361dda0af3839290b0ef57ad6', // USDC + '0x20cab320a855b39f724131c69424240519573f81', // DAI + ], + whitelistTokens: [ + '0x4200000000000000000000000000000000000006', // WETH + '0x078d782b760474a361dda0af3839290b0ef57ad6', // USDC + '0x20cab320a855b39f724131c69424240519573f81', // DAI + ], + tokenOverrides: [], + 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') }