@requestnetwork/smart-contracts 0.32.1-next.1986 → 0.32.1-next.1988

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 (79) hide show
  1. package/README.md +7 -0
  2. package/dist/deploy/deploy-zk-batch-contracts.js +1 -1
  3. package/dist/deploy/deploy-zk-batch-contracts.js.map +1 -1
  4. package/dist/deploy/utils-zk.js +1 -1
  5. package/dist/deploy/utils-zk.js.map +1 -1
  6. package/dist/hardhat.config.d.ts.map +1 -1
  7. package/dist/hardhat.config.js +9 -17
  8. package/dist/hardhat.config.js.map +1 -1
  9. package/dist/scripts/deploy-storage.js +1 -1
  10. package/dist/scripts/deploy-storage.js.map +1 -1
  11. package/dist/scripts/test-deploy-all.js +3 -3
  12. package/dist/scripts/test-deploy-all.js.map +1 -1
  13. package/dist/scripts-create2/constructor-args.js +2 -1
  14. package/dist/scripts-create2/constructor-args.js.map +1 -1
  15. package/dist/scripts-create2/contract-setup/adminTasks.d.ts +44 -10
  16. package/dist/scripts-create2/contract-setup/adminTasks.d.ts.map +1 -1
  17. package/dist/scripts-create2/contract-setup/adminTasks.js +135 -34
  18. package/dist/scripts-create2/contract-setup/adminTasks.js.map +1 -1
  19. package/dist/scripts-create2/contract-setup/execute-contract-method.d.ts +11 -0
  20. package/dist/scripts-create2/contract-setup/execute-contract-method.d.ts.map +1 -0
  21. package/dist/scripts-create2/contract-setup/execute-contract-method.js +65 -0
  22. package/dist/scripts-create2/contract-setup/execute-contract-method.js.map +1 -0
  23. package/dist/scripts-create2/contract-setup/setupBatchConversionPayments.d.ts +3 -1
  24. package/dist/scripts-create2/contract-setup/setupBatchConversionPayments.d.ts.map +1 -1
  25. package/dist/scripts-create2/contract-setup/setupBatchConversionPayments.js +15 -9
  26. package/dist/scripts-create2/contract-setup/setupBatchConversionPayments.js.map +1 -1
  27. package/dist/scripts-create2/contract-setup/setupChainlinkConversionPath.d.ts +3 -1
  28. package/dist/scripts-create2/contract-setup/setupChainlinkConversionPath.d.ts.map +1 -1
  29. package/dist/scripts-create2/contract-setup/setupChainlinkConversionPath.js +3 -2
  30. package/dist/scripts-create2/contract-setup/setupChainlinkConversionPath.js.map +1 -1
  31. package/dist/scripts-create2/contract-setup/setupERC20SwapToConversion.d.ts +3 -1
  32. package/dist/scripts-create2/contract-setup/setupERC20SwapToConversion.d.ts.map +1 -1
  33. package/dist/scripts-create2/contract-setup/setupERC20SwapToConversion.js +5 -4
  34. package/dist/scripts-create2/contract-setup/setupERC20SwapToConversion.js.map +1 -1
  35. package/dist/scripts-create2/contract-setup/setupERC20SwapToPay.d.ts +3 -1
  36. package/dist/scripts-create2/contract-setup/setupERC20SwapToPay.d.ts.map +1 -1
  37. package/dist/scripts-create2/contract-setup/setupERC20SwapToPay.js +4 -3
  38. package/dist/scripts-create2/contract-setup/setupERC20SwapToPay.js.map +1 -1
  39. package/dist/scripts-create2/contract-setup/setupETHConversionProxy.d.ts +3 -1
  40. package/dist/scripts-create2/contract-setup/setupETHConversionProxy.d.ts.map +1 -1
  41. package/dist/scripts-create2/contract-setup/setupETHConversionProxy.js +5 -4
  42. package/dist/scripts-create2/contract-setup/setupETHConversionProxy.js.map +1 -1
  43. package/dist/scripts-create2/contract-setup/setupErc20ConversionProxy.d.ts +3 -1
  44. package/dist/scripts-create2/contract-setup/setupErc20ConversionProxy.d.ts.map +1 -1
  45. package/dist/scripts-create2/contract-setup/setupErc20ConversionProxy.js +4 -3
  46. package/dist/scripts-create2/contract-setup/setupErc20ConversionProxy.js.map +1 -1
  47. package/dist/scripts-create2/contract-setup/setups.d.ts +3 -1
  48. package/dist/scripts-create2/contract-setup/setups.d.ts.map +1 -1
  49. package/dist/scripts-create2/contract-setup/setups.js +8 -7
  50. package/dist/scripts-create2/contract-setup/setups.js.map +1 -1
  51. package/dist/scripts-create2/deploy.d.ts.map +1 -1
  52. package/dist/scripts-create2/deploy.js +6 -1
  53. package/dist/scripts-create2/deploy.js.map +1 -1
  54. package/dist/scripts-create2/tenderly.js +3 -3
  55. package/dist/scripts-create2/tenderly.js.map +1 -1
  56. package/dist/scripts-create2/update-contracts-setup.d.ts +1 -1
  57. package/dist/scripts-create2/update-contracts-setup.d.ts.map +1 -1
  58. package/dist/scripts-create2/update-contracts-setup.js +2 -1
  59. package/dist/scripts-create2/update-contracts-setup.js.map +1 -1
  60. package/dist/scripts-create2/utils.js +2 -1
  61. package/dist/scripts-create2/utils.js.map +1 -1
  62. package/dist/src/lib/artifacts/Admin/0.1.0.json +10 -0
  63. package/dist/src/lib/artifacts/Admin/index.d.ts +7 -0
  64. package/dist/src/lib/artifacts/Admin/index.d.ts.map +1 -0
  65. package/dist/src/lib/artifacts/Admin/index.js +25 -0
  66. package/dist/src/lib/artifacts/Admin/index.js.map +1 -0
  67. package/dist/src/lib/artifacts/BatchPayments/index.d.ts.map +1 -1
  68. package/dist/src/lib/artifacts/BatchPayments/index.js +0 -8
  69. package/dist/src/lib/artifacts/BatchPayments/index.js.map +1 -1
  70. package/dist/src/lib/artifacts/index.d.ts +4 -0
  71. package/dist/src/lib/artifacts/index.d.ts.map +1 -1
  72. package/dist/src/lib/artifacts/index.js +4 -0
  73. package/dist/src/lib/artifacts/index.js.map +1 -1
  74. package/dist/tsconfig.build.tsbuildinfo +1 -1
  75. package/package.json +7 -5
  76. package/dist/scripts/deploy-payments.d.ts +0 -18
  77. package/dist/scripts/deploy-payments.d.ts.map +0 -1
  78. package/dist/scripts/deploy-payments.js +0 -285
  79. package/dist/scripts/deploy-payments.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@requestnetwork/smart-contracts",
