Skip to content

Commit de930c1

Browse files
committed
fix list params
1 parent ac42c39 commit de930c1

File tree

8 files changed

+12
-26
lines changed

8 files changed

+12
-26
lines changed

.changeset/gentle-weeks-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cartesi/viem": patch
3+
---
4+
5+
fix list params

packages/viem/src/actions/listCommitments.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ export const listCommitments = async (
1616
const commitments = await client.request({
1717
method: "cartesi_listCommitments",
1818
params: {
19-
application: params.application,
20-
descending: params.descending,
19+
...params,
2120
epoch_index:
2221
params.epochIndex !== undefined
2322
? numberToHex(params.epochIndex)
2423
: undefined,
2524
tournament_address: params.tournamentAddress
2625
? getAddress(params.tournamentAddress)
2726
: undefined,
28-
limit: params.limit,
29-
offset: params.offset,
3027
},
3128
});
3229
return {

packages/viem/src/actions/listInputs.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ export const listInputs = async (
1313
const inputs = await client.request({
1414
method: "cartesi_listInputs",
1515
params: {
16-
application: params.application,
16+
...params,
1717
epoch_index:
1818
params.epochIndex !== undefined
1919
? numberToHex(params.epochIndex)
2020
: undefined,
21-
sender: params.sender,
22-
limit: params.limit,
23-
offset: params.offset,
2421
},
2522
});
2623
return {

packages/viem/src/actions/listMatchAdvances.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ export const listMatchAdvances = async (
1616
const matchAdvances = await client.request({
1717
method: "cartesi_listMatchAdvances",
1818
params: {
19-
application: params.application,
20-
descending: params.descending,
19+
...params,
2120
epoch_index: numberToHex(params.epochIndex),
2221
tournament_address: getAddress(params.tournamentAddress),
2322
id_hash: params.idHash,
24-
limit: params.limit,
25-
offset: params.offset,
2623
},
2724
});
2825
return {

packages/viem/src/actions/listMatches.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ export const listMatches = async (
1313
const matches = await client.request({
1414
method: "cartesi_listMatches",
1515
params: {
16-
application: params.application,
17-
descending: params.descending,
16+
...params,
1817
epoch_index:
1918
params.epochIndex !== undefined
2019
? numberToHex(params.epochIndex)
2120
: undefined,
2221
tournament_address: params.tournamentAddress
2322
? getAddress(params.tournamentAddress)
2423
: undefined,
25-
limit: params.limit,
26-
offset: params.offset,
2724
},
2825
});
2926
return {

packages/viem/src/actions/listOutputs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const listOutputs = async (
4444
const outputs = await client.request({
4545
method: "cartesi_listOutputs",
4646
params: {
47-
application: params.application,
47+
...params,
4848
epoch_index:
4949
params.epochIndex !== undefined
5050
? numberToHex(params.epochIndex)
@@ -55,8 +55,6 @@ export const listOutputs = async (
5555
: undefined,
5656
output_type,
5757
voucher_address: params.voucherAddress,
58-
limit: params.limit,
59-
offset: params.offset,
6058
},
6159
});
6260
return {

packages/viem/src/actions/listReports.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const listReports = async (
1313
const reports = await client.request({
1414
method: "cartesi_listReports",
1515
params: {
16-
application: params.application,
16+
...params,
1717
epoch_index:
1818
params.epochIndex !== undefined
1919
? numberToHex(params.epochIndex)
@@ -22,8 +22,6 @@ export const listReports = async (
2222
params.inputIndex !== undefined
2323
? numberToHex(params.inputIndex)
2424
: undefined,
25-
limit: params.limit,
26-
offset: params.offset,
2725
},
2826
});
2927
return {

packages/viem/src/actions/listTournaments.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export const listTournaments = async (
1616
const tournaments = await client.request({
1717
method: "cartesi_listTournaments",
1818
params: {
19-
application: params.application,
20-
descending: params.descending,
19+
...params,
2120
epoch_index:
2221
params.epochIndex !== undefined
2322
? numberToHex(params.epochIndex)
@@ -26,8 +25,6 @@ export const listTournaments = async (
2625
params.level !== undefined
2726
? numberToHex(params.level)
2827
: undefined,
29-
limit: params.limit,
30-
offset: params.offset,
3128
parent_tournament_address: params.parentTournamentAddress,
3229
parent_match_id_hash: params.parentMatchIdHash,
3330
},

0 commit comments

Comments
 (0)