I am trying to query past transactions by a specific move function from a package filter with the TS SDK:
const res = await suiClient.queryTransactionBlocks({
filter: {
MoveFunction:{
function: "add_channel",
module: "test2",
package: "0xa82ae62a22d8ae7f767e3c89de3562bebd3e435d5f22270f7cd2a9085107d863"
},
FromAddress: "0x3424e5f99e50dc02e1e271599774a0bcf8655226e24f19bbc06856b1b5c5e878"
},
limit: 10
});
I am still getting this error:
file:///Users/tahliltahlil/Desktop/GRLA_DAO/grla-web3/sui/scripts/node_modules/.pnpm/@mysten+sui.js@0.51.0/node_modules/@mysten/sui.js/dist/esm/client/http-transport.js:71
throw new JsonRpcError(data.error.message, data.error.code);
^
JsonRpcError: expected value at line 1 column 148
at SuiHTTPTransport.request (file:///Users/tahliltahlil/Desktop/GRLA_DAO/grla-web3/sui/scripts/node_modules/.pnpm/@mysten+sui.js@0.51.0/node_modules/@mysten/sui.js/dist/esm/client/http-transport.js:71:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SuiClient.queryTransactionBlocks (file:///Users/tahliltahlil/Desktop/GRLA_DAO/grla-web3/sui/scripts/node_modules/.pnpm/@mysten+sui.js@0.51.0/node_modules/@mysten/sui.js/dist/esm/client/client.js:211:12)
at async getAddChannelTxDetails (file:///Users/tahliltahlil/Desktop/GRLA_DAO/grla-web3/sui/scripts/checkGas.js:7:17)
at async main (file:///Users/tahliltahlil/Desktop/GRLA_DAO/grla-web3/sui/scripts/checkGas.js:23:5) {
code: -32602,
type: 'InvalidParams'
}
I am assuming something wrong with the MoveFunction
parameter. How to resolve this error?