@super-protocol/sdk-js 0.12.1-beta.1 → 0.12.1-beta.2

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.
@@ -25,6 +25,12 @@ var __assign = (this && this.__assign) || function () {
25
25
  };
26
26
  return __assign.apply(this, arguments);
27
27
  };
28
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
29
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
32
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33
+ };
28
34
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
35
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
36
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -408,6 +414,18 @@ var BlockchainConnector = /** @class */ (function (_super) {
408
414
  _super.prototype.shutdown.call(this);
409
415
  store_1.default.web3Https = undefined;
410
416
  };
417
+ __decorate([
418
+ (0, utils_1.incrementMethodCall)()
419
+ ], BlockchainConnector.prototype, "getBalance", null);
420
+ __decorate([
421
+ (0, utils_1.incrementMethodCall)()
422
+ ], BlockchainConnector.prototype, "getTransactionEvents", null);
423
+ __decorate([
424
+ (0, utils_1.incrementMethodCall)()
425
+ ], BlockchainConnector.prototype, "transfer", null);
426
+ __decorate([
427
+ (0, utils_1.incrementMethodCall)()
428
+ ], BlockchainConnector.prototype, "getTransactions", null);
411
429
  return BlockchainConnector;
412
430
  }(BaseConnector_1.BaseConnector));
413
431
  exports.default = BlockchainConnector;
@@ -24,13 +24,18 @@ var Monitoring = /** @class */ (function () {
24
24
  return;
25
25
  var startTs = Date.now();
26
26
  setInterval(function () {
27
- _this.logger.debug({ stopwatch: Date.now() - startTs }, "Contract methods calls");
28
27
  _this.contractMethodCalls.forEach(function (value, key) {
29
28
  return _this.logger.debug({
30
29
  methodName: key,
31
30
  calledTimes: value,
32
31
  });
33
32
  });
33
+ var totalCalls = Array.from(_this.contractMethodCalls.values()).reduce(function (acc, curr) { return acc + curr; }, 0);
34
+ var timeSpend = Math.floor((Date.now() - startTs) / (60 * 1000));
35
+ _this.logger.debug({
36
+ timeSpend: timeSpend + " min",
37
+ totalCalls: totalCalls,
38
+ }, "Contract methods calls");
34
39
  }, +checkInterval);
35
40
  };
36
41
  Monitoring.prototype.incrementCall = function (methodName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-protocol/sdk-js",
3
- "version": "0.12.1-beta.1",
3
+ "version": "0.12.1-beta.2",
4
4
  "main": "build/index.js",
5
5
  "license": "MIT",
6
6
  "files": [