Skip to content

Commit

Permalink
feat: deploy optimism sepolia and zksync sepolia subgraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 6, 2024
1 parent f82273d commit 210ec78
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/node": "^20.5.9",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"@venusprotocol/governance-contracts": "2.4.0",
"@venusprotocol/governance-contracts": "2.5.0-dev.3",
"@venusprotocol/isolated-pools": "3.6.0",
"@venusprotocol/oracle": "2.6.0",
"@venusprotocol/protocol-reserve": "2.3.0",
Expand Down Expand Up @@ -81,7 +81,7 @@
"typescript": "^4.8.4"
},
"resolutions": {
"@venusprotocol/governance-contracts": "2.4.0",
"@venusprotocol/governance-contracts": "2.5.0-dev.3",
"@venusprotocol/venus-protocol": "9.3.0"
},
"husky": {
Expand Down
25 changes: 25 additions & 0 deletions subgraphs/cross-chain-governance/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import arbitrumDeployments from '@venusprotocol/governance-contracts/deployments
import arbitrumSepoliaDeployments from '@venusprotocol/governance-contracts/deployments/arbitrumsepolia_addresses.json';
import ethereumDeployments from '@venusprotocol/governance-contracts/deployments/ethereum_addresses.json';
import opBnBMainnetDeployments from '@venusprotocol/governance-contracts/deployments/opbnbmainnet_addresses.json';
import optimismSepoliaDeployments from '@venusprotocol/governance-contracts/deployments/opsepolia_addresses.json';
import sepoliaDeployments from '@venusprotocol/governance-contracts/deployments/sepolia_addresses.json';
import zkSyncSepoliaDeployments from '@venusprotocol/governance-contracts/deployments/zksyncsepolia_addresses.json';
import fs from 'fs';
import Mustache from 'mustache';

Expand All @@ -15,6 +17,8 @@ export const getNetwork = () => {
'opbnbMainnet',
'arbitrumSepolia',
'arbitrum',
'zkSyncSepolia',
'optimismSepolia',
] as const;
const network = process.env.NETWORK;
// @ts-expect-error network env var is unknown here
Expand Down Expand Up @@ -88,6 +92,27 @@ const main = () => {
accessControlManagerAddress: arbitrumDeployments.addresses.AccessControlManager,
accessControlManagerStartBlock: '201597544',
},
zkSyncSepolia: {
network: 'zksync-era-sepolia',
layerZeroChainId: 10248,
omnichainGovernanceOwnerAddress: zkSyncSepoliaDeployments.addresses.OmnichainExecutorOwner,
startBlockOmnichainGovernanceOwner: '3771652',
omnichainExecutorOwnerAddress: zkSyncSepoliaDeployments.addresses.OmnichainGovernanceExecutor,
startBlockOmnichainGovernanceExecutor: '3771603',
accessControlManagerAddress: zkSyncSepoliaDeployments.addresses.AccessControlManager,
accessControlManagerStartBlock: '3445364',
},
optimismSepolia: {
network: 'optimism-sepolia',
layerZeroChainId: 10232,
omnichainGovernanceOwnerAddress: optimismSepoliaDeployments.addresses.OmnichainExecutorOwner,
startBlockOmnichainGovernanceOwner: '18679072',
omnichainExecutorOwnerAddress:
optimismSepoliaDeployments.addresses.OmnichainGovernanceExecutor,
startBlockOmnichainGovernanceExecutor: '18676643',
accessControlManagerAddress: optimismSepoliaDeployments.addresses.AccessControlManager,
accessControlManagerStartBlock: '14150248',
},
};

