diff --git a/package.json b/package.json index b2d96a88..3f92f28a 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.5.0-dev.3", + "@venusprotocol/governance-contracts": "2.5.0-dev.4", "@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.5.0-dev.3", + "@venusprotocol/governance-contracts": "2.5.0-dev.4", "@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 0c39922a..7550cf89 100644 --- a/subgraphs/cross-chain-governance/config/index.ts +++ b/subgraphs/cross-chain-governance/config/index.ts @@ -3,8 +3,10 @@ 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 optimismDeployments from '@venusprotocol/governance-contracts/deployments/opmainnet_addresses.json'; import optimismSepoliaDeployments from '@venusprotocol/governance-contracts/deployments/opsepolia_addresses.json'; import sepoliaDeployments from '@venusprotocol/governance-contracts/deployments/sepolia_addresses.json'; +import zkSyncDeployments from '@venusprotocol/governance-contracts/deployments/zksyncmainnet_addresses.json'; import zkSyncSepoliaDeployments from '@venusprotocol/governance-contracts/deployments/zksyncsepolia_addresses.json'; import fs from 'fs'; import Mustache from 'mustache'; @@ -18,7 +20,9 @@ export const getNetwork = () => { 'arbitrumSepolia', 'arbitrum', 'zkSyncSepolia', + 'zkSync', 'optimismSepolia', + 'optimism', ] as const; const network = process.env.NETWORK; // @ts-expect-error network env var is unknown here @@ -102,6 +106,16 @@ const main = () => { accessControlManagerAddress: zkSyncSepoliaDeployments.addresses.AccessControlManager, accessControlManagerStartBlock: '3445364', }, + zkSync: { + network: 'zksync-era', + layerZeroChainId: 165, + omnichainGovernanceOwnerAddress: zkSyncDeployments.addresses.OmnichainExecutorOwner, + startBlockOmnichainGovernanceOwner: '48278537', + omnichainExecutorOwnerAddress: zkSyncDeployments.addresses.OmnichainGovernanceExecutor, + startBlockOmnichainGovernanceExecutor: '48277850', + accessControlManagerAddress: zkSyncDeployments.addresses.AccessControlManager, + accessControlManagerStartBlock: '42301361', + }, optimismSepolia: { network: 'optimism-sepolia', layerZeroChainId: 10232, @@ -113,6 +127,16 @@ const main = () => { accessControlManagerAddress: optimismSepoliaDeployments.addresses.AccessControlManager, accessControlManagerStartBlock: '14150248', }, + optimism: { + network: 'optimism', + layerZeroChainId: 111, + omnichainGovernanceOwnerAddress: optimismDeployments.addresses.OmnichainExecutorOwner, + startBlockOmnichainGovernanceOwner: '127723947', + omnichainExecutorOwnerAddress: optimismDeployments.addresses.OmnichainGovernanceExecutor, + startBlockOmnichainGovernanceExecutor: '127723676', + accessControlManagerAddress: optimismDeployments.addresses.AccessControlManager, + accessControlManagerStartBlock: '125490536', + }, }; const yamlTemplate = fs.readFileSync('template.yaml', 'utf8'); diff --git a/subgraphs/cross-chain-governance/package.json b/subgraphs/cross-chain-governance/package.json index c18e76ef..07e88133 100644 --- a/subgraphs/cross-chain-governance/package.json +++ b/subgraphs/cross-chain-governance/package.json @@ -20,7 +20,9 @@ "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:optimism": "yarn prepare:optimismSepolia && yarn graph deploy --studio venus-governance-optimism", "deploy:zkSyncSepolia": "yarn prepare:zkSyncSepolia && yarn graph deploy --studio venus-governance-zksyncsepolia", + "deploy:zkSync": "yarn prepare:zkSync && yarn graph deploy --studio venus-governance-zksync", "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", @@ -28,7 +30,9 @@ "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:optimism": "NETWORK=optimism yarn ts-node config/index.ts", "prepare:zkSyncSepolia": "NETWORK=zkSyncSepolia yarn ts-node config/index.ts", + "prepare:zkSync": "NETWORK=zkSync yarn ts-node config/index.ts", "test": "yarn prepare:docker && graph test", "test:integration": "true" }, @@ -36,7 +40,7 @@ "@graphprotocol/client-cli": "3.0.0", "@graphprotocol/graph-cli": "^0.80.0", "@layerzerolabs/solidity-examples": "^1.0.0", - "@venusprotocol/governance-contracts": "2.5.0-dev.3", + "@venusprotocol/governance-contracts": "2.5.0-dev.4", "apollo-fetch": "^0.7.0", "hardhat": "^2.10.2", "ts-node": "^10.9.2", diff --git a/yarn.lock b/yarn.lock index e6e022bf..f2daad1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4824,14 +4824,14 @@ __metadata: languageName: node linkType: hard -"@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" +"@venusprotocol/governance-contracts@npm:2.5.0-dev.4": + version: 2.5.0-dev.4 + resolution: "@venusprotocol/governance-contracts@npm:2.5.0-dev.4" dependencies: "@venusprotocol/solidity-utilities": 2.0.0 hardhat-deploy-ethers: ^0.3.0-beta.13 module-alias: ^2.2.2 - checksum: aa6ccd4b3e18c213071cc2100684a8ba38a770d5a3403dba3f39e3a253b6c77394eddfdda44ccadca2a2082a01e03ed1fd327690972b4e16e21acbb75fc382d3 + checksum: 1886e4ee17e1181b403c5351742ad01e10f561945a0a0df2ef25018dfc189fc3e00c736a94ceefc43f8db595af4b3d6ca615102408d860162e05f940310a910a 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.5.0-dev.3 + "@venusprotocol/governance-contracts": 2.5.0-dev.4 "@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.5.0-dev.3 + "@venusprotocol/governance-contracts": 2.5.0-dev.4 apollo-fetch: ^0.7.0 hardhat: ^2.10.2 ts-node: ^10.9.2