Miner: {{index (strings "blocks" "miner" "cid=?" $cid) 0}}
Parents:
{{range strings "block_parents" "parent" "block=?" $cid}}
{{$parent := .}}
{{. | substr 54 62}}
{{end}}
Messages:
{{range strings "block_messages" "message" "block=?" $cid}}
{{$msg := .}}
{{$msg | substr 54 62}} |
{{$from := qstr "select \"from\" from messages where cid=?" $msg}}
{{$nonce := qstr "select nonce from messages where cid=?" $msg}}
{{$from}} (N:{{$nonce}})
|
-> |
{{$to := qstr "select \"to\" from messages where cid=?" $msg}}
{{$to}}
|
Method:{{qstr "select method from messages where cid=?" $msg}}
|
{{$rec := qstrs `select r.exit, r.gas_used from messages
inner join block_messages bm on messages.cid = bm.message
inner join blocks b on bm.block = b.cid
inner join block_parents bp on b.cid = bp.parent
inner join blocks chd on bp.block = chd.cid
inner join receipts r on messages.cid = r.msg and chd.parentStateRoot = r.state
where messages.cid=? and b.cid=?` 2 $msg $cid}}
exit:{{index $rec 0}} |
gasUsed:{{index $rec 1}} |
{{end}}