GET /inspect_tx endpoint
This endpoint allows you to obtain data about a mined transaction.
Query Parameters
- api_key –
The API key as found in the console to authenticate requests.
- tx_hash –
The transaction hash encoded as a 0x-prefixed hex string.
- chain –
Optional parameter to specify which chain the transaction is on.
Currently only ethereum-mainnet is acceptable.
More chains coming soon!
Default: ethereum-mainnet.
JSON Response
- status –
Either success or error.
- error_type –
Either internal_error, user_error or state_error.
Only presented when there is an error.
A user_error is due to a badly-formatted request.
A state_error is due to the state of the system preventing a response from being obtained.
An internal_error is our fault! Please contact us if this occurs.
- error_code – An error-specific code that can be used to test against.
Only presented when there is a state_error.
Either tx_not_found, unsupported_tx_type, bad_authentication or bad_authorization.
If the transaction is not found it means either the transaction doesn't exist or wasn't yet mined.
An unsupported transaction type means that it wasn't a contract interaction which is currently the only type supported.
A bad authentication means that a valid API key was not provided. Please register for one here.
A bad authorization means that the account associated with this API key was prevented from accessing our API for some reason. Please contact support if this occurs.
- error_message – A human-readable error message.
May be presented alongside errors.
- tx_status – The execution status of the mined transaction.
Either executed or reverted.
- logs – An array of logs. (Logs are also gathered for reverted transactions).
If the transaction was executed, this should match that of the live chain.
If the transaction was reverted, this should reveal the logs that would have been included up to the point of when the transaction failed.
Each log entry contains a topics array of 0x-prefixed hex strings as produced by the EVM log opcodes.
Each log entry contains a data 0x-prefixed hex string as produced by the EVM log opcodes.
Each log entry contains an address 0x-prefixed hex string revealing the contract address under which this log was produced / from which this log was created.
Response Codes
- A 200 status should only occur when a successful JSON output as described above is returned.
- A 400 status should only occur alongside a user_error.
- A 409 status should only occur alongside a state_error.
- A 500 status should only occur alongside an internal_error.
- Rate-limiting responses may also occur if requests are sent too frequently.
Request Weight
The request weight determines the amount charged as described on the pricing page.
For successful responses:
For transactions that were executed, 5 request-weight is added.
For transactions that were reverted, 10 request-weight is added instead.
For unsuccessful responses:
For a user_error, 1 request-weight is added.
For a state_error, 5 request-weight is added.
For any other error or lack of a successful response, no request-weight is added.