add transactions to get block methods

pull/5370/head
Iuri Matias 6 years ago
parent 90b0f8bbbd
commit ae74f03b9d
  1. 8
      remix-simulator/src/methods/blocks.js

@ -38,9 +38,7 @@ Blocks.prototype.eth_getBlockByNumber = function (payload, cb) {
'gasLimit': toHex(block.header.gasLimit),
'gasUsed': toHex(block.header.gasUsed),
"timestamp": toHex(block.header.timestamp),
// TODO: add transactions
// block.transactions
"transactions": [],
"transactions": block.transactions.map((t) => "0x" + t.hash().toString('hex')),
"uncles": []
}
@ -79,9 +77,7 @@ Blocks.prototype.eth_getBlockByHash = function (payload, cb) {
'gasLimit': toHex(block.header.gasLimit),
'gasUsed': toHex(block.header.gasUsed),
"timestamp": toHex(block.header.timestamp),
// TODO: add transactions
// block.transactions
"transactions": [],
"transactions": block.transactions.map((t) => "0x" + t.hash().toString('hex')),
"uncles": []
}

Loading…
Cancel
Save