ForgedTransaction.fromJson constructor

ForgedTransaction.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ForgedTransaction.fromJson(Map<String, dynamic> json) {
  L1Info l1Info = L1Info.fromJson(json['L1Info']);
  L2Info l2Info = L2Info.fromJson(json['L2Info']);
  Token token = Token.fromJson(json['token']);
  return ForgedTransaction(
    l1info: l1Info,
    L1orL2: json['L1orL2'],
    l2info: l2Info,
    amount: json['amount'],
    batchNum: json['batchNum'],
    fromAccountIndex: json['fromAccountIndex'],
    fromBJJ: json['fromBJJ'],
    fromHezEthereumAddress: json['fromHezEthereumAddress'],
    historicUSD: double.tryParse(json['historicUSD'].toString()) ?? 0.0,
    id: json['id'],
    itemId: json['itemId'],
    position: json['position'],
    timestamp: json['timestamp'],
    toAccountIndex: json['toAccountIndex'],
    toBJJ: json['toBJJ'],
    toHezEthereumAddress: json['toHezEthereumAddress'],
    token: token,
    type: json['type'],
  );
}