@fileverse-dev/formulajs 4.4.11-mod-68 → 4.4.11-mod-68-patch-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /* @fileverse-dev/formulajs v4.4.11-mod-68 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-68-patch-1 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -21,38 +21,6 @@ function _objectWithoutPropertiesLoose(r, e) {
21
21
  return t;
22
22
  }
23
23
 
24
- function ownKeys(e, r) {
25
- var t = Object.keys(e);
26
- if (Object.getOwnPropertySymbols) {
27
- var o = Object.getOwnPropertySymbols(e);
28
- r && (o = o.filter((function(r) {
29
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
30
- }))), t.push.apply(t, o);
31
- }
32
- return t;
33
- }
34
-
35
- function _objectSpread(e) {
36
- for (var r = 1; r < arguments.length; r++) {
37
- var t = null != arguments[r] ? arguments[r] : {};
38
- r % 2 ? ownKeys(Object(t), !0).forEach((function(r) {
39
- _defineProperty(e, r, t[r]);
40
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach((function(r) {
41
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
42
- }));
43
- }
44
- return e;
45
- }
46
-
47
- function _defineProperty(e, r, t) {
48
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
49
- value: t,
50
- enumerable: !0,
51
- configurable: !0,
52
- writable: !0
53
- }) : e[r] = t, e;
54
- }
55
-
56
24
  function _createForOfIteratorHelper(r, e) {
57
25
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
58
26
  if (!t) {
@@ -113,22 +81,6 @@ function _createClass(e, r, t) {
113
81
  }), e;
114
82
  }
115
83
 
116
- function _toPropertyKey(t) {
117
- var i = _toPrimitive(t, "string");
118
- return "symbol" == _typeof(i) ? i : i + "";
119
- }
120
-
121
- function _toPrimitive(t, r) {
122
- if ("object" != _typeof(t) || !t) return t;
123
- var e = t[Symbol.toPrimitive];
124
- if (void 0 !== e) {
125
- var i = e.call(t, r || "default");
126
- if ("object" != _typeof(i)) return i;
127
- throw new TypeError("@@toPrimitive must return a primitive value.");
128
- }
129
- return ("string" === r ? String : Number)(t);
130
- }
131
-
132
84
  function _classCallCheck(a, n) {
133
85
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
134
86
  }
@@ -511,6 +463,54 @@ function _asyncToGenerator(n) {
511
463
  };
512
464
  }
513
465
 
466
+ function ownKeys(e, r) {
467
+ var t = Object.keys(e);
468
+ if (Object.getOwnPropertySymbols) {
469
+ var o = Object.getOwnPropertySymbols(e);
470
+ r && (o = o.filter((function(r) {
471
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
472
+ }))), t.push.apply(t, o);
473
+ }
474
+ return t;
475
+ }
476
+
477
+ function _objectSpread(e) {
478
+ for (var r = 1; r < arguments.length; r++) {
479
+ var t = null != arguments[r] ? arguments[r] : {};
480
+ r % 2 ? ownKeys(Object(t), !0).forEach((function(r) {
481
+ _defineProperty(e, r, t[r]);
482
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach((function(r) {
483
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
484
+ }));
485
+ }
486
+ return e;
487
+ }
488
+
489
+ function _defineProperty(e, r, t) {
490
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
491
+ value: t,
492
+ enumerable: !0,
493
+ configurable: !0,
494
+ writable: !0
495
+ }) : e[r] = t, e;
496
+ }
497
+
498
+ function _toPropertyKey(t) {
499
+ var i = _toPrimitive(t, "string");
500
+ return "symbol" == _typeof(i) ? i : i + "";
501
+ }
502
+
503
+ function _toPrimitive(t, r) {
504
+ if ("object" != _typeof(t) || !t) return t;
505
+ var e = t[Symbol.toPrimitive];
506
+ if (void 0 !== e) {
507
+ var i = e.call(t, r || "default");
508
+ if ("object" != _typeof(i)) return i;
509
+ throw new TypeError("@@toPrimitive must return a primitive value.");
510
+ }
511
+ return ("string" === r ? String : Number)(t);
512
+ }
513
+
514
514
  function _slicedToArray(r, e) {
515
515
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
516
516
  }
@@ -11068,9 +11068,85 @@ function _typeof(o) {
11068
11068
  Neynar: "Neynar",
11069
11069
  Defillama: "Defillama"
11070
11070
  };
11071
+ var PROXY_MAP = {
11072
+ Etherscan: {
11073
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11074
+ removeParams: [ "apikey" ]
11075
+ },
11076
+ Basescan: {
11077
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11078
+ removeParams: [ "apikey" ]
11079
+ },
11080
+ Gnosisscan: {
11081
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11082
+ removeParams: [ "apikey" ]
11083
+ },
11084
+ Coingecko: {
11085
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11086
+ removeParams: [ "apikey" ]
11087
+ },
11088
+ Firefly: {
11089
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11090
+ removeParams: [ "apikey" ]
11091
+ },
11092
+ Neynar: {
11093
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11094
+ removeParams: [ "api_key" ]
11095
+ },
11096
+ Safe: {
11097
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11098
+ removeParams: [ "api_key" ]
11099
+ },
11100
+ Defillama: {
11101
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11102
+ removeParams: [ "api_key" ]
11103
+ },
11104
+ GnosisPay: {
11105
+ url: "https://staging-api-proxy-ca4268d7d581.herokuapp.com/proxy",
11106
+ removeParams: [ "api_key" ]
11107
+ }
11108
+ };
11109
+ function removeUrlParams(url, paramsToRemove) {
11110
+ if (!paramsToRemove || paramsToRemove.length === 0) {
11111
+ return url;
11112
+ }
11113
+ var urlObj = new URL(url);
11114
+ paramsToRemove.forEach((function(param) {
11115
+ if (urlObj.searchParams.has(param)) {
11116
+ urlObj.searchParams["delete"](param);
11117
+ }
11118
+ }));
11119
+ return urlObj.toString();
11120
+ }
11121
+ function getUrlAndHeaders(_ref) {
11122
+ var url = _ref.url, serviceName = _ref.serviceName, _ref$headers = _ref.headers, headers = _ref$headers === void 0 ? {} : _ref$headers;
11123
+ console.log("getUrlAndHeaders new modified function from formulajs", url, apiKeyName, serviceName);
11124
+ var apiKeyLS = window.localStorage.getItem(SERVICES_API_KEY[serviceName]);
11125
+ var isProxyModeEnabledValue = apiKeyLS === "DEFAULT_PROXY_MODE";
11126
+ var proxyConfig = PROXY_MAP[serviceName];
11127
+ if (isProxyModeEnabledValue && proxyConfig && serviceName && SERVICES_API_KEY[serviceName]) {
11128
+ console.log("isProxyModeEnabledValue", isProxyModeEnabledValue);
11129
+ var cleanedUrl = removeUrlParams(url, proxyConfig.removeParams);
11130
+ return {
11131
+ URL: proxyConfig.url,
11132
+ HEADERS: {
11133
+ "target-url": cleanedUrl,
11134
+ method: "GET",
11135
+ "Content-Type": "application/json"
11136
+ }
11137
+ };
11138
+ }
11139
+ return {
11140
+ URL: url,
11141
+ HEADERS: _objectSpread(_objectSpread({}, headers), {}, {
11142
+ method: "GET",
11143
+ "Content-Type": "application/json"
11144
+ })
11145
+ };
11146
+ }
11071
11147
  var fromTimeStampToBlock = function() {
11072
- var _ref = _asyncToGenerator(_regeneratorRuntime().mark((function _callee(timestamp, chain, apiKey) {
11073
- var chainId, url, res, json;
11148
+ var _ref2 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee(timestamp, chain, apiKey) {
11149
+ var chainId, url, _getUrlAndHeaders, finalUrl, HEADERS, res, json;
11074
11150
  return _regeneratorRuntime().wrap((function _callee$(_context) {
11075
11151
  while (1) switch (_context.prev = _context.next) {
11076
11152
  case 0:
@@ -11083,26 +11159,30 @@ function _typeof(o) {
11083
11159
  case 2:
11084
11160
  chainId = CHAIN_ID_MAP[chain];
11085
11161
  url = "https://api.etherscan.io/v2/api?module=block&action=getblocknobytime&timestamp=".concat(timestamp, "&closest=before&apikey=").concat(apiKey, "&chainId=").concat(chainId);
11086
- _context.next = 6;
11087
- return fetch(url);
11162
+ _getUrlAndHeaders = getUrlAndHeaders(url), finalUrl = _getUrlAndHeaders.URL, HEADERS = _getUrlAndHeaders.HEADERS;
11163
+ _context.next = 7;
11164
+ return fetch(finalUrl, {
11165
+ method: "GET",
11166
+ headers: HEADERS
11167
+ });
11088
11168
 
11089
- case 6:
11169
+ case 7:
11090
11170
  res = _context.sent;
11091
- _context.next = 9;
11171
+ _context.next = 10;
11092
11172
  return res.json();
11093
11173
 
11094
- case 9:
11174
+ case 10:
11095
11175
  json = _context.sent;
11096
11176
  return _context.abrupt("return", parseInt(json.result));
11097
11177
 
11098
- case 11:
11178
+ case 12:
11099
11179
  case "end":
11100
11180
  return _context.stop();
11101
11181
  }
11102
11182
  }), _callee);
11103
11183
  })));
11104
11184
  return function fromTimeStampToBlock(_x2, _x3, _x4) {
11105
- return _ref.apply(this, arguments);
11185
+ return _ref2.apply(this, arguments);
11106
11186
  };
11107
11187
  }();
11108
11188
  var fromTimestampToBlock = {
@@ -11239,15 +11319,15 @@ function _typeof(o) {
11239
11319
  return _handleScanRequest.apply(this, arguments);
11240
11320
  }
11241
11321
  function _handleScanRequest() {
11242
- _handleScanRequest = _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(_ref2) {
11243
- var type, address, startDate, endDate, _ref2$page, page, _ref2$offset, offset, apiKey, functionName, chainId, network, API_INFO_MAP, ensName, apiInfo, baseUrl, ACTION_MAP, action, url, _yield$Promise$all, _yield$Promise$all2, startBlock, endBlock, res, json;
11322
+ _handleScanRequest = _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(_ref3) {
11323
+ var type, address, startDate, endDate, _ref3$page, page, _ref3$offset, offset, apiKey, functionName, chainId, network, API_INFO_MAP, ensName, apiInfo, baseUrl, ACTION_MAP, action, url, _yield$Promise$all, _yield$Promise$all2, startBlock, endBlock, _getUrlAndHeaders3, finalUrl, HEADERS, res, json;
11244
11324
  return _regeneratorRuntime().wrap((function _callee10$(_context10) {
11245
11325
  while (1) switch (_context10.prev = _context10.next) {
11246
11326
  case 0:
11247
- type = _ref2.type, address = _ref2.address, startDate = _ref2.startDate, endDate = _ref2.endDate,
11248
- _ref2$page = _ref2.page, page = _ref2$page === void 0 ? 1 : _ref2$page, _ref2$offset = _ref2.offset,
11249
- offset = _ref2$offset === void 0 ? 10 : _ref2$offset, apiKey = _ref2.apiKey, functionName = _ref2.functionName,
11250
- chainId = _ref2.chainId, network = _ref2.network;
11327
+ type = _ref3.type, address = _ref3.address, startDate = _ref3.startDate, endDate = _ref3.endDate,
11328
+ _ref3$page = _ref3.page, page = _ref3$page === void 0 ? 1 : _ref3$page, _ref3$offset = _ref3.offset,
11329
+ offset = _ref3$offset === void 0 ? 10 : _ref3$offset, apiKey = _ref3.apiKey, functionName = _ref3.functionName,
11330
+ chainId = _ref3.chainId, network = _ref3.network;
11251
11331
  API_INFO_MAP = {
11252
11332
  BASE: {
11253
11333
  url: "https://api.basescan.org/api",
@@ -11326,44 +11406,52 @@ function _typeof(o) {
11326
11406
  url += "&page=".concat(page, "&offset=").concat(offset);
11327
11407
 
11328
11408
  case 29:
11329
- _context10.next = 31;
11330
- return fetch(url);
11409
+ _getUrlAndHeaders3 = getUrlAndHeaders({
11410
+ url: url,
11411
+ serviceName: "Etherscan",
11412
+ headers: {}
11413
+ }), finalUrl = _getUrlAndHeaders3.URL, HEADERS = _getUrlAndHeaders3.HEADERS;
11414
+ _context10.next = 32;
11415
+ return fetch(finalUrl, {
11416
+ method: "GET",
11417
+ headers: HEADERS
11418
+ });
11331
11419
 
11332
- case 31:
11420
+ case 32:
11333
11421
  res = _context10.sent;
11334
11422
  if (res.ok) {
11335
- _context10.next = 34;
11423
+ _context10.next = 35;
11336
11424
  break;
11337
11425
  }
11338
11426
  throw new NetworkError(apiInfo.apiKeyName, res.status);
11339
11427
 
11340
- case 34:
11341
- _context10.next = 36;
11428
+ case 35:
11429
+ _context10.next = 37;
11342
11430
  return res.json();
11343
11431
 
11344
- case 36:
11432
+ case 37:
11345
11433
  json = _context10.sent;
11346
11434
  if (!(typeof json.result === "string")) {
11347
- _context10.next = 42;
11435
+ _context10.next = 43;
11348
11436
  break;
11349
11437
  }
11350
11438
  if (!json.result.includes("Invalid API Key")) {
11351
- _context10.next = 40;
11439
+ _context10.next = 41;
11352
11440
  break;
11353
11441
  }
11354
11442
  throw new InvalidApiKeyError(apiInfo.apiKeyName);
11355
11443
 
11356
- case 40:
11444
+ case 41:
11357
11445
  if (!json.result.includes("Max rate limit reached")) {
11358
- _context10.next = 42;
11446
+ _context10.next = 43;
11359
11447
  break;
11360
11448
  }
11361
11449
  throw new RateLimitError(apiInfo.apiKeyName);
11362
11450
 
11363
- case 42:
11451
+ case 43:
11364
11452
  return _context10.abrupt("return", json.result);
11365
11453
 
11366
- case 43:
11454
+ case 44:
11367
11455
  case "end":
11368
11456
  return _context10.stop();
11369
11457
  }
@@ -11372,8 +11460,8 @@ function _typeof(o) {
11372
11460
  return _handleScanRequest.apply(this, arguments);
11373
11461
  }
11374
11462
  var fromUsernameToFid = function() {
11375
- var _ref3 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(username, apiKey) {
11376
- var url, res, json, users, user;
11463
+ var _ref4 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(username, apiKey) {
11464
+ var url, _getUrlAndHeaders2, finalUrl, HEADERS, res, json, users, user;
11377
11465
  return _regeneratorRuntime().wrap((function _callee2$(_context2) {
11378
11466
  while (1) switch (_context2.prev = _context2.next) {
11379
11467
  case 0:
@@ -11385,20 +11473,26 @@ function _typeof(o) {
11385
11473
 
11386
11474
  case 2:
11387
11475
  url = "https://api.neynar.com/v2/farcaster/user/search/?q=".concat(username, "&limit=5");
11388
- _context2.next = 5;
11389
- return fetch(url, {
11476
+ _getUrlAndHeaders2 = getUrlAndHeaders({
11477
+ url: url,
11478
+ serviceName: "Neynar",
11390
11479
  headers: {
11391
11480
  "x-api-key": apiKey,
11392
11481
  "x-neynar-experimental": "false"
11393
11482
  }
11483
+ }), finalUrl = _getUrlAndHeaders2.URL, HEADERS = _getUrlAndHeaders2.HEADERS;
11484
+ _context2.next = 6;
11485
+ return fetch(finalUrl, {
11486
+ method: "GET",
11487
+ headers: HEADERS
11394
11488
  });
11395
11489
 
11396
- case 5:
11490
+ case 6:
11397
11491
  res = _context2.sent;
11398
- _context2.next = 8;
11492
+ _context2.next = 9;
11399
11493
  return res.json();
11400
11494
 
11401
- case 8:
11495
+ case 9:
11402
11496
  json = _context2.sent;
11403
11497
  users = json.result ? json.result.users : [];
11404
11498
  user = users.find((function(user) {
@@ -11406,14 +11500,14 @@ function _typeof(o) {
11406
11500
  }));
11407
11501
  return _context2.abrupt("return", user && user.fid || null);
11408
11502
 
11409
- case 12:
11503
+ case 13:
11410
11504
  case "end":
11411
11505
  return _context2.stop();
11412
11506
  }
11413
11507
  }), _callee2);
11414
11508
  })));
11415
11509
  return function fromUsernameToFid(_x7, _x8) {
11416
- return _ref3.apply(this, arguments);
11510
+ return _ref4.apply(this, arguments);
11417
11511
  };
11418
11512
  }();
11419
11513
  var fromUsernameToFid$1 = {
@@ -12160,7 +12254,7 @@ function _typeof(o) {
12160
12254
  description: description
12161
12255
  };
12162
12256
  var customMap = function customMap(iss, ctx) {
12163
- var _ref5;
12257
+ var _ref6;
12164
12258
  var message = params.message;
12165
12259
  if (iss.code === "invalid_enum_value") {
12166
12260
  return {
@@ -12168,16 +12262,16 @@ function _typeof(o) {
12168
12262
  };
12169
12263
  }
12170
12264
  if (typeof ctx.data === "undefined") {
12171
- var _ref4;
12265
+ var _ref5;
12172
12266
  return {
12173
- message: (_ref4 = message !== null && message !== void 0 ? message : required_error) !== null && _ref4 !== void 0 ? _ref4 : ctx.defaultError
12267
+ message: (_ref5 = message !== null && message !== void 0 ? message : required_error) !== null && _ref5 !== void 0 ? _ref5 : ctx.defaultError
12174
12268
  };
12175
12269
  }
12176
12270
  if (iss.code !== "invalid_type") return {
12177
12271
  message: ctx.defaultError
12178
12272
  };
12179
12273
  return {
12180
- message: (_ref5 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _ref5 !== void 0 ? _ref5 : ctx.defaultError
12274
+ message: (_ref6 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _ref6 !== void 0 ? _ref6 : ctx.defaultError
12181
12275
  };
12182
12276
  };
12183
12277
  return {
@@ -14917,7 +15011,7 @@ function _typeof(o) {
14917
15011
  }
14918
15012
  if (ctx.common.async) {
14919
15013
  return Promise.all(options.map(function() {
14920
- var _ref7 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee7(option) {
15014
+ var _ref8 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee7(option) {
14921
15015
  var childCtx;
14922
15016
  return _regeneratorRuntime().wrap((function _callee7$(_context7) {
14923
15017
  while (1) switch (_context7.prev = _context7.next) {
@@ -14950,7 +15044,7 @@ function _typeof(o) {
14950
15044
  }), _callee7);
14951
15045
  })));
14952
15046
  return function(_x13) {
14953
- return _ref7.apply(this, arguments);
15047
+ return _ref8.apply(this, arguments);
14954
15048
  };
14955
15049
  }())).then(handleResults);
14956
15050
  } else {
@@ -15252,8 +15346,8 @@ function _typeof(o) {
15252
15346
  data: ctx.data,
15253
15347
  path: ctx.path,
15254
15348
  parent: ctx
15255
- }) ]).then((function(_ref8) {
15256
- var _ref9 = _slicedToArray(_ref8, 2), left = _ref9[0], right = _ref9[1];
15349
+ }) ]).then((function(_ref9) {
15350
+ var _ref0 = _slicedToArray(_ref9, 2), left = _ref0[0], right = _ref0[1];
15257
15351
  return handleParsed(left, right);
15258
15352
  }));
15259
15353
  } else {
@@ -15386,8 +15480,8 @@ function _typeof(o) {
15386
15480
  }
15387
15481
  var keyType = this._def.keyType;
15388
15482
  var valueType = this._def.valueType;
15389
- var pairs = _toConsumableArray(ctx.data.entries()).map((function(_ref0, index) {
15390
- var _ref1 = _slicedToArray(_ref0, 2), key = _ref1[0], value = _ref1[1];
15483
+ var pairs = _toConsumableArray(ctx.data.entries()).map((function(_ref1, index) {
15484
+ var _ref10 = _slicedToArray(_ref1, 2), key = _ref10[0], value = _ref10[1];
15391
15485
  return {
15392
15486
  key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [ index, "key" ])),
15393
15487
  value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [ index, "value" ]))
@@ -15921,7 +16015,7 @@ function _typeof(o) {
15921
16015
  var processed = effect.transform(ctx.data, checkCtx);
15922
16016
  if (ctx.common.async) {
15923
16017
  return Promise.resolve(processed).then(function() {
15924
- var _ref11 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(processed) {
16018
+ var _ref12 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(processed) {
15925
16019
  var result;
15926
16020
  return _regeneratorRuntime().wrap((function _callee9$(_context9) {
15927
16021
  while (1) switch (_context9.prev = _context9.next) {
@@ -15972,7 +16066,7 @@ function _typeof(o) {
15972
16066
  }), _callee9);
15973
16067
  })));
15974
16068
  return function(_x14) {
15975
- return _ref11.apply(this, arguments);
16069
+ return _ref12.apply(this, arguments);
15976
16070
  };
15977
16071
  }());
15978
16072
  } else {
@@ -16303,7 +16397,7 @@ function _typeof(o) {
16303
16397
  var _this$_processInputPa13 = this._processInputParams(input), status = _this$_processInputPa13.status, ctx = _this$_processInputPa13.ctx;
16304
16398
  if (ctx.common.async) {
16305
16399
  var handleAsync = function() {
16306
- var _ref12 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee0() {
16400
+ var _ref13 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee0() {
16307
16401
  var inResult;
16308
16402
  return _regeneratorRuntime().wrap((function _callee0$(_context0) {
16309
16403
  while (1) switch (_context0.prev = _context0.next) {
@@ -16345,7 +16439,7 @@ function _typeof(o) {
16345
16439
  }), _callee0);
16346
16440
  })));
16347
16441
  return function handleAsync() {
16348
- return _ref12.apply(this, arguments);
16442
+ return _ref13.apply(this, arguments);
16349
16443
  };
16350
16444
  }();
16351
16445
  return handleAsync();
@@ -16643,7 +16737,7 @@ function _typeof(o) {
16643
16737
  }
16644
16738
  function _FIREFLY() {
16645
16739
  _FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee11() {
16646
- var _argsToArray3, _argsToArray4, platform, contentType, identifier, _argsToArray4$, start, _argsToArray4$2, end, apiKey, url, response, _yield$response$json, _data, _args11 = arguments;
16740
+ var _argsToArray3, _argsToArray4, platform, contentType, identifier, _argsToArray4$, start, _argsToArray4$2, end, apiKey, url, _getUrlAndHeaders4, finalUrl, HEADERS, response, _yield$response$json, _data, _args11 = arguments;
16647
16741
  return _regeneratorRuntime().wrap((function _callee11$(_context11) {
16648
16742
  while (1) switch (_context11.prev = _context11.next) {
16649
16743
  case 0:
@@ -16674,35 +16768,39 @@ function _typeof(o) {
16674
16768
  url.searchParams.set("type", fireFlyPlaformType[platform][contentType]);
16675
16769
  url.searchParams.set("start", String(start));
16676
16770
  url.searchParams.set("end", String(end));
16677
- _context11.next = 13;
16678
- return fetch(url.toString(), {
16679
- headers: {
16680
- "x-api-key": apiKey
16681
- }
16771
+ _getUrlAndHeaders4 = getUrlAndHeaders({
16772
+ url: url.toString(),
16773
+ serviceName: "Firefly",
16774
+ headers: headers
16775
+ }), finalUrl = _getUrlAndHeaders4.URL, HEADERS = _getUrlAndHeaders4.HEADERS;
16776
+ _context11.next = 14;
16777
+ return fetch(finalUrl, {
16778
+ method: "GET",
16779
+ headers: HEADERS
16682
16780
  });
16683
16781
 
16684
- case 13:
16782
+ case 14:
16685
16783
  response = _context11.sent;
16686
16784
  if (response.ok) {
16687
- _context11.next = 16;
16785
+ _context11.next = 17;
16688
16786
  break;
16689
16787
  }
16690
16788
  throw new NetworkError(SERVICES_API_KEY.Firefly, response.status);
16691
16789
 
16692
- case 16:
16693
- _context11.next = 18;
16790
+ case 17:
16791
+ _context11.next = 19;
16694
16792
  return response.json();
16695
16793
 
16696
- case 18:
16794
+ case 19:
16697
16795
  _yield$response$json = _context11.sent;
16698
16796
  _data = _yield$response$json.data;
16699
16797
  if (Array.isArray(_data)) {
16700
- _context11.next = 22;
16798
+ _context11.next = 23;
16701
16799
  break;
16702
16800
  }
16703
16801
  return _context11.abrupt("return", []);
16704
16802
 
16705
- case 22:
16803
+ case 23:
16706
16804
  return _context11.abrupt("return", _data.map((function(item) {
16707
16805
  var flat = {};
16708
16806
  for (var _i10 = 0, _Object$entries = Object.entries(item); _i10 < _Object$entries.length; _i10++) {
@@ -16715,16 +16813,16 @@ function _typeof(o) {
16715
16813
  return flat;
16716
16814
  })));
16717
16815
 
16718
- case 25:
16719
- _context11.prev = 25;
16816
+ case 26:
16817
+ _context11.prev = 26;
16720
16818
  _context11.t0 = _context11["catch"](0);
16721
16819
  return _context11.abrupt("return", errorMessageHandler(_context11.t0, "FIREFLY"));
16722
16820
 
16723
- case 28:
16821
+ case 29:
16724
16822
  case "end":
16725
16823
  return _context11.stop();
16726
16824
  }
16727
- }), _callee11, null, [ [ 0, 25 ] ]);
16825
+ }), _callee11, null, [ [ 0, 26 ] ]);
16728
16826
  })));
16729
16827
  return _FIREFLY.apply(this, arguments);
16730
16828
  }
@@ -16733,7 +16831,7 @@ function _typeof(o) {
16733
16831
  }
16734
16832
  function _LENS() {
16735
16833
  _LENS = _asyncToGenerator(_regeneratorRuntime().mark((function _callee12() {
16736
- var _argsToArray5, _argsToArray6, contentType, identifier, _argsToArray6$, start, _argsToArray6$2, end, apiKey, url, typeMap, response, _yield$response$json2, _data2, _args12 = arguments;
16834
+ var _argsToArray5, _argsToArray6, contentType, identifier, _argsToArray6$, start, _argsToArray6$2, end, apiKey, url, typeMap, _getUrlAndHeaders5, finalUrl, HEADERS, response, _yield$response$json2, _data2, _args12 = arguments;
16737
16835
  return _regeneratorRuntime().wrap((function _callee12$(_context12) {
16738
16836
  while (1) switch (_context12.prev = _context12.next) {
16739
16837
  case 0:
@@ -16767,35 +16865,39 @@ function _typeof(o) {
16767
16865
  url.searchParams.set("type", typeMap[contentType]);
16768
16866
  url.searchParams.set("start", String(start));
16769
16867
  url.searchParams.set("end", String(end));
16770
- _context12.next = 14;
16771
- return fetch(url.toString(), {
16772
- headers: {
16773
- "x-api-key": apiKey
16774
- }
16868
+ _getUrlAndHeaders5 = getUrlAndHeaders({
16869
+ url: url.toString(),
16870
+ serviceName: "Firefly",
16871
+ headers: headers
16872
+ }), finalUrl = _getUrlAndHeaders5.URL, HEADERS = _getUrlAndHeaders5.HEADERS;
16873
+ _context12.next = 15;
16874
+ return fetch(finalUrl, {
16875
+ method: "GET",
16876
+ headers: HEADERS
16775
16877
  });
16776
16878
 
16777
- case 14:
16879
+ case 15:
16778
16880
  response = _context12.sent;
16779
16881
  if (response.ok) {
16780
- _context12.next = 17;
16882
+ _context12.next = 18;
16781
16883
  break;
16782
16884
  }
16783
16885
  throw new NetworkError(SERVICES_API_KEY.Firefly, response.status);
16784
16886
 
16785
- case 17:
16786
- _context12.next = 19;
16887
+ case 18:
16888
+ _context12.next = 20;
16787
16889
  return response.json();
16788
16890
 
16789
- case 19:
16891
+ case 20:
16790
16892
  _yield$response$json2 = _context12.sent;
16791
16893
  _data2 = _yield$response$json2.data;
16792
16894
  if (Array.isArray(_data2)) {
16793
- _context12.next = 23;
16895
+ _context12.next = 24;
16794
16896
  break;
16795
16897
  }
16796
16898
  return _context12.abrupt("return", []);
16797
16899
 
16798
- case 23:
16900
+ case 24:
16799
16901
  return _context12.abrupt("return", _data2.map((function(item) {
16800
16902
  var flat = {};
16801
16903
  for (var _i11 = 0, _Object$entries2 = Object.entries(item); _i11 < _Object$entries2.length; _i11++) {
@@ -16808,16 +16910,16 @@ function _typeof(o) {
16808
16910
  return flat;
16809
16911
  })));
16810
16912
 
16811
- case 26:
16812
- _context12.prev = 26;
16913
+ case 27:
16914
+ _context12.prev = 27;
16813
16915
  _context12.t0 = _context12["catch"](0);
16814
16916
  return _context12.abrupt("return", errorMessageHandler(_context12.t0, "LENS"));
16815
16917
 
16816
- case 29:
16918
+ case 30:
16817
16919
  case "end":
16818
16920
  return _context12.stop();
16819
16921
  }
16820
- }), _callee12, null, [ [ 0, 26 ] ]);
16922
+ }), _callee12, null, [ [ 0, 27 ] ]);
16821
16923
  })));
16822
16924
  return _LENS.apply(this, arguments);
16823
16925
  }
@@ -16826,7 +16928,7 @@ function _typeof(o) {
16826
16928
  }
16827
16929
  function _FARCASTER() {
16828
16930
  _FARCASTER = _asyncToGenerator(_regeneratorRuntime().mark((function _callee13() {
16829
- var _argsToArray7, _argsToArray8, contentType, identifier, _argsToArray8$, start, _argsToArray8$2, end, apiKey, url, typeMap, response, _yield$response$json3, _data3, _args13 = arguments;
16931
+ var _argsToArray7, _argsToArray8, contentType, identifier, _argsToArray8$, start, _argsToArray8$2, end, apiKey, url, typeMap, _getUrlAndHeaders6, finalUrl, HEADERS, response, _yield$response$json3, _data3, _args13 = arguments;
16830
16932
  return _regeneratorRuntime().wrap((function _callee13$(_context13) {
16831
16933
  while (1) switch (_context13.prev = _context13.next) {
16832
16934
  case 0:
@@ -16861,35 +16963,39 @@ function _typeof(o) {
16861
16963
  url.searchParams.set("type", typeMap[contentType]);
16862
16964
  url.searchParams.set("start", String(start));
16863
16965
  url.searchParams.set("end", String(end));
16864
- _context13.next = 14;
16865
- return fetch(url.toString(), {
16866
- headers: {
16867
- "x-api-key": apiKey
16868
- }
16966
+ _getUrlAndHeaders6 = getUrlAndHeaders({
16967
+ url: url.toString(),
16968
+ serviceName: "Firefly",
16969
+ headers: headers
16970
+ }), finalUrl = _getUrlAndHeaders6.URL, HEADERS = _getUrlAndHeaders6.HEADERS;
16971
+ _context13.next = 15;
16972
+ return fetch(finalUrl, {
16973
+ method: "GET",
16974
+ headers: HEADERS
16869
16975
  });
16870
16976
 
16871
- case 14:
16977
+ case 15:
16872
16978
  response = _context13.sent;
16873
16979
  if (response.ok) {
16874
- _context13.next = 17;
16980
+ _context13.next = 18;
16875
16981
  break;
16876
16982
  }
16877
16983
  throw new NetworkError(SERVICES_API_KEY.Firefly, response.status);
16878
16984
 
16879
- case 17:
16880
- _context13.next = 19;
16985
+ case 18:
16986
+ _context13.next = 20;
16881
16987
  return response.json();
16882
16988
 
16883
- case 19:
16989
+ case 20:
16884
16990
  _yield$response$json3 = _context13.sent;
16885
16991
  _data3 = _yield$response$json3.data;
16886
16992
  if (Array.isArray(_data3)) {
16887
- _context13.next = 23;
16993
+ _context13.next = 24;
16888
16994
  break;
16889
16995
  }
16890
16996
  return _context13.abrupt("return", []);
16891
16997
 
16892
- case 23:
16998
+ case 24:
16893
16999
  return _context13.abrupt("return", _data3.map((function(item) {
16894
17000
  var flat = {};
16895
17001
  for (var _i12 = 0, _Object$entries3 = Object.entries(item); _i12 < _Object$entries3.length; _i12++) {
@@ -16902,16 +17008,16 @@ function _typeof(o) {
16902
17008
  return flat;
16903
17009
  })));
16904
17010
 
16905
- case 26:
16906
- _context13.prev = 26;
17011
+ case 27:
17012
+ _context13.prev = 27;
16907
17013
  _context13.t0 = _context13["catch"](0);
16908
17014
  return _context13.abrupt("return", errorMessageHandler(_context13.t0, "FARCASTER"));
16909
17015
 
16910
- case 29:
17016
+ case 30:
16911
17017
  case "end":
16912
17018
  return _context13.stop();
16913
17019
  }
16914
- }), _callee13, null, [ [ 0, 26 ] ]);
17020
+ }), _callee13, null, [ [ 0, 27 ] ]);
16915
17021
  })));
16916
17022
  return _FARCASTER.apply(this, arguments);
16917
17023
  }
@@ -17027,7 +17133,7 @@ function _typeof(o) {
17027
17133
  }
17028
17134
  function _BASE() {
17029
17135
  _BASE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee15() {
17030
- var _argsToArray1, _argsToArray10, type, address, startDate, endDate, page, limit, API_KEY, _args15 = arguments;
17136
+ var _argsToArray1, _argsToArray10, type, address, startDate, endDate, page, limit, _API_KEY, _args15 = arguments;
17031
17137
  return _regeneratorRuntime().wrap((function _callee15$(_context15) {
17032
17138
  while (1) switch (_context15.prev = _context15.next) {
17033
17139
  case 0:
@@ -17043,8 +17149,8 @@ function _typeof(o) {
17043
17149
  page: page,
17044
17150
  limit: limit
17045
17151
  });
17046
- API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Basescan);
17047
- if (API_KEY) {
17152
+ _API_KEY = window.localStorage.getItem(SERVICES_API_KEY.Basescan);
17153
+ if (_API_KEY) {
17048
17154
  _context15.next = 6;
17049
17155
  break;
17050
17156
  }
@@ -17059,7 +17165,7 @@ function _typeof(o) {
17059
17165
  endDate: endDate,
17060
17166
  page: page,
17061
17167
  offset: limit,
17062
- apiKey: API_KEY,
17168
+ apiKey: _API_KEY,
17063
17169
  functionName: "BASE",
17064
17170
  chainId: CHAIN_ID_MAP.base,
17065
17171
  network: "base"
@@ -17146,7 +17252,7 @@ function _typeof(o) {
17146
17252
  }
17147
17253
  function _NEYNAR() {
17148
17254
  _NEYNAR = _asyncToGenerator(_regeneratorRuntime().mark((function _callee17() {
17149
- var neynarParamsSchema, _argsToArray13, _argsToArray14, username, apiKey, fid, url, response, json, users, _args17 = arguments;
17255
+ var neynarParamsSchema, _argsToArray13, _argsToArray14, username, apiKey, fid, url, _getUrlAndHeaders7, finalUrl, HEADERS, response, json, users, _args17 = arguments;
17150
17256
  return _regeneratorRuntime().wrap((function _callee17$(_context17) {
17151
17257
  while (1) switch (_context17.prev = _context17.next) {
17152
17258
  case 0:
@@ -17180,39 +17286,47 @@ function _typeof(o) {
17180
17286
 
17181
17287
  case 12:
17182
17288
  url = "https://api.neynar.com/v2/farcaster/followers?fid=".concat(fid);
17183
- _context17.next = 15;
17184
- return fetch(url, {
17289
+ _getUrlAndHeaders7 = getUrlAndHeaders({
17290
+ url: url.toString(),
17291
+ serviceName: "Firefly",
17185
17292
  headers: {
17186
- "x-api-key": apiKey,
17187
- "x-neynar-experimental": "false"
17293
+ headers: {
17294
+ "x-api-key": API_KEY,
17295
+ "x-neynar-experimental": "false"
17296
+ }
17188
17297
  }
17298
+ }), finalUrl = _getUrlAndHeaders7.URL, HEADERS = _getUrlAndHeaders7.HEADERS;
17299
+ _context17.next = 16;
17300
+ return fetch(finalUrl, {
17301
+ method: "GET",
17302
+ headers: HEADERS
17189
17303
  });
17190
17304
 
17191
- case 15:
17305
+ case 16:
17192
17306
  response = _context17.sent;
17193
17307
  if (response.ok) {
17194
- _context17.next = 18;
17308
+ _context17.next = 19;
17195
17309
  break;
17196
17310
  }
17197
17311
  throw new NetworkError(SERVICES_API_KEY.Neynar, response.status);
17198
17312
 
17199
- case 18:
17200
- _context17.next = 20;
17313
+ case 19:
17314
+ _context17.next = 21;
17201
17315
  return response.json();
17202
17316
 
17203
- case 20:
17317
+ case 21:
17204
17318
  json = _context17.sent;
17205
17319
  users = (json === null || json === void 0 ? void 0 : json.users) || [];
17206
17320
  if (users.length) {
17207
- _context17.next = 24;
17321
+ _context17.next = 25;
17208
17322
  break;
17209
17323
  }
17210
17324
  return _context17.abrupt("return", []);
17211
17325
 
17212
- case 24:
17213
- return _context17.abrupt("return", users.map((function(_ref13) {
17326
+ case 25:
17327
+ return _context17.abrupt("return", users.map((function(_ref14) {
17214
17328
  var _user$profile, _user$profile2;
17215
- var user = _ref13.user;
17329
+ var user = _ref14.user;
17216
17330
  return {
17217
17331
  username: user.username,
17218
17332
  custody_address: user.custody_address,
@@ -17222,16 +17336,16 @@ function _typeof(o) {
17222
17336
  };
17223
17337
  })));
17224
17338
 
17225
- case 27:
17226
- _context17.prev = 27;
17339
+ case 28:
17340
+ _context17.prev = 28;
17227
17341
  _context17.t0 = _context17["catch"](0);
17228
17342
  return _context17.abrupt("return", errorMessageHandler(_context17.t0, "NEYNAR"));
17229
17343
 
17230
- case 30:
17344
+ case 31:
17231
17345
  case "end":
17232
17346
  return _context17.stop();
17233
17347
  }
17234
- }), _callee17, null, [ [ 0, 27 ] ]);
17348
+ }), _callee17, null, [ [ 0, 28 ] ]);
17235
17349
  })));
17236
17350
  return _NEYNAR.apply(this, arguments);
17237
17351
  }
@@ -17310,7 +17424,7 @@ function _typeof(o) {
17310
17424
  }
17311
17425
  function _COINGECKO() {
17312
17426
  _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee19() {
17313
- var _category$toLowerCase, _argsToArray17, _argsToArray18, category, param1, param2, apiKey, headers, url, vs, map, _category, trend, _category2, _trend, res, json, _json$status, msg, out, _i13, _Object$entries4, _Object$entries4$_i, token, prices, _i14, _Object$entries5, _Object$entries5$_i, cur, val, _data4, _args19 = arguments;
17427
+ var _category$toLowerCase, _argsToArray17, _argsToArray18, category, param1, param2, apiKey, _headers, url, vs, map, _category, trend, _category2, _trend, res, json, _json$status, msg, out, _i13, _Object$entries4, _Object$entries4$_i, token, prices, _i14, _Object$entries5, _Object$entries5$_i, cur, val, _data4, _args19 = arguments;
17314
17428
  return _regeneratorRuntime().wrap((function _callee19$(_context19) {
17315
17429
  while (1) switch (_context19.prev = _context19.next) {
17316
17430
  case 0:
@@ -17330,7 +17444,7 @@ function _typeof(o) {
17330
17444
  throw new MissingApiKeyError(SERVICES_API_KEY.Coingecko);
17331
17445
 
17332
17446
  case 6:
17333
- headers = {
17447
+ _headers = {
17334
17448
  accept: "application/json",
17335
17449
  "x-cg-demo-api-key": apiKey
17336
17450
  };
@@ -17374,7 +17488,7 @@ function _typeof(o) {
17374
17488
  case 25:
17375
17489
  _context19.next = 27;
17376
17490
  return fetch(url, {
17377
- headers: headers
17491
+ headers: _headers
17378
17492
  });
17379
17493
 
17380
17494
  case 27:
@@ -17450,58 +17564,68 @@ function _typeof(o) {
17450
17564
  return _regeneratorRuntime().wrap((function _callee21$(_context24) {
17451
17565
  while (1) switch (_context24.prev = _context24.next) {
17452
17566
  case 0:
17453
- _context24.prev = 0;
17567
+ console.log("EOA");
17568
+ _context24.prev = 1;
17454
17569
  fetchJSON = function() {
17455
- var _ref14 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee20(url) {
17456
- var res, json;
17570
+ var _ref15 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee20(url) {
17571
+ var _getUrlAndHeaders8, finalUrl, HEADERS, res, json;
17457
17572
  return _regeneratorRuntime().wrap((function _callee20$(_context20) {
17458
17573
  while (1) switch (_context20.prev = _context20.next) {
17459
17574
  case 0:
17460
- _context20.next = 2;
17461
- return fetch(url);
17575
+ _getUrlAndHeaders8 = getUrlAndHeaders({
17576
+ url: url,
17577
+ serviceName: "Etherscan",
17578
+ headers: {}
17579
+ }), finalUrl = _getUrlAndHeaders8.URL, HEADERS = _getUrlAndHeaders8.HEADERS;
17580
+ console.log("finalUrl", finalUrl, HEADERS);
17581
+ _context20.next = 4;
17582
+ return fetch(finalUrl, {
17583
+ method: "GET",
17584
+ headers: HEADERS
17585
+ });
17462
17586
 
17463
- case 2:
17587
+ case 4:
17464
17588
  res = _context20.sent;
17465
17589
  if (res.ok) {
17466
- _context20.next = 5;
17590
+ _context20.next = 7;
17467
17591
  break;
17468
17592
  }
17469
17593
  throw new NetworkError(SERVICES_API_KEY.Etherscan, res.status);
17470
17594
 
17471
- case 5:
17472
- _context20.next = 7;
17595
+ case 7:
17596
+ _context20.next = 9;
17473
17597
  return res.json();
17474
17598
 
17475
- case 7:
17599
+ case 9:
17476
17600
  json = _context20.sent;
17477
17601
  if (!(typeof json.result === "string")) {
17478
- _context20.next = 13;
17602
+ _context20.next = 15;
17479
17603
  break;
17480
17604
  }
17481
17605
  if (!json.result.includes("Invalid API Key")) {
17482
- _context20.next = 11;
17606
+ _context20.next = 13;
17483
17607
  break;
17484
17608
  }
17485
17609
  throw new InvalidApiKeyError(SERVICES_API_KEY.Etherscan);
17486
17610
 
17487
- case 11:
17611
+ case 13:
17488
17612
  if (!json.result.includes("Max rate limit reached")) {
17489
- _context20.next = 13;
17613
+ _context20.next = 15;
17490
17614
  break;
17491
17615
  }
17492
17616
  throw new RateLimitError(SERVICES_API_KEY.Etherscan);
17493
17617
 
17494
- case 13:
17618
+ case 15:
17495
17619
  return _context20.abrupt("return", json.result);
17496
17620
 
17497
- case 14:
17621
+ case 16:
17498
17622
  case "end":
17499
17623
  return _context20.stop();
17500
17624
  }
17501
17625
  }), _callee20);
17502
17626
  })));
17503
17627
  return function fetchJSON(_x17) {
17504
- return _ref14.apply(this, arguments);
17628
+ return _ref15.apply(this, arguments);
17505
17629
  };
17506
17630
  }();
17507
17631
  _argsToArray19 = argsToArray(_args24), _argsToArray20 = _slicedToArray(_argsToArray19, 7),
@@ -17520,12 +17644,12 @@ function _typeof(o) {
17520
17644
  });
17521
17645
  apiKey = window.localStorage.getItem(SERVICES_API_KEY.Etherscan);
17522
17646
  if (apiKey) {
17523
- _context24.next = 7;
17647
+ _context24.next = 8;
17524
17648
  break;
17525
17649
  }
17526
17650
  throw new MissingApiKeyError(SERVICES_API_KEY.Etherscan);
17527
17651
 
17528
- case 7:
17652
+ case 8:
17529
17653
  INPUTS = addresses.split(",").map((function(s) {
17530
17654
  return s.trim();
17531
17655
  })).filter(Boolean);
@@ -17534,62 +17658,62 @@ function _typeof(o) {
17534
17658
  })).filter(Boolean);
17535
17659
  ADDRESS_MAP = {};
17536
17660
  _iterator41 = _createForOfIteratorHelper(INPUTS);
17537
- _context24.prev = 11;
17661
+ _context24.prev = 12;
17538
17662
  _iterator41.s();
17539
17663
 
17540
- case 13:
17664
+ case 14:
17541
17665
  if ((_step41 = _iterator41.n()).done) {
17542
- _context24.next = 28;
17666
+ _context24.next = 29;
17543
17667
  break;
17544
17668
  }
17545
17669
  inp = _step41.value;
17546
17670
  if (!isAddress$1.isAddress(inp)) {
17547
- _context24.next = 19;
17671
+ _context24.next = 20;
17548
17672
  break;
17549
17673
  }
17550
17674
  ADDRESS_MAP[inp.toLowerCase()] = null;
17551
- _context24.next = 26;
17675
+ _context24.next = 27;
17552
17676
  break;
17553
17677
 
17554
- case 19:
17678
+ case 20:
17555
17679
  ens = inp;
17556
- _context24.next = 22;
17680
+ _context24.next = 23;
17557
17681
  return fromEnsNameToAddress$1.fromEnsNameToAddress(ens);
17558
17682
 
17559
- case 22:
17683
+ case 23:
17560
17684
  resolved = _context24.sent;
17561
17685
  if (resolved) {
17562
- _context24.next = 25;
17686
+ _context24.next = 26;
17563
17687
  break;
17564
17688
  }
17565
17689
  throw new EnsError(ens);
17566
17690
 
17567
- case 25:
17691
+ case 26:
17568
17692
  ADDRESS_MAP[resolved.toLowerCase()] = ens;
17569
17693
 
17570
- case 26:
17571
- _context24.next = 13;
17694
+ case 27:
17695
+ _context24.next = 14;
17572
17696
  break;
17573
17697
 
17574
- case 28:
17575
- _context24.next = 33;
17698
+ case 29:
17699
+ _context24.next = 34;
17576
17700
  break;
17577
17701
 
17578
- case 30:
17579
- _context24.prev = 30;
17580
- _context24.t0 = _context24["catch"](11);
17702
+ case 31:
17703
+ _context24.prev = 31;
17704
+ _context24.t0 = _context24["catch"](12);
17581
17705
  _iterator41.e(_context24.t0);
17582
17706
 
17583
- case 33:
17584
- _context24.prev = 33;
17707
+ case 34:
17708
+ _context24.prev = 34;
17585
17709
  _iterator41.f();
17586
- return _context24.finish(33);
17710
+ return _context24.finish(34);
17587
17711
 
17588
- case 36:
17712
+ case 37:
17589
17713
  ADDRS = Object.keys(ADDRESS_MAP);
17590
17714
  out = [];
17591
17715
  _iterator42 = _createForOfIteratorHelper(CHAINS);
17592
- _context24.prev = 39;
17716
+ _context24.prev = 40;
17593
17717
  _loop = _regeneratorRuntime().mark((function _loop() {
17594
17718
  var chain, chainId, _loop2, _ret2, i, sb, eb, _loop3, _ret3, _i16, _ADDRS;
17595
17719
  return _regeneratorRuntime().wrap((function _loop$(_context23) {
@@ -17763,52 +17887,52 @@ function _typeof(o) {
17763
17887
  }));
17764
17888
  _iterator42.s();
17765
17889
 
17766
- case 42:
17890
+ case 43:
17767
17891
  if ((_step42 = _iterator42.n()).done) {
17768
- _context24.next = 49;
17892
+ _context24.next = 50;
17769
17893
  break;
17770
17894
  }
17771
- return _context24.delegateYield(_loop(), "t1", 44);
17895
+ return _context24.delegateYield(_loop(), "t1", 45);
17772
17896
 
17773
- case 44:
17897
+ case 45:
17774
17898
  _ret = _context24.t1;
17775
17899
  if (!_ret) {
17776
- _context24.next = 47;
17900
+ _context24.next = 48;
17777
17901
  break;
17778
17902
  }
17779
17903
  return _context24.abrupt("return", _ret.v);
17780
17904
 
17781
- case 47:
17782
- _context24.next = 42;
17905
+ case 48:
17906
+ _context24.next = 43;
17783
17907
  break;
17784
17908
 
17785
- case 49:
17786
- _context24.next = 54;
17909
+ case 50:
17910
+ _context24.next = 55;
17787
17911
  break;
17788
17912
 
17789
- case 51:
17790
- _context24.prev = 51;
17791
- _context24.t2 = _context24["catch"](39);
17913
+ case 52:
17914
+ _context24.prev = 52;
17915
+ _context24.t2 = _context24["catch"](40);
17792
17916
  _iterator42.e(_context24.t2);
17793
17917
 
17794
- case 54:
17795
- _context24.prev = 54;
17918
+ case 55:
17919
+ _context24.prev = 55;
17796
17920
  _iterator42.f();
17797
- return _context24.finish(54);
17921
+ return _context24.finish(55);
17798
17922
 
17799
- case 57:
17923
+ case 58:
17800
17924
  return _context24.abrupt("return", out);
17801
17925
 
17802
- case 60:
17803
- _context24.prev = 60;
17804
- _context24.t3 = _context24["catch"](0);
17926
+ case 61:
17927
+ _context24.prev = 61;
17928
+ _context24.t3 = _context24["catch"](1);
17805
17929
  return _context24.abrupt("return", errorMessageHandler(_context24.t3, "EOA"));
17806
17930
 
17807
- case 63:
17931
+ case 64:
17808
17932
  case "end":
17809
17933
  return _context24.stop();
17810
17934
  }
17811
- }), _callee21, null, [ [ 0, 60 ], [ 11, 30, 33, 36 ], [ 39, 51, 54, 57 ] ]);
17935
+ }), _callee21, null, [ [ 1, 61 ], [ 12, 31, 34, 37 ], [ 40, 52, 55, 58 ] ]);
17812
17936
  })));
17813
17937
  return _EOA.apply(this, arguments);
17814
17938
  }
@@ -17920,8 +18044,8 @@ function _typeof(o) {
17920
18044
  throw new ValidationError("Invalid API response");
17921
18045
 
17922
18046
  case 28:
17923
- return _context26.abrupt("return", json.results.map((function(_ref15) {
17924
- var confirmations = _ref15.confirmations, dataDecoded = _ref15.dataDecoded, rest = _objectWithoutProperties(_ref15, _excluded);
18047
+ return _context26.abrupt("return", json.results.map((function(_ref16) {
18048
+ var confirmations = _ref16.confirmations, dataDecoded = _ref16.dataDecoded, rest = _objectWithoutProperties(_ref16, _excluded);
17925
18049
  return rest;
17926
18050
  })));
17927
18051
 
@@ -18069,8 +18193,8 @@ function _typeof(o) {
18069
18193
  }
18070
18194
  return _context28.abrupt("return", json.map((function(item) {
18071
18195
  var flat = {};
18072
- Object.entries(item).forEach((function(_ref16) {
18073
- var _ref17 = _slicedToArray(_ref16, 2), k = _ref17[0], v = _ref17[1];
18196
+ Object.entries(item).forEach((function(_ref17) {
18197
+ var _ref18 = _slicedToArray(_ref17, 2), k = _ref18[0], v = _ref18[1];
18074
18198
  if (v === null || _typeof(v) !== "object") flat[k] = v;
18075
18199
  }));
18076
18200
  return flat;
@@ -18136,8 +18260,8 @@ function _typeof(o) {
18136
18260
  }
18137
18261
  return _context29.abrupt("return", json.map((function(item) {
18138
18262
  var flat = {};
18139
- Object.entries(item).forEach((function(_ref18) {
18140
- var _ref19 = _slicedToArray(_ref18, 2), k = _ref19[0], v = _ref19[1];
18263
+ Object.entries(item).forEach((function(_ref19) {
18264
+ var _ref20 = _slicedToArray(_ref19, 2), k = _ref20[0], v = _ref20[1];
18141
18265
  if (v === null || _typeof(v) !== "object") flat[k] = v;
18142
18266
  }));
18143
18267
  return flat;