@gooddollar/goodprotocol 1.0.3 → 1.0.4-beta.0
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/hardhat.config.ts +3 -2
- package/package.json +2 -1
- package/scripts/deployFullDAO.ts +88 -45
- package/scripts/upgradeToV2/upgradeToV2.ts +49 -32
- package/yarn.lock +14 -0
package/hardhat.config.ts
CHANGED
|
@@ -117,7 +117,8 @@ const hhconfig: HardhatUserConfig = {
|
|
|
117
117
|
"fuse-mainnet": {
|
|
118
118
|
accounts: { mnemonic },
|
|
119
119
|
url: "https://ropsten.infura.io/v3/" + infura_api,
|
|
120
|
-
|
|
120
|
+
gasPrice: 20000000000,
|
|
121
|
+
gas: 5000000,
|
|
121
122
|
chainId: 3
|
|
122
123
|
},
|
|
123
124
|
staging: {
|
|
@@ -143,7 +144,7 @@ const hhconfig: HardhatUserConfig = {
|
|
|
143
144
|
accounts: [deployerPrivateKey],
|
|
144
145
|
url: "https://mainnet.infura.io/v3/" + infura_api,
|
|
145
146
|
gas: 3000000,
|
|
146
|
-
gasPrice:
|
|
147
|
+
gasPrice: 50000000000,
|
|
147
148
|
chainId: 1
|
|
148
149
|
}
|
|
149
150
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddollar/goodprotocol",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4-beta.0",
|
|
4
4
|
"description": "GoodDollar Protocol",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "scripts/build.sh deploy",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"ethers-multicall": "^0.2.1",
|
|
61
61
|
"openzeppelin-solidity": "^4.3.2",
|
|
62
62
|
"patch-package": "latest",
|
|
63
|
+
"press-any-key": "^0.1.1",
|
|
63
64
|
"truffle-plugin-verify": "^0.5.11",
|
|
64
65
|
"truffle-source-verify": "^0.0.6"
|
|
65
66
|
},
|
package/scripts/deployFullDAO.ts
CHANGED
|
@@ -22,6 +22,7 @@ import ProtocolSettings from "../releases/deploy-settings.json";
|
|
|
22
22
|
import dao from "../releases/deployment.json";
|
|
23
23
|
import { main as deployV2 } from "./upgradeToV2/upgradeToV2";
|
|
24
24
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
25
|
+
import pressAnyKey from "press-any-key";
|
|
25
26
|
|
|
26
27
|
const { name } = network;
|
|
27
28
|
|
|
@@ -41,6 +42,7 @@ const printDeploy = async (
|
|
|
41
42
|
|
|
42
43
|
export const createDAO = async () => {
|
|
43
44
|
const fusedao = dao[network.name.split("-")[0]];
|
|
45
|
+
let release: { [key: string]: any } = {}; //dao[network.name];
|
|
44
46
|
let [root, ...signers] = await ethers.getSigners();
|
|
45
47
|
//generic call permissions
|
|
46
48
|
let schemeMock = root;
|
|
@@ -79,7 +81,9 @@ export const createDAO = async () => {
|
|
|
79
81
|
|
|
80
82
|
const BancorFormula = (await (
|
|
81
83
|
await ethers.getContractFactory("BancorFormula")
|
|
82
|
-
)
|
|
84
|
+
)
|
|
85
|
+
.deploy()
|
|
86
|
+
.then(printDeploy)) as Contract;
|
|
83
87
|
|
|
84
88
|
const AddFounders = (await AddFoundersFactory.deploy().then(
|
|
85
89
|
printDeploy
|
|
@@ -94,7 +98,7 @@ export const createDAO = async () => {
|
|
|
94
98
|
)) as Contract;
|
|
95
99
|
// const Identity = await ethers.getContractAt(
|
|
96
100
|
// IdentityABI.abi,
|
|
97
|
-
//
|
|
101
|
+
// release.Identity
|
|
98
102
|
// );
|
|
99
103
|
|
|
100
104
|
const daoCreator = (await DAOCreatorFactory.deploy(AddFounders.address).then(
|
|
@@ -129,6 +133,15 @@ export const createDAO = async () => {
|
|
|
129
133
|
root
|
|
130
134
|
);
|
|
131
135
|
|
|
136
|
+
// const Avatar = new ethers.Contract(
|
|
137
|
+
// release.Avatar,
|
|
138
|
+
// [
|
|
139
|
+
// "function owner() view returns (address)",
|
|
140
|
+
// "function nativeToken() view returns (address)"
|
|
141
|
+
// ],
|
|
142
|
+
// root
|
|
143
|
+
// );
|
|
144
|
+
|
|
132
145
|
await Identity.setAvatar(Avatar.address).then(printDeploy);
|
|
133
146
|
|
|
134
147
|
console.log("Done deploying DAO, setting schemes permissions");
|
|
@@ -158,13 +171,22 @@ export const createDAO = async () => {
|
|
|
158
171
|
);
|
|
159
172
|
|
|
160
173
|
let mainnet: { [key: string]: Contract } = {};
|
|
174
|
+
release = {
|
|
175
|
+
...release,
|
|
176
|
+
Avatar: Avatar.address,
|
|
177
|
+
Controller: controller,
|
|
178
|
+
GoodDollar: gd,
|
|
179
|
+
Identity: Identity.address,
|
|
180
|
+
FeeFormula: FeeFormula.address
|
|
181
|
+
};
|
|
161
182
|
|
|
162
183
|
if (isMainnet) {
|
|
163
184
|
mainnet = await deployMainnet(Avatar, Identity);
|
|
185
|
+
Object.entries(mainnet).forEach(([k, v]) => (release[k] = v.address));
|
|
164
186
|
}
|
|
165
187
|
|
|
166
188
|
let sidechain: { [key: string]: any } = {};
|
|
167
|
-
|
|
189
|
+
|
|
168
190
|
if (false === isMainnet) {
|
|
169
191
|
sidechain = await deploySidechain(
|
|
170
192
|
setSchemes,
|
|
@@ -175,25 +197,24 @@ export const createDAO = async () => {
|
|
|
175
197
|
);
|
|
176
198
|
schemes.push(sidechain.OneTimePayments.address);
|
|
177
199
|
const adminWallet = await deployAdminWallet(Identity.address);
|
|
178
|
-
await root
|
|
179
|
-
.sendTransaction({
|
|
180
|
-
to: adminWallet.address,
|
|
181
|
-
value: ethers.utils.parseUnits("0.1", "ether")
|
|
182
|
-
})
|
|
183
|
-
.then(printDeploy);
|
|
184
200
|
Object.entries(sidechain).forEach(([k, v]) => (release[k] = v.address));
|
|
185
201
|
release["AdminWallet"] = adminWallet.address;
|
|
186
202
|
}
|
|
187
203
|
|
|
204
|
+
await releaser(release, network.name);
|
|
205
|
+
|
|
206
|
+
await pressAnyKey();
|
|
188
207
|
const bridgeRelease = await deployBridge(Avatar, gd, setSchemes, isMainnet);
|
|
189
208
|
release = { ...release, ...bridgeRelease };
|
|
209
|
+
await releaser(release, network.name);
|
|
190
210
|
|
|
191
|
-
|
|
211
|
+
await pressAnyKey();
|
|
212
|
+
// deploy v2 mainnet/sidechain contracts, returns their addresses
|
|
192
213
|
const v2 = await deployV2(network.name, false, {
|
|
193
|
-
FirstClaimPool:
|
|
194
|
-
BancorFormula: BancorFormula
|
|
195
|
-
Avatar: Avatar
|
|
196
|
-
Controller:
|
|
214
|
+
FirstClaimPool: release.FirstClaimPool,
|
|
215
|
+
BancorFormula: release.BancorFormula,
|
|
216
|
+
Avatar: release.Avatar,
|
|
217
|
+
Controller: release.Controller,
|
|
197
218
|
DAIUsdOracle: ethers.constants.AddressZero,
|
|
198
219
|
COMPUsdOracle: ethers.constants.AddressZero,
|
|
199
220
|
USDCUsdOracle: ethers.constants.AddressZero,
|
|
@@ -201,20 +222,22 @@ export const createDAO = async () => {
|
|
|
201
222
|
AaveLendingPool: ethers.constants.AddressZero,
|
|
202
223
|
AaveIncentiveController: ethers.constants.AddressZero,
|
|
203
224
|
GasPriceOracle: ethers.constants.AddressZero,
|
|
204
|
-
cDAI:
|
|
205
|
-
DAI:
|
|
206
|
-
COMP:
|
|
225
|
+
cDAI: release.cDAI || ethers.constants.AddressZero,
|
|
226
|
+
DAI: release.DAI || ethers.constants.AddressZero,
|
|
227
|
+
COMP: release.COMP || ethers.constants.AddressZero,
|
|
207
228
|
USDC: ethers.constants.AddressZero,
|
|
208
|
-
Identity: Identity
|
|
209
|
-
GoodDollar:
|
|
210
|
-
Contribution:
|
|
229
|
+
Identity: release.Identity,
|
|
230
|
+
GoodDollar: release.GoodDollar,
|
|
231
|
+
Contribution: release.Contribution,
|
|
211
232
|
UniswapRouter: "0x0000000000000000000000000000000000000001",
|
|
212
|
-
|
|
233
|
+
HomeBridge: release.HomeBridge,
|
|
234
|
+
ForeignBridge: release.ForeignBridge,
|
|
213
235
|
SchemeRegistrar: ethers.constants.AddressZero,
|
|
214
236
|
UpgradeScheme: ethers.constants.AddressZero
|
|
215
237
|
});
|
|
216
238
|
release = { ...v2, ...release };
|
|
217
|
-
|
|
239
|
+
await releaser(release, network.name);
|
|
240
|
+
await pressAnyKey();
|
|
218
241
|
if (isMainnet) {
|
|
219
242
|
await setSchemes([release.ProtocolUpgrade]);
|
|
220
243
|
await performUpgrade(release, fusedao.UBIScheme);
|
|
@@ -233,28 +256,16 @@ export const createDAO = async () => {
|
|
|
233
256
|
|
|
234
257
|
if (false === isMainnet) {
|
|
235
258
|
let encoded = (
|
|
236
|
-
await ethers.getContractAt("IGoodDollar",
|
|
259
|
+
await ethers.getContractAt("IGoodDollar", release.GoodDollar)
|
|
237
260
|
).interface.encodeFunctionData("mint", [release.UBIScheme, 1000000]);
|
|
238
261
|
|
|
239
|
-
await genericCall(
|
|
262
|
+
await genericCall(release.GoodDollar, encoded);
|
|
240
263
|
|
|
241
264
|
await setSchemes([release.ProtocolUpgradeFuse]);
|
|
242
265
|
await performUpgradeFuse(release);
|
|
243
266
|
}
|
|
244
267
|
|
|
245
268
|
await releaser(release, network.name);
|
|
246
|
-
|
|
247
|
-
return {
|
|
248
|
-
...mainnet,
|
|
249
|
-
...sidechain,
|
|
250
|
-
daoCreator,
|
|
251
|
-
controller,
|
|
252
|
-
avatar: await daoCreator.avatar(),
|
|
253
|
-
gd: await Avatar.nativeToken(),
|
|
254
|
-
identity: Identity.address,
|
|
255
|
-
bancorFormula: BancorFormula.address
|
|
256
|
-
// bridge: Bridge.address,
|
|
257
|
-
};
|
|
258
269
|
};
|
|
259
270
|
|
|
260
271
|
const deployBridge = async (Avatar, gd, setSchemes, isMainnet) => {
|
|
@@ -318,7 +329,7 @@ const deployMainnet = async (Avatar, Identity) => {
|
|
|
318
329
|
const cdaiAddr = ProtocolSettings[network.name]?.compound?.cdai;
|
|
319
330
|
const COMPAddr = ProtocolSettings[network.name]?.compound?.comp;
|
|
320
331
|
|
|
321
|
-
let
|
|
332
|
+
let DAI = daiAddr
|
|
322
333
|
? await ethers.getContractAt("DAIMock", daiAddr)
|
|
323
334
|
: ((await daiFactory.deploy().then(printDeploy)) as Contract);
|
|
324
335
|
|
|
@@ -328,7 +339,7 @@ const deployMainnet = async (Avatar, Identity) => {
|
|
|
328
339
|
|
|
329
340
|
let cDAI = cdaiAddr
|
|
330
341
|
? await ethers.getContractAt("DAIMock", cdaiAddr)
|
|
331
|
-
: ((await cdaiFactory.deploy(
|
|
342
|
+
: ((await cdaiFactory.deploy(DAI.address).then(printDeploy)) as Contract);
|
|
332
343
|
|
|
333
344
|
const ccFactory = new ethers.ContractFactory(
|
|
334
345
|
ContributionCalculation.abi,
|
|
@@ -336,7 +347,7 @@ const deployMainnet = async (Avatar, Identity) => {
|
|
|
336
347
|
root
|
|
337
348
|
);
|
|
338
349
|
|
|
339
|
-
const
|
|
350
|
+
const Contribution = (await ccFactory
|
|
340
351
|
.deploy(Avatar.address, 0, 1e15)
|
|
341
352
|
.then(printDeploy)) as Contract;
|
|
342
353
|
// const contribution = await ethers.getContractAt(
|
|
@@ -345,8 +356,8 @@ const deployMainnet = async (Avatar, Identity) => {
|
|
|
345
356
|
// );
|
|
346
357
|
|
|
347
358
|
return {
|
|
348
|
-
|
|
349
|
-
|
|
359
|
+
Contribution,
|
|
360
|
+
DAI,
|
|
350
361
|
COMP,
|
|
351
362
|
cDAI
|
|
352
363
|
};
|
|
@@ -416,6 +427,13 @@ export const deploySidechain = async (
|
|
|
416
427
|
.deployProxy(faucetf, [identity])
|
|
417
428
|
.then(printDeploy)) as Contract;
|
|
418
429
|
|
|
430
|
+
await root
|
|
431
|
+
.sendTransaction({
|
|
432
|
+
to: faucet.address,
|
|
433
|
+
value: ethers.utils.parseEther("5")
|
|
434
|
+
})
|
|
435
|
+
.then(printDeploy);
|
|
436
|
+
|
|
419
437
|
console.log("setting firstclaim and otp schemes...");
|
|
420
438
|
await setSchemes([firstClaim.address, otp.address]);
|
|
421
439
|
await firstClaim.start().then(printDeploy);
|
|
@@ -554,10 +572,35 @@ const performUpgrade = async (release, ubiScheme) => {
|
|
|
554
572
|
console.log("performing protocol v2 upgrade on Mainnet...", {
|
|
555
573
|
release
|
|
556
574
|
});
|
|
557
|
-
console.log(
|
|
575
|
+
console.log(
|
|
576
|
+
"upgrading nameservice + staking rewards...",
|
|
577
|
+
release.NameService,
|
|
578
|
+
[
|
|
579
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("RESERVE")),
|
|
580
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("MARKET_MAKER")),
|
|
581
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("FUND_MANAGER")),
|
|
582
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("REPUTATION")),
|
|
583
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("GDAO_STAKERS")),
|
|
584
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BRIDGE_CONTRACT")),
|
|
585
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("UBI_RECIPIENT")),
|
|
586
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("EXCHANGE_HELPER"))
|
|
587
|
+
],
|
|
588
|
+
[
|
|
589
|
+
release.GoodReserveCDai,
|
|
590
|
+
release.GoodMarketMaker,
|
|
591
|
+
release.GoodFundManager,
|
|
592
|
+
release.GReputation,
|
|
593
|
+
release.StakersDistribution,
|
|
594
|
+
release.ForeignBridge || ethers.constants.AddressZero,
|
|
595
|
+
ubiScheme,
|
|
596
|
+
release.ExchangeHelper
|
|
597
|
+
],
|
|
598
|
+
release.StakingContracts.map((_: any) => _[0]),
|
|
599
|
+
release.StakingContracts.map((_: any) => _[1])
|
|
600
|
+
);
|
|
558
601
|
let tx;
|
|
559
|
-
tx = await
|
|
560
|
-
|
|
602
|
+
tx = await upgrade
|
|
603
|
+
.upgradeBasic(
|
|
561
604
|
release.NameService,
|
|
562
605
|
[
|
|
563
606
|
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("RESERVE")),
|
|
@@ -582,7 +625,7 @@ const performUpgrade = async (release, ubiScheme) => {
|
|
|
582
625
|
release.StakingContracts.map((_: any) => _[0]),
|
|
583
626
|
release.StakingContracts.map((_: any) => _[1])
|
|
584
627
|
)
|
|
585
|
-
|
|
628
|
+
.then(printDeploy);
|
|
586
629
|
|
|
587
630
|
console.log("upgrading reserve...", {
|
|
588
631
|
params: [
|
|
@@ -11,7 +11,7 @@ import { network, ethers, upgrades, run } from "hardhat";
|
|
|
11
11
|
import { networkNames } from "@openzeppelin/upgrades-core";
|
|
12
12
|
import { isFunction, get, omitBy } from "lodash";
|
|
13
13
|
import { getImplementationAddress } from "@openzeppelin/upgrades-core";
|
|
14
|
-
|
|
14
|
+
import pressAnyKey from "press-any-key";
|
|
15
15
|
import {
|
|
16
16
|
AaveStakingFactory,
|
|
17
17
|
CompoundStakingFactory,
|
|
@@ -80,6 +80,12 @@ export const main = async (
|
|
|
80
80
|
gasLimit: 6000000,
|
|
81
81
|
gasPrice: ethers.utils.parseUnits("1", "gwei")
|
|
82
82
|
};
|
|
83
|
+
} else {
|
|
84
|
+
GAS_SETTINGS = {
|
|
85
|
+
maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"),
|
|
86
|
+
maxFeePerGas: ethers.utils.parseUnits("10", "gwei"),
|
|
87
|
+
gasLimit: 6000000
|
|
88
|
+
};
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
const isBackendTest = networkName.startsWith("dapptest");
|
|
@@ -619,7 +625,7 @@ export const main = async (
|
|
|
619
625
|
dao.Reserve,
|
|
620
626
|
dao.MarketMaker,
|
|
621
627
|
dao.FundManager,
|
|
622
|
-
|
|
628
|
+
release.COMP
|
|
623
629
|
]
|
|
624
630
|
});
|
|
625
631
|
tx = await upgrade.upgradeReserve(
|
|
@@ -627,7 +633,8 @@ export const main = async (
|
|
|
627
633
|
dao.Reserve,
|
|
628
634
|
dao.MarketMaker,
|
|
629
635
|
dao.FundManager,
|
|
630
|
-
|
|
636
|
+
release.COMP,
|
|
637
|
+
GAS_SETTINGS
|
|
631
638
|
);
|
|
632
639
|
await countTotalGas(tx, "call upgrade reserve");
|
|
633
640
|
console.log("upgrading donationstaking...", {
|
|
@@ -641,7 +648,8 @@ export const main = async (
|
|
|
641
648
|
release.NameService,
|
|
642
649
|
dao.DonationsStaking, //old
|
|
643
650
|
release.DonationsStaking, //new
|
|
644
|
-
dao.DAIStaking
|
|
651
|
+
dao.DAIStaking,
|
|
652
|
+
GAS_SETTINGS
|
|
645
653
|
);
|
|
646
654
|
await countTotalGas(tx, "call upgrade donations");
|
|
647
655
|
console.log("Donation staking upgraded");
|
|
@@ -671,31 +679,34 @@ export const main = async (
|
|
|
671
679
|
)) as unknown as ProtocolUpgradeFuse;
|
|
672
680
|
|
|
673
681
|
console.log("performing protocol v2 upgrade on Fuse...", { release, dao });
|
|
674
|
-
await upgrade
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
[
|
|
685
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("REPUTATION")),
|
|
686
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BRIDGE_CONTRACT")),
|
|
687
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("UBISCHEME")),
|
|
688
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("GDAO_STAKING")),
|
|
689
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("GDAO_CLAIMERS"))
|
|
690
|
-
],
|
|
691
|
-
[
|
|
692
|
-
release.GReputation,
|
|
693
|
-
dao.HomeBridge,
|
|
682
|
+
await upgrade
|
|
683
|
+
.upgrade(
|
|
684
|
+
release.NameService,
|
|
685
|
+
//old contracts
|
|
686
|
+
[
|
|
687
|
+
dao.SchemeRegistrar || ethers.constants.AddressZero,
|
|
688
|
+
dao.UpgradeScheme,
|
|
689
|
+
dao.UBIScheme,
|
|
690
|
+
dao.FirstClaimPool
|
|
691
|
+
],
|
|
694
692
|
release.UBIScheme,
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
693
|
+
[
|
|
694
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("REPUTATION")),
|
|
695
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BRIDGE_CONTRACT")),
|
|
696
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("UBISCHEME")),
|
|
697
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("GDAO_STAKING")),
|
|
698
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("GDAO_CLAIMERS"))
|
|
699
|
+
],
|
|
700
|
+
[
|
|
701
|
+
release.GReputation,
|
|
702
|
+
dao.HomeBridge,
|
|
703
|
+
release.UBIScheme,
|
|
704
|
+
release.GovernanceStaking,
|
|
705
|
+
release.ClaimersDistribution
|
|
706
|
+
],
|
|
707
|
+
GAS_SETTINGS
|
|
708
|
+
)
|
|
709
|
+
.then(_ => countTotalGas(_, "fuse basic upgrade"));
|
|
699
710
|
|
|
700
711
|
if (isProduction || isBackendTest) {
|
|
701
712
|
console.log(
|
|
@@ -707,7 +718,8 @@ export const main = async (
|
|
|
707
718
|
await upgrade.upgradeGovernance(
|
|
708
719
|
dao.SchemeRegistrar,
|
|
709
720
|
dao.UpgradeScheme,
|
|
710
|
-
release.CompoundVotingMachine
|
|
721
|
+
release.CompoundVotingMachine,
|
|
722
|
+
GAS_SETTINGS
|
|
711
723
|
);
|
|
712
724
|
}
|
|
713
725
|
};
|
|
@@ -757,10 +769,13 @@ export const main = async (
|
|
|
757
769
|
founders
|
|
758
770
|
});
|
|
759
771
|
await Promise.all(
|
|
760
|
-
founders.slice(
|
|
772
|
+
founders.slice(1).map(f =>
|
|
761
773
|
absoluteVote
|
|
762
774
|
.connect(f)
|
|
763
|
-
.vote(proposalId, 1, 0, f.address, {
|
|
775
|
+
.vote(proposalId, 1, 0, f.address, {
|
|
776
|
+
...GAS_SETTINGS,
|
|
777
|
+
gasLimit: 300000
|
|
778
|
+
})
|
|
764
779
|
.then(_ => countTotalGas(_.wait(), "vote"))
|
|
765
780
|
.catch(e => console.log("founder vote failed:", f.address, e.message))
|
|
766
781
|
)
|
|
@@ -946,8 +961,10 @@ export const main = async (
|
|
|
946
961
|
await deployContracts();
|
|
947
962
|
|
|
948
963
|
if (isPerformUpgrade) {
|
|
949
|
-
console.log("deployed contracts", { totalGas });
|
|
964
|
+
console.log("deployed contracts", { totalGas, dao, release });
|
|
965
|
+
if (isTest === false) await pressAnyKey();
|
|
950
966
|
await voteProtocolUpgrade(release);
|
|
967
|
+
if (isTest === false) await pressAnyKey();
|
|
951
968
|
console.log("voted contracts", { totalGas });
|
|
952
969
|
isMainnet && (await performUpgrade(release));
|
|
953
970
|
!isMainnet && (await performUpgradeFuse(release));
|
package/yarn.lock
CHANGED
|
@@ -13647,6 +13647,13 @@ preserve@^0.2.0:
|
|
|
13647
13647
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
|
13648
13648
|
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
|
|
13649
13649
|
|
|
13650
|
+
press-any-key@^0.1.1:
|
|
13651
|
+
version "0.1.1"
|
|
13652
|
+
resolved "https://registry.yarnpkg.com/press-any-key/-/press-any-key-0.1.1.tgz#97cf184ae84f25858fe3d83ab824e9d1dce2cde8"
|
|
13653
|
+
integrity sha512-TR722R9UpZjvOtyVcmS7hx2/1KzKIyeizIqHJ7sRcfXvCDzeSknS3UNLhmQMN7075Jd9gGUBdq98sHw2eqb86Q==
|
|
13654
|
+
dependencies:
|
|
13655
|
+
single-line-log "^1.1.2"
|
|
13656
|
+
|
|
13650
13657
|
prettier@^1.14.3:
|
|
13651
13658
|
version "1.19.1"
|
|
13652
13659
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
|
|
@@ -15022,6 +15029,13 @@ simple-get@^2.7.0:
|
|
|
15022
15029
|
once "^1.3.1"
|
|
15023
15030
|
simple-concat "^1.0.0"
|
|
15024
15031
|
|
|
15032
|
+
single-line-log@^1.1.2:
|
|
15033
|
+
version "1.1.2"
|
|
15034
|
+
resolved "https://registry.yarnpkg.com/single-line-log/-/single-line-log-1.1.2.tgz#c2f83f273a3e1a16edb0995661da0ed5ef033364"
|
|
15035
|
+
integrity sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=
|
|
15036
|
+
dependencies:
|
|
15037
|
+
string-width "^1.0.1"
|
|
15038
|
+
|
|
15025
15039
|
slash@^1.0.0:
|
|
15026
15040
|
version "1.0.0"
|
|
15027
15041
|
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
|