@venusprotocol/governance-contracts 2.2.0 → 2.3.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/deploy/000-lz-mocks.ts +22 -0
  2. package/deploy/003-omnichain-source.ts +5 -2
  3. package/deploy/004-omnichain-executor-remote.ts +4 -3
  4. package/deploy/005-remote-timelock.ts +3 -3
  5. package/deploy/006-omnichain-executorOwner-remote.ts +1 -0
  6. package/deployments/arbitrumone/.migrations.json +3 -0
  7. package/deployments/arbitrumsepolia/.migrations.json +3 -0
  8. package/deployments/ethereum/.migrations.json +3 -0
  9. package/deployments/opbnbmainnet/.migrations.json +3 -0
  10. package/deployments/opbnbtestnet/.migrations.json +3 -0
  11. package/deployments/sepolia/.migrations.json +3 -0
  12. package/deployments/zksyncsepolia/.chainId +1 -0
  13. package/deployments/zksyncsepolia/.migrations.json +3 -0
  14. package/deployments/zksyncsepolia/AccessControlManager.json +630 -0
  15. package/deployments/zksyncsepolia/solcInputs/bbb815e123a08a26954984beb0f34bc0.json +139 -0
  16. package/deployments/zksyncsepolia.json +369 -0
  17. package/deployments/zksyncsepolia_addresses.json +7 -0
  18. package/dist/deploy/000-lz-mocks.d.ts +4 -0
  19. package/dist/deploy/000-lz-mocks.d.ts.map +1 -0
  20. package/dist/deploy/000-lz-mocks.js +29 -0
  21. package/dist/deploy/000-lz-mocks.js.map +1 -0
  22. package/dist/deploy/003-omnichain-source.d.ts.map +1 -1
  23. package/dist/deploy/003-omnichain-source.js +3 -2
  24. package/dist/deploy/003-omnichain-source.js.map +1 -1
  25. package/dist/deploy/004-omnichain-executor-remote.d.ts.map +1 -1
  26. package/dist/deploy/004-omnichain-executor-remote.js +2 -2
  27. package/dist/deploy/004-omnichain-executor-remote.js.map +1 -1
  28. package/dist/deploy/005-remote-timelock.js +3 -3
  29. package/dist/deploy/005-remote-timelock.js.map +1 -1
  30. package/dist/deploy/006-omnichain-executorOwner-remote.d.ts.map +1 -1
  31. package/dist/deploy/006-omnichain-executorOwner-remote.js +1 -0
  32. package/dist/deploy/006-omnichain-executorOwner-remote.js.map +1 -1
  33. package/dist/hardhat.config.d.ts.map +1 -1
  34. package/dist/hardhat.config.js +0 -1
  35. package/dist/hardhat.config.js.map +1 -1
  36. package/dist/helpers/deploy/constants.d.ts +1 -1
  37. package/dist/helpers/deploy/constants.d.ts.map +1 -1
  38. package/dist/helpers/deploy/constants.js +3 -12
  39. package/dist/helpers/deploy/constants.js.map +1 -1
  40. package/dist/helpers/deploy/deploymentConfig.d.ts.map +1 -1
  41. package/dist/helpers/deploy/deploymentConfig.js +6 -0
  42. package/dist/helpers/deploy/deploymentConfig.js.map +1 -1
  43. package/dist/helpers/deploy/deploymentUtils.d.ts +3 -0
  44. package/dist/helpers/deploy/deploymentUtils.d.ts.map +1 -1
  45. package/dist/helpers/deploy/deploymentUtils.js +28 -2
  46. package/dist/helpers/deploy/deploymentUtils.js.map +1 -1
  47. package/package.json +14 -6
@@ -0,0 +1,22 @@
1
+ import { DeployFunction } from "hardhat-deploy/types";
2
+ import { HardhatRuntimeEnvironment } from "hardhat/types";
3
+
4
+ import { onlyHardhat } from "../helpers/deploy/deploymentUtils";
5
+
6
+ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
7
+ const { deployments, getNamedAccounts } = hre;
8
+ const { deploy } = deployments;
9
+ const { deployer } = await getNamedAccounts();
10
+ await deploy("LZEndpointMock", {
11
+ from: deployer,
12
+ args: [10102],
13
+ log: true,
14
+ autoMine: true,
15
+ });
16
+ };
17
+
18
+ func.tags = ["mocks"];
19
+
20
+ func.skip = onlyHardhat();
21
+
22
+ export default func;
@@ -3,7 +3,7 @@ import { ethers } from "hardhat";
3
3
  import { DeployFunction } from "hardhat-deploy/types";
4
4
  import { HardhatRuntimeEnvironment } from "hardhat/types";
5
5
 
