you_getTransactionReceipt

描述:返回指定交易的收据,使用哈希指定交易

parameter

数据类型 备注
String, 32 字节 交易哈希
"params": ["0xac79c817f2183e2dc052fd136c42ca828a4e080e06e32a9cfbb2ea31358b93ee"]

return

Object - 交易收据对象,如果收据不存在则为 null。交易对象的结构如下:

参数值 数据类型 备注
transactionHash String, 32字节 交易哈希
transactionIndex String 交易在块内的索引序号
blockHash String, 32 字节 交易所在块的哈希
blockNumber String 交易所在块的编号
from String, 20 字节 交易发送方地址
to String, 20 字节 交易接收方地址,对于合约创建交易该值为 null
cumulativeGasUsed String 交易所在块消耗的 gas 总量
gasUsed String 该次交易消耗的 gas 用量
contractAddress String, 20 字节 对于合约创建交易,该值为新创建的合约地址,否则为 null
status String 状态 0x0失败 0x1成功
logs Array 本次交易生成的日志对象数组
logsBloom String, 256 字节 bloom 过滤器,轻客户端用来快速提取相关日志

example

Request:

curl -X POST \
  http://127.0.0.1:8283 \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "you_getTransactionReceipt",
    "params": ["0xac79c817f2183e2dc052fd136c42ca828a4e080e06e32a9cfbb2ea31358b93ee"]
}'

Response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xbbad8715442eb5c9277be5f279555b3d7cb61e5543480bca7b36eff0d8bbe347",
        "blockNumber": "0x940",
        "contractAddress": null,
        "cumulativeGasUsed": "0x5208",
        "from": "0x59677fd68ec54e43ad4319d915f81748b5a6ff8b",
        "gasUsed": "0x5208",
        "logs": [],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": "0x8009a7Cbd192B3aeD4adb983D5284552c16C7451",
        "transactionHash": "0xac79c817f2183e2dc052fd136c42ca828a4e080e06e32a9cfbb2ea31358b93ee",
        "transactionIndex": "0x0"
    }
}