@venusprotocol/venus-protocol 6.1.0-dev.2 → 6.1.0-dev.3

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.
@@ -0,0 +1,3 @@
1
+ import { DeployFunction } from "hardhat-deploy/types";
2
+ declare const func: DeployFunction;
3
+ export default func;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const func = async function (hre) {
4
+ const { deployments, getNamedAccounts } = hre;
5
+ const { deploy } = deployments;
6
+ const { deployer } = await getNamedAccounts();
7
+ await deploy("XVS", {
8
+ from: deployer,
9
+ args: [deployer],
10
+ log: true,
11
+ autoMine: true,
12
+ });
13
+ };
14
+ func.tags = ["xvs"];
15
+ func.skip = async (hre) => hre.network.live;
16
+ exports.default = func;
@@ -0,0 +1,3 @@
1
+ import { DeployFunction } from "hardhat-deploy/types";
2
+ declare const func: DeployFunction;
3
+ export default func;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hardhat_1 = require("hardhat");
4
+ const func = async function (hre) {
5
+ const { deployments, getNamedAccounts } = hre;
6
+ const { deploy } = deployments;
7
+ const { deployer } = await getNamedAccounts();
8
+ const xvsVaultDeployment = await deploy("XVSVault", {
9
+ from: deployer,
10
+ args: [],
11
+ log: true,
12
+ autoMine: true,
13
+ });
14
+ const xvsVaultAddress = xvsVaultDeployment.address;
15
+ const xvsVaultProxyDeployment = await deploy("XVSVaultProxy", {
16
+ from: deployer,
17
+ args: [],
18
+ log: true,
19
+ autoMine: true,
20
+ });
21
+ const xvsVaultProxyAddress = xvsVaultProxyDeployment.address;
22
+ await deploy("XVSStore", {
23
+ from: deployer,
24
+ args: [],
25
+ log: true,
26
+ autoMine: true,
27
+ });
28
+ const xvsVault = await hardhat_1.ethers.getContract("XVSVault");
29
+ const xvsStore = await hardhat_1.ethers.getContract("XVSStore");
30
+ const xvsVaultProxy = await hardhat_1.ethers.getContract("XVSVaultProxy");
31
+ // Become Implementation of XVSVaultProxy
32
+ const tx = await xvsVaultProxy._setPendingImplementation(xvsVaultAddress);
33
+ await tx.wait();
34
+ await xvsVault._become(xvsVaultProxyAddress);
35
+ await tx.wait();
36
+ // Set new owner to xvs store
37
+ await xvsStore.setNewOwner(xvsVaultProxyAddress);
38
+ await tx.wait();
39
+ };
40
+ func.tags = ["xvs-vault"];
41
+ exports.default = func;
@@ -0,0 +1,3 @@
1
+ import { DeployFunction } from "hardhat-deploy/types";
2
+ declare const func: DeployFunction;
3
+ export default func;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const hardhat_1 = require("hardhat");
4
+ const adminAccount = {
5
+ sepolia: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
6
+ ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", // ETHEREUM MULTISIG
7
+ };
8
+ const func = async function (hre) {
9
+ const { getNamedAccounts } = hre;
10
+ const { deployer } = await getNamedAccounts();
11
+ const accessControlManager = await hardhat_1.ethers.getContract("AccessControlManager");
12
+ const xvs = await hardhat_1.ethers.getContract("XVS");
13
+ const xvsVaultProxyDeployment = await hardhat_1.ethers.getContract("XVSVaultProxy");
14
+ const xvsStoreDeployment = await hardhat_1.ethers.getContract("XVSStore");
15
+ const xvsVaultProxy = await hardhat_1.ethers.getContractAt("XVSVault", xvsVaultProxyDeployment.address);
16
+ let txn = await xvsVaultProxy.setXvsStore(xvs.address, xvsStoreDeployment.address);
17
+ await txn.wait();
18
+ txn = await xvsVaultProxy.setAccessControl(accessControlManager.address);
19
+ await txn.wait();
20
+ if (!hre.network.live) {
21
+ const tx = await accessControlManager.giveCallPermission(hardhat_1.ethers.constants.AddressZero, "add(address,uint256,address,uint256,uint256)", deployer);
22
+ await tx.wait();
23
+ // Add token pool to xvs vault
24
+ const allocPoint = 100;
25
+ const token = xvs.address;
26
+ const rewardToken = xvs.address;
27
+ const rewardPerBlock = "61805555555555555";
28
+ const lockPeriod = 604800;
29
+ await xvsVaultProxy.add(rewardToken, allocPoint, token, rewardPerBlock, lockPeriod);
30
+ }
31
+ else {
32
+ const owner = adminAccount[hre.network.name];
33
+ console.log("Please accept ownership of vault and store");
34
+ txn = await xvsVaultProxyDeployment._setPendingAdmin(owner);
35
+ await txn.wait();
36
+ txn = await xvsStoreDeployment.setPendingAdmin(owner);
37
+ await txn.wait();
38
+ }
39
+ };
40
+ func.tags = ["xvs-vault"];
41
+ exports.default = func;