4

I'm not sure why this error occurs when I'm trying to getTransaction.

curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "getTransaction",
     "params": [
       "5wSgBWy4XE9VZW91emQF6k7bjTSJ3ndVzdraRJBTdtHJ9HgQHH7e8Bn5AiASnYRTJ5BZ7gDAnn8tzKFtR8Uodfok",
       {"encoding: "json", "maxSupportedTransactionVersion":0}
     ]
   }
 '

Output

{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}      
1
  • make sure the transaction is base58 encoded, otherwise use base64.
    – vicyyn
    Dec 21, 2022 at 16:09

1 Answer 1

1

You're missing a quote after encoding. I think the versioned-transaction aspect is fine.

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.