@gearbox-protocol/deploy-tools 1.6.0-next.12 → 1.6.0-next.13

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 (2) hide show
  1. package/dist/index.js +41 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -264191,6 +264191,38 @@ var require_cjs2 = __commonJS({
264191
264191
  var require_EtherscanVerifier = __commonJS({
264192
264192
  "../../packages/lib/dist/EtherscanVerifier.js"(exports2) {
264193
264193
  "use strict";
264194
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
264195
+ if (k2 === void 0)
264196
+ k2 = k;
264197
+ var desc = Object.getOwnPropertyDescriptor(m, k);
264198
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
264199
+ desc = { enumerable: true, get: function() {
264200
+ return m[k];
264201
+ } };
264202
+ }
264203
+ Object.defineProperty(o, k2, desc);
264204
+ } : function(o, m, k, k2) {
264205
+ if (k2 === void 0)
264206
+ k2 = k;
264207
+ o[k2] = m[k];
264208
+ });
264209
+ var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
264210
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
264211
+ } : function(o, v) {
264212
+ o["default"] = v;
264213
+ });
264214
+ var __importStar2 = exports2 && exports2.__importStar || function(mod) {
264215
+ if (mod && mod.__esModule)
264216
+ return mod;
264217
+ var result = {};
264218
+ if (mod != null) {
264219
+ for (var k in mod)
264220
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
264221
+ __createBinding2(result, mod, k);
264222
+ }
264223
+ __setModuleDefault2(result, mod);
264224
+ return result;
264225
+ };
264194
264226
  var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
264195
264227
  return mod && mod.__esModule ? mod : { "default": mod };
264196
264228
  };
@@ -264199,7 +264231,7 @@ var require_EtherscanVerifier = __commonJS({
264199
264231
  var node_fs_1 = require("fs");
264200
264232
  var promises_1 = require("fs/promises");
264201
264233
  var node_path_1 = __importDefault2(require("path"));
264202
- var axios_1 = __importDefault2(require_axios());
264234
+ var axios_1 = __importStar2(require_axios());
264203
264235
  var axios_retry_1 = __importDefault2(require_cjs2());
264204
264236
  var log_1 = __importDefault2(require_log());
264205
264237
  var _logger, _etherscanApi, _cacheDir, _cachePolicy, _result, _verify, verify_fn, _getCached, getCached_fn, _saveCached, saveCached_fn;
@@ -264228,22 +264260,23 @@ var require_EtherscanVerifier = __commonJS({
264228
264260
  }));
264229
264261
  __privateGet(this, _etherscanApi).interceptors.response.use(async (response) => {
264230
264262
  var _a, _b, _c;
264231
- if (response.status === 200 && ((_a = response.data) == null ? void 0 : _a.status) === "0" && ((_c = (_b = response.data) == null ? void 0 : _b.message) == null ? void 0 : _c.startsWith("Max rate"))) {
264263
+ if (response.status === 200 && ((_a = response.data) == null ? void 0 : _a.status) === "0" && ((_c = (_b = response.data) == null ? void 0 : _b.result) == null ? void 0 : _c.startsWith("Max rate"))) {
264232
264264
  response.status = 429;
264265
+ throw new axios_1.AxiosError("maxrate", "429", response.config, response.request, response);
264233
264266
  }
264234
264267
  return response;
264235
264268
  });
264236
264269
  (0, axios_retry_1.default)(__privateGet(this, _etherscanApi), {
264237
264270
  retries: 5,
264238
264271
  retryCondition: (e) => {
264239
- var _a, _b, _c, _d;
264240
- __privateGet(this, _logger).trace(`Etherscan error, status ${(_a = e.response) == null ? void 0 : _a.status}, msg: ${(_b = e.response) == null ? void 0 : _b.data}`);
264241
- if (((_c = e.response) == null ? void 0 : _c.status) === 429) {
264272
+ var _a, _b, _c, _d, _e;
264273
+ __privateGet(this, _logger).trace(`Etherscan error, status ${(_a = e.response) == null ? void 0 : _a.status}, msg: ${(_c = (_b = e.response) == null ? void 0 : _b.data) == null ? void 0 : _c.result}`);
264274
+ if (((_d = e.response) == null ? void 0 : _d.status) === 429) {
264242
264275
  return true;
264243
264276
  }
264244
264277
  try {
264245
- const resp = (_d = e.response) == null ? void 0 : _d.data;
264246
- return resp.status === "0" && resp.message.startsWith("Max rate");
264278
+ const resp = (_e = e.response) == null ? void 0 : _e.data;
264279
+ return resp.status === "0" && resp.result.startsWith("Max rate");
264247
264280
  } catch {
264248
264281
  }
264249
264282
  return false;
@@ -264307,11 +264340,6 @@ var require_EtherscanVerifier = __commonJS({
264307
264340
  }
264308
264341
  });
264309
264342
  if (resp.data.status === "0") {
264310
- __privateGet(this, _logger).trace({
264311
- data: resp.data,
264312
- status: resp.status,
264313
- statusText: resp.statusText
264314
- });
264315
264343
  throw new Error(`cannot verify address ${address}: ${resp.data.result}`);
264316
264344
  }
264317
264345
  if (resp.data.result.length === 0 || resp.data.result[0].ABI.startsWith("Contract source code not verified")) {
@@ -414721,7 +414749,7 @@ var require_package3 = __commonJS({
414721
414749
  module2.exports = {
414722
414750
  name: "@gearbox-protocol/deploy-tools",
414723
414751
  description: "Gearbox deploy tools",
414724
- version: "1.6.0-next.11",
414752
+ version: "1.6.0-next.12",
414725
414753
  homepage: "https://gearbox.fi",
414726
414754
  keywords: [
414727
414755
  "gearbox"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "1.6.0-next.12",
4
+ "version": "1.6.0-next.13",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"