diff --git a/networks.json b/networks.json index e2d3d019..822ddcb7 100644 --- a/networks.json +++ b/networks.json @@ -70,5 +70,11 @@ "address": "0x7a5028BDa40e7B173C278C5342087826455ea25a", "startBlock": 1603366 } + }, + "sepolia": { + "Factory": { + "address": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c", + "startBlock": 3518270 + } } } diff --git a/src/utils/chains.ts b/src/utils/chains.ts index 438b284a..692c8399 100644 --- a/src/utils/chains.ts +++ b/src/utils/chains.ts @@ -16,6 +16,7 @@ export enum ChainId { ZKSYNC_ERA = 324, ZORA_MAINNET = 7777777, WORLDCHAIN_MAINNET = 480, + SEPOLIA = 11155111, } // subgraph does not support string enums, hence these constants @@ -31,6 +32,7 @@ const OPTIMISM_NETWORK_NAME = 'optimism' 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' // Note: All token and pool addresses should be lowercased! export class SubgraphConfig { @@ -433,6 +435,27 @@ export function getSubgraphConfig(): SubgraphConfig { poolsToSkip: [], poolMappings: [], } + } else if (selectedNetwork == SEPOLIA_NETWORK_NAME) { + return { + factoryAddress: '0x0227628f3f023bb0b980b67d528571c95c6dac1c', + stablecoinWrappedNativePoolAddress: '0x6418eec70f50913ff0d756b48d32ce7c02b47c47', // USDC/WETH 1% pool + stablecoinIsToken0: true, + wrappedNativeAddress: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', // WETH + minimumNativeLocked: BigDecimal.fromString('1'), + stablecoinAddresses: [ + '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238', // USDC + '0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0', // USDT + ], + whitelistTokens: [ + '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', // WETH + '0x1c7d4b196cb0c7b01d743fbc6116a902379c7238', // USDC + '0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0', // USDT + '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', // UNI, + ], + tokenOverrides: [], + poolsToSkip: [], + poolMappings: [], + } } else { throw new Error('Unsupported Network') } diff --git a/subgraph.yaml b/subgraph.yaml index 395f99b4..d7546bce 100644 --- a/subgraph.yaml +++ b/subgraph.yaml @@ -9,11 +9,11 @@ features: dataSources: - kind: ethereum/contract name: Factory - network: mainnet + network: sepolia source: - address: '0x1F98431c8aD98523631AE4a59f267346ea31F984' + address: "0x0227628f3F023bb0B980b67D528571c95c6DaC1c" abi: Factory - startBlock: 12369621 + startBlock: 3518270 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -39,7 +39,7 @@ dataSources: templates: - kind: ethereum/contract name: Pool - network: mainnet + network: sepolia source: abi: Pool mapping: