@venusprotocol/venus-protocol 9.0.0-dev.4 → 9.0.0-dev.6
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.
- package/deploy/008-deploy-vaults.ts +1 -1
- package/deploy/009-configure-vaults.ts +11 -5
- package/deployments/arbitrumone/.chainId +1 -0
- package/deployments/arbitrumone/VTreasuryV8.json +329 -0
- package/deployments/arbitrumone/solcInputs/61db31590278030f2b5f03e8109c4f65.json +283 -0
- package/deployments/arbitrumone.json +196 -1
- package/deployments/arbitrumone_addresses.json +3 -1
- package/dist/deploy/008-deploy-vaults.js +1 -1
- package/dist/deploy/009-configure-vaults.js +9 -5
- package/package.json +1 -1
- package/deploy/008-deploy-xvs-vault.ts +0 -21
- package/deploy/009-configure-xvs-vault.ts +0 -19
- package/dist/deploy/008-deploy-xvs-vault.d.ts +0 -3
- package/dist/deploy/008-deploy-xvs-vault.js +0 -16
- package/dist/deploy/009-configure-xvs-vault.d.ts +0 -3
- package/dist/deploy/009-configure-xvs-vault.js +0 -15
|
@@ -1,5 +1,200 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arbitrumone",
|
|
3
3
|
"chainId": "42161",
|
|
4
|
-
"contracts": {
|
|
4
|
+
"contracts": {
|
|
5
|
+
"VTreasuryV8": {
|
|
6
|
+
"address": "0x8a662ceAC418daeF956Bc0e6B2dd417c80CDA631",
|
|
7
|
+
"abi": [
|
|
8
|
+
{
|
|
9
|
+
"inputs": [],
|
|
10
|
+
"name": "ZeroAddressNotAllowed",
|
|
11
|
+
"type": "error"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"anonymous": false,
|
|
15
|
+
"inputs": [
|
|
16
|
+
{
|
|
17
|
+
"indexed": true,
|
|
18
|
+
"internalType": "address",
|
|
19
|
+
"name": "previousOwner",
|
|
20
|
+
"type": "address"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"indexed": true,
|
|
24
|
+
"internalType": "address",
|
|
25
|
+
"name": "newOwner",
|
|
26
|
+
"type": "address"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"name": "OwnershipTransferStarted",
|
|
30
|
+
"type": "event"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"anonymous": false,
|
|
34
|
+
"inputs": [
|
|
35
|
+
{
|
|
36
|
+
"indexed": true,
|
|
37
|
+
"internalType": "address",
|
|
38
|
+
"name": "previousOwner",
|
|
39
|
+
"type": "address"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"indexed": true,
|
|
43
|
+
"internalType": "address",
|
|
44
|
+
"name": "newOwner",
|
|
45
|
+
"type": "address"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "OwnershipTransferred",
|
|
49
|
+
"type": "event"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"anonymous": false,
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"indexed": false,
|
|
56
|
+
"internalType": "uint256",
|
|
57
|
+
"name": "withdrawAmount",
|
|
58
|
+
"type": "uint256"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"indexed": true,
|
|
62
|
+
"internalType": "address",
|
|
63
|
+
"name": "withdrawAddress",
|
|
64
|
+
"type": "address"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"name": "WithdrawTreasuryNative",
|
|
68
|
+
"type": "event"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"anonymous": false,
|
|
72
|
+
"inputs": [
|
|
73
|
+
{
|
|
74
|
+
"indexed": true,
|
|
75
|
+
"internalType": "address",
|
|
76
|
+
"name": "tokenAddress",
|
|
77
|
+
"type": "address"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"indexed": false,
|
|
81
|
+
"internalType": "uint256",
|
|
82
|
+
"name": "withdrawAmount",
|
|
83
|
+
"type": "uint256"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"indexed": true,
|
|
87
|
+
"internalType": "address",
|
|
88
|
+
"name": "withdrawAddress",
|
|
89
|
+
"type": "address"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"name": "WithdrawTreasuryToken",
|
|
93
|
+
"type": "event"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"stateMutability": "payable",
|
|
97
|
+
"type": "fallback"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"inputs": [],
|
|
101
|
+
"name": "acceptOwnership",
|
|
102
|
+
"outputs": [],
|
|
103
|
+
"stateMutability": "nonpayable",
|
|
104
|
+
"type": "function"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"inputs": [],
|
|
108
|
+
"name": "owner",
|
|
109
|
+
"outputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "address",
|
|
112
|
+
"name": "",
|
|
113
|
+
"type": "address"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"stateMutability": "view",
|
|
117
|
+
"type": "function"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"inputs": [],
|
|
121
|
+
"name": "pendingOwner",
|
|
122
|
+
"outputs": [
|
|
123
|
+
{
|
|
124
|
+
"internalType": "address",
|
|
125
|
+
"name": "",
|
|
126
|
+
"type": "address"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"stateMutability": "view",
|
|
130
|
+
"type": "function"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"inputs": [],
|
|
134
|
+
"name": "renounceOwnership",
|
|
135
|
+
"outputs": [],
|
|
136
|
+
"stateMutability": "nonpayable",
|
|
137
|
+
"type": "function"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"inputs": [
|
|
141
|
+
{
|
|
142
|
+
"internalType": "address",
|
|
143
|
+
"name": "newOwner",
|
|
144
|
+
"type": "address"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"name": "transferOwnership",
|
|
148
|
+
"outputs": [],
|
|
149
|
+
"stateMutability": "nonpayable",
|
|
150
|
+
"type": "function"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"inputs": [
|
|
154
|
+
{
|
|
155
|
+
"internalType": "uint256",
|
|
156
|
+
"name": "withdrawAmount",
|
|
157
|
+
"type": "uint256"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"internalType": "address payable",
|
|
161
|
+
"name": "withdrawAddress",
|
|
162
|
+
"type": "address"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"name": "withdrawTreasuryNative",
|
|
166
|
+
"outputs": [],
|
|
167
|
+
"stateMutability": "payable",
|
|
168
|
+
"type": "function"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"inputs": [
|
|
172
|
+
{
|
|
173
|
+
"internalType": "address",
|
|
174
|
+
"name": "tokenAddress",
|
|
175
|
+
"type": "address"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"internalType": "uint256",
|
|
179
|
+
"name": "withdrawAmount",
|
|
180
|
+
"type": "uint256"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"internalType": "address",
|
|
184
|
+
"name": "withdrawAddress",
|
|
185
|
+
"type": "address"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"name": "withdrawTreasuryToken",
|
|
189
|
+
"outputs": [],
|
|
190
|
+
"stateMutability": "nonpayable",
|
|
191
|
+
"type": "function"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"stateMutability": "payable",
|
|
195
|
+
"type": "receive"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
5
200
|
}
|
|
@@ -29,13 +29,17 @@ const func = async function (hre) {
|
|
|
29
29
|
const xvs = await hardhat_1.ethers.getContract("XVS");
|
|
30
30
|
const xvsVaultProxyDeployment = await hardhat_1.ethers.getContract("XVSVaultProxy");
|
|
31
31
|
const xvsStoreDeployment = await hardhat_1.ethers.getContract("XVSStore");
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
let xvsVault = await hardhat_1.ethers.getContract("XVSVaultProxy_Implementation");
|
|
33
|
+
await xvsVaultProxyDeployment._setPendingImplementation(xvsVault.address);
|
|
34
|
+
await xvsVault._become(xvsVaultProxyDeployment.address);
|
|
35
|
+
xvsVault = await hardhat_1.ethers.getContractAt("XVSVault", xvsVaultProxyDeployment.address);
|
|
36
|
+
let txn = await xvsVault.initializeTimeManager(isTimeBased, blocksPerYear[hardhat_1.network.name]);
|
|
34
37
|
await txn.wait();
|
|
35
|
-
txn = await
|
|
38
|
+
txn = await xvsVault.setXvsStore(xvs.address, xvsStoreDeployment.address);
|
|
36
39
|
await txn.wait();
|
|
37
|
-
txn = await
|
|
40
|
+
txn = await xvsVault.setAccessControl(accessControlManager.address);
|
|
38
41
|
await txn.wait();
|
|
42
|
+
await xvsStoreDeployment.setNewOwner(xvsVaultProxyDeployment.address);
|
|
39
43
|
if (!hre.network.live) {
|
|
40
44
|
const tx = await accessControlManager.giveCallPermission(hardhat_1.ethers.constants.AddressZero, "add(address,uint256,address,uint256,uint256)", deployer);
|
|
41
45
|
await tx.wait();
|
|
@@ -45,7 +49,7 @@ const func = async function (hre) {
|
|
|
45
49
|
const rewardToken = xvs.address;
|
|
46
50
|
const rewardPerBlock = "61805555555555555";
|
|
47
51
|
const lockPeriod = 604800;
|
|
48
|
-
await
|
|
52
|
+
await xvsVault.add(rewardToken, allocPoint, token, rewardPerBlock, lockPeriod);
|
|
49
53
|
}
|
|
50
54
|
else {
|
|
51
55
|
const owner = adminAccount[hre.network.name];
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DeployFunction } from "hardhat-deploy/types";
|
|
2
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
3
|
-
|
|
4
|
-
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
5
|
-
const { deployments, getNamedAccounts } = hre;
|
|
6
|
-
const { deploy } = deployments;
|
|
7
|
-
const { deployer } = await getNamedAccounts();
|
|
8
|
-
|
|
9
|
-
await deployments.delete("XVSVault");
|
|
10
|
-
|
|
11
|
-
await deploy("XVSVault", {
|
|
12
|
-
from: deployer,
|
|
13
|
-
args: [],
|
|
14
|
-
log: true,
|
|
15
|
-
autoMine: true,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
func.tags = ["xvs-vault"];
|
|
20
|
-
|
|
21
|
-
export default func;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ethers } from "hardhat";
|
|
2
|
-
import { DeployFunction } from "hardhat-deploy/types";
|
|
3
|
-
|
|
4
|
-
const func: DeployFunction = async function () {
|
|
5
|
-
const xvsVault = await ethers.getContract("XVSVaultProxy_Implementation");
|
|
6
|
-
const xvsStore = await ethers.getContract("XVSStore");
|
|
7
|
-
const xvsVaultProxy = await ethers.getContract("XVSVaultProxy");
|
|
8
|
-
|
|
9
|
-
// Become Implementation of XVSVaultProxy
|
|
10
|
-
await xvsVaultProxy._setPendingImplementation(xvsVault.address);
|
|
11
|
-
await xvsVault._become(xvsVaultProxy.address);
|
|
12
|
-
|
|
13
|
-
await xvsStore.setNewOwner(xvsVaultProxy.address);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
func.tags = ["configure-xvs-vault"];
|
|
17
|
-
func.id = "configure_xvs_vaults"; // id required to prevent re-execution
|
|
18
|
-
|
|
19
|
-
export default func;
|
|
@@ -1,16 +0,0 @@
|
|
|
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 deployments.delete("XVSVault");
|
|
8
|
-
await deploy("XVSVault", {
|
|
9
|
-
from: deployer,
|
|
10
|
-
args: [],
|
|
11
|
-
log: true,
|
|
12
|
-
autoMine: true,
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
func.tags = ["xvs-vault"];
|
|
16
|
-
exports.default = func;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const hardhat_1 = require("hardhat");
|
|
4
|
-
const func = async function () {
|
|
5
|
-
const xvsVault = await hardhat_1.ethers.getContract("XVSVaultProxy_Implementation");
|
|
6
|
-
const xvsStore = await hardhat_1.ethers.getContract("XVSStore");
|
|
7
|
-
const xvsVaultProxy = await hardhat_1.ethers.getContract("XVSVaultProxy");
|
|
8
|
-
// Become Implementation of XVSVaultProxy
|
|
9
|
-
await xvsVaultProxy._setPendingImplementation(xvsVault.address);
|
|
10
|
-
await xvsVault._become(xvsVaultProxy.address);
|
|
11
|
-
await xvsStore.setNewOwner(xvsVaultProxy.address);
|
|
12
|
-
};
|
|
13
|
-
func.tags = ["configure-xvs-vault"];
|
|
14
|
-
func.id = "configure_xvs_vaults"; // id required to prevent re-execution
|
|
15
|
-
exports.default = func;
|