Receipts
A receipt contains details about the execution of a transaction, including gas used, success status, and logs generated.
Properties
- Name
transactionHash- Type
- string
- Description
The unique identifier of the receipt (transaction hash).
- Name
status- Type
- integer
- Description
The status of the transaction (1 for success, 0 for failure).
- Name
blockNumber- Type
- string
- Description
The height of the block containing this receipt.
- Name
gasUsed- Type
- integer
- Description
The amount of gas used by this transaction.
- Name
gasRefunded- Type
- integer
- Description
The amount of gas refunded after transaction execution.
- Name
contractAddress- Type
- string
- Description
The address of the contract deployed by the transaction, if applicable.
- Name
logs- Type
- array
- Description
Array of log objects generated by this transaction, including data and topics.
- Name
output- Type
- string
- Description
The output data from the transaction.
Request
GET
/receiptscurl https://testnet.mainsailhq.com/api/receipts
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 100,
"first": "/receipts?limit=100&page=1",
"last": "/receipts?limit=100&page=2",
"next": "/receipts?limit=100&page=2",
"pageCount": 2,
"previous": null,
"self": "/receipts?limit=100&page=1",
"totalCount": 162
},
"data": [
{
"transactionHash": "4adf082eed58eb7447e7ad4ad3de84862f5803b6519244a74808b3dffb204663",
"status": 1,
"blockNumber": "0",
"gasUsed": 92344,
"gasRefunded": 0,
"contractAddress": null,
"logs": [
{
"data": "0x0000000000000000000000001bf9cf8a006a5279ca81ea9d3f6ac2d41e1353e20000000000000000000000001bf9cf8a006a5279ca81ea9d3f6ac2d41e1353e2",
"topics": [
"0xce0c7a2a940807f7dc2ce7a615c2532e915e6c0ac9a08bc4ed9d515a710a53e2"
],
"address": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459"
}
],
"output": "0x"
}
// ...
]
}
Request
GET
/receipts/{txHash}curl https://testnet.mainsailhq.com/api/receipts/{txHash}
Response
{
"data": [
{
"transactionHash": "3c669fb93baa09b2f93dd59bf2584864aaeaef42f1ac0f9ebbc0406db570afb4",
"status": 0,
"gasUsed": 28476,
"gasRefunded": 0,
"contractAddress": null,
"logs": null,
"output": "0xcd03235e"
}
]
}