Skip to content

Get Transaction Receipt

After calling a contract method, you can retrieve the transaction receipt to check status, gas used, logs, and other result metadata. This guide shows you how to fetch it.

Before you begin, ensure:

  • You’ve successfully called a contract method
  • You have the txId returned from the call
GET /v2/contract/tx/{txId}/receipt

Example Request

get-tx-receipt.sh
curl -X GET https://api.fsco.io/v2/contract/tx/{{transactionId}}/receipt \
-H "Authorization: Bearer $FSCO_API_KEY"

Response

response.json
{
"response": {
"to": "0xContractAddress",
"from": "0xSenderAddress",
"value": "0",
"gas": {
"used": "21000",
"price": "50000000000"
},
"block": {
"hash": "0xabcde123456789...",
"number": 19385732
},
"tx": {
"hash": "0xdeadbeef123456...",
"index": 5,
"status": 1
},
"execution": {
"logs": [
{
"address": "0xContractAddress",
"topics": ["0x123456789abcdef..."],
"data": "0x7465737464617461"
}
]
}
}
}
  • The receipt contains execution details such as status, gasUsed, logs, and more
  • Some chains may introduce a delay between transaction submission and receipt availability
  • If status is false, the transaction was reverted