0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Ethereum】transactionHashからcontractAddressを調べる方法

Last updated at Posted at 2018-12-06

コントラクトのアドレスは、トランザクションレシートに記載されています。
JSON-RPCでeth_getTransactionReceiptを呼び出すことで、トランザクションレシートを確認できます。

JSON-RPC リクエスト例
{
  "jsonrpc" : "2.0",
  "method" : "eth_getTransactionReceipt",
  "params" : [
    "トランザクションハッシュ"
  ],
  "id" : 1
}
JSON-RPC レスポンス例
{
  "jsonrpc" : "2.0",
  "id" : 1,
  "result" : {
    "blockHash" : "...",
    "blockNumber" : "...",
    "contractAddress" : "コントラクトのアドレス",
    "cumulativeGasUsed": "...",
    "from": "...",
    "gasUsed": "...",
    "logs":[],
    "logsBloom": "...",
    "root": "...",
    "to": null,
    "transactionHash": "...",
    "transactionIndex": "..."
  }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?