tx · J4Q18XjvEAfQaAQ72odZdu7owmBAWvesmeUQx6MCAHJa 3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR: -0.01400000 Waves 2022.10.13 10:17 [2270267] smart account 3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR > SELF 0.00000000 Waves
{ "type": 13, "id": "J4Q18XjvEAfQaAQ72odZdu7owmBAWvesmeUQx6MCAHJa", "fee": 1400000, "feeAssetId": null, "timestamp": 1665645286992, "version": 2, "chainId": 84, "sender": "3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR", "senderPublicKey": "GjnhUMpwQus4JiztKNVi1bLKtwBS2UT3YpxVyqsYB4KG", "proofs": [ "qdY8HsLLu1ZuFTG6NTYeGYVXsvLo4eaSt3fcP1iCLH8oAEpq6HRrZXoXJvkRjraEkYKaoPAZJC6KzftSmHmN8RN" ], "script": "base64:AAIDAAAAAAAAAA0IARIJCgcBCAEICAEBAAAAAAAAAAEAAAABaQEAAAANYWRkVXBkYXRlQ2FzZQAAAAcAAAALaWRlbnRpZmlhbnQAAAAGZ2VuZGVyAAAAA2FnZQAAAAhsb2NhdGlvbgAAAANwZWMAAAAGc3RhdHVzAAAABGRhdGUEAAAADG93bmVyQWRkcmVzcwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAAEWN1cnJlbnRDb3VudGVyTnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAtfY291bnRlck51bQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFjBQAAAAckbWF0Y2gwBQAAAAFjAAAAAAAAAAAABAAAAAlwYXRpZW50SUQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAALaWRlbnRpZmlhbnQCAAA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LAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAFX2pzb24FAAAABGpzb24JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAtfY291bnRlck51bQUAAAANdXBkYXRlQ291bnRlcgUAAAADbmlsAAAAAIiKoOk=", "height": 2270267, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9JhBNHrobE3AkmzBognwFwiN29zAjmQSqf1XLs2qmWit Next: GRSiT7PZrH1bxGi8vbcSVBbFkVNoT16XKKkhCuyovXWL Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func addUpdateCase (identifiant,gender,age,location,pec,status,date) = { | |
8 | 8 | let ownerAddress = toString(i.caller) | |
9 | 9 | let currentCounterNum = match getInteger(this, (ownerAddress + "_counterNum")) { | |
10 | 10 | case c: Int => | |
11 | 11 | c | |
12 | 12 | case _ => | |
13 | 13 | 0 | |
14 | 14 | } | |
15 | 15 | let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(identifiant)) + "_identifiant")) { | |
16 | 16 | case p: Int => | |
17 | 17 | p | |
18 | 18 | case _ => | |
19 | 19 | (currentCounterNum + 1) | |
20 | 20 | } | |
21 | 21 | let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}") | |
22 | 22 | let updateCounter = if ((identifiant == 0)) | |
23 | 23 | then (currentCounterNum + 1) | |
24 | 24 | else currentCounterNum | |
25 | 25 | if (if (if ((status != 1)) | |
26 | 26 | then (status != 2) | |
27 | 27 | else false) | |
28 | 28 | then (status != 3) | |
29 | 29 | else false) | |
30 | 30 | then throw("Wrong status") | |
31 | 31 | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_identifiant"), patientID), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_gender"), gender), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_age"), age), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_pec"), pec), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_location"), location), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_status"), status), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_date"), date), DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_json"), json), DataEntry((ownerAddress + "_counterNum"), updateCounter)]) | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 |
github/deemru/w8io/169f3d6 31.87 ms ◑