@aurigami/sdk 1.12.2 → 1.12.4

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,6 +22,10 @@ export declare class PlyGameRead extends BlockchainEntityRead {
22
22
  * Top 100 users by amount of PULP unlocked
23
23
  */
24
24
  leaderboard(): Promise<PlyGameLeaderboardItem[]>;
25
+ getLastJackpotResult(): Promise<{
26
+ winner: Address;
27
+ amount: TokenAmount;
28
+ }>;
25
29
  }
26
30
  export declare class PlyGameReadWrite extends PlyGameRead {
27
31
  /**
@@ -5058,6 +5058,45 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
5058
5058
  return leaderboard;
5059
5059
  }();
5060
5060
 
5061
+ _proto.getLastJackpotResult = /*#__PURE__*/function () {
5062
+ var _getLastJackpotResult = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7() {
5063
+ var round, result;
5064
+ return runtime_1.wrap(function _callee7$(_context7) {
5065
+ while (1) {
5066
+ switch (_context7.prev = _context7.next) {
5067
+ case 0:
5068
+ _context7.t0 = ethers.BigNumber;
5069
+ _context7.next = 3;
5070
+ return this._networkConnection.provider.getStorageAt(this.env.plygame.address, 158);
5071
+
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:
5079
+ result = _context7.sent;
5080
+ return _context7.abrupt("return", {
5081
+ winner: result.winner.slice(0, 6) + '...' + result.winner.slice(4),
5082
+ amount: new TokenAmount(this.plyToken, result.amount.toString())
5083
+ });
5084
+
5085
+ case 9:
5086
+ case "end":
5087
+ return _context7.stop();
5088
+ }
5089
+ }
5090
+ }, _callee7, this);
5091
+ }));
5092
+
5093
+ function getLastJackpotResult() {
5094
+ return _getLastJackpotResult.apply(this, arguments);
5095
+ }
5096
+
5097
+ return getLastJackpotResult;
5098
+ }();
5099
+
5061
5100
  return PlyGameRead;
5062
5101
  }(BlockchainEntityRead);
5063
5102
  var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
@@ -5075,19 +5114,19 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5075
5114
  _proto2.makeBetOnce =
5076
5115
  /*#__PURE__*/
5077
5116
  function () {
5078
- var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(amount) {
5079
- return runtime_1.wrap(function _callee7$(_context7) {
5117
+ var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
5118
+ return runtime_1.wrap(function _callee8$(_context8) {
5080
5119
  while (1) {
5081
- switch (_context7.prev = _context7.next) {
5120
+ switch (_context8.prev = _context8.next) {
5082
5121
  case 0:
5083
- return _context7.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
5122
+ return _context8.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
5084
5123
 
5085
5124
  case 1:
5086
5125
  case "end":
5087
- return _context7.stop();
5126
+ return _context8.stop();
5088
5127
  }
5089
5128
  }
5090
- }, _callee7, this);
5129
+ }, _callee8, this);
5091
5130
  }));
5092
5131
 
5093
5132
  function makeBetOnce(_x5) {
@@ -5098,19 +5137,19 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
5098
5137
  }();
5099
5138
 
5100
5139
  _proto2.approve = /*#__PURE__*/function () {
5101
- var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
5102
- return runtime_1.wrap(function _callee8$(_context8) {
5140
+ var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(amount) {
5141
+ return runtime_1.wrap(function _callee9$(_context9) {
5103
5142
  while (1) {
5104
- switch (_context8.prev = _context8.next) {
5143
+ switch (_context9.prev = _context9.next) {
5105
5144
  case 0:
5106
- return _context8.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5145
+ return _context9.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5107
5146
 
5108
5147
  case 1:
5109
5148
  case "end":
5110
- return _context8.stop();
5149
+ return _context9.stop();
5111
5150
  }
5112
5151
  }
5113
- }, _callee8, this);
5152
+ }, _callee9, this);
5114
5153
  }));
5115
5154
 
5116
5155
  function approve(_x6) {