web3.js web3.eth.getTransactionFromBlock
getTransactionFromBlock(hashStringOrNumber, indexNumber [, callback])
ブロックハッシュまたはブロック番号、およびトランザクションのインデックス位置に基づき、トランザクションを返します。
パラメータ
1. String
ブロック番号またはハッシュ
または web3.js web3.eth.defaultBlock で定義されているつぎの文字列
"genesis"
"latest"
"pending"
2. Number
トランザクションのインデックス位置
3. Function
オプショナル
コールバック
第一引数に error オブジェクト、第二引数に result オブジェクトが渡されます。
戻り値
Object を返す Promise
トランザクションオブジェクト
詳細は web3.js web3.eth.getTransaction を参照してください。
サンプル
code:example.js
var transaction = web3.eth.getTransactionFromBlock('0x4534534534', 2)
.then(console.log);
// 戻り値の詳細は web3.eth.getTransaction を参照
参考
http://web3js.readthedocs.io/en/1.0/web3-eth.html#gettransactionfromblock
#web3.js #web3.js@1.0
web3.js 日本語 API リファレンス #180813