Skip to content

Commit

Permalink
feat: include mainnet subgraphs for optimism and zksync
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 11, 2024
1 parent 6d53851 commit 1af956f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 9 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.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",
Expand Down Expand Up @@ -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": {
Expand Down
24 changes: 24 additions & 0 deletions subgraphs/cross-chain-governance/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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');
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 @@ -20,23 +20,27 @@
"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",
"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: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"
},
"dependencies": {
"@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",
Expand Down
12 changes: 6 additions & 6 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.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

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.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
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.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
Expand Down

0 comments on commit 1af956f

Please sign in to comment.