3
- "version": "0.32.1-next.1986+98997ed1",
3
+ "version": "0.32.1-next.1988+5c83706a",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -65,9 +65,11 @@
65
65
  "@nomiclabs/hardhat-web3": "2.0.0",
66
66
  "@openzeppelin/contracts": "4.9.5",
67
67
  "@rainbow-me/fee-suggestions": "2.1.0",
68
- "@requestnetwork/currency": "0.12.1-next.1986+98997ed1",
69
- "@requestnetwork/types": "0.39.1-next.1986+98997ed1",
70
- "@requestnetwork/utils": "0.39.1-next.1986+98997ed1",
68
+ "@requestnetwork/currency": "0.12.1-next.1988+5c83706a",
69
+ "@requestnetwork/types": "0.39.1-next.1988+5c83706a",
70
+ "@requestnetwork/utils": "0.39.1-next.1988+5c83706a",
71
+ "@safe-global/api-kit": "1.3.1",
72
+ "@safe-global/protocol-kit": "1.3.0",
71
73
  "@superfluid-finance/ethereum-contracts": "1.1.1",
72
74
  "@typechain/ethers-v5": "7.0.1",
73
75
  "@typechain/hardhat": "2.1.2",
@@ -87,5 +89,5 @@
87
89
  "web3": "1.7.3",
88
90
  "zksync-web3": "0.14.3"
89
91
  },
90
- "gitHead": "98997ed16aee7d09184c98bc88c337745d2aa928"
92
+ "gitHead": "5c83706a63dd6c6b6a34bcd6d2d7752fb825f596"
91
93
  }
