@venusprotocol/venus-protocol 9.0.0-dev.3 → 9.0.0-dev.5

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.
@@ -29,6 +29,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
29
29
  });
30
30
  };
31
31
 
32
- func.tags = ["deploy-vault"];
32
+ func.tags = ["xvs-vault"];
33
33
 
34
34
  export default func;
@@ -45,17 +45,23 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
45
45
  const xvsVaultProxyDeployment = await ethers.getContract("XVSVaultProxy");
46
46
  const xvsStoreDeployment = await ethers.getContract("XVSStore");
47
47
 
48
- const xvsVaultProxy = await ethers.getContractAt("XVSVault", xvsVaultProxyDeployment.address);
48
+ let xvsVault = await ethers.getContract("XVSVaultProxy_Implementation");
49
+ await xvsVaultProxyDeployment._setPendingImplementation(xvsVault.address);
50
+ await xvsVault._become(xvsVaultProxyDeployment.address);
49
51
 
50
- let txn = await xvsVaultProxy.initializeTimeManager(isTimeBased, blocksPerYear[network.name]);
52
+ xvsVault = await ethers.getContractAt("XVSVault", xvsVaultProxyDeployment.address);
53
+
54
+ let txn = await xvsVault.initializeTimeManager(isTimeBased, blocksPerYear[network.name]);
51
55
  await txn.wait();
52
56
 
53
- txn = await xvsVaultProxy.setXvsStore(xvs.address, xvsStoreDeployment.address);
57
+ txn = await xvsVault.setXvsStore(xvs.address, xvsStoreDeployment.address);
54
58
  await txn.wait();
55
59
 
56
- txn = await xvsVaultProxy.setAccessControl(accessControlManager.address);
60
+ txn = await xvsVault.setAccessControl(accessControlManager.address);
57
61
  await txn.wait();
58
62
 
63
+ await xvsStoreDeployment.setNewOwner(xvsVaultProxyDeployment.address);
64
+
59
65
  if (!hre.network.live) {
60
66
  const tx = await accessControlManager.giveCallPermission(
61
67
  ethers.constants.AddressZero,
@@ -71,7 +77,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
71
77
  const rewardPerBlock = "61805555555555555";
72
78
  const lockPeriod = 604800;
73
79
 
74
- await xvsVaultProxy.add(rewardToken, allocPoint, token, rewardPerBlock, lockPeriod);
80
+ await xvsVault.add(rewardToken, allocPoint, token, rewardPerBlock, lockPeriod);
75
81
  } else {
76
82
  const owner = adminAccount[hre.network.name];
77
83
  console.log("Please accept ownership of vault and store");
@@ -24,6 +24,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
24
24
  hardhat: TEN_MINUTES,
25
25
  bsctestnet: TEN_MINUTES,
26
26
  sepolia: TEN_MINUTES,
27
+ arbitrumsepolia: TEN_MINUTES,
27
28
  bscmainnet: NINETY_DAYS,
28
29
  ethereum: NINETY_DAYS,
29
30
  };
@@ -31,6 +32,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
31
32
  const xVSVaultPoolId: Config = {
32
33
  bsctestnet: 1,
33
34
  sepolia: 0,
35
+ arbitrumsepolia: 0,
34
36
  bscmainnet: 0,
35
37
  ethereum: 0,
36
38
  hardhat: 0,
@@ -39,6 +41,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
39
41
  const blocksPerYear: Config = {
40
42
  bsctestnet: 10_512_000, // 3 sec per block
41
43
  sepolia: 2_628_000, // 12 sec per block
44
+ arbitrumsepolia: 0, // time based contracts
42
45
  bscmainnet: 10_512_000,
43
46
  ethereum: 2_628_000,
44
47
  hardhat: 100,
@@ -65,6 +68,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
65
68
  ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", // ETHEREUM MULTISIG
66
69
  opbnbtestnet: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf", // OPBNBTESTNET MULTISIG
67
70
  opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG
71
+ arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM SEPOLIA MULTISIG
68
72
  bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
69
73
  bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
70
74
  };
@@ -16,6 +16,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
16
16
  ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", // ETHEREUM MULTISIG
17
17
  opbnbtestnet: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf", // OPBNBTESTNET MULTISIG
18
18
  opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG
19
+ arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM SEPOLIA MULTISIG
19
20
  bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
20
21
  bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
21
22
  };