@peeramid-labs/sdk 3.0.3 → 3.2.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.
Files changed (107) hide show
  1. package/cli/cli/client.js +29 -6
  2. package/cli/cli/client.js.map +1 -1
  3. package/cli/cli/commands/distributions/add.js +1 -1
  4. package/cli/cli/commands/distributions/add.js.map +1 -1
  5. package/cli/cli/commands/distributions/index.js +3 -1
  6. package/cli/cli/commands/distributions/index.js.map +1 -1
  7. package/cli/cli/commands/distributions/list.js +1 -1
  8. package/cli/cli/commands/distributions/list.js.map +1 -1
  9. package/cli/cli/commands/distributions/state.js +38 -0
  10. package/cli/cli/commands/distributions/state.js.map +1 -0
  11. package/cli/cli/commands/eds/index.js +59 -0
  12. package/cli/cli/commands/eds/index.js.map +1 -0
  13. package/cli/cli/commands/fellowship/create.js +1 -1
  14. package/cli/cli/commands/fellowship/create.js.map +1 -1
  15. package/cli/cli/commands/fellowship/index.js +3 -1
  16. package/cli/cli/commands/fellowship/index.js.map +1 -1
  17. package/cli/cli/commands/fellowship/list.js +36 -0
  18. package/cli/cli/commands/fellowship/list.js.map +1 -0
  19. package/cli/cli/commands/fellowship/metadata.js +1 -1
  20. package/cli/cli/commands/fellowship/metadata.js.map +1 -1
  21. package/cli/cli/commands/instances/list.js +5 -1
  22. package/cli/cli/commands/instances/list.js.map +1 -1
  23. package/cli/cli/commands/multipass/contract.js +1 -1
  24. package/cli/cli/commands/multipass/contract.js.map +1 -1
  25. package/cli/cli/commands/multipass/domain.js +6 -6
  26. package/cli/cli/commands/multipass/domain.js.map +1 -1
  27. package/cli/cli/commands/multipass/domains.js +2 -2
  28. package/cli/cli/commands/multipass/domains.js.map +1 -1
  29. package/cli/eds/Distributor.js +10 -2
  30. package/cli/eds/Distributor.js.map +1 -1
  31. package/cli/rankify/InstanceBase.js +502 -0
  32. package/cli/rankify/InstanceBase.js.map +1 -0
  33. package/cli/rankify/MAODistributor.js +117 -73
  34. package/cli/rankify/MAODistributor.js.map +1 -1
  35. package/cli/rankify/RankToken.js +24 -13
  36. package/cli/rankify/RankToken.js.map +1 -1
  37. package/cli/utils/ApiError.js +33 -0
  38. package/cli/utils/ApiError.js.map +1 -1
  39. package/cli/utils/artifacts.js +2 -2
  40. package/cli/utils/artifacts.js.map +1 -1
  41. package/docs/classes/GameMaster.md +31 -8
  42. package/docs/classes/InstanceBase.md +26 -7
  43. package/docs/classes/InstancePlayer.md +47 -22
  44. package/docs/classes/MAODistributorClient.md +45 -11
  45. package/docs/docs/classes/GameMaster.md +31 -8
  46. package/docs/docs/classes/InstanceBase.md +26 -7
  47. package/docs/docs/classes/InstancePlayer.md +47 -22
  48. package/docs/docs/classes/MAODistributorClient.md +45 -11
  49. package/docs/docs/index.md +18 -1
  50. package/docs/index.md +18 -1
  51. package/lib.commonjs/eds/Distributor.d.ts +4 -1
  52. package/lib.commonjs/eds/Distributor.d.ts.map +1 -1
  53. package/lib.commonjs/eds/Distributor.js +11 -2
  54. package/lib.commonjs/eds/Distributor.js.map +1 -1
  55. package/lib.commonjs/rankify/GameMaster.d.ts.map +1 -1
  56. package/lib.commonjs/rankify/GameMaster.js +137 -111
  57. package/lib.commonjs/rankify/GameMaster.js.map +1 -1
  58. package/lib.commonjs/rankify/InstanceBase.d.ts +24 -54
  59. package/lib.commonjs/rankify/InstanceBase.d.ts.map +1 -1
  60. package/lib.commonjs/rankify/InstanceBase.js +227 -163
  61. package/lib.commonjs/rankify/InstanceBase.js.map +1 -1
  62. package/lib.commonjs/rankify/MAODistributor.d.ts +23 -3
  63. package/lib.commonjs/rankify/MAODistributor.d.ts.map +1 -1
  64. package/lib.commonjs/rankify/MAODistributor.js +117 -73
  65. package/lib.commonjs/rankify/MAODistributor.js.map +1 -1
  66. package/lib.commonjs/rankify/Player.d.ts +13 -9
  67. package/lib.commonjs/rankify/Player.d.ts.map +1 -1
  68. package/lib.commonjs/rankify/Player.js +173 -125
  69. package/lib.commonjs/rankify/Player.js.map +1 -1
  70. package/lib.commonjs/rankify/RankToken.d.ts.map +1 -1
  71. package/lib.commonjs/rankify/RankToken.js +24 -13
  72. package/lib.commonjs/rankify/RankToken.js.map +1 -1
  73. package/lib.commonjs/utils/ApiError.d.ts +1 -0
  74. package/lib.commonjs/utils/ApiError.d.ts.map +1 -1
  75. package/lib.commonjs/utils/ApiError.js +33 -0
  76. package/lib.commonjs/utils/ApiError.js.map +1 -1
  77. package/lib.commonjs/utils/artifacts.js +2 -2
  78. package/lib.commonjs/utils/artifacts.js.map +1 -1
  79. package/lib.esm/eds/Distributor.d.ts +4 -1
  80. package/lib.esm/eds/Distributor.d.ts.map +1 -1
  81. package/lib.esm/eds/Distributor.js +11 -2
  82. package/lib.esm/eds/Distributor.js.map +1 -1
  83. package/lib.esm/rankify/GameMaster.d.ts.map +1 -1
  84. package/lib.esm/rankify/GameMaster.js +137 -111
  85. package/lib.esm/rankify/GameMaster.js.map +1 -1
  86. package/lib.esm/rankify/InstanceBase.d.ts +24 -54
  87. package/lib.esm/rankify/InstanceBase.d.ts.map +1 -1
  88. package/lib.esm/rankify/InstanceBase.js +228 -164
  89. package/lib.esm/rankify/InstanceBase.js.map +1 -1
  90. package/lib.esm/rankify/MAODistributor.d.ts +23 -3
  91. package/lib.esm/rankify/MAODistributor.d.ts.map +1 -1
  92. package/lib.esm/rankify/MAODistributor.js +119 -75
  93. package/lib.esm/rankify/MAODistributor.js.map +1 -1
  94. package/lib.esm/rankify/Player.d.ts +13 -9
  95. package/lib.esm/rankify/Player.d.ts.map +1 -1
  96. package/lib.esm/rankify/Player.js +173 -125
  97. package/lib.esm/rankify/Player.js.map +1 -1
  98. package/lib.esm/rankify/RankToken.d.ts.map +1 -1
  99. package/lib.esm/rankify/RankToken.js +24 -13
  100. package/lib.esm/rankify/RankToken.js.map +1 -1
  101. package/lib.esm/utils/ApiError.d.ts +1 -0
  102. package/lib.esm/utils/ApiError.d.ts.map +1 -1
  103. package/lib.esm/utils/ApiError.js +32 -0
  104. package/lib.esm/utils/ApiError.js.map +1 -1
  105. package/lib.esm/utils/artifacts.js +2 -2
  106. package/lib.esm/utils/artifacts.js.map +1 -1
  107. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { Address, PublicClient, type GetContractReturnType, type Block } from "viem";
