forked from NFTX-project/nftx-protocol-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathretrieve-tokens-upgrade.js
41 lines (32 loc) · 1.13 KB
/
retrieve-tokens-upgrade.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const { BigNumber } = require("@ethersproject/bignumber");
const { ethers, upgrades } = require("hardhat");
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Deploying account:", await deployer.getAddress());
console.log(
"Deploying account balance:",
(await deployer.getBalance()).toString(),
"\n"
);
const VaultImpl = await ethers.getContractFactory("NFTXVaultUpgradeable");
const vaultImpl = await VaultImpl.deploy();
await vaultImpl.deployed();
console.log('vault implementation deployed at:', vaultImpl.address);
const LPStaking = await ethers.getContractFactory("NFTXLPStaking");
const lpStaking = await LPStaking.deploy();
await lpStaking.deployed();
console.log('lpstaking deployed at:', lpStaking.address ,'\n');
console.log('1) set child implementation on vault factory')
console.log('2) set lpstaking impl on proxycontroller')
}
main()
.then(() => {
console.log("\nDeployment completed successfully ✓");
process.exit(0);
})
.catch((error) => {
console.log("\nDeployment failed ✗");
console.error(error);
process.exit(1);
});
`