Skip to content

Commit

Permalink
feat: update contract address
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorvin committed Apr 29, 2024
1 parent 4f14b24 commit 7d6c53c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
26 changes: 20 additions & 6 deletions networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,30 @@
},
"base": {
"BookManager": {
"address": "0x93A43391978BFC0bc708d5f55b0Abe7A9ede1B91",
"startBlock": 13269610
"address": "0x59fAD5b95e755034572702991ABBA937Cc90254a",
"startBlock": 13787160
},
"BookViewer": {
"address": "0x6d928455050b3b71490fe3B73DD84daD094299c4",
"startBlock": 13269610
"address": "0x0e7fc8F067470424589Cc25DceEd0dA9a1a8E72A",
"startBlock": 13795540
},
"Controller": {
"address": "0x3A2875239c3947A9e2e76C4DE21D3050bc16b4Ee",
"startBlock": 13269620
"address": "0x4ed2804b5409298290654D665619c7b092297dB2",
"startBlock": 13795560
}
},
"berachain-public-testnet": {
"BookManager": {
"address": "0x982c57388101D012846aDC4997E9b073F3bC16BD",
"startBlock": 1848400
},
"BookViewer": {
"address": "0xb735FdD82497Dd9AbfEEAdc659b960473BF896E0",
"startBlock": 1849850
},
"Controller": {
"address": "0xce3F3C90970C08Fe451998441b30879560AA6757",
"startBlock": 1849850
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 v2-core-subgraph --network localhost",
"deploy-arbitrum": "dotenv -e .env -- cross-var graph deploy v2-core-subgraph --version-label %DEPLOY_VERSION% --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key %DEPLOY_KEY% --ipfs https://ipfs.satsuma.xyz --network arbitrum-sepolia",
"deploy-base": "dotenv -e .env -- cross-var graph deploy v2-core-subgraph-base --version-label %DEPLOY_VERSION% --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key %DEPLOY_KEY% --ipfs https://ipfs.satsuma.xyz --network base",
"deploy-berachain-public-testnet": "dotenv -e .env -- cross-var graph build --network=berachain-public-testnet && goldsky subgraph deploy v2-core-subgraph/%DEPLOY_VERSION%",
"test": "graph test"
},
"dependencies": {
Expand Down
5 changes: 4 additions & 1 deletion src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Multicall3 } from '../generated/BookManager/Multicall3'
const MULTICALL3_ADDRESS = '0xcA11bde05977b3631167028862bE2a173976CA11'
const ARBITRUM_SEPOLIA = BigInt.fromI32(421614)
const BASE = BigInt.fromI32(8453)
const BERA_TESTNET = BigInt.fromI32(80085)

export function getChainId(): BigInt {
const multiCall = Multicall3.bind(Address.fromString(MULTICALL3_ADDRESS))
Expand All @@ -16,7 +17,9 @@ export function getControllerAddress(): string {
if (chainId == ARBITRUM_SEPOLIA) {
return '0xfAe4A04fa491DC21F77796394532a1B62d8331BF'
} else if (chainId == BASE) {
return '0x3A2875239c3947A9e2e76C4DE21D3050bc16b4Ee'
return '0x4ed2804b5409298290654D665619c7b092297dB2'
} else if (chainId == BERA_TESTNET) {
return '0xce3F3C90970C08Fe451998441b30879560AA6757'
} else {
return '0xfAe4A04fa491DC21F77796394532a1B62d8331BF'
}
Expand Down

0 comments on commit 7d6c53c

Please sign in to comment.