1
+ import { Address, PublicClient, type GetContractReturnType, type Block, ContractFunctionReturnType } from "viem";
2
2
  import instanceAbi from "../abis/RankifyDiamondInstance";
3
3
  /**
4
4
  * Enum representing different states of a game instance
@@ -20,6 +20,16 @@ export declare enum gameStatusEnum {
20
20
  /** Game was not found */
21
21
  notFound = "not found"
22
22
  }
23
+ interface GameState extends ContractFunctionReturnType<typeof instanceAbi, "view", "getGameState"> {
24
+ joinRequirements: ContractFunctionReturnType<typeof instanceAbi, "view", "getJoinRequirements">;
25
+ requirementsPerContract: ContractFunctionReturnType<typeof instanceAbi, "view", "getJoinRequirementsByToken">[];
26
+ scores: readonly [readonly `0x${string}`[], readonly bigint[]];
27
+ isLastTurn: boolean;
28
+ isOpen: boolean;
29
+ canStart: boolean;
30
+ gamePhase: gameStatusEnum;
31
+ currentPhaseTimeoutAt: bigint;
32
+ }
23
33
  /**
24
34
  * Base class for interacting with a Rankify game instance
25
35
  * Provides core functionality for managing game state and interactions
@@ -9423,7 +9433,7 @@ export default class InstanceBase {
9423
9433
  readonly stateMutability: "nonpayable";
9424
9434
  readonly type: "function";
9425
9435
  }], "ProposalSubmitted", undefined, bigint, undefined>;
9426
- } | undefined>;
9436
+ }>;
9427
9437
  /**
9428
9438
  * Retrieves the ongoing proposals for a specific game.
9429
9439
  * @param gameId - The ID of the game.
@@ -11038,7 +11048,7 @@ export default class InstanceBase {
11038
11048
  readonly type: "function";
11039
11049
  }], "ProposalScore", undefined, undefined, undefined>>;
11040
11050
  /**
11041
- * Retrieves the current turn of a game.
11051
+ * Retrieve s the current turn of a game.
11042
11052
  * @param gameId - The ID of the game.
11043
11053
  * @returns A Promise that resolves to the current turn of the game.
11044
11054
  */
