You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combining filter in method suix_queryTransactionBlocks returning error. I want to get transactions for a address with certain function. so how can I apply multiple filters. Please guide. Thanks
We have gone through live chat and they were suggesting to create metamask wallet then only I'd be able to use API 'suix_queryTransactionBlocks' with multiple filters. I am not sure how those keys would be passed while calling APIs.
Just to clarify, I am using suix_queryTransactionBlocks API to fetch transactions against any random SUI address.
hi @chkdmin , sure actually my requirement is to get transactions against any SUI address and a specific function using suix_queryTransactionBlocks API.
For example I need to query only staking transaction against an address so in filter, when I am passing FromAddress as '0xfb1e639da7789fa78b5747840f3511f2a1335c8fd11199a0100b8264b85b6a64' and function as 'request_add_stake'. It is returning below error-
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "expected value at line 4 column 99"
},
"id": 1
}
Oh Thank you for your response. I misunderstood that you had solved the problem.
I'm getting the error when combining filters like you.
I don't think there are any plans on the SUI side to support combined queries.
Following case is querying for events, not transactions, but events also throw errors when combine filters. and they told don't support it. #16872
I guess I'll have to find another way to solve the problem.
Combining filter in method suix_queryTransactionBlocks returning error. I want to get transactions for a address with certain function. so how can I apply multiple filters. Please guide. Thanks
Payload -
{
"jsonrpc": "2.0",
"id": 1,
"method": "suix_queryTransactionBlocks",
"params": [
{
"filter": {
"FromAddress": "0xfb1e639da7789fa78b5747840f3511f2a1335c8fd11199a0100b8264b85b6a64",
"MoveFunction": {
"function": "request_add_stake",
"module": "sui_system",
"package": "0x0000000000000000000000000000000000000000000000000000000000000003"
}
},
"options": {
"showBalanceChanges": false,
"showEffects": false,
"showEvents": false,
"showInput": false
}
}
]
}
Response -
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "expected value at line 4 column 99"
},
"id": 1
}
The text was updated successfully, but these errors were encountered: