fromJson static method
Implementation
static TransactionReceipt fromJson(Map<String, dynamic> jsonReceipt) {
int type = jsonReceipt['type'];
switch (type) {
case 0:
return ReceiptCall.fromJson(jsonReceipt);
case 1:
return ReceiptReturn.fromJson(jsonReceipt);
case 2:
return ReceiptReturnData.fromJson(jsonReceipt);
case 3:
return ReceiptPanic.fromJson(jsonReceipt);
case 4:
return ReceiptRevert.fromJson(jsonReceipt);
case 5:
return ReceiptLog.fromJson(jsonReceipt);
case 6:
return ReceiptLogData.fromJson(jsonReceipt);
case 7:
return ReceiptTransfer.fromJson(jsonReceipt);
case 8:
return ReceiptTransferOut.fromJson(jsonReceipt);
case 9:
return ReceiptScriptResult.fromJson(jsonReceipt);
case 10:
return ReceiptMessageOut.fromJson(jsonReceipt);
default:
throw Exception('Cannot parse transaction receipt');
}
}