Skip to content

Commit

Permalink
add unichain sepolia (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mz- authored Dec 2, 2024
1 parent 2c8b0db commit 190efd5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@
"address": "0x1B1C77B606d13b09C84d1c7394B96b147bC03147",
"startBlock": 6894479
}
},
"unichain-sepolia": {
"PoolManager": {
"address": "0x38eb8b22df3ae7fb21e92881151b365df14ba967",
"startBlock": 1487797
},
"PositionManager": {
"address": "0x05deD3F8a8e84700d68A4D81cd6780c982dB13F9",
"startBlock": 1490026
}
}
}
25 changes: 25 additions & 0 deletions src/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum ChainId {

// assemblyscript does not support string enums, hence these constants
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 @@ -84,6 +85,30 @@ export function getSubgraphConfig(): SubgraphConfig {
decimals: BigInt.fromI32(18),
},
}
} else if (selectedNetwork == UNICHAIN_SEPOLIA_NETWORK_NAME) {
return {
poolManagerAddress: '0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967',
stablecoinWrappedNativePoolId: '0xabdb9820d36431e092c155f7151c4c781f09fb4e1b7894fa918a0aadcac87e16', // TODO: no v4 pool for WETH/stable is deployed yet. This will result in $0 ETH USD prices for now
stablecoinIsToken0: true,
wrappedNativeAddress: '0x4200000000000000000000000000000000000006', // WETH
minimumNativeLocked: BigDecimal.fromString('1'),
stablecoinAddresses: [
'0x31d0220469e10c4E71834a79b1f276d740d3768F', // USDC
],
whitelistTokens: [
'0x0000000000000000000000000000000000000000', // Native ETH
'0x31d0220469e10c4E71834a79b1f276d740d3768F', // USDC
'0x4200000000000000000000000000000000000006', // WETH
],
tokenOverrides: [],
poolsToSkip: [],
poolMappings: [],
nativeTokenDetails: {
symbol: 'ETH',
name: 'Ethereum',
decimals: BigInt.fromI32(18),
},
}
} else {
throw new Error('Unsupported Network')
}
Expand Down

0 comments on commit 190efd5

Please sign in to comment.