6
- import { LZ_ENDPOINTS, SUPPORTED_NETWORKS } from "../helpers/deploy/constants";
6
+ import { SUPPORTED_NETWORKS } from "../helpers/deploy/constants";
7
7
  import {
8
8
  OmnichainProposalSenderCriticalMethods,
9
9
  OmnichainProposalSenderFasttrackMethods,
@@ -11,6 +11,7 @@ import {
11
11
  OmnichainProposalSenderNormalMethods,
12
12
  config,
13
13
  } from "../helpers/deploy/deploymentConfig";
14
+ import { getLzEndpoint } from "../helpers/deploy/deploymentUtils";
14
15
  import { getArgTypesFromSignature } from "../helpers/utils";
15
16
 
16
17
  const BNB_MAINNET_GUARDIAN = "0x1C2CAc6ec528c20800B2fe734820D87b581eAA6B";
@@ -76,7 +77,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
76
77
 
77
78
  const OmnichainProposalSender = await deploy("OmnichainProposalSender", {
78
79
  from: deployer,
79
- args: [LZ_ENDPOINTS[hre.network.name as keyof typeof LZ_ENDPOINTS], acmAddress],
80
+ args: [await getLzEndpoint(hre.network.name as SUPPORTED_NETWORKS), acmAddress],
80
81
  log: true,
81
82
  autoMine: true,
82
83
  });
@@ -131,4 +132,6 @@ func.tags = ["OmnichainProposalSender"];
131
132
 
132
133
  func.skip = async (hre: HardhatRuntimeEnvironment) =>
133
134
  !(hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet") && hre.network.name !== "hardhat";
135
+
136
+ func.dependencies = ["mocks"];
134
137
  export default func;
@@ -1,8 +1,8 @@
1
1
  import { DeployFunction } from "hardhat-deploy/types";
2
2
  import { HardhatRuntimeEnvironment } from "hardhat/types";
3
3
 
4
- import { LZ_ENDPOINTS, SUPPORTED_NETWORKS } from "../helpers/deploy/constants";
5
- import { getSourceChainId, guardian } from "../helpers/deploy/deploymentUtils";
4
+ import { SUPPORTED_NETWORKS } from "../helpers/deploy/constants";
5
+ import { getLzEndpoint, getSourceChainId, guardian } from "../helpers/deploy/deploymentUtils";
6
6
 
7
7
  const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
8
8
  const { deployments, getNamedAccounts } = hre;
@@ -13,7 +13,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
13
13
 
14
14
  await deploy("OmnichainGovernanceExecutor", {
15
15
  from: deployer,
16
- args: [LZ_ENDPOINTS[networkName], await guardian(networkName), await getSourceChainId(networkName)],
16
+ args: [await getLzEndpoint(networkName), await guardian(networkName), await getSourceChainId(networkName)],
17
17
  log: true,
18
18
  autoMine: true,
19
19
  });
@@ -22,4 +22,5 @@ func.tags = ["OmnichainGovernanceExecutor", "Remote"];
22
22
 
23
23
  func.skip = async (hre: HardhatRuntimeEnvironment) =>
24
24
  hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet";
25
+ func.dependencies = ["mocks"];
25
26
  export default func;
@@ -67,7 +67,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
67
67
 
68
68
  const omnichainGovernanceExecutorAddress = (await ethers.getContract("OmnichainGovernanceExecutor")).address;
69
69
 
70
- await deploy("NormalTimelock", {
70
+ await deploy(live ? "NormalTimelock" : "NormalTimelockRemote", {
71
71
  contract: live ? "TimelockV8" : "TestTimelockV8",
72
72
  from: deployer,
73
73
  args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].normal],
@@ -75,7 +75,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
75
75
  autoMine: true,
76
76
  });
77
77
 
78
- await deploy("FastTrackTimelock", {
78
+ await deploy(live ? "FastTrackTimelock" : "FastTrackTimelockRemote", {
79
79
  contract: live ? "TimelockV8" : "TestTimelockV8",
80
80
  from: deployer,
81
81
  args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].fast],
@@ -83,7 +83,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
83
83
  autoMine: true,
84
84
  });
85
85
 
86
- await deploy("CriticalTimelock", {
86
+ await deploy(live ? "CriticalTimelock" : "CriticalTimelockRemote", {
87
87
  contract: live ? "TimelockV8" : "TestTimelockV8",
88
88
  from: deployer,
89
89
  args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].critical],
@@ -204,6 +204,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
204
204
  );
205
205
  };
206
206
  func.tags = ["OmnichainExecutorOwner", "Remote"];
207
+ func.id = "configure_remote_executor";
207
208
 
208
209
  func.skip = async (hre: HardhatRuntimeEnvironment) =>
209
210
  hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet";
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }
@@ -0,0 +1 @@
1
+ 300
@@ -0,0 +1,3 @@
1
+ {
2
+ "configure_remote_executor": true
3
+ }