@keep-network/tbtc-v2 1.6.0-dev.5 → 1.6.0-dev.7
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/artifacts/BLS.json +6 -6
- package/artifacts/Bank.json +17 -17
- package/artifacts/BeaconAuthorization.json +6 -6
- package/artifacts/BeaconDkg.json +6 -6
- package/artifacts/BeaconDkgValidator.json +9 -9
- package/artifacts/BeaconInactivity.json +6 -6
- package/artifacts/BeaconSortitionPool.json +16 -16
- package/artifacts/Bridge.json +32 -32
- package/artifacts/BridgeGovernance.json +14 -14
- package/artifacts/BridgeGovernanceParameters.json +7 -7
- package/artifacts/Deposit.json +7 -7
- package/artifacts/DepositSweep.json +7 -7
- package/artifacts/DonationVault.json +11 -11
- package/artifacts/EcdsaDkgValidator.json +7 -7
- package/artifacts/EcdsaInactivity.json +6 -6
- package/artifacts/EcdsaSortitionPool.json +16 -16
- package/artifacts/Fraud.json +7 -7
- package/artifacts/LightRelay.json +28 -28
- package/artifacts/LightRelayMaintainerProxy.json +24 -24
- package/artifacts/MaintainerProxy.json +37 -37
- package/artifacts/MovingFunds.json +7 -7
- package/artifacts/NuCypherToken.json +11 -11
- package/artifacts/RandomBeacon.json +23 -23
- package/artifacts/RandomBeaconChaosnet.json +11 -11
- package/artifacts/RandomBeaconGovernance.json +12 -12
- package/artifacts/Redemption.json +7 -7
- package/artifacts/ReimbursementPool.json +11 -11
- package/artifacts/T.json +11 -11
- package/artifacts/TBTC.json +19 -19
- package/artifacts/TBTCToken.json +19 -19
- package/artifacts/TBTCVault.json +36 -36
- package/artifacts/TokenStaking.json +156 -308
- package/artifacts/TokenholderGovernor.json +47 -47
- package/artifacts/TokenholderTimelock.json +36 -36
- package/artifacts/VendingMachine.json +22 -22
- package/artifacts/VendingMachineNuCypher.json +9 -9
- package/artifacts/VendingMachineV2.json +15 -15
- package/artifacts/VendingMachineV3.json +15 -15
- package/artifacts/WalletProposalValidator.json +437 -0
- package/artifacts/WalletRegistry.json +31 -31
- package/artifacts/WalletRegistryGovernance.json +56 -56
- package/artifacts/Wallets.json +7 -7
- package/artifacts/solcInputs/{d2d7e276da75d7184610fe11a4a103b7.json → b4e1c442421284b256fcad9f86102ecc.json} +4 -4
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
- package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
- package/build/contracts/bridge/WalletProposalValidator.sol/WalletProposalValidator.dbg.json +4 -0
- package/build/contracts/bridge/WalletProposalValidator.sol/WalletProposalValidator.json +323 -0
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
- package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
- package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
- package/build/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.dbg.json +1 -1
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/bridge/{WalletCoordinator.sol → WalletProposalValidator.sol} +129 -447
- package/deploy/39_deploy_wallet_proposal_validator.ts +33 -0
- package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +24 -24
- package/export/artifacts/@keep-network/ecdsa/contracts/WalletRegistry.sol/WalletRegistry.json +4999 -4814
- package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +2 -2
- package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +23 -23
- package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +53 -53
- package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +21 -21
- package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +16 -16
- package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +206 -206
- package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +26 -26
- package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +46 -46
- package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +36 -36
- package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +78 -78
- package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +68 -68
- package/export/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +43 -43
- package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +79 -79
- package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +42 -42
- package/export/artifacts/contracts/bank/Bank.sol/Bank.json +77 -77
- package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +320 -320
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +108 -108
- package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +63 -63
- package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +65 -65
- package/export/artifacts/contracts/bridge/WalletProposalValidator.sol/WalletProposalValidator.json +25381 -0
- package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +194 -194
- package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +98 -98
- package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +149 -149
- package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +76 -76
- package/export/artifacts/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.json +62 -62
- package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +79 -79
- package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +358 -358
- package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +78 -78
- package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +4 -4
- package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +78 -78
- package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +7 -7
- package/export/artifacts/contracts/test/SepoliaLightRelay.sol/SepoliaLightRelay.json +78 -78
- package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +14 -14
- package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +85 -85
- package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +78 -78
- package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +4 -4
- package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +37 -37
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +104 -104
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +19 -19
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +184 -184
- package/export/deploy/39_deploy_wallet_proposal_validator.js +82 -0
- package/export/hardhat.config.js +0 -6
- package/export/typechain/factories/EcdsaAuthorization__factory.js +1 -1
- package/export/typechain/factories/IStaking__factory.js +24 -103
- package/export/typechain/factories/WalletProposalValidator__factory.js +402 -0
- package/export/typechain/factories/WalletRegistry__factory.js +1 -1
- package/export/typechain/index.js +3 -3
- package/package.json +2 -2
- package/artifacts/KeepRegistry.json +0 -99
- package/artifacts/KeepStake.json +0 -286
- package/artifacts/KeepToken.json +0 -711
- package/artifacts/KeepTokenStaking.json +0 -483
- package/artifacts/NuCypherStakingEscrow.json +0 -287
- package/artifacts/VendingMachineKeep.json +0 -400
- package/artifacts/WalletCoordinator.json +0 -1107
- package/build/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.dbg.json +0 -4
- package/build/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.json +0 -1042
- package/deploy/34_deploy_wallet_coordinator.ts +0 -43
- package/deploy/35_add_coordinator_address.ts +0 -20
- package/deploy/36_transfer_wallet_coordinator_ownership.ts +0 -19
- package/deploy/81_upgrade_wallet_coordinator_v2.ts +0 -99
- package/export/artifacts/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.json +0 -33310
- package/export/deploy/34_deploy_wallet_coordinator.js +0 -115
- package/export/deploy/35_add_coordinator_address.js +0 -60
- package/export/deploy/36_transfer_wallet_coordinator_ownership.js +0 -60
- package/export/deploy/81_upgrade_wallet_coordinator_v2.js +0 -140
- package/export/typechain/factories/WalletCoordinator__factory.js +0 -1121
- /package/deploy/{37_deploy_light_relay_maintainer_proxy.ts → 34_deploy_light_relay_maintainer_proxy.ts} +0 -0
- /package/deploy/{38_authorize_maintainer_in_light_relay_maintainer_proxy.ts → 35_authorize_maintainer_in_light_relay_maintainer_proxy.ts} +0 -0
- /package/deploy/{39_transfer_light_relay_maintainer_proxy_ownership.ts → 36_transfer_light_relay_maintainer_proxy_ownership.ts} +0 -0
- /package/deploy/{40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts → 37_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts} +0 -0
- /package/deploy/{41_authorize_light_relay_maintainer_proxy_in_light_relay.ts → 38_authorize_light_relay_maintainer_proxy_in_light_relay.ts} +0 -0
- /package/export/deploy/{37_deploy_light_relay_maintainer_proxy.js → 34_deploy_light_relay_maintainer_proxy.js} +0 -0
- /package/export/deploy/{38_authorize_maintainer_in_light_relay_maintainer_proxy.js → 35_authorize_maintainer_in_light_relay_maintainer_proxy.js} +0 -0
- /package/export/deploy/{39_transfer_light_relay_maintainer_proxy_ownership.js → 36_transfer_light_relay_maintainer_proxy_ownership.js} +0 -0
- /package/export/deploy/{40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js → 37_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js} +0 -0
- /package/export/deploy/{41_authorize_light_relay_maintainer_proxy_in_light_relay.js → 38_authorize_light_relay_maintainer_proxy_in_light_relay.js} +0 -0
- /package/export/typechain/{WalletCoordinator.js → WalletProposalValidator.js} +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
-
if (!m) return o;
|
|
41
|
-
var i = m.call(o), r, ar = [], e;
|
|
42
|
-
try {
|
|
43
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
-
}
|
|
45
|
-
catch (error) { e = { error: error }; }
|
|
46
|
-
finally {
|
|
47
|
-
try {
|
|
48
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
-
}
|
|
50
|
-
finally { if (e) throw e.error; }
|
|
51
|
-
}
|
|
52
|
-
return ar;
|
|
53
|
-
};
|
|
54
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
var func = function (hre) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
var deployments, ethers, getNamedAccounts, helpers, deployer, Bridge, _a, walletCoordinator, proxyDeployment, _b, _c, _d;
|
|
58
|
-
var _e, _f;
|
|
59
|
-
return __generator(this, function (_g) {
|
|
60
|
-
switch (_g.label) {
|
|
61
|
-
case 0:
|
|
62
|
-
deployments = hre.deployments, ethers = hre.ethers, getNamedAccounts = hre.getNamedAccounts, helpers = hre.helpers;
|
|
63
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
64
|
-
case 1:
|
|
65
|
-
deployer = (_g.sent()).deployer;
|
|
66
|
-
return [4 /*yield*/, deployments.get("Bridge")];
|
|
67
|
-
case 2:
|
|
68
|
-
Bridge = _g.sent();
|
|
69
|
-
_c = (_b = helpers.upgrades).deployProxy;
|
|
70
|
-
_d = ["WalletCoordinator"];
|
|
71
|
-
_e = {
|
|
72
|
-
contractName: "WalletCoordinator",
|
|
73
|
-
initializerArgs: [Bridge.address]
|
|
74
|
-
};
|
|
75
|
-
_f = {};
|
|
76
|
-
return [4 /*yield*/, ethers.getSigner(deployer)];
|
|
77
|
-
case 3: return [4 /*yield*/, _c.apply(_b, _d.concat([(_e.factoryOpts = (_f.signer = _g.sent(),
|
|
78
|
-
_f),
|
|
79
|
-
_e.proxyOpts = {
|
|
80
|
-
kind: "transparent",
|
|
81
|
-
},
|
|
82
|
-
_e)]))];
|
|
83
|
-
case 4:
|
|
84
|
-
_a = __read.apply(void 0, [_g.sent(), 2]), walletCoordinator = _a[0], proxyDeployment = _a[1];
|
|
85
|
-
if (!hre.network.tags.etherscan) return [3 /*break*/, 6];
|
|
86
|
-
// We use `verify` instead of `verify:verify` as the `verify` task is defined
|
|
87
|
-
// in "@openzeppelin/hardhat-upgrades" to perform Etherscan verification
|
|
88
|
-
// of Proxy and Implementation contracts.
|
|
89
|
-
return [4 /*yield*/, hre.run("verify", {
|
|
90
|
-
address: proxyDeployment.address,
|
|
91
|
-
constructorArgsParams: proxyDeployment.args,
|
|
92
|
-
})];
|
|
93
|
-
case 5:
|
|
94
|
-
// We use `verify` instead of `verify:verify` as the `verify` task is defined
|
|
95
|
-
// in "@openzeppelin/hardhat-upgrades" to perform Etherscan verification
|
|
96
|
-
// of Proxy and Implementation contracts.
|
|
97
|
-
_g.sent();
|
|
98
|
-
_g.label = 6;
|
|
99
|
-
case 6:
|
|
100
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 8];
|
|
101
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
102
|
-
name: "WalletCoordinator",
|
|
103
|
-
address: walletCoordinator.address,
|
|
104
|
-
})];
|
|
105
|
-
case 7:
|
|
106
|
-
_g.sent();
|
|
107
|
-
_g.label = 8;
|
|
108
|
-
case 8: return [2 /*return*/];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
exports.default = func;
|
|
114
|
-
func.tags = ["WalletCoordinator"];
|
|
115
|
-
func.dependencies = ["Bridge"];
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var func = function (hre) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
-
var getNamedAccounts, deployments, execute, _a, deployer, coordinator;
|
|
42
|
-
return __generator(this, function (_b) {
|
|
43
|
-
switch (_b.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
getNamedAccounts = hre.getNamedAccounts, deployments = hre.deployments;
|
|
46
|
-
execute = deployments.execute;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
_a = _b.sent(), deployer = _a.deployer, coordinator = _a.coordinator;
|
|
50
|
-
return [4 /*yield*/, execute("WalletCoordinator", { from: deployer, log: true, waitConfirmations: 1 }, "addCoordinator", coordinator)];
|
|
51
|
-
case 2:
|
|
52
|
-
_b.sent();
|
|
53
|
-
return [2 /*return*/];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
exports.default = func;
|
|
59
|
-
func.tags = ["AddCoordinatorAddress"];
|
|
60
|
-
func.dependencies = ["WalletCoordinator"];
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var func = function (hre) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
-
var getNamedAccounts, helpers, _a, deployer, governance;
|
|
42
|
-
return __generator(this, function (_b) {
|
|
43
|
-
switch (_b.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
getNamedAccounts = hre.getNamedAccounts, helpers = hre.helpers;
|
|
46
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
47
|
-
case 1:
|
|
48
|
-
_a = _b.sent(), deployer = _a.deployer, governance = _a.governance;
|
|
49
|
-
return [4 /*yield*/, helpers.ownable.transferOwnership("WalletCoordinator", governance, deployer)];
|
|
50
|
-
case 2:
|
|
51
|
-
_b.sent();
|
|
52
|
-
return [2 /*return*/];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
exports.default = func;
|
|
58
|
-
func.tags = ["TransferWalletCoordinatorOwnership"];
|
|
59
|
-
func.dependencies = ["AddCoordinatorAddress"];
|
|
60
|
-
func.runAtTheEnd = true;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
var func = function (hre) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var ethers, helpers, deployments, deployer, proxyDeployment, implementationContractFactory, newImplementationAddress, proxyAdmin, proxyAdminOwner, upgradeTxData, walletCoordinatorArtifact, walletCoordinator, walletCoordinatorOwner, updateRedemptionProposalParametersTxData;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
ethers = hre.ethers, helpers = hre.helpers, deployments = hre.deployments;
|
|
57
|
-
return [4 /*yield*/, helpers.signers.getNamedSigners()];
|
|
58
|
-
case 1:
|
|
59
|
-
deployer = (_a.sent()).deployer;
|
|
60
|
-
return [4 /*yield*/, deployments.get("WalletCoordinator")];
|
|
61
|
-
case 2:
|
|
62
|
-
proxyDeployment = _a.sent();
|
|
63
|
-
return [4 /*yield*/, ethers.getContractFactory("WalletCoordinator", {
|
|
64
|
-
signer: deployer,
|
|
65
|
-
})
|
|
66
|
-
// Deploy new implementation contract
|
|
67
|
-
];
|
|
68
|
-
case 3:
|
|
69
|
-
implementationContractFactory = _a.sent();
|
|
70
|
-
return [4 /*yield*/, hre.upgrades.prepareUpgrade(proxyDeployment, implementationContractFactory, {
|
|
71
|
-
kind: "transparent",
|
|
72
|
-
})];
|
|
73
|
-
case 4:
|
|
74
|
-
newImplementationAddress = (_a.sent());
|
|
75
|
-
deployments.log("new implementation contract deployed at: ".concat(newImplementationAddress));
|
|
76
|
-
return [4 /*yield*/, hre.upgrades.admin.getInstance()];
|
|
77
|
-
case 5:
|
|
78
|
-
proxyAdmin = (_a.sent());
|
|
79
|
-
return [4 /*yield*/, proxyAdmin.owner()];
|
|
80
|
-
case 6:
|
|
81
|
-
proxyAdminOwner = _a.sent();
|
|
82
|
-
return [4 /*yield*/, proxyAdmin.interface.encodeFunctionData("upgrade", [proxyDeployment.address, newImplementationAddress])];
|
|
83
|
-
case 7:
|
|
84
|
-
upgradeTxData = _a.sent();
|
|
85
|
-
deployments.log("proxy admin owner ".concat(proxyAdminOwner, " is required to upgrade proxy implementation with transaction:\n") +
|
|
86
|
-
"\t\tfrom: ".concat(proxyAdminOwner, "\n") +
|
|
87
|
-
"\t\tto: ".concat(proxyAdmin.address, "\n") +
|
|
88
|
-
"\t\tdata: ".concat(upgradeTxData));
|
|
89
|
-
walletCoordinatorArtifact = hre.artifacts.readArtifactSync("WalletCoordinator");
|
|
90
|
-
return [4 /*yield*/, deployments.save("WalletCoordinator", __assign(__assign({}, proxyDeployment), { abi: walletCoordinatorArtifact.abi, implementation: newImplementationAddress }))
|
|
91
|
-
// Assemble parameters upgrade transaction.
|
|
92
|
-
];
|
|
93
|
-
case 8:
|
|
94
|
-
_a.sent();
|
|
95
|
-
return [4 /*yield*/, helpers.contracts.getContract("WalletCoordinator")];
|
|
96
|
-
case 9:
|
|
97
|
-
walletCoordinator = _a.sent();
|
|
98
|
-
return [4 /*yield*/, walletCoordinator.owner()];
|
|
99
|
-
case 10:
|
|
100
|
-
walletCoordinatorOwner = _a.sent();
|
|
101
|
-
updateRedemptionProposalParametersTxData = walletCoordinator.interface.encodeFunctionData("updateRedemptionProposalParameters", [7200, 600, 7200, 20, 20000]);
|
|
102
|
-
deployments.log("WalletCoordinator owner ".concat(walletCoordinatorOwner, " is required to update redemption proposal parameters with transaction:\n") +
|
|
103
|
-
"\t\tfrom: ".concat(walletCoordinatorOwner, "\n") +
|
|
104
|
-
"\t\tto: ".concat(walletCoordinator.address, "\n") +
|
|
105
|
-
"\t\tdata: ".concat(updateRedemptionProposalParametersTxData));
|
|
106
|
-
if (!hre.network.tags.etherscan) return [3 /*break*/, 12];
|
|
107
|
-
// We use `verify` instead of `verify:verify` as the `verify` task is defined
|
|
108
|
-
// in "@openzeppelin/hardhat-upgrades" to perform Etherscan verification
|
|
109
|
-
// of Proxy and Implementation contracts.
|
|
110
|
-
return [4 /*yield*/, hre.run("verify", {
|
|
111
|
-
address: newImplementationAddress,
|
|
112
|
-
constructorArgsParams: proxyDeployment.args,
|
|
113
|
-
})];
|
|
114
|
-
case 11:
|
|
115
|
-
// We use `verify` instead of `verify:verify` as the `verify` task is defined
|
|
116
|
-
// in "@openzeppelin/hardhat-upgrades" to perform Etherscan verification
|
|
117
|
-
// of Proxy and Implementation contracts.
|
|
118
|
-
_a.sent();
|
|
119
|
-
_a.label = 12;
|
|
120
|
-
case 12:
|
|
121
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 14];
|
|
122
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
123
|
-
name: "WalletCoordinator",
|
|
124
|
-
address: newImplementationAddress,
|
|
125
|
-
})];
|
|
126
|
-
case 13:
|
|
127
|
-
_a.sent();
|
|
128
|
-
_a.label = 14;
|
|
129
|
-
case 14: return [2 /*return*/];
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
exports.default = func;
|
|
135
|
-
func.tags = ["UpgradeWalletCoordinator"];
|
|
136
|
-
// When running an upgrade uncomment the skip below and run the command:
|
|
137
|
-
// yarn deploy --tags UpgradeWalletCoordinator --network <NETWORK>
|
|
138
|
-
func.skip = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
139
|
-
return [2 /*return*/, true];
|
|
140
|
-
}); }); };
|