@aurigami/sdk 1.12.3 → 1.12.5

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.
@@ -22,7 +22,7 @@ export declare class PlyGameRead extends BlockchainEntityRead {
22
22
  * Top 100 users by amount of PULP unlocked
23
23
  */
24
24
  leaderboard(): Promise<PlyGameLeaderboardItem[]>;
25
- getJackpotResult(round: number): Promise<{
25
+ getLastJackpotResult(): Promise<{
26
26
  winner: Address;
27
27
  amount: TokenAmount;
28
28
  }>;
@@ -5058,24 +5058,31 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
5058
5058
  return leaderboard;
5059
5059
  }();
5060
5060
 
5061
- _proto.getJackpotResult = /*#__PURE__*/function () {
5062
- var _getJackpotResult = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(round) {
5063
- var result;
5061
+ _proto.getLastJackpotResult = /*#__PURE__*/function () {
5062
+ var _getLastJackpotResult = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7() {
5063
+ var round, result;
5064
5064
  return runtime_1.wrap(function _callee7$(_context7) {
5065
5065
  while (1) {
5066
5066
  switch (_context7.prev = _context7.next) {
5067
5067
  case 0:
5068
- _context7.next = 2;
5069
- return this.env.plygame.jackpotHistory(round);
5068
+ _context7.t0 = ethers.BigNumber;
5069
+ _context7.next = 3;
5070
+ return this._networkConnection.provider.getStorageAt(this.env.plygame.address, 158);
5070
5071
 
5071
- case 2:
5072
+ case 3:
5073
+ _context7.t1 = _context7.sent;
5074
+ round = _context7.t0.from.call(_context7.t0, _context7.t1);
5075
+ _context7.next = 7;
5076
+ return this.env.plygame.jackpotHistory(round.sub(1));
5077
+
5078
+ case 7:
5072
5079
  result = _context7.sent;
5073
5080
  return _context7.abrupt("return", {
5074
- winner: result.winner,
5081
+ winner: result.winner.slice(0, 6) + '...' + result.winner.slice(-4),
5075
5082
  amount: new TokenAmount(this.plyToken, result.amount.toString())
5076
5083
  });
5077
5084
 
5078
- case 4:
5085
+ case 9:
5079
5086
  case "end":
5080
5087
  return _context7.stop();
5081
5088
  }
@@ -5083,11 +5090,11 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
5083
5090
  }, _callee7, this);
5084
5091
  }));
5085
5092
 
5086
- function getJackpotResult(_x5) {
5087
- return _getJackpotResult.apply(this, arguments);
5093
+ function getLastJackpotResult() {
5094
+ return _getLastJackpotResult.apply(this, arguments);
5088
5095
  }
5089
5096
 
5090
- return getJackpotResult;
5097
+ return getLastJackpotResult;
5091
5098
  }();
5092
5099
 
5093
5100
  return PlyGameRead;
@@ -5122,7 +5129,7 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5122
5129
  }, _callee8, this);
5123
5130
  }));
5124
5131
 
5125
- function makeBetOnce(_x6) {
5132
+ function makeBetOnce(_x5) {
5126
5133
  return _makeBetOnce.apply(this, arguments);
5127
5134
  }
5128
5135
 
@@ -5145,7 +5152,7 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5145
5152
  }, _callee9, this);
5146
5153
  }));
5147
5154
 
5148
- function approve(_x7) {
5155
+ function approve(_x6) {
5149
5156
  return _approve.apply(this, arguments);
5150
5157
  }
5151
5158