tx · 6cZP8G4rC591CipNZZxWwSmW5T21XgC2jAE2UDBSbbwq 3NA9EqBLzdqVk3HeXo8bCZps9Brxtyu9qB2: -0.01400000 Waves 2020.04.07 10:53 [943591] smart account 3NA9EqBLzdqVk3HeXo8bCZps9Brxtyu9qB2 > SELF 0.00000000 Waves
{ "type": 13, "id": "6cZP8G4rC591CipNZZxWwSmW5T21XgC2jAE2UDBSbbwq", "fee": 1400000, "feeAssetId": null, "timestamp": 1586246011397, "version": 1, "sender": "3NA9EqBLzdqVk3HeXo8bCZps9Brxtyu9qB2", "senderPublicKey": "HiegtwzYYT7w7bmyj9gnGHmfXgGYCMBW6dKshoBik5b5", "proofs": [ "447HQpokcLYbN1hnvAGe1UnRBmAnp6W8x8kfjkUPTdrkY3HBe2VxPsfe5Ab6HADvXgdie5vvSNSqx7xrSuPZ2Z5q" ], "script": "base64:AAIDAAAAAAAAABEIARIECgIICBIHCgUBCAgIAQAAAAMAAAAABkFDVElWRQAAAAAAAAAAAQAAAAAJUkVDT1ZFUkVEAAAAAAAAAAACAAAAAAhERUNFQVNFRAAAAAAAAAAAAwAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABGNpdHkAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEY2l0eQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAFAAAAAmlkAAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAAGc3RhdHVzBAAAAAxvd25lckFkZHJlc3MJAAQlAA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AAEsAAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAAB19nZW5kZXIFAAAABmdlbmRlcgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAARfYWdlBQAAAANhZ2UJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAJX2xvY2F0aW9uBQAAAAhsb2NhdGlvbgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAAdfc3RhdHVzBQAAAAxzdHJpbmdTdGF0dXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAtfY291bnRlck51bQUAAAAJcGF0aWVudElEBQAAAANuaWwAAAAABJsTzA==", "chainId": 84, "height": 943591, "spentComplexity": 0 } View: original | compacted Prev: GXghdgTiLmWQMz4cbTuaNKPUdajCy32dgRtVV5giX8p5 Next: 1SHEThSbMm22yGPpsmBjbAmHpoCYVUZYuyBEcS6HisH Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | else throw("Wrong status") | |
40 | 40 | if ((stringStatus == "Wrong status")) | |
41 | 41 | then throw("Wrong status") | |
42 | - | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_ID"), i.transactionId), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), stringStatus), DataEntry((ownerAddress + "_counterNum"), | |
42 | + | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_ID"), i.transactionId), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), stringStatus), DataEntry((ownerAddress + "_counterNum"), patientID)]) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ACTIVE = 1 | |
5 | 5 | ||
6 | 6 | let RECOVERED = 2 | |
7 | 7 | ||
8 | 8 | let DECEASED = 3 | |
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | 11 | func updateInfos (city,intro) = { | |
12 | 12 | let ownerAddress = i.caller | |
13 | 13 | WriteSet([DataEntry((toString(ownerAddress) + "_name"), city), DataEntry((toString(ownerAddress) + "_intro"), intro)]) | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | 18 | @Callable(i) | |
19 | 19 | func addUpdateCase (id,gender,age,location,status) = { | |
20 | 20 | let ownerAddress = toString(i.caller) | |
21 | 21 | let counterNum = match getInteger(this, (ownerAddress + "_counterNum")) { | |
22 | 22 | case c: Int => | |
23 | 23 | c | |
24 | 24 | case _ => | |
25 | 25 | 0 | |
26 | 26 | } | |
27 | 27 | let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(id)) + "_ID")) { | |
28 | 28 | case p: Int => | |
29 | 29 | p | |
30 | 30 | case _ => | |
31 | 31 | (counterNum + 1) | |
32 | 32 | } | |
33 | 33 | let stringStatus = if ((status == ACTIVE)) | |
34 | 34 | then "active" | |
35 | 35 | else if ((status == RECOVERED)) | |
36 | 36 | then "recovered" | |
37 | 37 | else if ((status == DECEASED)) | |
38 | 38 | then "deceased" | |
39 | 39 | else throw("Wrong status") | |
40 | 40 | if ((stringStatus == "Wrong status")) | |
41 | 41 | then throw("Wrong status") | |
42 | - | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_ID"), i.transactionId), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), stringStatus), DataEntry((ownerAddress + "_counterNum"), | |
42 | + | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_ID"), i.transactionId), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), stringStatus), DataEntry((ownerAddress + "_counterNum"), patientID)]) | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 |
github/deemru/w8io/169f3d6 43.19 ms ◑