toJSON method
Implementation
Map<String, dynamic> toJSON() {
return {
'to': to,
'from': from,
'gas': '0x${gasLimit.toRadixString(16)}',
'gasPrice': '0x${gasPrice.toRadixString(16)}', // TODO: it's gwei?
'value': '0x${value.toRadixString(16)}', // TODO: it's gwei?
if (data != null) 'data': bytesToHex(data!, include0x: true),
};
}