Transaction.fromJson constructor
Transaction.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Transaction.fromJson(Map<String, dynamic> json) {
return Transaction(
hash: json['hash'],
nonce: json['nonce'],
transactionIndex: json['transaction_index'],
fromAddress: json['from_address'],
toAddress: json['to_address'],
value: json['value'],
gas: json['gas'],
gasPrice: json['gas_price'],
input: json['input'],
receiptCumulativeGasUsed: json['receipt_cumulative_gas_used'],
receiptGasUsed: json['receipt_gas_used'],
receiptContractAddress: json['receipt_contract_address'],
receiptRoot: json['receipt_root'],
receiptStatus: json['receipt_status'],
blockTimestamp: json['block_timestamp'],
blockNumber: json['block_number'],
blockHash: json['block_hash'],
transferIndex: List<int>.from(json['transfer_index'] ?? []),
toAddressLabel: json['to_address_label'] ?? '',
);
}