0

I am trying to send get request as follows but it returns nothing... Can you please guide me how to fix this issue? and how to figure out the datasize and bytes for any program address...

{
jsonrpc:"2.0",
id:0,
method:"getProgramAccounts",
params:[
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",
{
encoding:"jsonParsed",
filters:[
{
dataSize:165
},
{
memcmp:{
offset:32,
bytes:"my_wallet_public_address"
       }
}
      ]
}
      ]
}
1
  • 1
    Solved it! though getTokenAccountsByOwner
    – kokiez
    Commented Dec 22, 2023 at 4:50

1 Answer 1

3

That's because dataSize 165 is for TOKEN_PROGRAM_ID, for Token 2022 you should use dataSize:182

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.