@keep-network/tbtc-v2 1.2.0-goerli.0 → 1.2.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.
Files changed (157) hide show
  1. package/artifacts/.chainId +1 -1
  2. package/artifacts/Bank.json +23 -23
  3. package/artifacts/Bridge.json +27 -63
  4. package/artifacts/BridgeGovernance.json +25 -25
  5. package/artifacts/BridgeGovernanceParameters.json +10 -10
  6. package/artifacts/Deposit.json +14 -14
  7. package/artifacts/DepositSweep.json +13 -13
  8. package/artifacts/DonationVault.json +14 -14
  9. package/artifacts/Fraud.json +13 -13
  10. package/artifacts/LightRelay.json +65 -55
  11. package/artifacts/MaintainerProxy.json +47 -47
  12. package/artifacts/MovingFunds.json +13 -13
  13. package/artifacts/Redemption.json +13 -13
  14. package/artifacts/TBTC.json +36 -37
  15. package/artifacts/TBTCVault.json +47 -47
  16. package/artifacts/VendingMachine.json +34 -35
  17. package/artifacts/VendingMachineV2.json +360 -0
  18. package/artifacts/VendingMachineV3.json +405 -0
  19. package/artifacts/Wallets.json +13 -13
  20. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +102 -0
  21. package/artifacts/solcInputs/802132f7da69a8a4226cb9424480847b.json +218 -0
  22. package/artifacts/solcInputs/{f862bd134ddc06352fa5be0644481600.json → 887fad6b16575ba42183543c324eeb0e.json} +6 -6
  23. package/artifacts/solcInputs/b0025f1f7efe4824592ac0c9793776c3.json +392 -0
  24. package/artifacts/solcInputs/{deff85fc9ae9b5be07226c67809262df.json → fccb130292c8c7cc958ab4fa31a3e180.json} +3 -3
  25. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  26. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  27. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
  28. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  29. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
  30. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  31. package/build/contracts/bridge/Bridge.sol/Bridge.json +2 -2
  32. package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.dbg.json +1 -1
  33. package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +2 -2
  34. package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
  35. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  36. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +2 -2
  37. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  38. package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
  39. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
  40. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.json +2 -2
  41. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  42. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  43. package/build/contracts/bridge/Fraud.sol/Fraud.json +2 -2
  44. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
  45. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  46. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  47. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +2 -2
  48. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  49. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
  50. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  51. package/build/contracts/bridge/Redemption.sol/Redemption.json +2 -2
  52. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  53. package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
  54. package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
  55. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  56. package/build/contracts/bridge/Wallets.sol/Wallets.json +2 -2
  57. package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
  58. package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
  59. package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
  60. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
  61. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +2 -2
  62. package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
  63. package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
  64. package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
  65. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  66. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
  67. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  68. package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
  69. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  70. package/build/contracts/vault/TBTCVault.sol/TBTCVault.json +2 -2
  71. package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +29 -29
  72. package/export/artifacts/@keep-network/ecdsa/contracts/WalletRegistry.sol/WalletRegistry.json +245 -245
  73. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +7 -7
  74. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +28 -28
  75. package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +53 -53
  76. package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +21 -21
  77. package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +16 -16
  78. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +1054 -1054
  79. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +26 -26
  80. package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +46 -46
  81. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +36 -36
  82. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +78 -78
  83. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +68 -68
  84. package/export/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +43 -43
  85. package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +79 -79
  86. package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +42 -42
  87. package/export/artifacts/contracts/bank/Bank.sol/Bank.json +77 -77
  88. package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +325 -325
  89. package/export/artifacts/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +223 -223
  90. package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +108 -108
  91. package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +63 -63
  92. package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +65 -65
  93. package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +194 -194
  94. package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +100 -100
  95. package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +154 -154
  96. package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +76 -76
  97. package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +104 -104
  98. package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +19 -19
  99. package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +189 -189
  100. package/export/deploy/00_resolve_relay.js +83 -0
  101. package/export/deploy/01_deploy_tbtc_v2_token.js +70 -0
  102. package/export/deploy/02_deploy_vending_machine.js +84 -0
  103. package/export/deploy/03_transfer_vending_machine_roles.js +69 -0
  104. package/export/deploy/04_deploy_bank.js +73 -0
  105. package/export/deploy/05_deploy_bridge.js +178 -0
  106. package/export/deploy/06_deploy_tbtc_vault.js +80 -0
  107. package/export/deploy/07_deploy_bridge_governance.js +87 -0
  108. package/export/deploy/08_deploy_maintainer_proxy.js +80 -0
  109. package/export/deploy/09_bank_update_bridge.js +63 -0
  110. package/export/deploy/10_authorize_spv_maintainer_in_bridge.js +61 -0
  111. package/export/deploy/11_transfer_bank_ownership.js +60 -0
  112. package/export/deploy/12_transfer_bridge_governance.js +63 -0
  113. package/export/deploy/13_transfer_bridge_governance_ownership.js +60 -0
  114. package/export/deploy/14_transfer_tbtc_vault_ownership.js +60 -0
  115. package/export/deploy/15_transfer_maintainer_proxy_ownership.js +60 -0
  116. package/export/deploy/16_initialize_wallet_owner.js +63 -0
  117. package/export/deploy/16_transfer_proxy_admin_ownership.js +73 -0
  118. package/export/deploy/17_authorize_maintainer_proxy_in_bridge.js +63 -0
  119. package/export/deploy/17_transfer_proxy_admin_ownership.js +73 -0
  120. package/export/deploy/18_authorize_maintainer_proxy_in_bridge.js +63 -0
  121. package/export/deploy/18_authorize_maintainer_proxy_in_reimbursement_pool.js +63 -0
  122. package/export/deploy/19_authorize_bridge_in_reimbursement_pool.js +63 -0
  123. package/export/deploy/19_authorize_maintainer_proxy_in_reimbursement_pool.js +63 -0
  124. package/export/deploy/20_authorize_bridge_in_reimbursement_pool.js +63 -0
  125. package/export/deploy/20_deploy_proxy_admin_with_deputy.js +80 -0
  126. package/export/deploy/21_transfer_reimbursement_pool_ownership.js +60 -0
  127. package/export/deploy/22_deploy_proxy_admin_with_deputy.js +80 -0
  128. package/export/deploy/24_transfer_maintainer_proxy_ownership.js +60 -0
  129. package/export/deploy/25_transfer_proxy_admin_ownership.js +73 -0
  130. package/export/deploy/26_authorize_maintainer_proxy_in_reimbursement_pool.js +70 -0
  131. package/export/deploy/27_authorize_bridge_in_reimbursement_pool.js +70 -0
  132. package/export/deploy/28_deploy_proxy_admin_with_deputy.js +80 -0
  133. package/export/typechain/RelayStub.js +2 -0
  134. package/export/typechain/TestRelay.js +2 -0
  135. package/export/typechain/factories/BridgeGovernance__factory.js +1 -1
  136. package/export/typechain/factories/BridgeState__factory.js +1 -1
  137. package/export/typechain/factories/BridgeStub__factory.js +1 -1
  138. package/export/typechain/factories/Bridge__factory.js +1 -1
  139. package/export/typechain/factories/DepositSweep__factory.js +1 -1
  140. package/export/typechain/factories/Deposit__factory.js +1 -1
  141. package/export/typechain/factories/EcdsaAuthorization__factory.js +1 -1
  142. package/export/typechain/factories/EcdsaDkgValidator__factory.js +1 -1
  143. package/export/typechain/factories/EcdsaDkg__factory.js +1 -1
  144. package/export/typechain/factories/EcdsaInactivity__factory.js +1 -1
  145. package/export/typechain/factories/Fraud__factory.js +1 -1
  146. package/export/typechain/factories/MaintainerProxy__factory.js +1 -1
  147. package/export/typechain/factories/MovingFunds__factory.js +1 -1
  148. package/export/typechain/factories/Redemption__factory.js +1 -1
  149. package/export/typechain/factories/RelayStub__factory.js +546 -0
  150. package/export/typechain/factories/SortitionPool__factory.js +1 -1
  151. package/export/typechain/factories/SystemTestRelay__factory.js +1 -1
  152. package/export/typechain/factories/TBTCVault__factory.js +1 -1
  153. package/export/typechain/factories/TestRelay__factory.js +168 -0
  154. package/export/typechain/factories/WalletRegistry__factory.js +1 -1
  155. package/export/typechain/factories/Wallets__factory.js +1 -1
  156. package/export.json +7879 -37568
  157. package/package.json +7 -5
