tx · 3r8CcxPkf2XXMtY19EjkHe71jAJwdPAef7RAGWPruua9 3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR: -0.01400000 Waves 2022.10.14 14:22 [2271952] smart account 3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR > SELF 0.00000000 Waves
{ "type": 13, "id": "3r8CcxPkf2XXMtY19EjkHe71jAJwdPAef7RAGWPruua9", "fee": 1400000, "feeAssetId": null, "timestamp": 1665746356653, "version": 2, "chainId": 84, "sender": "3MvUPcLYNFkmNzkA2h8jVU1fVK416VCT3hR", "senderPublicKey": "GjnhUMpwQus4JiztKNVi1bLKtwBS2UT3YpxVyqsYB4KG", "proofs": [ "3RFBEhqmMu1cnyNw9TSuZkqiRtScmJTFmaoEg4929XFsS61Ln5Hw6m8sdQYuxnDTq9pD7s2FzEk4tUAW6e5Xei6y" ], "script": "base64:AAIDAAAAAAAAABMIARIECgIICBIJCgcBCAEICAEBAAAAAAAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABG5hbWUAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEbmFtZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAHAAAAC2lkZW50aWZpYW50AAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAADcGVjAAAABnN0YXR1cwAAAARkYXRlBAAAAAxvd25lckFkZHJlc3MJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAABFjdXJyZW50Q291bnRlck51bQ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AAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAAB19nZW5kZXIFAAAABmdlbmRlcgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAARfYWdlBQAAAANhZ2UJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAEX3BlYwUAAAADcGVjCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAACV9sb2NhdGlvbgUAAAAIbG9jYXRpb24JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAHX3N0YXR1cwUAAAAGc3RhdHVzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAABV9kYXRlBQAAAARkYXRlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAALX2NvdW50ZXJOdW0FAAAADXVwZGF0ZUNvdW50ZXIFAAAAA25pbAAAAAAObQov", "height": 2271952, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7XWFqo2kS2bq7GcMRBXatGT8CnMfRao3tGdwSDvr8BE2 Next: Bk8x4497kZb54QMJmrgwRpXcTzCp2iKVJFvw8C93NcT7 Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | case _ => | |
27 | 27 | (currentCounterNum + 1) | |
28 | 28 | } | |
29 | - | let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}") | |
30 | 29 | let updateCounter = if ((identifiant == 0)) | |
31 | 30 | then (currentCounterNum + 1) | |
32 | 31 | else currentCounterNum | |
36 | 35 | then (status != 3) | |
37 | 36 | else false) | |
38 | 37 | then throw("Wrong status") | |
39 | - | 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(( | |
38 | + | 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 + "_counterNum"), updateCounter)]) | |
40 | 39 | } | |
41 | 40 | ||
42 | 41 |
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 updateInfos (name,intro) = { | |
8 | 8 | let ownerAddress = i.caller | |
9 | 9 | WriteSet([DataEntry((toString(ownerAddress) + "_name"), name), DataEntry((toString(ownerAddress) + "_intro"), intro)]) | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | 14 | @Callable(i) | |
15 | 15 | func addUpdateCase (identifiant,gender,age,location,pec,status,date) = { | |
16 | 16 | let ownerAddress = toString(i.caller) | |
17 | 17 | let currentCounterNum = match getInteger(this, (ownerAddress + "_counterNum")) { | |
18 | 18 | case c: Int => | |
19 | 19 | c | |
20 | 20 | case _ => | |
21 | 21 | 0 | |
22 | 22 | } | |
23 | 23 | let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(identifiant)) + "_identifiant")) { | |
24 | 24 | case p: Int => | |
25 | 25 | p | |
26 | 26 | case _ => | |
27 | 27 | (currentCounterNum + 1) | |
28 | 28 | } | |
29 | - | let json = (((((((((((((("{\"identifiant\":\"" + toString(patientID)) + "\",\"gender\":\"") + gender) + "\",\"age\":\"") + toString(age)) + "\",\"pec\":\"") + pec) + "\",\"location\":\"") + location) + "\",\"date\":\"") + toString(date)) + "\",\"status\":\"") + toString(status)) + "\"}") | |
30 | 29 | let updateCounter = if ((identifiant == 0)) | |
31 | 30 | then (currentCounterNum + 1) | |
32 | 31 | else currentCounterNum | |
33 | 32 | if (if (if ((status != 1)) | |
34 | 33 | then (status != 2) | |
35 | 34 | else false) | |
36 | 35 | then (status != 3) | |
37 | 36 | else false) | |
38 | 37 | then throw("Wrong status") | |
39 | - | 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(( | |
38 | + | 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 + "_counterNum"), updateCounter)]) | |
40 | 39 | } | |
41 | 40 | ||
42 | 41 |
github/deemru/w8io/026f985 43.22 ms ◑