@@ -11048,61 +11058,21 @@ export default class InstanceBase {
11048
11058
  * @param gameId - The ID of the game.
11049
11059
  * @returns A promise that resolves to an object containing the game state.
11050
11060
  */
11051
- getGameState: (gameId: bigint) => Promise<{
11052
- gameMaster: `0x${string}`;
11053
- joinRequirements: {
11054
- ethValues: {
11055
- have: bigint;
11056
- lock: bigint;
11057
- burn: bigint;
11058
- pay: bigint;
11059
- bet: bigint;
11060
- };
11061
- timesRefunded: bigint;
11062
- timesReleased: bigint;
11063
- timesFunded: bigint;
11064
- contractAddresses: readonly `0x${string}`[];
11065
- contractIds: readonly bigint[];
11066
- contractTypes: readonly number[];
11067
- _isConfigured: boolean;
11068
- };
11069
- requirementsPerContract: {
11070
- have: {
11071
- data: `0x${string}`;
11072
- amount: bigint;
11073
- };
11074
- lock: {
11075
- data: `0x${string}`;
11076
- amount: bigint;
11077
- };
11078
- burn: {
11079
- data: `0x${string}`;
11080
- amount: bigint;
11081
- };
11082
- pay: {
11083
- data: `0x${string}`;
11084
- amount: bigint;
11085
- };
11086
- bet: {
11087
- data: `0x${string}`;
11088
- amount: bigint;
11089
- };
11090
- }[];
11091
- scores: readonly [readonly `0x${string}`[], readonly bigint[]];
11092
- currentTurn: bigint;
11093
- isFinished: boolean;
11094
- isOvertime: boolean;
11095
- isLastTurn: boolean;
11096
- isOpen: boolean;
11097
- createdBy: `0x${string}`;
11098
- gameRank: bigint;
11099
- players: readonly `0x${string}`[];
11100
- canStart: boolean;
11101
- gamePhase: gameStatusEnum;
11061
+ getGameStateDetails: (gameId: bigint) => Promise<GameState>;
11062
+ getGameStates: ({ pageParam, pageSize, }: {
11063
+ pageParam?: number;
11064
+ pageSize?: number;
11065
+ }) => Promise<{
11066
+ items: (ContractFunctionReturnType<typeof instanceAbi, "view", "getGameState"> & {
11067
+ gamePhase: gameStatusEnum;
11068
+ })[];
11069
+ nextPage: number | undefined;
11070
+ hasMore: boolean;
11102
11071
  }>;
11103
11072
  }
11104
11073
  /**
11105
11074
  * Contract type for Rankify instance
11106
11075
  */
11107
11076
  export type RankifyContract = GetContractReturnType<typeof instanceAbi, PublicClient>;
11077
+ export {};
11108
11078
  //# sourceMappingURL=InstanceBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InstanceBase.d.ts","sourceRoot":"","sources":["../../../src/rankify/InstanceBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,KAAK,EAAE,MAAM,MAAM,CAAC;AAGrF,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD;;;GAGG;AACH,oBAAY,cAAc;IACxB,4DAA4D;IAC5D,OAAO,iBAAiB;IACxB,2CAA2C;IAC3C,IAAI,sBAAsB;IAC1B,0BAA0B;IAC1B,OAAO,gBAAgB;IACvB,gCAAgC;IAChC,QAAQ,sBAAsB;IAC9B,0BAA0B;IAC1B,QAAQ,wBAAwB;IAChC,wBAAwB;IACxB,QAAQ,aAAa;IACrB,yBAAyB;IACzB,QAAQ,cAAc;CACvB;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,gDAAgD;IAChD,YAAY,EAAE,YAAY,CAAC;IAC3B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IAEzB,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;;;OAMG;gBACS,EACV,YAAY,EACZ,OAAO,EACP,eAAe,EACf,aAAkB,GACnB,EAAE;QACD,YAAY,EAAE,YAAY,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,OAAO,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;IAOD;;;;OAIG;IACH,eAAe,WAAkB,MAAM,UAAU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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oDA;CACH;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC,OAAO,WAAW,EAAE,YAAY,CAAC,CAAC"}
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.gameStatusEnum = void 0;
7
+ const viem_1 = require("viem");
7
8
  const index_1 = require("../utils/index");
8
9
  const RankifyDiamondInstance_1 = __importDefault(require("../abis/RankifyDiamondInstance"));
9
10
  /**
@@ -85,12 +86,18 @@ class InstanceBase {
85
86
  * @returns The previous turn information for the specified game.
86
87
  */
87
88
  getPreviousTurnStats = async (gameId) => {
88
- const currentTurn = await this.publicClient.readContract({
89
- address: this.instanceAddress,
90
- abi: RankifyDiamondInstance_1.default,
91
- functionName: "getTurn",
92
- args: [gameId],
93
- });
89
+ let currentTurn;
90
+ try {
91
+ currentTurn = await this.publicClient.readContract({
92
+ address: this.instanceAddress,
93
+ abi: RankifyDiamondInstance_1.default,
94
+ functionName: "getTurn",
95
+ args: [gameId],
96
+ });
97
+ }
98
+ catch (e) {
99
+ throw await (0, index_1.handleRPCError)(e);
100
+ }
94
101
  if (currentTurn > 1n) {
95
102
  return this.getHistoricTurn(gameId, currentTurn - 1n);
96
103
  }
@@ -152,7 +159,7 @@ class InstanceBase {
152
159
  return this.getVoting(gameId, turn);
153
160
  }
154
161
  catch (error) {
155
- console.error(error);
162
+ throw await (0, index_1.handleRPCError)(error);
156
163
  }
157
164
  };
158
165
  /**
@@ -161,13 +168,13 @@ class InstanceBase {
161
168
  * @returns The ongoing proposals for the specified game.
162
169
  */
163
170
  getOngoingProposals = async (gameId) => {
164
- const currentTurn = await this.publicClient.readContract({
165
- address: this.instanceAddress,
166
- abi: RankifyDiamondInstance_1.default,
167
- functionName: "getTurn",
168
- args: [gameId],
169
- });
170
171
  try {
172
+ const currentTurn = await this.publicClient.readContract({
173
+ address: this.instanceAddress,
174
+ abi: RankifyDiamondInstance_1.default,
175
+ functionName: "getTurn",
176
+ args: [gameId],
177
+ });
171
178
  const lastTurnEndedEvent = await this.publicClient.getContractEvents({
172
179
  address: this.instanceAddress,
173
180
  abi: RankifyDiamondInstance_1.default,
@@ -183,8 +190,7 @@ class InstanceBase {
183
190
  return { currentTurn, proposals: args.newProposals };
184
191
  }
185
192
  catch (error) {
186
- console.error("Error in getOngoingProposals:", error);
187
- return { currentTurn, proposals: [] };
193
+ throw await (0, index_1.handleRPCError)(error);
188
194
  }
189
195
  };
190
196
  /**
@@ -211,13 +217,18 @@ class InstanceBase {
211
217
  if (timeToJoin) {
212
218
  return Number(block.timestamp) + timeToJoin;
213
219
  }
214
- const gameState = await this.publicClient.readContract({
215
- address: this.instanceAddress,
216
- abi: RankifyDiamondInstance_1.default,
217
- functionName: "getGameState",
218
- args: [gameId],
219
- });
220
- return Number(block.timestamp) + Number(gameState.timeToJoin);
220
+ try {
221
+ const gameState = await this.publicClient.readContract({
222
+ address: this.instanceAddress,
223
+ abi: RankifyDiamondInstance_1.default,
224
+ functionName: "getGameState",
225
+ args: [gameId],
226
+ });
227
+ return Number(block.timestamp) + Number(gameState.timeToJoin);
228
+ }
229
+ catch (e) {
230
+ throw await (0, index_1.handleRPCError)(e);
231
+ }
221
232
  };
222
233
  /**
223
234
  * Resolves the deadline for the current turn.
@@ -227,15 +238,20 @@ class InstanceBase {
227
238
  * @returns The deadline for the current turn.
228
239
  */
229
240
  resolveTurnDeadline = async (block, gameId, timePerTurn) => {
230
- if (timePerTurn)
231
- return Number(block.timestamp) + timePerTurn;
232
- const gameState = await this.publicClient.readContract({
233
- address: this.instanceAddress,
234
- abi: RankifyDiamondInstance_1.default,
235
- functionName: "getGameState",
236
- args: [gameId],
237
- });
238
- return Number(block.timestamp) + Number(gameState.timePerTurn);
241
+ try {
242
+ if (timePerTurn)
243
+ return Number(block.timestamp) + timePerTurn;
244
+ const gameState = await this.publicClient.readContract({
245
+ address: this.instanceAddress,
246
+ abi: RankifyDiamondInstance_1.default,
247
+ functionName: "getGameState",
248
+ args: [gameId],
249
+ });
250
+ return Number(block.timestamp) + Number(gameState.timePerTurn);
251
+ }
252
+ catch (e) {
253
+ throw await (0, index_1.handleRPCError)(e);
254
+ }
239
255
  };
240
256
  /**
241
257
  * Retrieves the deadline for the current turn in a game.
@@ -274,24 +290,34 @@ class InstanceBase {
274
290
  * Retrieves the contract state.
275
291
  */
276
292
  getContractState = async () => {
277
- const state = await this.publicClient.readContract({
278
- address: this.instanceAddress,
279
- abi: RankifyDiamondInstance_1.default,
280
- functionName: "getContractState",
281
- });
282
- return state;
293
+ try {
294
+ const state = await this.publicClient.readContract({
295
+ address: this.instanceAddress,
296
+ abi: RankifyDiamondInstance_1.default,
297
+ functionName: "getContractState",
298
+ });
299
+ return state;
300
+ }
301
+ catch (e) {
302
+ throw await (0, index_1.handleRPCError)(e);
303
+ }
283
304
  };
284
305
  /**
285
306
  * Retrieves a player's game.
286
307
  * @param account - The player's account address.
287
308
  */
288
309
  getPlayersGame = async (account) => {
289
- return this.publicClient.readContract({
290
- address: this.instanceAddress,
291
- abi: RankifyDiamondInstance_1.default,
292
- functionName: "getPlayersGame",
293
- args: [account],
294
- });
310
+ try {
311
+ return this.publicClient.readContract({
312
+ address: this.instanceAddress,
313
+ abi: RankifyDiamondInstance_1.default,
314
+ functionName: "getPlayersGame",
315
+ args: [account],
316
+ });
317
+ }
318
+ catch (e) {
319
+ throw await (0, index_1.handleRPCError)(e);
320
+ }
295
321
  };
296
322
  /**
297
323
  * Retrieves the list of proposal scores for a specific game.
@@ -301,143 +327,181 @@ class InstanceBase {
301
327
  getProposalScoresList = async (gameId) => {
302
328
  if (!gameId)
303
329
  throw new Error("gameId not set");
304
- const logs = await this.publicClient.getContractEvents({
305
- address: this.instanceAddress,
306
- abi: RankifyDiamondInstance_1.default,
307
- eventName: "ProposalScore",
308
- args: { gameId },
309
- });
310
- return logs;
330
+ try {
331
+ const logs = await this.publicClient.getContractEvents({
332
+ address: this.instanceAddress,
333
+ abi: RankifyDiamondInstance_1.default,
334
+ eventName: "ProposalScore",
335
+ args: { gameId },
336
+ });
337
+ return logs;
338
+ }
339
+ catch (e) {
340
+ throw await (0, index_1.handleRPCError)(e);
341
+ }
311
342
  };
312
343
  /**
313
- * Retrieves the current turn of a game.
344
+ * Retrieve s the current turn of a game.
314
345
  * @param gameId - The ID of the game.
315
346
  * @returns A Promise that resolves to the current turn of the game.
316
347
  */
317
348
  getCurrentTurn = async (gameId) => {
318
- return this.publicClient.readContract({
319
- address: this.instanceAddress,
320
- abi: RankifyDiamondInstance_1.default,
321
- functionName: "getTurn",
322
- args: [gameId],
323
- });
349
+ try {
350
+ return this.publicClient.readContract({
351
+ address: this.instanceAddress,
352
+ abi: RankifyDiamondInstance_1.default,
353
+ functionName: "getTurn",
354
+ args: [gameId],
355
+ });
356
+ }
357
+ catch (e) {
358
+ throw await (0, index_1.handleRPCError)(e);
359
+ }
324
360
  };
325
361
  /**
326
362
  * Retrieves the game state for a specific game.
327
363
  * @param gameId - The ID of the game.
328
364
  * @returns A promise that resolves to an object containing the game state.
329
365
  */
330
- getGameState = async (gameId) => {
331
- const [gameMaster, joinRequirements, scores, currentTurn, isFinished, isOvertime, isLastTurn, isOpen, createdBy, gameRank, players, canStart,] = await Promise.all([
332
- this.publicClient.readContract({
333
- address: this.instanceAddress,
334
- abi: RankifyDiamondInstance_1.default,
335
- functionName: "getGM",
336
- args: [gameId],
337
- }),
338
- this.publicClient.readContract({
339
- address: this.instanceAddress,
340
- abi: RankifyDiamondInstance_1.default,
341
- functionName: "getJoinRequirements",
342
- args: [gameId],
343
- }),
344
- this.publicClient.readContract({
345
- address: this.instanceAddress,
346
- abi: RankifyDiamondInstance_1.default,
347
- functionName: "getScores",
348
- args: [gameId],
349
- }),
350
- this.publicClient.readContract({
351
- address: this.instanceAddress,
352
- abi: RankifyDiamondInstance_1.default,
353
- functionName: "getTurn",
354
- args: [gameId],
355
- }),
356
- this.publicClient.readContract({
357
- address: this.instanceAddress,
358
- abi: RankifyDiamondInstance_1.default,
359
- functionName: "isGameOver",
360
- args: [gameId],
361
- }),
362
- this.publicClient.readContract({
363
- address: this.instanceAddress,
364
- abi: RankifyDiamondInstance_1.default,
365
- functionName: "isOvertime",
366
- args: [gameId],
367
- }),
368
- this.publicClient.readContract({
369
- address: this.instanceAddress,
370
- abi: RankifyDiamondInstance_1.default,
371
- functionName: "isLastTurn",
372
- args: [gameId],
373
- }),
374
- this.publicClient.readContract({
375
- address: this.instanceAddress,
376
- abi: RankifyDiamondInstance_1.default,
377
- functionName: "isRegistrationOpen",
378
- args: [gameId],
379
- }),
380
- this.publicClient.readContract({
381
- address: this.instanceAddress,
382
- abi: RankifyDiamondInstance_1.default,
383
- functionName: "gameCreator",
384
- args: [gameId],
385
- }),
386
- this.publicClient.readContract({
387
- address: this.instanceAddress,
388
- abi: RankifyDiamondInstance_1.default,
389
- functionName: "getGameRank",
390
- args: [gameId],
391
- }),
392
- this.publicClient.readContract({
393
- address: this.instanceAddress,
394
- abi: RankifyDiamondInstance_1.default,
395
- functionName: "getPlayers",
396
- args: [gameId],
397
- }),
398
- this.publicClient.readContract({
399
- address: this.instanceAddress,
400
- abi: RankifyDiamondInstance_1.default,
401
- functionName: "canStartGame",
402
- args: [gameId],
403
- }),
404
- ]);
405
- const requirementsPerContract = await Promise.all(joinRequirements.contractAddresses.map(async (address, idx) => {
406
- return this.publicClient.readContract({
366
+ getGameStateDetails = async (gameId) => {
367
+ try {
368
+ const [joinRequirements, ongoingScores, isLastTurn, players, canStart, state] = await Promise.all([
369
+ this.publicClient.readContract({
370
+ address: this.instanceAddress,
371
+ abi: RankifyDiamondInstance_1.default,
372
+ functionName: "getJoinRequirements",
373
+ args: [gameId],
374
+ }),
375
+ this.publicClient.readContract({
376
+ address: this.instanceAddress,
377
+ abi: RankifyDiamondInstance_1.default,
378
+ functionName: "getScores",
379
+ args: [gameId],
380
+ }),
381
+ this.publicClient.readContract({
382
+ address: this.instanceAddress,
383
+ abi: RankifyDiamondInstance_1.default,
384
+ functionName: "isLastTurn",
385
+ args: [gameId],
386
+ }),
387
+ this.publicClient.readContract({
388
+ address: this.instanceAddress,
389
+ abi: RankifyDiamondInstance_1.default,
390
+ functionName: "getPlayers",
391
+ args: [gameId],
392
+ }),
393
+ this.publicClient.readContract({
394
+ address: this.instanceAddress,
395
+ abi: RankifyDiamondInstance_1.default,
396
+ functionName: "canStartGame",
397
+ args: [gameId],
398
+ }),
399
+ this.publicClient.readContract({
400
+ address: this.instanceAddress,
401
+ abi: RankifyDiamondInstance_1.default,
402
+ functionName: "getGameState",
403
+ args: [gameId],
404
+ }),
405
+ ]);
406
+ const requirementsPerContract = await Promise.all(joinRequirements.contractAddresses.map(async (address, idx) => {
407
+ return this.publicClient.readContract({
408
+ address: this.instanceAddress,
409
+ abi: RankifyDiamondInstance_1.default,
410
+ functionName: "getJoinRequirementsByToken",
411
+ args: [gameId, address, joinRequirements.contractIds[idx], joinRequirements.contractTypes[idx]],
412
+ });
413
+ }));
414
+ let scores = ongoingScores;
415
+ if (state.hasEnded) {
416
+ const LastTurnScores = await this.publicClient.getContractEvents({
417
+ address: this.instanceAddress,
418
+ abi: RankifyDiamondInstance_1.default,
419
+ eventName: "GameOver",
420
+ args: { gameId },
421
+ fromBlock: await this.getCreationBlock(),
422
+ });
423
+ const evt = LastTurnScores[0];
424
+ if (evt.args?.scores && evt.args?.players)
425
+ scores = [players, evt.args.scores];
426
+ }
427
+ const gamePhase = state.hasEnded
428
+ ? gameStatusEnum["finished"]
429
+ : state.isOvertime
430
+ ? gameStatusEnum["overtime"]
431
+ : isLastTurn
432
+ ? gameStatusEnum["lastTurn"]
433
+ : state.startedAt > 0n
434
+ ? gameStatusEnum["started"]
435
+ : state.registrationOpenAt > 0n
436
+ ? gameStatusEnum["open"]
437
+ : state.createdBy !== viem_1.zeroAddress
438
+ ? gameStatusEnum["created"]
439
+ : gameStatusEnum["notFound"];
440
+ const currentPhaseTimeoutAt = gamePhase === gameStatusEnum["started"]
441
+ ? state.turnStartedAt + state.timePerTurn
442
+ : gamePhase === gameStatusEnum["open"]
443
+ ? state.registrationOpenAt + state.timeToJoin
444
+ : state.startedAt + state.timePerTurn;
445
+ return {
446
+ joinRequirements,
447
+ requirementsPerContract,
448
+ scores,
449
+ isLastTurn,
450
+ isOpen: state.registrationOpenAt > 0n,
451
+ currentPhaseTimeoutAt,
452
+ canStart,
453
+ gamePhase,
454
+ ...state,
455
+ };
456
+ }
457
+ catch (e) {
458
+ throw await (0, index_1.handleRPCError)(e);
459
+ }
460
+ };
461
+ getGameStates = async ({ pageParam = 0, pageSize = 10, }) => {
462
+ const { numGames } = await this.getContractState();
463
+ const totalGames = Number(numGames);
464
+ const startIndex = pageParam * pageSize;
465
+ if (startIndex >= totalGames) {
466
+ return {
467
+ items: [],
468
+ nextPage: undefined,
469
+ hasMore: false,
470
+ };
471
+ }
472
+ const realPageSize = Math.min(pageSize, totalGames - startIndex);
473
+ const hasMore = startIndex + realPageSize < totalGames;
474
+ const nextPage = hasMore ? pageParam + 1 : undefined;
475
+ const gameStates = await Promise.all(Array.from({ length: realPageSize }, (_, i) => i + startIndex).map(async (index) => {
476
+ const gameId = index + 1;
477
+ return this.publicClient
478
+ .readContract({
407
479
  address: this.instanceAddress,
408
480
  abi: RankifyDiamondInstance_1.default,
409
- functionName: "getJoinRequirementsByToken",
410
- args: [gameId, address, joinRequirements.contractIds[idx], joinRequirements.contractTypes[idx]],
481
+ functionName: "getGameState",
482
+ args: [BigInt(gameId)],
483
+ })
484
+ .then((r) => {
485
+ const gamePhase = r.hasEnded
486
+ ? gameStatusEnum["finished"]
487
+ : r.isOvertime
488
+ ? gameStatusEnum["overtime"]
489
+ : r.currentTurn - r.maxTurns === 0n
490
+ ? gameStatusEnum["lastTurn"]
491
+ : r.startedAt > 0n
492
+ ? gameStatusEnum["started"]
493
+ : r.registrationOpenAt > 0n
494
+ ? gameStatusEnum["open"]
495
+ : r.createdBy !== viem_1.zeroAddress
496
+ ? gameStatusEnum["created"]
497
+ : gameStatusEnum["notFound"];
498
+ return { ...r, gamePhase };
411
499
  });
412
500
  }));
413
- const gamePhase = isFinished
414
- ? gameStatusEnum["finished"]
415
- : isOvertime
416
- ? gameStatusEnum["overtime"]
417
- : isLastTurn
418
- ? gameStatusEnum["lastTurn"]
419
- : currentTurn > 0n
420
- ? gameStatusEnum["started"]
421
- : isOpen
422
- ? gameStatusEnum["open"]
423
- : gameMaster
424
- ? gameStatusEnum["created"]
425
- : gameStatusEnum["notFound"];
426
501
  return {
427
- gameMaster,
428
- joinRequirements,
429
- requirementsPerContract,
430
- scores,
431
- currentTurn,
432
- isFinished,
433
- isOvertime,
434
- isLastTurn,
435
- isOpen,
436
- createdBy,
437
- gameRank,
438
- players,
439
- canStart,
440
- gamePhase,
502
+ items: gameStates,
503
+ nextPage,
504
+ hasMore,
441
505
  };
442
506
  };
443
507
  }