Skip to content

Commit

Permalink
add unichain sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
mz- committed Oct 17, 2024
1 parent 5e9f4e6 commit 4df723b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,11 @@
"address": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c",
"startBlock": 3518270
}
},
"unichain-sepolia": {
"Factory": {
"address": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
"startBlock": 0
}
}
}
20 changes: 20 additions & 0 deletions src/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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')
}
Expand Down

0 comments on commit 4df723b

Please sign in to comment.