transaction/gettxreceiptstatus - 获取指定交易的收据状态
使用Transaction模块的gettxreceiptstatus方法获取指定交易的收据状态。 注意该调用仅适用于拜占庭分叉之后的交易。
API调用
GET|POST /api
查询|表单参数:
- module:transaction
- action:gettxreceiptstatus
- txhash:要查询其收据的交易哈希
- apikey:etherscan API密钥
API返回结果
返回结果为一个JSON对象,主要字段如下:
- status:状态码,1为成功
- message:调用描述信息,OK为成功
- result:调用结果对象,包含如下字段:
- status:是否成功。0 - 失败 1 - 成功
示例代码
以curl为例的API调用代码如下,也可以直接点击这里查看浏览器中的执行结果:
~$ curl https://api.etherscan.io/api?module=transaction&action=gettxreceiptstatus&txhash=0x513c1ba0bebf66436b5fed86ab668452b7805593c05073eb2d51d3a52f480a76&apikey=YourApiKeyToken
返回结果:
{
"status": "1",
"message": "OK",
"result": {
"status": "1"
}
}