@aurigami/sdk 1.11.0-beta4 → 1.11.0

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(),
@@ -4805,49 +4805,26 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4805
4805
  return currentJackpotAmount;
4806
4806
  }();
4807
4807
 
4808
- _proto.nextJackpotRevealTime = /*#__PURE__*/function () {
4809
- var _nextJackpotRevealTime = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4() {
4810
- return runtime_1.wrap(function _callee4$(_context4) {
4811
- while (1) {
4812
- switch (_context4.prev = _context4.next) {
4813
- case 0:
4814
- return _context4.abrupt("return", 0);
4815
-
4816
- case 1:
4817
- case "end":
4818
- return _context4.stop();
4819
- }
4820
- }
4821
- }, _callee4);
4822
- }));
4823
-
4824
- function nextJackpotRevealTime() {
4825
- return _nextJackpotRevealTime.apply(this, arguments);
4826
- }
4827
-
4828
- return nextJackpotRevealTime;
4829
- }();
4830
-
4831
4808
  _proto.earlyUnlockedPulpAmount = /*#__PURE__*/function () {
4832
- var _earlyUnlockedPulpAmount = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(user) {
4809
+ var _earlyUnlockedPulpAmount = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(user) {
4833
4810
  var earlyUnlockedPulpAmount;
4834
- return runtime_1.wrap(function _callee5$(_context5) {
4811
+ return runtime_1.wrap(function _callee4$(_context4) {
4835
4812
  while (1) {
4836
- switch (_context5.prev = _context5.next) {
4813
+ switch (_context4.prev = _context4.next) {
4837
4814
  case 0:
4838
- _context5.next = 2;
4815
+ _context4.next = 2;
4839
4816
  return this.env.plygame.totalPlyUnlockedEarly(user);
4840
4817
 
4841
4818
  case 2:
4842
- earlyUnlockedPulpAmount = _context5.sent;
4843
- return _context5.abrupt("return", new TokenAmount(this.pulpToken, earlyUnlockedPulpAmount.toString()));
4819
+ earlyUnlockedPulpAmount = _context4.sent;
4820
+ return _context4.abrupt("return", new TokenAmount(this.pulpToken, earlyUnlockedPulpAmount.toString()));
4844
4821
 
4845
4822
  case 4:
4846
4823
  case "end":
4847
- return _context5.stop();
4824
+ return _context4.stop();
4848
4825
  }
4849
4826
  }
4850
- }, _callee5, this);
4827
+ }, _callee4, this);
4851
4828
  }));
4852
4829
 
4853
4830
  function earlyUnlockedPulpAmount(_x3) {
@@ -4858,19 +4835,19 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4858
4835
  }();
4859
4836
 
4860
4837
  _proto.getPlyGameResultsInTransaction = /*#__PURE__*/function () {
4861
- var _getPlyGameResultsInTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(txHash) {
4838
+ var _getPlyGameResultsInTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(txHash) {
4862
4839
  var _this3 = this;
4863
4840
 
4864
4841
  var tx, filter, betMadeEvents;
4865
- return runtime_1.wrap(function _callee6$(_context6) {
4842
+ return runtime_1.wrap(function _callee5$(_context5) {
4866
4843
  while (1) {
4867
- switch (_context6.prev = _context6.next) {
4844
+ switch (_context5.prev = _context5.next) {
4868
4845
  case 0:
4869
- _context6.next = 2;
4870
- return this._networkConnection.provider.getTransactionReceipt(txHash);
4846
+ _context5.next = 2;
4847
+ return this._networkConnection.provider.waitForTransaction(txHash, 1);
4871
4848
 
4872
4849
  case 2:
4873
- tx = _context6.sent;
4850
+ tx = _context5.sent;
4874
4851
  filter = this.env.plygame.filters.BetMade();
4875
4852
  betMadeEvents = tx.logs.filter(function (log) {
4876
4853
  return isSameAddress(log.topics[0], filter.topics[0]);
@@ -4880,16 +4857,16 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4880
4857
  transactionHash: txHash
4881
4858
  });
4882
4859
  });
4883
- return _context6.abrupt("return", this.attachTimestamp(betMadeEvents.map(function (e) {
4860
+ return _context5.abrupt("return", this.attachTimestamp(betMadeEvents.map(function (e) {
4884
4861
  return _this3.parseBetMakeEvent(e);
4885
4862
  })));
4886
4863
 
4887
4864
  case 6:
4888
4865
  case "end":
4889
- return _context6.stop();
4866
+ return _context5.stop();
4890
4867
  }
4891
4868
  }
4892
- }, _callee6, this);
4869
+ }, _callee5, this);
4893
4870
  }));
4894
4871
 
4895
4872
  function getPlyGameResultsInTransaction(_x4) {
@@ -4906,20 +4883,20 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4906
4883
  _proto.leaderboard =
4907
4884
  /*#__PURE__*/
4908
4885
  function () {
4909
- var _leaderboard = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7() {
4886
+ var _leaderboard = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
4910
4887
  var _this4 = this;
4911
4888
 
4912
4889
  var result;
4913
- return runtime_1.wrap(function _callee7$(_context7) {
4890
+ return runtime_1.wrap(function _callee6$(_context6) {
4914
4891
  while (1) {
4915
- switch (_context7.prev = _context7.next) {
4892
+ switch (_context6.prev = _context6.next) {
4916
4893
  case 0:
4917
- _context7.next = 2;
4894
+ _context6.next = 2;
4918
4895
  return getPaginatedApi('/plygame/leaderboard');
4919
4896
 
4920
4897
  case 2:
4921
- result = _context7.sent;
4922
- return _context7.abrupt("return", result.items.map(function (item, i) {
4898
+ result = _context6.sent;
4899
+ return _context6.abrupt("return", result.items.map(function (item, i) {
4923
4900
  return {
4924
4901
  player: item.user,
4925
4902
  unlockedPulpAmount: new TokenAmount(_this4.pulpToken, item.unlockedAmount),
@@ -4929,10 +4906,10 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4929
4906
 
4930
4907
  case 4:
4931
4908
  case "end":
4932
- return _context7.stop();
4909
+ return _context6.stop();
4933
4910
  }
4934
4911
  }
4935
- }, _callee7);
4912
+ }, _callee6);
4936
4913
  }));
4937
4914
 
4938
4915
  function leaderboard() {
@@ -4953,57 +4930,28 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
4953
4930
 
4954
4931
  var _proto2 = PlyGameReadWrite.prototype;
4955
4932
 
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
4933
  /**
4984
4934
  * Make a single bet
4985
4935
  */
4986
- ;
4987
-
4988
4936
  _proto2.makeBetOnce =
4989
4937
  /*#__PURE__*/
4990
4938
  function () {
4991
- var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(amount) {
4992
- return runtime_1.wrap(function _callee9$(_context9) {
4939
+ var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(amount) {
4940
+ return runtime_1.wrap(function _callee7$(_context7) {
4993
4941
  while (1) {
4994
- switch (_context9.prev = _context9.next) {
4942
+ switch (_context7.prev = _context7.next) {
4995
4943
  case 0:
4996
- return _context9.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
4944
+ return _context7.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
4997
4945
 
4998
4946
  case 1:
4999
4947
  case "end":
5000
- return _context9.stop();
4948
+ return _context7.stop();
5001
4949
  }
5002
4950
  }
5003
- }, _callee9, this);
4951
+ }, _callee7, this);
5004
4952
  }));
5005
4953
 
5006
- function makeBetOnce(_x7) {
4954
+ function makeBetOnce(_x5) {
5007
4955
  return _makeBetOnce.apply(this, arguments);
5008
4956
  }
5009
4957
 
@@ -5011,22 +4959,22 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5011
4959
  }();
5012
4960
 
5013
4961
  _proto2.approve = /*#__PURE__*/function () {
5014
- var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(amount) {
5015
- return runtime_1.wrap(function _callee10$(_context10) {
4962
+ var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
4963
+ return runtime_1.wrap(function _callee8$(_context8) {
5016
4964
  while (1) {
5017
- switch (_context10.prev = _context10.next) {
4965
+ switch (_context8.prev = _context8.next) {
5018
4966
  case 0:
5019
- return _context10.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
4967
+ return _context8.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5020
4968
 
5021
4969
  case 1:
5022
4970
  case "end":
5023
- return _context10.stop();
4971
+ return _context8.stop();
5024
4972
  }
5025
4973
  }
5026
- }, _callee10, this);
4974
+ }, _callee8, this);
5027
4975
  }));
5028
4976
 
5029
- function approve(_x8) {
4977
+ function approve(_x6) {
5030
4978
  return _approve.apply(this, arguments);
5031
4979
  }
5032
4980