@@ -1,18 +0,0 @@
1
- import '@nomiclabs/hardhat-ethers';
2
- import { HardhatRuntimeEnvironmentExtended } from '../scripts-create2/types';
3
- /**
4
- * Script ensuring all payment contracts are deployed and usable on a live chain.
5
- *
6
- * For a given chain, in the absence of `args.simulate` and `args.force`, the script is responsible for:
7
- * - Deploying contracts in the exact same sequence on every chain, to keep the same addresses
8
- * - Deploying only contracts which, according to the artifacts in `src/lib/artifacts`, are not yet deployed on the chain
9
- * - Doing the minimum required administration tasks (typically: handover administration to other wallets)
10
- * - Verifying the contract code of deployed contracts on the appropriate explorer, when relevant
11
- * - Switching to simulation mode if any deployment cannot be made (in order to keep the sequence)
12
- *
13
- * `args.force = true` to force deployments even if addresses are found in the artifacts (eg. on private network)
14
- * `args.simulate = true` to prevent deployments and contract verification
15
- *
16
- */
17
- export declare function deployAllPaymentContracts(args: any, hre: HardhatRuntimeEnvironmentExtended): Promise<void>;
18
- //# sourceMappingURL=deploy-payments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploy-payments.d.ts","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAkBnC,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAG7E;;;;;;;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,GAAG,EACT,GAAG,EAAE,iCAAiC,GACrC,OAAO,CAAC,IAAI,CAAC,CA2Vf"}
@@ -1,285 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deployAllPaymentContracts = void 0;
4
- const tslib_1 = require("tslib");
5
- require("@nomiclabs/hardhat-ethers");
6
- const lib_1 = require("../src/lib");
7
- const conversion_proxy_1 = require("./conversion-proxy");
8
- const deploy_one_1 = require("./deploy-one");
9
- const utils_1 = require("./utils");
10
- const currency_1 = require("@requestnetwork/currency");
11
- const types_1 = require("@requestnetwork/types");
12
- const compute_one_address_1 = require("../scripts-create2/compute-one-address");
13
- /**
14
- * Script ensuring all payment contracts are deployed and usable on a live chain.
15
- *
16
- * For a given chain, in the absence of `args.simulate` and `args.force`, the script is responsible for:
17
- * - Deploying contracts in the exact same sequence on every chain, to keep the same addresses
18
- * - Deploying only contracts which, according to the artifacts in `src/lib/artifacts`, are not yet deployed on the chain
19
- * - Doing the minimum required administration tasks (typically: handover administration to other wallets)
20
- * - Verifying the contract code of deployed contracts on the appropriate explorer, when relevant
21
- * - Switching to simulation mode if any deployment cannot be made (in order to keep the sequence)
22
- *
23
- * `args.force = true` to force deployments even if addresses are found in the artifacts (eg. on private network)
24
- * `args.simulate = true` to prevent deployments and contract verification
25
- *
26
- */
27
- function deployAllPaymentContracts(args, hre) {
28
- var _a;
29
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
- const deploymentResults = [];
31
- let simulationSuccess;
32
- const logDeploymentMsg = (contractName, result, message) => {
33
- const blockMsg = (result === null || result === void 0 ? void 0 : result.type) === 'deployed' ? ` at ${result.block}` : '';
34
- const resultMsg = result
35
- ? result.address === result.type
36
- ? result.address
37
- : `${result.address}${blockMsg} (${result.type})`
38
- : '';
39
- const customMsg = message ? `(${message})` : '';
40
- console.log(`${` ${contractName}:`.padEnd(36, ' ')}${resultMsg}${customMsg}`);
41
- };
42
- const addToResult = (deployment) => {
43
- if (deployment) {
44
- deploymentResults.push(deployment);
45
- logDeploymentMsg(deployment.contractName, deployment);
46
- }
47
- };
48
- try {
49
- simulationSuccess = args.simulate ? true : undefined;
50
- const [deployer] = yield hre.ethers.getSigners();
51
- console.log(`*** Deploying with: ${deployer.address} on ${hre.network.name} (${hre.network.config.chainId}). Nonce = ${yield deployer.getTransactionCount()} ***`);
52
- // #region NATIVE TOKEN
53
- const nativeTokenNetwork = hre.network.name === 'private' ? 'mainnet' : hre.network.name;
54
- const nativeTokenHash = (_a = currency_1.CurrencyManager.getDefault().getNativeCurrency(types_1.RequestLogicTypes.CURRENCY.ETH, nativeTokenNetwork)) === null || _a === void 0 ? void 0 : _a.hash;
55
- if (!nativeTokenHash) {
56
- throw new Error(`Could not guess native token hash for network ${hre.network.name}`);
57
- }
58
- // #endregion
59
- // #region UTILS
60
- // Utility to run a straight-forward deployment with deployOne()
61
- const runEasyDeployment = (deployment) => tslib_1.__awaiter(this, void 0, void 0, function* () {
62
- var _b;
63
- deployment.constructorArguments = (_b = deployment.constructorArguments) !== null && _b !== void 0 ? _b : [];
64
- const result = yield (0, deploy_one_1.deployOne)(args, hre, deployment.contractName, Object.assign({}, deployment));
65
- addToResult(result);
66
- if (result.type === 'skipped') {
67
- switchToSimulation();
68
- }
69
- return result;
70
- });
71
- const switchToSimulation = () => {
72
- if (!args.simulate) {
73
- console.log('[!] Switching to simulated mode');
74
- args.simulate = true;
75
- simulationSuccess = simulationSuccess !== null && simulationSuccess !== void 0 ? simulationSuccess : true;
76
- }
77
- };
78
- /* Returns true if the nonce is <= targetNonce, and switches to simulation if != targetNonce */
79
- const nonceReady = (targetNonce) => tslib_1.__awaiter(this, void 0, void 0, function* () {
80
- const currentNonce = yield deployer.getTransactionCount();
81
- if (currentNonce !== targetNonce && currentNonce > 17) {
82
- console.warn(`Warning: got nonce ${currentNonce} instead of ${targetNonce}`);
83
- switchToSimulation();
84
- }
85
- if (currentNonce === targetNonce) {
86
- return true;
87
- }
88
- return false;
89
- });
90
- // #endregion
91
- // #region BATCH DEFINITIONS
92
- /*
93
- * Batch 2
94
- * - ERC20SwapToPay
95
- */
96
- const runDeploymentBatch_2 = (erc20FeeProxyAddress) => tslib_1.__awaiter(this, void 0, void 0, function* () {
97
- const nonceForBatch2 = 5;
98
- yield (0, utils_1.jumpToNonce)(args, hre, nonceForBatch2);
99
- // ERC20SwapToPay
100
- let swapRouterAddress = utils_1.uniswapV2RouterAddresses[hre.network.name];
101
- if (!swapRouterAddress) {
102
- logDeploymentMsg('ERC20SwapToPay:', undefined, 'swap router missing - can be administrated by deployer');
103
- swapRouterAddress = '0x0000000000000000000000000000000000000000';
104
- }
105
- const swapToPayResult = yield (0, deploy_one_1.deployOne)(args, hre, 'ERC20SwapToPay', {
106
- constructorArguments: [swapRouterAddress, erc20FeeProxyAddress],
107
- artifact: lib_1.erc20SwapToPayArtifact,
108
- nonceCondition: nonceForBatch2,
109
- });
110
- addToResult(swapToPayResult);
111
- return deploymentResults;
112
- });
113
- /*
114
- * Batch 4
115
- * - ChainlinkConversionPath (+ addWhitelistAdmin())
116
- * - EthConversionProxy
117
- */
118
- const runDeploymentBatch_4 = (ethFeeProxyAddress) => tslib_1.__awaiter(this, void 0, void 0, function* () {
119
- const NONCE_BATCH_4 = 10;
120
- yield (0, utils_1.jumpToNonce)(args, hre, NONCE_BATCH_4);
121
- // Deploy ChainlinkConversionPath
122
- const { instance: chainlinkInstance, address: chainlinkConversionPathAddress } = yield runEasyDeployment({
123
- contractName: 'ChainlinkConversionPath',
124
- constructorArguments: [nativeTokenHash],
125
- artifact: lib_1.chainlinkConversionPath,
126
- nonceCondition: NONCE_BATCH_4,
127
- });
128
- // Deploy ETH Conversion
129
- const ethConversionResult = yield (0, conversion_proxy_1.deployEthConversionProxy)(Object.assign(Object.assign({}, args), { chainlinkConversionPathAddress,
130
- ethFeeProxyAddress, nonceCondition: NONCE_BATCH_4 + 1, version: '0.2.0' }), hre);
131
- addToResult(ethConversionResult);
132
- // Administrate again whitelist admins for nonce consistency (due to 1 failing tx on Fantom)
133
- const chainlinkAdminNonce = NONCE_BATCH_4 + 2;
134
- const currentNonce = yield deployer.getTransactionCount();
135
- if (currentNonce === chainlinkAdminNonce && chainlinkInstance) {
136
- if (!process.env.ADMIN_WALLET_ADDRESS) {
137
- throw new Error('Chainlink was deployed but no ADMIN_WALLET_ADDRESS was provided, cannot addWhitelistAdmin.');
138
- }
139
- if (args.simulate === false) {
140
- const tx = yield chainlinkInstance.addWhitelistAdmin(process.env.ADMIN_WALLET_ADDRESS);
141
- yield tx.wait(1);
142
- }
143
- else {
144
- console.log('[i] Simulating addWhitelistAdmin to chainlinkInstance');
145
- }
146
- }
147
- else {
148
- if (currentNonce < chainlinkAdminNonce) {
149
- console.warn(`Warning: got nonce ${currentNonce} instead of ${chainlinkAdminNonce}`);
150
- switchToSimulation();
151
- }
152
- else if (!chainlinkInstance) {
153
- console.warn(`Warning: the Chainlink contract instance is not ready, consider retrying.`);
154
- switchToSimulation();
155
- }
156
- }
157
- return { chainlinkInstance, ethConversionResult };
158
- });
159
- /*
160
- * Batch 5
161
- * - 5.a ERC20ConversionProxy
162
- * - 5.b ERC20ConversionProxy.transferOwnership
163
- */
164
- const runDeploymentBatch_5 = (chainlinkInstance, erc20FeeProxyAddress, ethConversionResultInstance) => tslib_1.__awaiter(this, void 0, void 0, function* () {
165
- const NONCE_BATCH_5 = 15;
166
- yield (0, utils_1.jumpToNonce)(args, hre, NONCE_BATCH_5);
167
- let chainlinkConversionPathAddress = chainlinkInstance === null || chainlinkInstance === void 0 ? void 0 : chainlinkInstance.address;
168
- if (!chainlinkConversionPathAddress) {
169
- switchToSimulation();
170
- chainlinkConversionPathAddress = 'simulated';
171
- }
172
- // 5.a ERC20ConversionProxy
173
- const erc20ConversionResult = yield (0, conversion_proxy_1.deployERC20ConversionProxy)(Object.assign(Object.assign({}, args), { chainlinkConversionPathAddress,
174
- erc20FeeProxyAddress, nonceCondition: NONCE_BATCH_5 }), hre);
175
- addToResult(erc20ConversionResult);
176
- // 5.b ERC20ConversionProxy.transferOwnership
177
- if (yield nonceReady(NONCE_BATCH_5 + 1)) {
178
- if (erc20ConversionResult) {
179
- if (!process.env.ADMIN_WALLET_ADDRESS) {
180
- throw new Error('ADMIN_WALLET_ADDRESS missing for: ERC20ConversionProxy.transferOwnership');
181
- }
182
- if (args.simulate === false) {
183
- yield erc20ConversionResult.instance.transferOwnership(process.env.ADMIN_WALLET_ADDRESS);
184
- }
185
- else {
186
- console.log('[i] Simulating transferOwnership to ERC20ConversionProxy');
187
- }
188
- }
189
- else {
190
- console.warn(`Warning: the ERC20ConversionProxy contract instance is not ready, consider retrying.`);
191
- switchToSimulation();
192
- }
193
- }
194
- const ethConversionAdminNonce = NONCE_BATCH_5 + 3;
195
- yield (0, utils_1.jumpToNonce)(args, hre, ethConversionAdminNonce);
196
- // 5.d EthConversion.transferOwnership
197
- if (yield nonceReady(ethConversionAdminNonce)) {
198
- if (ethConversionResultInstance) {
199
- if (!process.env.ADMIN_WALLET_ADDRESS) {
200
- throw new Error('ADMIN_WALLET_ADDRESS missing, cannot addWhitelistAdmin on EthConversion.');
201
- }
202
- if (args.simulate === false) {
203
- const tx = yield ethConversionResultInstance.addWhitelistAdmin(process.env.ADMIN_WALLET_ADDRESS);
204
- yield tx.wait(1);
205
- }
206
- else {
207
- console.log(`[i] Simulating addWhitelistAdmin to EthConversion at ${ethConversionResultInstance.address}`);
208
- }
209
- }
210
- else {
211
- if (!ethConversionResultInstance) {
212
- console.warn(`Warning: the EthConversion contract instance is not ready for EthConversion update, consider retrying.`);
213
- switchToSimulation();
214
- }
215
- }
216
- }
217
- });
218
- // #endregion
219
- // #region MAIN - Deployments
220
- // Batch 1 - REMOVED -> Deployment CREATE2
221
- const erc20FeeProxyAddress = yield (0, compute_one_address_1.computeCreate2DeploymentAddress)({ contract: 'ERC20FeeProxy' }, hre);
222
- // Batch 2
223
- yield runDeploymentBatch_2(erc20FeeProxyAddress);
224
- // Batch 3 - REMOVED -> Deployment CREATE2
225
- // Compute EthereumFeeProxy address (CREATE2)
226
- const ethFeeProxyAddress = yield (0, compute_one_address_1.computeCreate2DeploymentAddress)({ contract: 'EthereumFeeProxy' }, hre);
227
- // Batch 4
228
- const { chainlinkInstance, ethConversionResult } = yield runDeploymentBatch_4(ethFeeProxyAddress);
229
- // Batch 5
230
- yield runDeploymentBatch_5(chainlinkInstance, erc20FeeProxyAddress, ethConversionResult === null || ethConversionResult === void 0 ? void 0 : ethConversionResult.instance);
231
- // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232
- // Add future batches above this line
233
- console.log('Done deploying.');
234
- // #endregion
235
- }
236
- catch (e) {
237
- console.error(e);
238
- }
239
- // #region MAIN - Conclusion and verification
240
- console.log('Summary:');
241
- deploymentResults
242
- .filter((x) => !!x)
243
- .forEach((res) => logDeploymentMsg(res.contractName, res));
244
- const nbDeployments = deploymentResults.filter((val) => (val === null || val === void 0 ? void 0 : val.type) === 'deployed').length;
245
- const verificationPromises = deploymentResults
246
- .map((val) => val === null || val === void 0 ? void 0 : val.verificationPromise)
247
- .filter(Boolean);
248
- if (nbDeployments > 0) {
249
- console.log(`--- ${nbDeployments} deployements were made. ---`, hre.network.name === 'private'
250
- ? ''
251
- : [
252
- ``,
253
- `TODO:`,
254
- `* CRITICAL: update src/lib/artifacts files, and push changes NOW !`,
255
- `* IMPORTANT: execute updateAggregatorsList() on conversionPaths`,
256
- `* : then update the lib with chainlinkPath util in toolbox and push changes`,
257
- `* OTHER: deploy subgraphes where needed`,
258
- ].join('\r\n'));
259
- if (verificationPromises.length > 0) {
260
- let nbSuccessfulVerifications = 0;
261
- console.log('Contracts verifications in progress...');
262
- yield Promise.all(verificationPromises.map((verificationPromise) => {
263
- return verificationPromise
264
- ? verificationPromise.then((success) => {
265
- nbSuccessfulVerifications += success ? 1 : 0;
266
- console.log(`${nbSuccessfulVerifications} / ${nbDeployments}...`);
267
- })
268
- : Promise.resolve();
269
- }));
270
- console.log(`${nbSuccessfulVerifications} verification successes !`);
271
- if (nbSuccessfulVerifications < nbDeployments) {
272
- console.log(`Some verifications failed, check logs and do them manually.`);
273
- }
274
- }
275
- }
276
- else {
277
- console.log(`--- No deployment was made. ---`);
278
- }
279
- if (simulationSuccess === false) {
280
- console.log('--- DO NOT PROCEED ---');
281
- }
282
- });
283
- }
284
- exports.deployAllPaymentContracts = deployAllPaymentContracts;
285
- //# sourceMappingURL=deploy-payments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploy-payments.js","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;AACnC,oCAIoB;AACpB,yDAA0F;AAC1F,6CAA2D;AAC3D,mCAAgE;AAQhE,uDAA2D;AAC3D,iDAA0D;AAE1D,gFAAyF;AAEzF;;;;;;;;;;;;;GAaG;AACH,SAAsB,yBAAyB,CAC7C,IAAS,EACT,GAAsC;;;QAEtC,MAAM,iBAAiB,GAAqC,EAAE,CAAC;QAC/D,IAAI,iBAAsC,CAAC;QAE3C,MAAM,gBAAgB,GAAG,CAAC,YAAoB,EAAE,MAAyB,EAAE,OAAgB,EAAE,EAAE;YAC7F,MAAM,QAAQ,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,MAAK,UAAU,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1E,MAAM,SAAS,GAAG,MAAM;gBACtB,CAAC,CAAC,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,IAAI;oBAC9B,CAAC,CAAC,MAAM,CAAC,OAAO;oBAChB,CAAC,CAAC,G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