@@ -0,0 +1,80 @@
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) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var ethers, getNamedAccounts, upgrades, deployments, _a, deployer, dao, esdm, BridgeProxyAdminWithDeputy, Bridge, proxyAdmin, _b, _c;
41
+ return __generator(this, function (_d) {
42
+ switch (_d.label) {
43
+ case 0:
44
+ ethers = hre.ethers, getNamedAccounts = hre.getNamedAccounts, upgrades = hre.upgrades, deployments = hre.deployments;
45
+ return [4 /*yield*/, getNamedAccounts()];
46
+ case 1:
47
+ _a = _d.sent(), deployer = _a.deployer, dao = _a.dao, esdm = _a.esdm;
48
+ return [4 /*yield*/, deployments.deploy("BridgeProxyAdminWithDeputy", {
49
+ contract: "ProxyAdminWithDeputy",
50
+ from: deployer,
51
+ args: [dao, esdm],
52
+ log: true,
53
+ waitConfirmations: 1,
54
+ })];
55
+ case 2:
56
+ BridgeProxyAdminWithDeputy = _d.sent();
57
+ return [4 /*yield*/, deployments.get("Bridge")];
58
+ case 3:
59
+ Bridge = _d.sent();
60
+ return [4 /*yield*/, upgrades.admin.getInstance()];
61
+ case 4:
62
+ proxyAdmin = _d.sent();
63
+ _c = (_b = proxyAdmin)
64
+ .connect;
65
+ return [4 /*yield*/, ethers.getSigner(esdm)];
66
+ case 5: return [4 /*yield*/, _c.apply(_b, [_d.sent()])
67
+ .changeProxyAdmin(Bridge.address, BridgeProxyAdminWithDeputy.address)];
68
+ case 6:
69
+ _d.sent();
70
+ return [2 /*return*/];
71
+ }
72
+ });
73
+ }); };
74
+ exports.default = func;
75
+ func.tags = ["BridgeProxyAdminWithDeputy"];
76
+ func.dependencies = ["Bridge"];
77
+ // TODO: For now we skip this script as DAO is not yet established.
78
+ func.skip = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
79
+ return [2 /*return*/, true];
80
+ }); }); };
@@ -0,0 +1,60 @@
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("ReimbursementPool", governance, deployer)];
50
+ case 2:
51
+ _b.sent();
52
+ return [2 /*return*/];
53
+ }
54
+ });
55
+ });
56
+ };
57
+ exports.default = func;
58
+ func.tags = ["TransferReimbursementPoolOwnership"];
59
+ func.dependencies = ["ReimbursementPool"];
60
+ func.runAtTheEnd = true;
@@ -0,0 +1,80 @@
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) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var ethers, getNamedAccounts, upgrades, deployments, _a, deployer, dao, esdm, BridgeProxyAdminWithDeputy, Bridge, proxyAdmin, _b, _c;
41
+ return __generator(this, function (_d) {
42
+ switch (_d.label) {
43
+ case 0:
44
+ ethers = hre.ethers, getNamedAccounts = hre.getNamedAccounts, upgrades = hre.upgrades, deployments = hre.deployments;
45
+ return [4 /*yield*/, getNamedAccounts()];
46
+ case 1:
47
+ _a = _d.sent(), deployer = _a.deployer, dao = _a.dao, esdm = _a.esdm;
48
+ return [4 /*yield*/, deployments.deploy("BridgeProxyAdminWithDeputy", {
49
+ contract: "ProxyAdminWithDeputy",
50
+ from: deployer,
51
+ args: [dao, esdm],
52
+ log: true,
53
+ waitConfirmations: 1,
54
+ })];
55
+ case 2:
56
+ BridgeProxyAdminWithDeputy = _d.sent();
57
+ return [4 /*yield*/, deployments.get("Bridge")];
58
+ case 3:
59
+ Bridge = _d.sent();
60
+ return [4 /*yield*/, upgrades.admin.getInstance()];
61
+ case 4:
62
+ proxyAdmin = _d.sent();
63
+ _c = (_b = proxyAdmin)
64
+ .connect;
65
+ return [4 /*yield*/, ethers.getSigner(esdm)];
66
+ case 5: return [4 /*yield*/, _c.apply(_b, [_d.sent()])
67
+ .changeProxyAdmin(Bridge.address, BridgeProxyAdminWithDeputy.address)];
68
+ case 6:
69
+ _d.sent();
70
+ return [2 /*return*/];
71
+ }
72
+ });
73
+ }); };
74
+ exports.default = func;
75
+ func.tags = ["BridgeProxyAdminWithDeputy"];
76
+ func.dependencies = ["Bridge"];
77
+ // TODO: For now we skip this script as DAO is not yet established.
78
+ func.skip = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
79
+ return [2 /*return*/, true];
80
+ }); }); };
@@ -0,0 +1,60 @@
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("MaintainerProxy", governance, deployer)];
50
+ case 2:
51
+ _b.sent();
52
+ return [2 /*return*/];
53
+ }
54
+ });
55
+ });
56
+ };
57
+ exports.default = func;
58
+ func.tags = ["TransferMaintainerProxyOwnership"];
59
+ func.dependencies = ["MaintainerProxy"];
60
+ func.runAtTheEnd = true;
@@ -0,0 +1,73 @@
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) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var helpers, upgrades, deployments, _a, esdm, deployer, log, newProxyAdminOwner, proxyAdmin, currentOwner;
41
+ return __generator(this, function (_b) {
42
+ switch (_b.label) {
43
+ case 0:
44
+ helpers = hre.helpers, upgrades = hre.upgrades, deployments = hre.deployments;
45
+ return [4 /*yield*/, helpers.signers.getNamedSigners()];
46
+ case 1:
47
+ _a = _b.sent(), esdm = _a.esdm, deployer = _a.deployer;
48
+ log = deployments.log;
49
+ newProxyAdminOwner = esdm.address;
50
+ return [4 /*yield*/, upgrades.admin.getInstance()];
51
+ case 2:
52
+ proxyAdmin = _b.sent();
53
+ return [4 /*yield*/, proxyAdmin.owner()
54
+ // The `@openzeppelin/hardhat-upgrades` plugin deploys a single ProxyAdmin
55
+ // per network. We don't want to transfer the ownership if the owner is already
56
+ // set to the desired address.
57
+ ];
58
+ case 3:
59
+ currentOwner = _b.sent();
60
+ if (!!helpers.address.equal(currentOwner, newProxyAdminOwner)) return [3 /*break*/, 6];
61
+ log("transferring ownership of ProxyAdmin to ".concat(newProxyAdminOwner));
62
+ return [4 /*yield*/, proxyAdmin.connect(deployer).transferOwnership(newProxyAdminOwner)];
63
+ case 4: return [4 /*yield*/, (_b.sent()).wait()];
64
+ case 5:
65
+ _b.sent();
66
+ _b.label = 6;
67
+ case 6: return [2 /*return*/];
68
+ }
69
+ });
70
+ }); };
71
+ exports.default = func;
72
+ func.tags = ["TransferProxyAdminOwnership"];
73
+ func.dependencies = ["Bridge"];
@@ -0,0 +1,70 @@
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, governance, MaintainerProxy;
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
+ governance = (_a.sent()).governance;
50
+ return [4 /*yield*/, deployments.get("MaintainerProxy")];
51
+ case 2:
52
+ MaintainerProxy = _a.sent();
53
+ return [4 /*yield*/, execute("ReimbursementPool", { from: governance, log: true, waitConfirmations: 1 }, "authorize", MaintainerProxy.address)];
54
+ case 3:
55
+ _a.sent();
56
+ return [2 /*return*/];
57
+ }
58
+ });
59
+ });
60
+ };
61
+ exports.default = func;
62
+ func.tags = ["AuthorizeMaintainerProxyInReimbursementPool"];
63
+ func.dependencies = ["ReimbursementPool", "MaintainerProxy"];
64
+ // On mainnet, the ReimbursementPool ownership is passed to the Treshold
65
+ // Council / DAO and that address is not controlled by the dev team.
66
+ // Hence, this step can be executed only for non-mainnet networks such as
67
+ // Hardhat (unit tests) and Goerli (testnet).
68
+ func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
69
+ return [2 /*return*/, hre.network.name === "mainnet"];
70
+ }); }); };
@@ -0,0 +1,70 @@
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, governance, 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
+ governance = (_a.sent()).governance;
50
+ return [4 /*yield*/, deployments.get("Bridge")];
51
+ case 2:
52
+ Bridge = _a.sent();
53
+ return [4 /*yield*/, execute("ReimbursementPool", { from: governance, log: true, waitConfirmations: 1 }, "authorize", Bridge.address)];
54
+ case 3:
55
+ _a.sent();
56
+ return [2 /*return*/];
57
+ }
58
+ });
59
+ });
60
+ };
61
+ exports.default = func;
62
+ func.tags = ["AuthorizeBridgeInReimbursementPool"];
63
+ func.dependencies = ["ReimbursementPool", "Bridge"];
64
+ // On mainnet, the ReimbursementPool ownership is passed to the Treshold
65
+ // Council / DAO and that address is not controlled by the dev team.
66
+ // Hence, this step can be executed only for non-mainnet networks such as
67
+ // Hardhat (unit tests) and Goerli (testnet).
68
+ func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
69
+ return [2 /*return*/, hre.network.name === "mainnet"];
70
+ }); }); };
@@ -0,0 +1,80 @@
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) { return __awaiter(void 0, void 0, void 0, function () {
40
+ var ethers, getNamedAccounts, upgrades, deployments, _a, deployer, dao, esdm, BridgeProxyAdminWithDeputy, Bridge, proxyAdmin, _b, _c;
41
+ return __generator(this, function (_d) {
42
+ switch (_d.label) {
43
+ case 0:
44
+ ethers = hre.ethers, getNamedAccounts = hre.getNamedAccounts, upgrades = hre.upgrades, deployments = hre.deployments;
45
+ return [4 /*yield*/, getNamedAccounts()];
46
+ case 1:
47
+ _a = _d.sent(), deployer = _a.deployer, dao = _a.dao, esdm = _a.esdm;
48
+ return [4 /*yield*/, deployments.deploy("BridgeProxyAdminWithDeputy", {
49
+ contract: "ProxyAdminWithDeputy",
50
+ from: deployer,
51
+ args: [dao, esdm],
52
+ log: true,
53
+ waitConfirmations: 1,
54
+ })];
55
+ case 2:
56
+ BridgeProxyAdminWithDeputy = _d.sent();
57
+ return [4 /*yield*/, deployments.get("Bridge")];
58
+ case 3:
59
+ Bridge = _d.sent();
60
+ return [4 /*yield*/, upgrades.admin.getInstance()];
61
+ case 4:
62
+ proxyAdmin = _d.sent();
63
+ _c = (_b = proxyAdmin)
64
+ .connect;
65
+ return [4 /*yield*/, ethers.getSigner(esdm)];
66
+ case 5: return [4 /*yield*/, _c.apply(_b, [_d.sent()])
67
+ .changeProxyAdmin(Bridge.address, BridgeProxyAdminWithDeputy.address)];
68
+ case 6:
69
+ _d.sent();
70
+ return [2 /*return*/];
71
+ }
72
+ });
73
+ }); };
74
+ exports.default = func;
75
+ func.tags = ["BridgeProxyAdminWithDeputy"];
76
+ func.dependencies = ["Bridge"];
77
+ // TODO: For now we skip this script as DAO is not yet established.
78
+ func.skip = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
79
+ return [2 /*return*/, true];
80
+ }); }); };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });