-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy path050_drip_all.js
More file actions
69 lines (64 loc) · 2.06 KB
/
Copy path050_drip_all.js
File metadata and controls
69 lines (64 loc) · 2.06 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const { deploymentWithGovernanceProposal } = require("../utils/deploy");
const addresses = require("../utils/addresses");
const { isMainnet } = require("../test/helpers.js");
module.exports = deploymentWithGovernanceProposal(
{
deployName: "050_drip_all",
forceDeploy: false,
//proposalId: "40434364243407050666554191388123037800510237271029051418887027936281231737485"
},
async ({
assetAddresses,
deployWithConfirmation,
ethers,
getTxOpts,
withConfirmation,
}) => {
const { deployerAddr, governorAddr } = await getNamedAccounts();
const sDeployer = await ethers.provider.getSigner(deployerAddr);
// Current contracts
const cVaultProxy = await ethers.getContract("VaultProxy");
// const cHarvester = await ethers.getContract("Harvester");
const dVaultCore = await deployWithConfirmation("VaultCore");
const dVaultAdmin = await deployWithConfirmation("VaultAdmin");
const cVaultCore = await ethers.getContract(
"VaultCore",
cVaultProxy.address
);
const cVaultAdmin = await ethers.getContract(
"VaultAdmin",
cVaultProxy.address
);
// Governance Actions
// ----------------
return {
name: "Drip all yield",
actions: [
// 1. Set VaultCore implementation
{
// Set VaultCore implementation
contract: cVaultProxy,
signature: "upgradeTo(address)",
args: [dVaultCore.address],
},
// 2. Set VaultAdmin implementation
// {
// contract: cVaultCore,
// signature: "setAdminImpl(address)",
// args: [dVaultAdmin.address],
// },
// 3. Set dripper duration
// {
// // Set VaultCore implementation
// contract: cVaultAdmin,
// signature: "setDripDuration(uint64)",
// args: [7*24*60*60],
// },
// 4. Send harvest rewards directly to the vault
// 5. Collect funds from old dripper
// 6. Send funds to vault
// 7. Collect some more funds from around
],
};
}
);