@keep-network/tbtc-v2 1.0.0-dev.6 → 1.0.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 (120) hide show
  1. package/artifacts/.chainId +1 -1
  2. package/artifacts/Bank.json +40 -50
  3. package/artifacts/Bridge.json +50 -431
  4. package/artifacts/BridgeGovernance.json +21 -21
  5. package/artifacts/BridgeGovernanceParameters.json +10 -10
  6. package/artifacts/Deposit.json +10 -10
  7. package/artifacts/DepositSweep.json +10 -10
  8. package/artifacts/DonationVault.json +14 -14
  9. package/artifacts/Fraud.json +10 -10
  10. package/artifacts/LightRelay.json +34 -34
  11. package/artifacts/MaintainerProxy.json +44 -44
  12. package/artifacts/MovingFunds.json +10 -10
  13. package/artifacts/Redemption.json +10 -10
  14. package/artifacts/TBTC.json +36 -37
  15. package/artifacts/TBTCVault.json +43 -43
  16. package/artifacts/VendingMachine.json +34 -35
  17. package/artifacts/Wallets.json +10 -10
  18. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +102 -0
  19. package/artifacts/solcInputs/{79a96d1cf4af176d93e6844dc248dcff.json → 887fad6b16575ba42183543c324eeb0e.json} +1 -1
  20. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  21. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  22. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
  23. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  24. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  25. package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
  26. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  27. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  28. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
  29. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  30. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  31. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
  32. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  33. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  34. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  35. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  36. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  37. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  38. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
  39. package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
  40. package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
  41. package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
  42. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  43. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
  44. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  45. package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
  46. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  47. package/deploy/06_deploy_bridge.ts +7 -0
  48. package/deploy/09_deploy_bridge_governance.ts +2 -0
  49. package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +26 -26
  50. package/export/artifacts/@keep-network/ecdsa/contracts/WalletRegistry.sol/WalletRegistry.json +251 -251
  51. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +2 -2
  52. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +25 -25
  53. package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +47 -47
  54. package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +21 -21
  55. package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +16 -16
  56. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +204 -204
  57. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +26 -26
  58. package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +42 -42
  59. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +34 -34
  60. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +74 -74
  61. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +62 -62
  62. package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +77 -77
  63. package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +38 -38
  64. package/export/artifacts/contracts/bank/Bank.sol/Bank.json +75 -75
  65. package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +326 -326
  66. package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +104 -104
  67. package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +147 -147
  68. package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +74 -74
  69. package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +100 -100
  70. package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +19 -19
  71. package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +176 -176
  72. package/export/deploy/06_deploy_bridge.js +30 -8
  73. package/export/deploy/09_deploy_bridge_governance.js +11 -7
  74. package/export/hardhat.config.js +1 -0
  75. package/export/typechain/factories/WalletRegistry__factory.js +1 -1
  76. package/export.json +13069 -0
  77. package/package.json +6 -6
  78. package/artifacts/BLS.json +0 -223
  79. package/artifacts/BeaconAuthorization.json +0 -273
  80. package/artifacts/BeaconDkg.json +0 -241
  81. package/artifacts/BeaconDkgValidator.json +0 -501
  82. package/artifacts/BeaconInactivity.json +0 -151
  83. package/artifacts/BeaconSortitionPool.json +0 -1187
  84. package/artifacts/EcdsaDkgValidator.json +0 -517
  85. package/artifacts/EcdsaInactivity.json +0 -156
  86. package/artifacts/EcdsaSortitionPool.json +0 -1187
  87. package/artifacts/KeepRegistry.json +0 -99
  88. package/artifacts/KeepStake.json +0 -286
  89. package/artifacts/KeepToken.json +0 -711
  90. package/artifacts/KeepTokenStaking.json +0 -483
  91. package/artifacts/NuCypherStakingEscrow.json +0 -287
  92. package/artifacts/NuCypherToken.json +0 -711
  93. package/artifacts/RandomBeacon.json +0 -3271
  94. package/artifacts/RandomBeaconChaosnet.json +0 -252
  95. package/artifacts/RandomBeaconGovernance.json +0 -3499
  96. package/artifacts/ReimbursementPool.json +0 -509
  97. package/artifacts/T.json +0 -1148
  98. package/artifacts/TBTCToken.json +0 -738
  99. package/artifacts/TokenStaking.json +0 -2288
  100. package/artifacts/TokenholderGovernor.json +0 -1795
  101. package/artifacts/TokenholderTimelock.json +0 -1058
  102. package/artifacts/VendingMachineKeep.json +0 -400
  103. package/artifacts/VendingMachineNuCypher.json +0 -400
  104. package/artifacts/WalletRegistry.json +0 -1962
  105. package/artifacts/WalletRegistryGovernance.json +0 -2863
  106. package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +0 -11969
  107. package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +0 -51939
  108. package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +0 -11982
  109. package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +0 -822
  110. package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +0 -12723
  111. package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +0 -2160
  112. package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +0 -3407
  113. package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +0 -14257
  114. package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +0 -11816
  115. package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +0 -1160
  116. package/export/test/integration/data/bls.js +0 -12
  117. package/export/test/integration/data/integration.js +0 -133
  118. package/export/test/integration/utils/ecdsa-wallet-registry.js +0 -370
  119. package/export/test/integration/utils/random-beacon.js +0 -193
  120. package/export/test/integration/utils/staking.js +0 -83
