4

I am getting an error for these transactions:

3D5pNo4kAC3LRJi5JyVMiCBAhj1DKeujsfS7q2rvQwXX7kkUVPZX9j2wHVHDjpwhNPYH75fEPWThw8a7SG84pH8E
4xfwN51GFa85C1okPCR9oGKzm9kM8XFg1jNJVeL26RAmnZifyk3LaG2Q2ykEQt2csUeST4Y88iX5rjqRLwKyAj5E
36KhL9wXQJeTV7AGWA8GaPBPSpw26oZjMc2kvEUuFxGmksxTNik9TiCbk19AWoSo9cdC1Xtv8N7nys3MmraPMFSA
5c9K7hiR1xk86wwq1dBYtts6rnhGbwgR3vaoLKJzR7PYmnFK5yzUvHx2Z3QvjLoVUQBzeUdJPywneeSAKxpCESCi
2hnadqANB8m4J4trXeQmRd2DnDeuazhk9o8G3jcYbc85xNUeKxDLbCXZ3dq1kK1rYMELX4sDNty3Uf7zhyqcLRoH

curl -

curl --location --request POST 'http://api.mainnet-beta.solana.com/'
--header 'Content-Type: application/json'
--data-raw '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getConfirmedTransaction",
  "params": [
    "5HbX6YFiQJsUhG1RM6YN8KNNY86rEpRJpG9WUWJmirAeiby5B6b6nH5qK43xctCxhecLKCmdKzuA1uFqFrLMfALg",
    "json"
  ]
}
'
o/p -
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32015,
    "message": "Transaction version (0) is not supported by the requesting client. Please try the request again with the following configuration parameter: "maxSupportedTransactionVersion": 0"
  },
  "id": 1
}

Thanks Umang Awasthy

2 Answers 2

4

Be sure to add the "maxSupportedTransactionVersion" param to your call to correctly get v0 transactions. That means doing:

curl --location --request POST 'http://api.mainnet-beta.solana.com/' \
  --header 'Content-Type: application/json' --data-raw \
' { "jsonrpc": "2.0", "id": 1, "method": "getConfirmedTransaction", "params": ["5HbX6YFiQJsUhG1RM6YN8KNNY86rEpRJpG9WUWJmirAeiby5B6b6nH5qK43xctCxhecLKCmdKzuA1uFqFrLMfALg", {"encoding: "json", "maxSupportedTransactionVersion":0} ] }

Sorry for the rough formatting, but that should do it! You can learn more about the optional parameters at https://docs.solana.com/developing/clients/jsonrpc-api#gettransaction

4

For web3.js users:

await connection.getParsedTransactions(signatures, {
  maxSupportedTransactionVersion: 0,
});

See https://docs.solana.com/developing/versioned-transactions for information on transaction versions.

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.