const yamlTemplate = fs.readFileSync('template.yaml', 'utf8');
Expand Down
6 changes: 5 additions & 1 deletion subgraphs/cross-chain-governance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@
"deploy:sepolia": "yarn prepare:sepolia && yarn graph deploy --studio venus-governance-sepolia",
"deploy:arbitrumSepolia": "yarn prepare:arbitrumSepolia && yarn graph deploy --studio venus-governance-arbisepolia",
"deploy:arbitrum": "yarn prepare:arbitrum && yarn graph deploy --studio venus-governance-arbitrum",
"deploy:optimismSepolia": "yarn prepare:optimismSepolia && yarn graph deploy --studio venus-governance-opsepolia",
"deploy:zkSyncSepolia": "yarn prepare:zkSyncSepolia && yarn graph deploy --studio venus-governance-zksyncsepolia",
"prepare:docker": "NETWORK=docker yarn ts-node config/index.ts",
"prepare:ethereum": "NETWORK=ethereum yarn ts-node config/index.ts",
"prepare:sepolia": "NETWORK=sepolia yarn ts-node config/index.ts",
"prepare:opbnbMainnet": "NETWORK=opbnbMainnet yarn ts-node config/index.ts",
"prepare:arbitrumSepolia": "NETWORK=arbitrumSepolia yarn ts-node config/index.ts",
"prepare:arbitrum": "NETWORK=arbitrum yarn ts-node config/index.ts",
"prepare:optimismSepolia": "NETWORK=optimismSepolia yarn ts-node config/index.ts",
"prepare:zkSyncSepolia": "NETWORK=zkSyncSepolia yarn ts-node config/index.ts",
"test": "yarn prepare:docker && graph test",
"test:integration": "true"
},
"dependencies": {
"@graphprotocol/client-cli": "3.0.0",
"@graphprotocol/graph-cli": "^0.80.0",
"@layerzerolabs/solidity-examples": "^1.0.0",
"@venusprotocol/governance-contracts": "2.4.0",
"@venusprotocol/governance-contracts": "2.5.0-dev.3",
"apollo-fetch": "^0.7.0",
"hardhat": "^2.10.2",
"ts-node": "^10.9.2",
Expand Down
14 changes: 7 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4824,14 +4824,14 @@ __metadata:
languageName: node
linkType: hard

"@venusprotocol/governance-contracts@npm:2.4.0":
version: 2.4.0
resolution: "@venusprotocol/governance-contracts@npm:2.4.0"
"@venusprotocol/governance-contracts@npm:2.5.0-dev.3":
version: 2.5.0-dev.3
resolution: "@venusprotocol/governance-contracts@npm:2.5.0-dev.3"
dependencies:
"@venusprotocol/solidity-utilities": 2.0.0
hardhat-deploy-ethers: ^0.3.0-beta.13
module-alias: ^2.2.2
checksum: 2a754a05a655bc7b24c33685f86c9bd616a6e7cba4b048315b11eca67a8c1e37c033f04e1b4394e7326251b6af49ab257275cef72727c8976ae16c7f2c2ff0e7
checksum: aa6ccd4b3e18c213071cc2100684a8ba38a770d5a3403dba3f39e3a253b6c77394eddfdda44ccadca2a2082a01e03ed1fd327690972b4e16e21acbb75fc382d3
languageName: node
linkType: hard

Expand Down Expand Up @@ -13942,7 +13942,7 @@ __metadata:
"@types/node": ^20.5.9
"@typescript-eslint/eslint-plugin": ^5.40.1
"@typescript-eslint/parser": ^5.40.1
"@venusprotocol/governance-contracts": 2.4.0
"@venusprotocol/governance-contracts": 2.5.0-dev.3
"@venusprotocol/isolated-pools": 3.6.0
"@venusprotocol/oracle": 2.6.0
"@venusprotocol/protocol-reserve": 2.3.0
Expand Down Expand Up @@ -14842,7 +14842,7 @@ __metadata:
"@graphprotocol/client-cli": 3.0.0
"@graphprotocol/graph-cli": ^0.80.0
"@layerzerolabs/solidity-examples": ^1.0.0
"@venusprotocol/governance-contracts": 2.4.0
"@venusprotocol/governance-contracts": 2.5.0-dev.3
apollo-fetch: ^0.7.0
hardhat: ^2.10.2
ts-node: ^10.9.2
Expand All @@ -14863,7 +14863,7 @@ __metadata:
dependencies:
"@graphprotocol/client-cli": 3.0.0
"@graphprotocol/graph-cli": ^0.80.0
"@venusprotocol/governance-contracts": 2.4.0
"@venusprotocol/governance-contracts": 2.5.0-dev.3
apollo-fetch: ^0.7.0
hardhat: ^2.10.2
ts-node: ^10.9.2
Expand Down

0 comments on commit 210ec78

Please sign in to comment.