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.
GET/receipts
Query Parameters
- Name
page
- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit
- Type
- integer
- Description
The number of resources per page.
- Name
txHash
- Type
- string
- Description
The transaction hash to filter receipts.
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={txHash}curl https://testnet.mainsailhq.com/api/receipts?txHash={txHash}
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 1,
"first": "/receipts?txHash=9785a75575426ae6cbb6123fca50112e808e046da8294f802f387ce4fef4c274&limit=100&page=1",
"last": "/receipts?txHash=9785a75575426ae6cbb6123fca50112e808e046da8294f802f387ce4fef4c274&limit=100&page=1",
"next": null,
"pageCount": 1,
"previous": null,
"self": "/receipts?txHash=9785a75575426ae6cbb6123fca50112e808e046da8294f802f387ce4fef4c274&limit=100&page=1",
"totalCount": 1
},
"data": [
{
"transactionHash": "9785a75575426ae6cbb6123fca50112e808e046da8294f802f387ce4fef4c274",
"success": true,
"blockNumber": "0",
"gasUsed": 92356,
"gasRefunded": 0,
"contractAddress": null,
"logs": [
{
"data": "0x000000000000000000000000b34415af3a8127596b94f86efdb6adae2e9df45e000000000000000000000000b34415af3a8127596b94f86efdb6adae2e9df45e",
"topics": [
"0xce0c7a2a940807f7dc2ce7a615c2532e915e6c0ac9a08bc4ed9d515a710a53e2"
],
"address": "0x522B3294E6d06aA25Ad0f1B8891242E335D3B459"
}
],
"output": "0x"
}
]
}