@pioneer-platform/osmosis-network 8.1.42 → 8.1.44

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/lib/index.js +22 -22
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -204,18 +204,18 @@ var get_APR = function () {
204
204
  return [4 /*yield*/, get_mint_params()];
205
205
  case 2:
206
206
  mintParams = _a.sent();
207
- log.info(tag, "mintParams:", mintParams);
207
+ log.debug(tag, "mintParams:", mintParams);
208
208
  distributionProportions = mintParams.params.distribution_proportions.staking;
209
- log.info(tag, "distributionProportions:", distributionProportions);
209
+ log.debug(tag, "distributionProportions:", distributionProportions);
210
210
  return [4 /*yield*/, get_epochs()];
211
211
  case 3:
212
212
  getEpochs = _a.sent();
213
- log.info(tag, "getEpochs:", getEpochs);
213
+ log.debug(tag, "getEpochs:", getEpochs);
214
214
  epochProvisionInfo = getEpochs.epochs.filter(function (e) { return e.identifier === 'day'; });
215
215
  epochProvisionInfo = epochProvisionInfo[0];
216
- log.info(tag, "epochProvisionInfo:", epochProvisionInfo);
216
+ log.debug(tag, "epochProvisionInfo:", epochProvisionInfo);
217
217
  durationSeconds = epochProvisionInfo.duration.replace("s", "");
218
- log.info(tag, "durationSeconds:", durationSeconds);
218
+ log.debug(tag, "durationSeconds:", durationSeconds);
219
219
  return [4 /*yield*/, get_epoch_provisions()
220
220
  //get bonded tokens
221
221
  ];
@@ -225,29 +225,29 @@ var get_APR = function () {
225
225
  case 5:
226
226
  poolInfo = _a.sent();
227
227
  bondedToken = poolInfo.pool.bonded_tokens;
228
- log.info(tag, "bondedToken:", bondedToken);
228
+ log.debug(tag, "bondedToken:", bondedToken);
229
229
  // mintingEpochProvision = epochProvision * distributionProportions
230
- log.info(tag, "epochProvision:", epochProvision);
231
- log.info(tag, "distributionProportions:", distributionProportions);
230
+ log.debug(tag, "epochProvision:", epochProvision);
231
+ log.debug(tag, "distributionProportions:", distributionProportions);
232
232
  mintingEpochProvision = epochProvision * distributionProportions;
233
- log.info(tag, "mintingEpochProvision:", mintingEpochProvision);
233
+ log.debug(tag, "mintingEpochProvision:", mintingEpochProvision);
234
234
  yearMintingProvision = mintingEpochProvision * ((365 * 24 * 3600) / durationSeconds);
235
- log.info(tag, "yearMintingProvision:", yearMintingProvision);
235
+ log.debug(tag, "yearMintingProvision:", yearMintingProvision);
236
236
  totalSupply = 1000000000;
237
237
  // //let totalSupply = await get_total_supply('uosmo')
238
- // log.info(tag,"totalSupply:",totalSupply)
238
+ // log.debug(tag,"totalSupply:",totalSupply)
239
239
  // totalSupply = totalSupply.result.amount
240
- // log.info(tag,"totalSupply:",totalSupply)
240
+ // log.debug(tag,"totalSupply:",totalSupply)
241
241
  if (!totalSupply)
242
242
  throw Error("unable to calc APR: missing totalSupply");
243
243
  if (!epochProvision)
244
244
  throw Error("unable to calc APR: missing epochProvision");
245
245
  ratio = bondedToken / totalSupply;
246
- log.info(tag, "ratio:", ratio);
246
+ log.debug(tag, "ratio:", ratio);
247
247
  inflation = yearMintingProvision / totalSupply;
248
- log.info(tag, "inflation:", inflation);
248
+ log.debug(tag, "inflation:", inflation);
249
249
  apr = inflation / ratio;
250
- log.info(tag, "apr:", apr);
250
+ log.debug(tag, "apr:", apr);
251
251
  apr = apr * 100;
252
252
  return [2 /*return*/, apr];
253
253
  case 6:
@@ -338,7 +338,7 @@ var get_total_supply = function (denom) {
338
338
  _a.label = 1;
339
339
  case 1:
340
340
  _a.trys.push([1, 3, , 4]);
341
- log.info(tag, "url: ", URL_OSMO_LCD + '/bank/total/' + denom);
341
+ log.debug(tag, "url: ", URL_OSMO_LCD + '/bank/total/' + denom);
342
342
  return [4 /*yield*/, axios({ method: 'GET', url: URL_OSMO_LCD + '/bank/total/' + denom })];
343
343
  case 2:
344
344
  txInfo = _a.sent();
@@ -408,11 +408,11 @@ var get_voucher_info = function (voucher) {
408
408
  case 1:
409
409
  _a.trys.push([1, 3, , 4]);
410
410
  url = URL_OSMO_LCD + '/ibc/applications/transfer/v1beta1/denom_traces/' + voucher;
411
- log.info(tag, "url: ", url);
411
+ log.debug(tag, "url: ", url);
412
412
  return [4 /*yield*/, axios({ method: 'GET', url: url })];
413
413
  case 2:
414
414
  txInfo = _a.sent();
415
- log.info(tag, "txInfo: ", txInfo.data);
415
+ log.debug(tag, "txInfo: ", txInfo.data);
416
416
  return [2 /*return*/, txInfo.data];
417
417
  case 3:
418
418
  e_8 = _a.sent();
@@ -754,7 +754,7 @@ var broadcast_transaction = function (tx) {
754
754
  })];
755
755
  case 3:
756
756
  result2 = _a.sent();
757
- log.info(tag, '** Broadcast ** REMOTE: result: ', result2.data);
757
+ log.debug(tag, '** Broadcast ** REMOTE: result: ', result2.data);
758
758
  if (result2.data.tx_response.txhash) {
759
759
  output.txid = result2.data.tx_response.txhash;
760
760
  output.success = true;
@@ -999,7 +999,7 @@ var get_balances = function (address) {
999
999
  return [4 /*yield*/, axios({ method: 'GET', url: URL_OSMO_LCD + '/bank/balances/' + address })];
1000
1000
  case 3:
1001
1001
  accountInfo = _b.sent();
1002
- log.info(tag, "accountInfo: ", accountInfo.data);
1002
+ log.debug(tag, "accountInfo: ", accountInfo.data);
1003
1003
  if (!((_a = accountInfo.data) === null || _a === void 0 ? void 0 : _a.result)) return [3 /*break*/, 9];
1004
1004
  i = 0;
1005
1005
  _b.label = 4;
@@ -1017,11 +1017,11 @@ var get_balances = function (address) {
1017
1017
  }
1018
1018
  if (!(entry.denom.indexOf('ibc/') >= 0)) return [3 /*break*/, 6];
1019
1019
  voucher = entry.denom.replace('ibc/', '');
1020
- log.info(tag, "voucher: ", voucher);
1020
+ log.debug(tag, "voucher: ", voucher);
1021
1021
  return [4 /*yield*/, get_voucher_info(voucher)];
1022
1022
  case 5:
1023
1023
  voucherInfo = _b.sent();
1024
- log.info(tag, "voucherInfo: ", voucherInfo);
1024
+ log.debug(tag, "voucherInfo: ", voucherInfo);
1025
1025
  if (voucherInfo.denom_trace.base_denom === 'uatom') {
1026
1026
  balance = {
1027
1027
  type: 'ibcChannel',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/osmosis-network",
3
- "version": "8.1.42",
3
+ "version": "8.1.44",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {
@@ -28,5 +28,5 @@
28
28
  "ts-node": "^8.10.2",
29
29
  "typescript": "^5.0.2"
30
30
  },
31
- "gitHead": "e1212fa842d8371740282be3f0cce4d32aff3201"
31
+ "gitHead": "ad33a5fc83136a234a7320f9a7b77869a305e6a4"
32
32
  }