|
|
@ -147,19 +147,18 @@ export class LogsManager { |
|
|
|
getLogsByTxHash (hash) { |
|
|
|
getLogsByTxHash (hash) { |
|
|
|
return this.oldLogs.filter((log) => '0x' + log.tx.hash().toString('hex') === hash) |
|
|
|
return this.oldLogs.filter((log) => '0x' + log.tx.hash().toString('hex') === hash) |
|
|
|
.map((log) => { |
|
|
|
.map((log) => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
logIndex: '0x1', // 1
|
|
|
|
logIndex: '0x1', // 1
|
|
|
|
blockNumber: log.blockNumber, |
|
|
|
blockNumber: log.blockNumber, |
|
|
|
blockHash: ('0x' + log.block.hash().toString('hex')), |
|
|
|
blockHash: ('0x' + log.block.hash().toString('hex')), |
|
|
|
transactionHash: ('0x' + log.tx.hash().toString('hex')), |
|
|
|
transactionHash: ('0x' + log.tx.hash().toString('hex')), |
|
|
|
transactionIndex: '0x' + log.txNumber.toString(16), |
|
|
|
transactionIndex: '0x' + log.txNumber.toString(16), |
|
|
|
// TODO: if it's a contract deploy, it should be that address instead
|
|
|
|
// TODO: if it's a contract deploy, it should be that address instead
|
|
|
|
address: log.log.address, |
|
|
|
address: log.log.address, |
|
|
|
data: log.log.data, |
|
|
|
data: log.log.data, |
|
|
|
topics: log.log.topics |
|
|
|
topics: log.log.topics |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getLogsFor (params) { |
|
|
|
getLogsFor (params) { |
|
|
|