@keep-network/tbtc-v2 1.5.0 → 1.5.1
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/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/WalletCoordinator.sol/WalletCoordinator.dbg.json +1 -1
- 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/l2/L2WormholeGateway.sol/L2WormholeGateway.json +2 -15
- 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/l2/L2WormholeGateway.sol +7 -27
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +6 -6
- package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +6 -6
- package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +3030 -3498
- package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +88 -88
- package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +57 -57
- package/export/artifacts/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.json +31 -31
- package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +11975 -0
- package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +51806 -0
- package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +12024 -0
- package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +822 -0
- package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +12729 -0
- package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +2160 -0
- package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +3407 -0
- package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +14263 -0
- package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +10644 -0
- package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +1160 -0
- package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +8665 -0
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2 -2
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +11 -11
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +135 -135
- package/export/test/integration/data/bls.js +12 -0
- package/export/test/integration/data/integration.js +133 -0
- package/export/test/integration/utils/ecdsa-wallet-registry.js +370 -0
- package/export/test/integration/utils/random-beacon.js +193 -0
- package/export/{deploy/08_deploy_maintainer_proxy.js → test/integration/utils/staking.js} +35 -32
- package/export/typechain/factories/L2WormholeGateway__factory.js +1 -14
- package/export/typechain/factories/WormholeBridgeStub__factory.js +1 -1
- package/package.json +1 -1
- package/export/deploy/00_resolve_relay.js +0 -83
- package/export/deploy/01_deploy_tbtc_v2_token.js +0 -70
- package/export/deploy/02_deploy_vending_machine.js +0 -84
- package/export/deploy/03_transfer_vending_machine_roles.js +0 -69
- package/export/deploy/04_deploy_bank.js +0 -73
- package/export/deploy/05_deploy_bridge.js +0 -178
- package/export/deploy/06_deploy_tbtc_vault.js +0 -80
- package/export/deploy/07_deploy_bridge_governance.js +0 -87
- package/export/deploy/09_bank_update_bridge.js +0 -63
- package/export/deploy/10_authorize_spv_maintainer_in_bridge.js +0 -61
- package/export/deploy/11_transfer_bank_ownership.js +0 -60
- package/export/deploy/12_transfer_bridge_governance.js +0 -63
- package/export/deploy/13_transfer_bridge_governance_ownership.js +0 -60
- package/export/deploy/14_transfer_tbtc_vault_ownership.js +0 -60
- package/export/deploy/15_transfer_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/16_initialize_wallet_owner.js +0 -63
- package/export/deploy/16_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/17_authorize_maintainer_proxy_in_bridge.js +0 -63
- package/export/deploy/17_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/18_authorize_maintainer_proxy_in_bridge.js +0 -63
- package/export/deploy/18_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
- package/export/deploy/19_authorize_bridge_in_reimbursement_pool.js +0 -63
- package/export/deploy/19_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
- package/export/deploy/20_authorize_bridge_in_reimbursement_pool.js +0 -63
- package/export/deploy/20_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/21_transfer_reimbursement_pool_ownership.js +0 -60
- package/export/deploy/22_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/24_transfer_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/25_transfer_proxy_admin_ownership.js +0 -73
- package/export/deploy/26_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -70
- package/export/deploy/27_authorize_bridge_in_reimbursement_pool.js +0 -70
- package/export/deploy/28_deploy_proxy_admin_with_deputy.js +0 -80
- package/export/deploy/35_transfer_wallet_coordinator_ownership.js +0 -60
- package/export/deploy/36_deploy_light_relay_maintainer_proxy.js +0 -86
- package/export/deploy/37_authorize_maintainer_in_light_relay_maintainer_proxy.js +0 -65
- package/export/deploy/38_transfer_light_relay_maintainer_proxy_ownership.js +0 -60
- package/export/deploy/39_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +0 -70
- package/export/deploy/40_authorize_light_relay_maintainer_proxy_in_light_relay.js +0 -66
- package/export/typechain/RelayStub.js +0 -2
- package/export/typechain/TestRelay.js +0 -2
- package/export/typechain/factories/RelayStub__factory.js +0 -546
- package/export/typechain/factories/TestRelay__factory.js +0 -168
|
@@ -1,84 +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 deployments, helpers, getNamedAccounts, deploy, deployer, TBTCToken, TBTC, unmintFee, VendingMachine;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
deployments = hre.deployments, helpers = hre.helpers, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
-
deploy = deployments.deploy;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
deployer = (_a.sent()).deployer;
|
|
50
|
-
return [4 /*yield*/, deployments.get("TBTCToken")];
|
|
51
|
-
case 2:
|
|
52
|
-
TBTCToken = _a.sent();
|
|
53
|
-
return [4 /*yield*/, deployments.get("TBTC")]; // tBTC v2
|
|
54
|
-
case 3:
|
|
55
|
-
TBTC = _a.sent() // tBTC v2
|
|
56
|
-
;
|
|
57
|
-
unmintFee = 0;
|
|
58
|
-
return [4 /*yield*/, deploy("VendingMachine", {
|
|
59
|
-
from: deployer,
|
|
60
|
-
args: [TBTCToken.address, TBTC.address, unmintFee],
|
|
61
|
-
log: true,
|
|
62
|
-
waitConfirmations: 1,
|
|
63
|
-
})];
|
|
64
|
-
case 4:
|
|
65
|
-
VendingMachine = _a.sent();
|
|
66
|
-
return [4 /*yield*/, helpers.ownable.transferOwnership("TBTC", VendingMachine.address, deployer)];
|
|
67
|
-
case 5:
|
|
68
|
-
_a.sent();
|
|
69
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 7];
|
|
70
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
71
|
-
name: "VendingMachine",
|
|
72
|
-
address: VendingMachine.address,
|
|
73
|
-
})];
|
|
74
|
-
case 6:
|
|
75
|
-
_a.sent();
|
|
76
|
-
_a.label = 7;
|
|
77
|
-
case 7: return [2 /*return*/];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
exports.default = func;
|
|
83
|
-
func.tags = ["VendingMachine"];
|
|
84
|
-
func.dependencies = ["TBTCToken", "TBTC"];
|
|
@@ -1,69 +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, deployments, execute, log, _a, deployer, keepTechnicalWalletTeam, keepCommunityMultiSig;
|
|
42
|
-
return __generator(this, function (_b) {
|
|
43
|
-
switch (_b.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
getNamedAccounts = hre.getNamedAccounts, helpers = hre.helpers, deployments = hre.deployments;
|
|
46
|
-
execute = deployments.execute, log = deployments.log;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
_a = _b.sent(), deployer = _a.deployer, keepTechnicalWalletTeam = _a.keepTechnicalWalletTeam, keepCommunityMultiSig = _a.keepCommunityMultiSig;
|
|
50
|
-
log("transferring vendingMachineUpgradeInitiator role to ".concat(keepTechnicalWalletTeam));
|
|
51
|
-
return [4 /*yield*/, execute("VendingMachine", { from: deployer, log: true, waitConfirmations: 1 }, "transferVendingMachineUpgradeInitiatorRole", keepTechnicalWalletTeam)];
|
|
52
|
-
case 2:
|
|
53
|
-
_b.sent();
|
|
54
|
-
log("transferring unmintFeeUpdateInitiator role to ".concat(keepTechnicalWalletTeam));
|
|
55
|
-
return [4 /*yield*/, execute("VendingMachine", { from: deployer, log: true, waitConfirmations: 1 }, "transferUnmintFeeUpdateInitiatorRole", keepTechnicalWalletTeam)];
|
|
56
|
-
case 3:
|
|
57
|
-
_b.sent();
|
|
58
|
-
return [4 /*yield*/, helpers.ownable.transferOwnership("VendingMachine", keepCommunityMultiSig, deployer)];
|
|
59
|
-
case 4:
|
|
60
|
-
_b.sent();
|
|
61
|
-
return [2 /*return*/];
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
exports.default = func;
|
|
67
|
-
func.tags = ["TransferVendingMachineRoles"];
|
|
68
|
-
func.dependencies = ["TBTC", "VendingMachine"];
|
|
69
|
-
func.runAtTheEnd = true;
|
|
@@ -1,73 +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 deployments, getNamedAccounts, deploy, deployer, Bank;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
deployments = hre.deployments, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
-
deploy = deployments.deploy;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
deployer = (_a.sent()).deployer;
|
|
50
|
-
return [4 /*yield*/, deploy("Bank", {
|
|
51
|
-
contract: process.env.TEST_USE_STUBS_TBTC === "true" ? "BankStub" : undefined,
|
|
52
|
-
from: deployer,
|
|
53
|
-
args: [],
|
|
54
|
-
log: true,
|
|
55
|
-
waitConfirmations: 1,
|
|
56
|
-
})];
|
|
57
|
-
case 2:
|
|
58
|
-
Bank = _a.sent();
|
|
59
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 4];
|
|
60
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
61
|
-
name: "Bank",
|
|
62
|
-
address: Bank.address,
|
|
63
|
-
})];
|
|
64
|
-
case 3:
|
|
65
|
-
_a.sent();
|
|
66
|
-
_a.label = 4;
|
|
67
|
-
case 4: return [2 /*return*/];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
exports.default = func;
|
|
73
|
-
func.tags = ["Bank"];
|
|
@@ -1,178 +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
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
50
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
-
if (!m) return o;
|
|
52
|
-
var i = m.call(o), r, ar = [], e;
|
|
53
|
-
try {
|
|
54
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
-
}
|
|
56
|
-
catch (error) { e = { error: error }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e) throw e.error; }
|
|
62
|
-
}
|
|
63
|
-
return ar;
|
|
64
|
-
};
|
|
65
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
-
var func = function (hre) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
-
var ethers, helpers, deployments, getNamedAccounts, deploy, _a, deployer, treasury, Bank, LightRelay, WalletRegistry, ReimbursementPool, txProofDifficultyFactor, deployOptions, Deposit, DepositSweep, Redemption, Wallets, Fraud, MovingFunds, _b, bridge, _c, _d, _e;
|
|
69
|
-
var _f, _g;
|
|
70
|
-
return __generator(this, function (_h) {
|
|
71
|
-
switch (_h.label) {
|
|
72
|
-
case 0:
|
|
73
|
-
ethers = hre.ethers, helpers = hre.helpers, deployments = hre.deployments, getNamedAccounts = hre.getNamedAccounts;
|
|
74
|
-
deploy = deployments.deploy;
|
|
75
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
76
|
-
case 1:
|
|
77
|
-
_a = _h.sent(), deployer = _a.deployer, treasury = _a.treasury;
|
|
78
|
-
return [4 /*yield*/, deployments.get("Bank")];
|
|
79
|
-
case 2:
|
|
80
|
-
Bank = _h.sent();
|
|
81
|
-
return [4 /*yield*/, deployments.get("LightRelay")
|
|
82
|
-
// TODO: Test for mainnet deployment that when `WalletRegistry` is provided
|
|
83
|
-
// in `external/mainnet/` directory it gets resolved correctly, and the deployment
|
|
84
|
-
// script from `@keep-network/ecdsa` is not invoked once again.
|
|
85
|
-
];
|
|
86
|
-
case 3:
|
|
87
|
-
LightRelay = _h.sent();
|
|
88
|
-
return [4 /*yield*/, deployments.get("WalletRegistry")];
|
|
89
|
-
case 4:
|
|
90
|
-
WalletRegistry = _h.sent();
|
|
91
|
-
return [4 /*yield*/, deployments.get("ReimbursementPool")
|
|
92
|
-
// For local tests use `1`.
|
|
93
|
-
];
|
|
94
|
-
case 5:
|
|
95
|
-
ReimbursementPool = _h.sent();
|
|
96
|
-
txProofDifficultyFactor = deployments.getNetworkName() === "hardhat" ||
|
|
97
|
-
deployments.getNetworkName() === "development"
|
|
98
|
-
? 1
|
|
99
|
-
: 6;
|
|
100
|
-
deployOptions = {
|
|
101
|
-
from: deployer,
|
|
102
|
-
log: true,
|
|
103
|
-
waitConfirmations: 1,
|
|
104
|
-
};
|
|
105
|
-
return [4 /*yield*/, deploy("Deposit", deployOptions)];
|
|
106
|
-
case 6:
|
|
107
|
-
Deposit = _h.sent();
|
|
108
|
-
return [4 /*yield*/, deploy("DepositSweep", deployOptions)];
|
|
109
|
-
case 7:
|
|
110
|
-
DepositSweep = _h.sent();
|
|
111
|
-
return [4 /*yield*/, deploy("Redemption", deployOptions)];
|
|
112
|
-
case 8:
|
|
113
|
-
Redemption = _h.sent();
|
|
114
|
-
return [4 /*yield*/, deploy("Wallets", __assign({ contract: "contracts/bridge/Wallets.sol:Wallets" }, deployOptions))];
|
|
115
|
-
case 9:
|
|
116
|
-
Wallets = _h.sent();
|
|
117
|
-
return [4 /*yield*/, deploy("Fraud", deployOptions)];
|
|
118
|
-
case 10:
|
|
119
|
-
Fraud = _h.sent();
|
|
120
|
-
return [4 /*yield*/, deploy("MovingFunds", deployOptions)];
|
|
121
|
-
case 11:
|
|
122
|
-
MovingFunds = _h.sent();
|
|
123
|
-
_d = (_c = helpers.upgrades).deployProxy;
|
|
124
|
-
_e = ["Bridge"];
|
|
125
|
-
_f = {
|
|
126
|
-
contractName: process.env.TEST_USE_STUBS_TBTC === "true" ? "BridgeStub" : undefined,
|
|
127
|
-
initializerArgs: [
|
|
128
|
-
Bank.address,
|
|
129
|
-
LightRelay.address,
|
|
130
|
-
treasury,
|
|
131
|
-
WalletRegistry.address,
|
|
132
|
-
ReimbursementPool.address,
|
|
133
|
-
txProofDifficultyFactor,
|
|
134
|
-
]
|
|
135
|
-
};
|
|
136
|
-
_g = {};
|
|
137
|
-
return [4 /*yield*/, ethers.getSigner(deployer)];
|
|
138
|
-
case 12: return [4 /*yield*/, _d.apply(_c, _e.concat([(_f.factoryOpts = (_g.signer = _h.sent(),
|
|
139
|
-
_g.libraries = {
|
|
140
|
-
Deposit: Deposit.address,
|
|
141
|
-
DepositSweep: DepositSweep.address,
|
|
142
|
-
Redemption: Redemption.address,
|
|
143
|
-
Wallets: Wallets.address,
|
|
144
|
-
Fraud: Fraud.address,
|
|
145
|
-
MovingFunds: MovingFunds.address,
|
|
146
|
-
},
|
|
147
|
-
_g),
|
|
148
|
-
_f.proxyOpts = {
|
|
149
|
-
kind: "transparent",
|
|
150
|
-
// Allow external libraries linking. We need to ensure manually that the
|
|
151
|
-
// external libraries we link are upgrade safe, as the OpenZeppelin plugin
|
|
152
|
-
// doesn't perform such a validation yet.
|
|
153
|
-
// See: https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#why-cant-i-use-external-libraries
|
|
154
|
-
unsafeAllow: ["external-library-linking"],
|
|
155
|
-
},
|
|
156
|
-
_f)]))
|
|
157
|
-
// TODO: Take proxyDeployment and use it for Etherscan verification.
|
|
158
|
-
];
|
|
159
|
-
case 13:
|
|
160
|
-
_b = __read.apply(void 0, [_h.sent()
|
|
161
|
-
// TODO: Take proxyDeployment and use it for Etherscan verification.
|
|
162
|
-
, 1]), bridge = _b[0];
|
|
163
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 15];
|
|
164
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
165
|
-
name: "Bridge",
|
|
166
|
-
address: bridge.address,
|
|
167
|
-
})];
|
|
168
|
-
case 14:
|
|
169
|
-
_h.sent();
|
|
170
|
-
_h.label = 15;
|
|
171
|
-
case 15: return [2 /*return*/];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
exports.default = func;
|
|
177
|
-
func.tags = ["Bridge"];
|
|
178
|
-
func.dependencies = ["Bank", "LightRelay", "Treasury", "WalletRegistry"];
|
|
@@ -1,80 +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 deployments, getNamedAccounts, deploy, deployer, Bank, TBTC, TBTCVault;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
deployments = hre.deployments, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
-
deploy = deployments.deploy;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
deployer = (_a.sent()).deployer;
|
|
50
|
-
return [4 /*yield*/, deployments.get("Bank")];
|
|
51
|
-
case 2:
|
|
52
|
-
Bank = _a.sent();
|
|
53
|
-
return [4 /*yield*/, deployments.get("TBTC")];
|
|
54
|
-
case 3:
|
|
55
|
-
TBTC = _a.sent();
|
|
56
|
-
return [4 /*yield*/, deploy("TBTCVault", {
|
|
57
|
-
contract: "TBTCVault",
|
|
58
|
-
from: deployer,
|
|
59
|
-
args: [Bank.address, TBTC.address],
|
|
60
|
-
log: true,
|
|
61
|
-
waitConfirmations: 1,
|
|
62
|
-
})];
|
|
63
|
-
case 4:
|
|
64
|
-
TBTCVault = _a.sent();
|
|
65
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 6];
|
|
66
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
67
|
-
name: "TBTCVault",
|
|
68
|
-
address: TBTCVault.address,
|
|
69
|
-
})];
|
|
70
|
-
case 5:
|
|
71
|
-
_a.sent();
|
|
72
|
-
_a.label = 6;
|
|
73
|
-
case 6: return [2 /*return*/];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
exports.default = func;
|
|
79
|
-
func.tags = ["TBTCVault"];
|
|
80
|
-
func.dependencies = ["Bank", "TBTC"];
|
|
@@ -1,87 +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 deployments, getNamedAccounts, deploy, deployer, Bridge, BridgeGovernanceParameters, GOVERNANCE_DELAY, BridgeGovernance;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
deployments = hre.deployments, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
-
deploy = deployments.deploy;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
deployer = (_a.sent()).deployer;
|
|
50
|
-
return [4 /*yield*/, deployments.get("Bridge")];
|
|
51
|
-
case 2:
|
|
52
|
-
Bridge = _a.sent();
|
|
53
|
-
return [4 /*yield*/, deployments.deploy("BridgeGovernanceParameters", {
|
|
54
|
-
from: deployer,
|
|
55
|
-
log: true,
|
|
56
|
-
waitConfirmations: 1,
|
|
57
|
-
})];
|
|
58
|
-
case 3:
|
|
59
|
-
BridgeGovernanceParameters = _a.sent();
|
|
60
|
-
GOVERNANCE_DELAY = 604800 // 1 week
|
|
61
|
-
;
|
|
62
|
-
return [4 /*yield*/, deploy("BridgeGovernance", {
|
|
63
|
-
from: deployer,
|
|
64
|
-
args: [Bridge.address, GOVERNANCE_DELAY],
|
|
65
|
-
log: true,
|
|
66
|
-
libraries: {
|
|
67
|
-
BridgeGovernanceParameters: BridgeGovernanceParameters.address,
|
|
68
|
-
},
|
|
69
|
-
waitConfirmations: 1,
|
|
70
|
-
})];
|
|
71
|
-
case 4:
|
|
72
|
-
BridgeGovernance = _a.sent();
|
|
73
|
-
if (!hre.network.tags.tenderly) return [3 /*break*/, 6];
|
|
74
|
-
return [4 /*yield*/, hre.tenderly.verify({
|
|
75
|
-
name: "BridgeGovernance",
|
|
76
|
-
address: BridgeGovernance.address,
|
|
77
|
-
})];
|
|
78
|
-
case 5:
|
|
79
|
-
_a.sent();
|
|
80
|
-
_a.label = 6;
|
|
81
|
-
case 6: return [2 /*return*/];
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
exports.default = func;
|
|
87
|
-
func.tags = ["BridgeGovernance"];
|
|
@@ -1,63 +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, deployer, Bridge;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
getNamedAccounts = hre.getNamedAccounts, deployments = hre.deployments;
|
|
46
|
-
execute = deployments.execute;
|
|
47
|
-
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
-
case 1:
|
|
49
|
-
deployer = (_a.sent()).deployer;
|
|
50
|
-
return [4 /*yield*/, deployments.get("Bridge")];
|
|
51
|
-
case 2:
|
|
52
|
-
Bridge = _a.sent();
|
|
53
|
-
return [4 /*yield*/, execute("Bank", { from: deployer, log: true, waitConfirmations: 1 }, "updateBridge", Bridge.address)];
|
|
54
|
-
case 3:
|
|
55
|
-
_a.sent();
|
|
56
|
-
return [2 /*return*/];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
exports.default = func;
|
|
62
|
-
func.tags = ["BankUpdateBridge"];
|
|
63
|
-
func.dependencies = ["Bank", "Bridge"];
|