@@ -1,193 +0,0 @@
1
- "use strict";
2
- /* eslint-disable no-await-in-loop */
3
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
- return new (P || (P = Promise))(function (resolve, reject) {
6
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
- step((generator = generator.apply(thisArg, _arguments || [])).next());
10
- });
11
- };
12
- var __generator = (this && this.__generator) || function (thisArg, body) {
13
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
14
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
15
- function verb(n) { return function (v) { return step([n, v]); }; }
16
- function step(op) {
17
- if (f) throw new TypeError("Generator is already executing.");
18
- while (_) try {
19
- 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;
20
- if (y = 0, t) op = [op[0] & 2, t.value];
21
- switch (op[0]) {
22
- case 0: case 1: t = op; break;
23
- case 4: _.label++; return { value: op[1], done: false };
24
- case 5: _.label++; y = op[1]; op = [0]; continue;
25
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
26
- default:
27
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
28
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
29
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
30
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
31
- if (t[2]) _.ops.pop();
32
- _.trys.pop(); continue;
33
- }
34
- op = body.call(thisArg, _);
35
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
36
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
37
- }
38
- };
39
- var __read = (this && this.__read) || function (o, n) {
40
- var m = typeof Symbol === "function" && o[Symbol.iterator];
41
- if (!m) return o;
42
- var i = m.call(o), r, ar = [], e;
43
- try {
44
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
45
- }
46
- catch (error) { e = { error: error }; }
47
- finally {
48
- try {
49
- if (r && !r.done && (m = i["return"])) m.call(i);
50
- }
51
- finally { if (e) throw e.error; }
52
- }
53
- return ar;
54
- };
55
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
56
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
57
- if (ar || !(i in from)) {
58
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
59
- ar[i] = from[i];
60
- }
61
- }
62
- return to.concat(ar || Array.prototype.slice.call(from));
63
- };
64
- Object.defineProperty(exports, "__esModule", { value: true });
65
- exports.hashDKGMembers = exports.signDkgResult = exports.selectGroup = exports.getGenesisSeed = exports.updateDkgResultChallengePeriodLength = void 0;
66
- var integration_1 = require("../data/integration");
67
- function updateDkgResultChallengePeriodLength(hre, governance, randomBeaconGovernance) {
68
- return __awaiter(this, void 0, void 0, function () {
69
- var helpers;
70
- return __generator(this, function (_a) {
71
- switch (_a.label) {
72
- case 0:
73
- helpers = hre.helpers;
74
- return [4 /*yield*/, randomBeaconGovernance
75
- .connect(governance)
76
- .beginDkgResultChallengePeriodLengthUpdate(integration_1.dkgResultChallengePeriodLength)];
77
- case 1:
78
- _a.sent();
79
- return [4 /*yield*/, helpers.time.increaseTime(integration_1.governanceDelay)];
80
- case 2:
81
- _a.sent();
82
- return [4 /*yield*/, randomBeaconGovernance
83
- .connect(governance)
84
- .finalizeDkgResultChallengePeriodLengthUpdate()];
85
- case 3:
86
- _a.sent();
87
- return [2 /*return*/];
88
- }
89
- });
90
- });
91
- }
92
- exports.updateDkgResultChallengePeriodLength = updateDkgResultChallengePeriodLength;
93
- function getGenesisSeed(hre, genesisBlock) {
94
- return __awaiter(this, void 0, void 0, function () {
95
- var ethers;
96
- return __generator(this, function (_a) {
97
- ethers = hre.ethers;
98
- return [2 /*return*/, ethers.BigNumber.from(ethers.utils.keccak256(ethers.utils.solidityPack(["uint256", "uint256"], [
99
- "31415926535897932384626433832795028841971693993751058209749445923078164062862",
100
- genesisBlock,
101
- ])))];
102
- });
103
- });
104
- }
105
- exports.getGenesisSeed = getGenesisSeed;
106
- function selectGroup(hre, sortitionPool, seed) {
107
- return __awaiter(this, void 0, void 0, function () {
108
- var ethers, identifiers, addresses;
109
- var _this = this;
110
- return __generator(this, function (_a) {
111
- switch (_a.label) {
112
- case 0:
113
- ethers = hre.ethers;
114
- return [4 /*yield*/, sortitionPool.selectGroup(64, ethers.utils.hexZeroPad(seed.toHexString(), 32))];
115
- case 1:
116
- identifiers = _a.sent();
117
- return [4 /*yield*/, sortitionPool.getIDOperators(identifiers)];
118
- case 2:
119
- addresses = _a.sent();
120
- return [2 /*return*/, Promise.all(identifiers.map(function (identifier, i) { return __awaiter(_this, void 0, void 0, function () {
121
- var _a;
122
- return __generator(this, function (_b) {
123
- switch (_b.label) {
124
- case 0:
125
- _a = {
126
- id: identifier
127
- };
128
- return [4 /*yield*/, ethers.getSigner(addresses[i])];
129
- case 1: return [2 /*return*/, (_a.signer = _b.sent(),
130
- _a)];
131
- }
132
- });
133
- }); }))];
134
- }
135
- });
136
- });
137
- }
138
- exports.selectGroup = selectGroup;
139
- function signDkgResult(hre, signers, groupPublicKey, misbehavedMembersIndices, startBlock, numberOfSignatures) {
140
- return __awaiter(this, void 0, void 0, function () {
141
- var ethers, hardhatNetworkId, resultHash, members, signingMembersIndices, signatures, i, _a, id, ethersSigner, signerIndex, signature, signaturesBytes;
142
- return __generator(this, function (_b) {
143
- switch (_b.label) {
144
- case 0:
145
- ethers = hre.ethers;
146
- hardhatNetworkId = 31337;
147
- resultHash = ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(["uint256", "bytes", "uint8[]", "uint256"], [hardhatNetworkId, groupPublicKey, misbehavedMembersIndices, startBlock]));
148
- members = [];
149
- signingMembersIndices = [];
150
- signatures = [];
151
- i = 0;
152
- _b.label = 1;
153
- case 1:
154
- if (!(i < signers.length)) return [3 /*break*/, 4];
155
- _a = signers[i], id = _a.id, ethersSigner = _a.signer;
156
- members.push(id);
157
- if (signatures.length === numberOfSignatures) {
158
- // eslint-disable-next-line no-continue
159
- return [3 /*break*/, 3];
160
- }
161
- signerIndex = i + 1;
162
- signingMembersIndices.push(signerIndex);
163
- return [4 /*yield*/, ethersSigner.signMessage(ethers.utils.arrayify(resultHash))];
164
- case 2:
165
- signature = _b.sent();
166
- signatures.push(signature);
167
- _b.label = 3;
168
- case 3:
169
- i++;
170
- return [3 /*break*/, 1];
171
- case 4:
172
- signaturesBytes = ethers.utils.hexConcat(signatures);
173
- return [2 /*return*/, { members: members, signingMembersIndices: signingMembersIndices, signaturesBytes: signaturesBytes }];
174
- }
175
- });
176
- });
177
- }
178
- exports.signDkgResult = signDkgResult;
179
- // Creates a members hash that actively participated in dkg
180
- function hashDKGMembers(hre, members, misbehavedMembersIndices) {
181
- var ethers = hre.ethers;
182
- if (misbehavedMembersIndices.length > 0) {
183
- var activeDkgMembers = __spreadArray([], __read(members), false);
184
- for (var i = 0; i < misbehavedMembersIndices.length; i++) {
185
- if (misbehavedMembersIndices[i] !== 0) {
186
- activeDkgMembers.splice(misbehavedMembersIndices[i] - i - 1, 1);
187
- }
188
- }
189
- return ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(["uint32[]"], [activeDkgMembers]));
190
- }
191
- return ethers.utils.keccak256(ethers.utils.defaultAbiCoder.encode(["uint32[]"], [members]));
192
- }
193
- exports.hashDKGMembers = hashDKGMembers;
@@ -1,83 +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
- exports.authorizeApplication = exports.stake = void 0;
40
- function stake(hre, t, staking, stakeAmount, owner, stakingProvider, beneficiary, authorizer) {
41
- return __awaiter(this, void 0, void 0, function () {
42
- var helpers, deployer, _a, _b;
43
- return __generator(this, function (_c) {
44
- switch (_c.label) {
45
- case 0:
46
- helpers = hre.helpers;
47
- return [4 /*yield*/, helpers.signers.getNamedSigners()];
48
- case 1:
49
- deployer = (_c.sent()).deployer;
50
- _b = (_a = t.connect(deployer)).mint;
51
- return [4 /*yield*/, owner.getAddress()];
52
- case 2: return [4 /*yield*/, _b.apply(_a, [_c.sent(), stakeAmount])];
53
- case 3:
54
- _c.sent();
55
- return [4 /*yield*/, t.connect(owner).approve(staking.address, stakeAmount)];
56
- case 4:
57
- _c.sent();
58
- return [4 /*yield*/, staking
59
- .connect(owner)
60
- .stake(stakingProvider, beneficiary, authorizer, stakeAmount)];
61
- case 5:
62
- _c.sent();
63
- return [2 /*return*/];
64
- }
65
- });
66
- });
67
- }
68
- exports.stake = stake;
69
- function authorizeApplication(staking, application, authorizer, stakingProvider, stakeAmount) {
70
- return __awaiter(this, void 0, void 0, function () {
71
- return __generator(this, function (_a) {
72
- switch (_a.label) {
73
- case 0: return [4 /*yield*/, staking
74
- .connect(authorizer)
75
- .increaseAuthorization(stakingProvider, application, stakeAmount)];
76
- case 1:
77
- _a.sent();
78
- return [2 /*return*/];
79
- }
80
- });
81
- });
82
- }
83
- exports.authorizeApplication = authorizeApplication;