From 6d538510d81f750b43f9523b32ae85619342e52a Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Wed, 6 Nov 2024 13:35:33 -0300 Subject: [PATCH] feat: deploy optimism sepolia and zksync sepolia subgraphs --- package.json | 4 +-- .../cross-chain-governance/config/index.ts | 25 +++++++++++++++++++ subgraphs/cross-chain-governance/package.json | 6 ++++- subgraphs/venus-governance/package.json | 2 +- yarn.lock | 14 +++++------ 5 files changed, 40 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 7cb80e6a..b2d96a88 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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": { diff --git a/subgraphs/cross-chain-governance/config/index.ts b/subgraphs/cross-chain-governance/config/index.ts index 172dfc1a..0c39922a 100644 --- a/subgraphs/cross-chain-governance/config/index.ts +++ b/subgraphs/cross-chain-governance/config/index.ts @@ -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'; @@ -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 @@ -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'); diff --git a/subgraphs/cross-chain-governance/package.json b/subgraphs/cross-chain-governance/package.json index 72806965..c18e76ef 100644 --- a/subgraphs/cross-chain-governance/package.json +++ b/subgraphs/cross-chain-governance/package.json @@ -19,12 +19,16 @@ "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" }, @@ -32,7 +36,7 @@ "@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", diff --git a/subgraphs/venus-governance/package.json b/subgraphs/venus-governance/package.json index 75d403f0..a5eaec56 100644 --- a/subgraphs/venus-governance/package.json +++ b/subgraphs/venus-governance/package.json @@ -28,7 +28,7 @@ "devDependencies": { "@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", diff --git a/yarn.lock b/yarn.lock index 0de0e9e6..e6e022bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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 @@ -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 @@ -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 @@ -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