@aurigami/sdk 1.11.0-beta5 → 1.11.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.
package/dist/sdk.esm.js CHANGED
@@ -110,7 +110,7 @@ var networkAddresses = {
110
110
  PLY_TOKEN_LOCK: /*#__PURE__*/MAINNET_ADDRESSES.plyTokenLock.toLowerCase(),
111
111
  REFERRAL: /*#__PURE__*/MAINNET_ADDRESSES.referralDirectory.toLowerCase(),
112
112
  AURI_INTERNAL_LENS: /*#__PURE__*/MAINNET_ADDRESSES.auriInternalLens.toLowerCase(),
113
- PLYGAME: /*#__PURE__*/'0x60bf668CA101060BD83BD644531a38719586B89f'.toLowerCase()
113
+ PLYGAME: /*#__PURE__*/MAINNET_ADDRESSES.plyGame.toLowerCase()
114
114
  },
115
115
  tokens: {
116
116
  AURORA: /*#__PURE__*/'0x8bec47865ade3b172a928df8f990bc7f2a3b9f79'.toLowerCase(),
@@ -1207,6 +1207,30 @@ var isSameAddress = function isSameAddress(address1, address2) {
1207
1207
  var getCurrentTimestamp = function getCurrentTimestamp() {
1208
1208
  return Math.trunc(Date.now() / 1000);
1209
1209
  };
1210
+ function sleep(_x) {
1211
+ return _sleep.apply(this, arguments);
1212
+ }
1213
+
1214
+ function _sleep() {
1215
+ _sleep = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(duration) {
1216
+ return runtime_1.wrap(function _callee$(_context) {
1217
+ while (1) {
1218
+ switch (_context.prev = _context.next) {
1219
+ case 0:
1220
+ return _context.abrupt("return", new Promise(function (resolve) {
1221
+ setTimeout(resolve, duration);
1222
+ }));
1223
+
1224
+ case 1:
1225
+ case "end":
1226
+ return _context.stop();
1227
+ }
1228
+ }
1229
+ }, _callee);
1230
+ }));
1231
+ return _sleep.apply(this, arguments);
1232
+ }
1233
+
1210
1234
  function validateAndParseAddress(address) {
1211
1235
  try {
1212
1236
  return utils.getAddress(address);
@@ -1248,35 +1272,35 @@ function calcLMRewardApr(rewardsValue, totalStakeValue, frequencyPerYear) {
1248
1272
 
1249
1273
  return rewardsValue.multipliedBy(frequencyPerYear).dividedBy(totalStakeValue);
1250
1274
  }
1251
- function getBlockTimestamp(_x, _x2) {
1275
+ function getBlockTimestamp(_x2, _x3) {
1252
1276
  return _getBlockTimestamp.apply(this, arguments);
1253
1277
  }
1254
1278
 
1255
1279
  function _getBlockTimestamp() {
1256
- _getBlockTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(provider, blockNumber) {
1280
+ _getBlockTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(provider, blockNumber) {
1257
1281
  var block;
1258
- return runtime_1.wrap(function _callee$(_context) {
1282
+ return runtime_1.wrap(function _callee2$(_context2) {
1259
1283
  while (1) {
1260
- switch (_context.prev = _context.next) {
1284
+ switch (_context2.prev = _context2.next) {
1261
1285
  case 0:
1262
- _context.next = 2;
1286
+ _context2.next = 2;
1263
1287
  return provider.getBlock(blockNumber);
1264
1288
 
1265
1289
  case 2:
1266
- block = _context.sent;
1267
- return _context.abrupt("return", block.timestamp);
1290
+ block = _context2.sent;
1291
+ return _context2.abrupt("return", block.timestamp);
1268
1292
 
1269
1293
  case 4:
1270
1294
  case "end":
1271
- return _context.stop();
1295
+ return _context2.stop();
1272
1296
  }
1273
1297
  }
1274
- }, _callee);
1298
+ }, _callee2);
1275
1299
  }));
1276
1300
  return _getBlockTimestamp.apply(this, arguments);
1277
1301
  }
1278
1302
 
1279
- function getBlocksTimestampViaRPC(_x3, _x4) {
1303
+ function getBlocksTimestampViaRPC(_x4, _x5) {
1280
1304
  return _getBlocksTimestampViaRPC.apply(this, arguments);
1281
1305
  }
1282
1306
  /**
@@ -1286,11 +1310,11 @@ function getBlocksTimestampViaRPC(_x3, _x4) {
1286
1310
  */
1287
1311
 
1288
1312
  function _getBlocksTimestampViaRPC() {
1289
- _getBlocksTimestampViaRPC = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(provider, blocksNumber) {
1313
+ _getBlocksTimestampViaRPC = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(provider, blocksNumber) {
1290
1314
  var CHUNK_SIZE, results, i, slice, promises;
1291
- return runtime_1.wrap(function _callee3$(_context3) {
1315
+ return runtime_1.wrap(function _callee4$(_context4) {
1292
1316
  while (1) {
1293
- switch (_context3.prev = _context3.next) {
1317
+ switch (_context4.prev = _context4.next) {
1294
1318
  case 0:
1295
1319
  // Promise all 200 blocks at a time, using too many blocks at once will cause the RPC call timeout.
1296
1320
  CHUNK_SIZE = 200;
@@ -1299,58 +1323,58 @@ function _getBlocksTimestampViaRPC() {
1299
1323
 
1300
1324
  case 3:
1301
1325
  if (!(i < blocksNumber.length)) {
1302
- _context3.next = 14;
1326
+ _context4.next = 14;
1303
1327
  break;
1304
1328
  }
1305
1329
 
1306
1330
  slice = blocksNumber.slice(i, i + CHUNK_SIZE);
1307
1331
  promises = slice.map( /*#__PURE__*/function () {
1308
- var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(blockNumber) {
1309
- return runtime_1.wrap(function _callee2$(_context2) {
1332
+ var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(blockNumber) {
1333
+ return runtime_1.wrap(function _callee3$(_context3) {
1310
1334
  while (1) {
1311
- switch (_context2.prev = _context2.next) {
1335
+ switch (_context3.prev = _context3.next) {
1312
1336
  case 0:
1313
- return _context2.abrupt("return", getBlockTimestamp(provider, blockNumber));
1337
+ return _context3.abrupt("return", getBlockTimestamp(provider, blockNumber));
1314
1338
 
1315
1339
  case 1:
1316
1340
  case "end":
1317
- return _context2.stop();
1341
+ return _context3.stop();
1318
1342
  }
1319
1343
  }
1320
- }, _callee2);
1344
+ }, _callee3);
1321
1345
  }));
1322
1346
 
1323
- return function (_x9) {
1347
+ return function (_x10) {
1324
1348
  return _ref.apply(this, arguments);
1325
1349
  };
1326
1350
  }());
1327
- _context3.t0 = results;
1328
- _context3.next = 9;
1351
+ _context4.t0 = results;
1352
+ _context4.next = 9;
1329
1353
  return Promise.all(promises);
1330
1354
 
1331
1355
  case 9:
1332
- _context3.t1 = _context3.sent;
1333
- results = _context3.t0.concat.call(_context3.t0, _context3.t1);
1356
+ _context4.t1 = _context4.sent;
1357
+ results = _context4.t0.concat.call(_context4.t0, _context4.t1);
1334
1358
 
1335
1359
  case 11:
1336
1360
  i += CHUNK_SIZE;
1337
- _context3.next = 3;
1361
+ _context4.next = 3;
1338
1362
  break;
1339
1363
 
1340
1364
  case 14:
1341
- return _context3.abrupt("return", results);
1365
+ return _context4.abrupt("return", results);
1342
1366
 
1343
1367
  case 15:
1344
1368
  case "end":
1345
- return _context3.stop();
1369
+ return _context4.stop();
1346
1370
  }
1347
1371
  }
1348
- }, _callee3);
1372
+ }, _callee4);
1349
1373
  }));
1350
1374
  return _getBlocksTimestampViaRPC.apply(this, arguments);
1351
1375
  }
1352
1376
 
1353
- function getBlocksTimestamp(_x5, _x6) {
1377
+ function getBlocksTimestamp(_x6, _x7) {
1354
1378
  return _getBlocksTimestamp.apply(this, arguments);
1355
1379
  }
1356
1380
  /**
@@ -1363,18 +1387,18 @@ function getBlocksTimestamp(_x5, _x6) {
1363
1387
  */
1364
1388
 
1365
1389
  function _getBlocksTimestamp() {
1366
- _getBlocksTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(provider, blockNumbers) {
1390
+ _getBlocksTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(provider, blockNumbers) {
1367
1391
  var CHUNK_SIZE, promises, lines, i, query, results, missingBlocks, missingBlocksTimestamps;
1368
- return runtime_1.wrap(function _callee4$(_context4) {
1392
+ return runtime_1.wrap(function _callee5$(_context5) {
1369
1393
  while (1) {
1370
- switch (_context4.prev = _context4.next) {
1394
+ switch (_context5.prev = _context5.next) {
1371
1395
  case 0:
1372
1396
  if (!(blockNumbers.length == 0)) {
1373
- _context4.next = 2;
1397
+ _context5.next = 2;
1374
1398
  break;
1375
1399
  }
1376
1400
 
1377
- return _context4.abrupt("return", []);
1401
+ return _context5.abrupt("return", []);
1378
1402
 
1379
1403
  case 2:
1380
1404
  CHUNK_SIZE = 100; // graphql query limit
@@ -1390,11 +1414,11 @@ function _getBlocksTimestamp() {
1390
1414
  } // merge all the json objects
1391
1415
 
1392
1416
 
1393
- _context4.next = 8;
1417
+ _context5.next = 8;
1394
1418
  return Promise.all(promises);
1395
1419
 
1396
1420
  case 8:
1397
- results = _context4.sent.reduce(function (acc, cur) {
1421
+ results = _context5.sent.reduce(function (acc, cur) {
1398
1422
  return _extends({}, acc, cur);
1399
1423
  });
1400
1424
  missingBlocks = blockNumbers.filter(function (blockNumber) {
@@ -1405,71 +1429,71 @@ function _getBlocksTimestamp() {
1405
1429
  devLog("These blocks are missing from Aurora GraphQL endpoint: " + missingBlocks.join(', '));
1406
1430
  }
1407
1431
 
1408
- _context4.next = 13;
1432
+ _context5.next = 13;
1409
1433
  return getBlocksTimestampViaRPC(provider, missingBlocks);
1410
1434
 
1411
1435
  case 13:
1412
- missingBlocksTimestamps = _context4.sent;
1436
+ missingBlocksTimestamps = _context5.sent;
1413
1437
  missingBlocksTimestamps.forEach(function (timestamp, index) {
1414
1438
  results["b" + missingBlocks[index]] = {
1415
1439
  timestamp: new Date(timestamp * 1000).toISOString()
1416
1440
  };
1417
1441
  });
1418
- return _context4.abrupt("return", blockNumbers.map(function (blockNumber) {
1442
+ return _context5.abrupt("return", blockNumbers.map(function (blockNumber) {
1419
1443
  return Math.trunc(new Date(results["b" + blockNumber].timestamp).getTime() / 1000);
1420
1444
  }));
1421
1445
 
1422
1446
  case 16:
1423
1447
  case "end":
1424
- return _context4.stop();
1448
+ return _context5.stop();
1425
1449
  }
1426
1450
  }
1427
- }, _callee4);
1451
+ }, _callee5);
1428
1452
  }));
1429
1453
  return _getBlocksTimestamp.apply(this, arguments);
1430
1454
  }
1431
1455
 
1432
- function getBlockBeforeTimestamp(_x7, _x8) {
1456
+ function getBlockBeforeTimestamp(_x8, _x9) {
1433
1457
  return _getBlockBeforeTimestamp.apply(this, arguments);
1434
1458
  }
1435
1459
 
1436
1460
  function _getBlockBeforeTimestamp() {
1437
- _getBlockBeforeTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(provider, timestamp) {
1461
+ _getBlockBeforeTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(provider, timestamp) {
1438
1462
  var result;
1439
- return runtime_1.wrap(function _callee5$(_context5) {
1463
+ return runtime_1.wrap(function _callee6$(_context6) {
1440
1464
  while (1) {
1441
- switch (_context5.prev = _context5.next) {
1465
+ switch (_context6.prev = _context6.next) {
1442
1466
  case 0:
1443
- _context5.next = 2;
1467
+ _context6.next = 2;
1444
1468
  return getQuery('block', 'getblocknobytime', {
1445
1469
  timestamp: timestamp,
1446
1470
  closest: 'before'
1447
1471
  });
1448
1472
 
1449
1473
  case 2:
1450
- result = _context5.sent;
1451
- _context5.t0 = parseInt(result);
1474
+ result = _context6.sent;
1475
+ _context6.t0 = parseInt(result);
1452
1476
 
1453
- if (_context5.t0) {
1454
- _context5.next = 8;
1477
+ if (_context6.t0) {
1478
+ _context6.next = 8;
1455
1479
  break;
1456
1480
  }
1457
1481
 
1458
- _context5.next = 7;
1482
+ _context6.next = 7;
1459
1483
  return provider.getBlockNumber();
1460
1484
 
1461
1485
  case 7:
1462
- _context5.t0 = _context5.sent;
1486
+ _context6.t0 = _context6.sent;
1463
1487
 
1464
1488
  case 8:
1465
- return _context5.abrupt("return", _context5.t0);
1489
+ return _context6.abrupt("return", _context6.t0);
1466
1490
 
1467
1491
  case 9:
1468
1492
  case "end":
1469
- return _context5.stop();
1493
+ return _context6.stop();
1470
1494
  }
1471
1495
  }
1472
- }, _callee5);
1496
+ }, _callee6);
1473
1497
  }));
1474
1498
  return _getBlockBeforeTimestamp.apply(this, arguments);
1475
1499
  }
@@ -2597,6 +2621,7 @@ var helpers = {
2597
2621
  decimalFactor: decimalFactor,
2598
2622
  isSameAddress: isSameAddress,
2599
2623
  getCurrentTimestamp: getCurrentTimestamp,
2624
+ sleep: sleep,
2600
2625
  validateAndParseAddress: validateAndParseAddress,
2601
2626
  getDecimal: getDecimal,
2602
2627
  getSymbol: getSymbol,
@@ -4805,72 +4830,81 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4805
4830
  return currentJackpotAmount;
4806
4831
  }();
4807
4832
 
4808
- _proto.nextJackpotRevealTime = /*#__PURE__*/function () {
4809
- var _nextJackpotRevealTime = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
4833
+ _proto.earlyUnlockedPulpAmount = /*#__PURE__*/function () {
4834
+ var _earlyUnlockedPulpAmount = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(user) {
4835
+ var earlyUnlockedPulpAmount;
4810
4836
  return runtime_1.wrap(function _callee4$(_context4) {
4811
4837
  while (1) {
4812
4838
  switch (_context4.prev = _context4.next) {
4813
4839
  case 0:
4814
- return _context4.abrupt("return", 0);
4840
+ _context4.next = 2;
4841
+ return this.env.plygame.totalPlyUnlockedEarly(user);
4815
4842
 
4816
- case 1:
4843
+ case 2:
4844
+ earlyUnlockedPulpAmount = _context4.sent;
4845
+ return _context4.abrupt("return", new TokenAmount(this.pulpToken, earlyUnlockedPulpAmount.toString()));
4846
+
4847
+ case 4:
4817
4848
  case "end":
4818
4849
  return _context4.stop();
4819
4850
  }
4820
4851
  }
4821
- }, _callee4);
4852
+ }, _callee4, this);
4822
4853
  }));
4823
4854
 
4824
- function nextJackpotRevealTime() {
4825
- return _nextJackpotRevealTime.apply(this, arguments);
4855
+ function earlyUnlockedPulpAmount(_x3) {
4856
+ return _earlyUnlockedPulpAmount.apply(this, arguments);
4826
4857
  }
4827
4858
 
4828
- return nextJackpotRevealTime;
4859
+ return earlyUnlockedPulpAmount;
4829
4860
  }();
4830
4861
 
4831
- _proto.earlyUnlockedPulpAmount = /*#__PURE__*/function () {
4832
- var _earlyUnlockedPulpAmount = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(user) {
4833
- var earlyUnlockedPulpAmount;
4862
+ _proto.getPlyGameResultsInTransaction = /*#__PURE__*/function () {
4863
+ var _getPlyGameResultsInTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(txHash) {
4864
+ var _this3 = this;
4865
+
4866
+ var tx, i, filter, betMadeEvents;
4834
4867
  return runtime_1.wrap(function _callee5$(_context5) {
4835
4868
  while (1) {
4836
4869
  switch (_context5.prev = _context5.next) {
4837
4870
  case 0:
4838
4871
  _context5.next = 2;
4839
- return this.env.plygame.totalPlyUnlockedEarly(user);
4872
+ return this._networkConnection.provider.getTransactionReceipt(txHash);
4840
4873
 
4841
4874
  case 2:
4842
- earlyUnlockedPulpAmount = _context5.sent;
4843
- return _context5.abrupt("return", new TokenAmount(this.pulpToken, earlyUnlockedPulpAmount.toString()));
4875
+ tx = _context5.sent;
4876
+ i = 0;
4844
4877
 
4845
4878
  case 4:
4846
- case "end":
4847
- return _context5.stop();
4848
- }
4849
- }
4850
- }, _callee5, this);
4851
- }));
4879
+ if (!(i < 100 && !tx)) {
4880
+ _context5.next = 13;
4881
+ break;
4882
+ }
4852
4883
 
4853
- function earlyUnlockedPulpAmount(_x3) {
4854
- return _earlyUnlockedPulpAmount.apply(this, arguments);
4855
- }
4884
+ _context5.next = 7;
4885
+ return sleep(1000);
4856
4886
 
4857
- return earlyUnlockedPulpAmount;
4858
- }();
4887
+ case 7:
4888
+ _context5.next = 9;
4889
+ return this._networkConnection.provider.getTransactionReceipt(txHash);
4859
4890
 
4860
- _proto.getPlyGameResultsInTransaction = /*#__PURE__*/function () {
4861
- var _getPlyGameResultsInTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(txHash) {
4862
- var _this3 = this;
4891
+ case 9:
4892
+ tx = _context5.sent;
4863
4893
 
4864
- var tx, filter, betMadeEvents;
4865
- return runtime_1.wrap(function _callee6$(_context6) {
4866
- while (1) {
4867
- switch (_context6.prev = _context6.next) {
4868
- case 0:
4869
- _context6.next = 2;
4870
- return this._networkConnection.provider.waitForTransaction(txHash, 1);
4894
+ case 10:
4895
+ i++;
4896
+ _context5.next = 4;
4897
+ break;
4871
4898
 
4872
- case 2:
4873
- tx = _context6.sent;
4899
+ case 13:
4900
+ if (tx) {
4901
+ _context5.next = 15;
4902
+ break;
4903
+ }
4904
+
4905
+ throw new Error("Transaction " + txHash + " takes too long to be mined");
4906
+
4907
+ case 15:
4874
4908
  filter = this.env.plygame.filters.BetMade();
4875
4909
  betMadeEvents = tx.logs.filter(function (log) {
4876
4910
  return isSameAddress(log.topics[0], filter.topics[0]);
@@ -4880,16 +4914,16 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4880
4914
  transactionHash: txHash
4881
4915
  });
4882
4916
  });
4883
- return _context6.abrupt("return", this.attachTimestamp(betMadeEvents.map(function (e) {
4917
+ return _context5.abrupt("return", this.attachTimestamp(betMadeEvents.map(function (e) {
4884
4918
  return _this3.parseBetMakeEvent(e);
4885
4919
  })));
4886
4920
 
4887
- case 6:
4921
+ case 18:
4888
4922
  case "end":
4889
- return _context6.stop();
4923
+ return _context5.stop();
4890
4924
  }
4891
4925
  }
4892
- }, _callee6, this);
4926
+ }, _callee5, this);
4893
4927
  }));
4894
4928
 
4895
4929
  function getPlyGameResultsInTransaction(_x4) {
@@ -4906,20 +4940,20 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4906
4940
  _proto.leaderboard =
4907
4941
  /*#__PURE__*/
4908
4942
  function () {
4909
- var _leaderboard = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7() {
4943
+ var _leaderboard = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
4910
4944
  var _this4 = this;
4911
4945
 
4912
4946
  var result;
4913
- return runtime_1.wrap(function _callee7$(_context7) {
4947
+ return runtime_1.wrap(function _callee6$(_context6) {
4914
4948
  while (1) {
4915
- switch (_context7.prev = _context7.next) {
4949
+ switch (_context6.prev = _context6.next) {
4916
4950
  case 0:
4917
- _context7.next = 2;
4951
+ _context6.next = 2;
4918
4952
  return getPaginatedApi('/plygame/leaderboard');
4919
4953
 
4920
4954
  case 2:
4921
- result = _context7.sent;
4922
- return _context7.abrupt("return", result.items.map(function (item, i) {
4955
+ result = _context6.sent;
4956
+ return _context6.abrupt("return", result.items.map(function (item, i) {
4923
4957
  return {
4924
4958
  player: item.user,
4925
4959
  unlockedPulpAmount: new TokenAmount(_this4.pulpToken, item.unlockedAmount),
@@ -4929,10 +4963,10 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4929
4963
 
4930
4964
  case 4:
4931
4965
  case "end":
4932
- return _context7.stop();
4966
+ return _context6.stop();
4933
4967
  }
4934
4968
  }
4935
- }, _callee7);
4969
+ }, _callee6);
4936
4970
  }));
4937
4971
 
4938
4972
  function leaderboard() {
@@ -4953,57 +4987,28 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
4953
4987
 
4954
4988
  var _proto2 = PlyGameReadWrite.prototype;
4955
4989
 
4956
- /**
4957
- * makes "times" independent bets, but consecutively, of the same amount
4958
- */
4959
- _proto2.makeBetMultiple =
4960
- /*#__PURE__*/
4961
- function () {
4962
- var _makeBetMultiple = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount, times) {
4963
- return runtime_1.wrap(function _callee8$(_context8) {
4964
- while (1) {
4965
- switch (_context8.prev = _context8.next) {
4966
- case 0:
4967
- return _context8.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetMultiple(amount.rawAmount(), times));
4968
-
4969
- case 1:
4970
- case "end":
4971
- return _context8.stop();
4972
- }
4973
- }
4974
- }, _callee8, this);
4975
- }));
4976
-
4977
- function makeBetMultiple(_x5, _x6) {
4978
- return _makeBetMultiple.apply(this, arguments);
4979
- }
4980
-
4981
- return makeBetMultiple;
4982
- }()
4983
4990
  /**
4984
4991
  * Make a single bet
4985
4992
  */
4986
- ;
4987
-
4988
4993
  _proto2.makeBetOnce =
4989
4994
  /*#__PURE__*/
4990
4995
  function () {
4991
- var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(amount) {
4992
- return runtime_1.wrap(function _callee9$(_context9) {
4996
+ var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(amount) {
4997
+ return runtime_1.wrap(function _callee7$(_context7) {
4993
4998
  while (1) {
4994
- switch (_context9.prev = _context9.next) {
4999
+ switch (_context7.prev = _context7.next) {
4995
5000
  case 0:
4996
- return _context9.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
5001
+ return _context7.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
4997
5002
 
4998
5003
  case 1:
4999
5004
  case "end":
5000
- return _context9.stop();
5005
+ return _context7.stop();
5001
5006
  }
5002
5007
  }
5003
- }, _callee9, this);
5008
+ }, _callee7, this);
5004
5009
  }));
5005
5010
 
5006
- function makeBetOnce(_x7) {
5011
+ function makeBetOnce(_x5) {
5007
5012
  return _makeBetOnce.apply(this, arguments);
5008
5013
  }
5009
5014
 
@@ -5011,22 +5016,22 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5011
5016
  }();
5012
5017
 
5013
5018
  _proto2.approve = /*#__PURE__*/function () {
5014
- var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(amount) {
5015
- return runtime_1.wrap(function _callee10$(_context10) {
5019
+ var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
5020
+ return runtime_1.wrap(function _callee8$(_context8) {
5016
5021
  while (1) {
5017
- switch (_context10.prev = _context10.next) {
5022
+ switch (_context8.prev = _context8.next) {
5018
5023
  case 0:
5019
- return _context10.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5024
+ return _context8.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5020
5025
 
5021
5026
  case 1:
5022
5027
  case "end":
5023
- return _context10.stop();
5028
+ return _context8.stop();
5024
5029
  }
5025
5030
  }
5026
- }, _callee10, this);
5031
+ }, _callee8, this);
5027
5032
  }));
5028
5033
 
5029
- function approve(_x8) {
5034
+ function approve(_x6) {
5030
5035
  return _approve.apply(this, arguments);
5031
5036
  }
5032
5037
 
@@ -5862,5 +5867,5 @@ BigNumber.config({
5862
5867
  DECIMAL_PLACES: 50
5863
5868
  });
5864
5869
 
5865
- export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, ALL_STAKING_POOLS, AURORA_CHAINID, Airdrop, AirdropRead, AirdropReadWrite, AuriEnv, BORROW_LIMIT_BUFFER, BORROW_NEAR_REWARDS_PER_WEEK, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, DEPOSIT_NEAR_REWARDS_PER_WEEK, DEPOSIT_ONLY_TOKENS, ETHAddress, HARDCODE_PRICE_TOKENS, INF, MarketAction, MiscRead, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_WEEK, ONE_YEAR, PLYToken, PLYWNEARToken, PLYWNEAR_POOL_ID, PLYWNEAR_REWARD_TOKENS, PRICE_WHITELISTED, Papermill, PapermillRead, PapermillReadWrite, PlyGame, PlyGameRead, PlyGameReadWrite, REFERRAL_CAMPAIGNS, REWARD_CLAIM_START, Referral, ReferralRead, ReferralReadWrite, SDK, SdkRead, SdkReadWrite, Staking, StakingRead, StakingReadWrite, Token, TokenAmount, TransferEventQuery, index as abis, assert, calcLMRewardApr, calcValuation, decimalFactor, decimalRecords, devLog, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPLYPrice, fetchPULPPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchToken0PriceByLP, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getApi, getBlockBeforeTimestamp, getBlockTimestamp, getBlocksTimestamp, getBlocksTimestampViaRPC, getCurrentTimestamp, getDecimal, getPaginatedApi, getQuery, getSymbol, getUnderlying, isSameAddress, networkAddresses, queryGraphQL, referralRewardDummy1, referralRewardDummy2, sortEvents, symbolRecords, validateAndParseAddress, valuateToken };
5870
+ export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, ALL_STAKING_POOLS, AURORA_CHAINID, Airdrop, AirdropRead, AirdropReadWrite, AuriEnv, BORROW_LIMIT_BUFFER, BORROW_NEAR_REWARDS_PER_WEEK, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, DEPOSIT_NEAR_REWARDS_PER_WEEK, DEPOSIT_ONLY_TOKENS, ETHAddress, HARDCODE_PRICE_TOKENS, INF, MarketAction, MiscRead, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_WEEK, ONE_YEAR, PLYToken, PLYWNEARToken, PLYWNEAR_POOL_ID, PLYWNEAR_REWARD_TOKENS, PRICE_WHITELISTED, Papermill, PapermillRead, PapermillReadWrite, PlyGame, PlyGameRead, PlyGameReadWrite, REFERRAL_CAMPAIGNS, REWARD_CLAIM_START, Referral, ReferralRead, ReferralReadWrite, SDK, SdkRead, SdkReadWrite, Staking, StakingRead, StakingReadWrite, Token, TokenAmount, TransferEventQuery, index as abis, assert, calcLMRewardApr, calcValuation, decimalFactor, decimalRecords, devLog, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPLYPrice, fetchPULPPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchToken0PriceByLP, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getApi, getBlockBeforeTimestamp, getBlockTimestamp, getBlocksTimestamp, getBlocksTimestampViaRPC, getCurrentTimestamp, getDecimal, getPaginatedApi, getQuery, getSymbol, getUnderlying, isSameAddress, networkAddresses, queryGraphQL, referralRewardDummy1, referralRewardDummy2, sleep, sortEvents, symbolRecords, validateAndParseAddress, valuateToken };
5866
5871
  //# sourceMappingURL=sdk.esm.js.map