toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'transactionHash': transactionHash,
'transactionIndex': '0x${transactionIndex.toRadixString(16)}',
'blockHash': blockHash,
'blockNumber': '0x${blockNumber.toRadixString(16)}',
'from': from,
if (to != null) 'to': to,
'cumulativeGasUsed': '0x${cumulativeGasUsed.toRadixString(16)}',
'gasUsed': '0x${gasUsed.toRadixString(16)}',
if (contractAddress != null) 'contractAddress': contractAddress,
'logs': logs.map((l) => l.toJson()).toList(),
'status': '0x${status.toRadixString(16)}',
if (effectiveGasPrice != null)
'effectiveGasPrice': '0x${effectiveGasPrice!.toRadixString(16)}',
};
}