tx · 2vNnD1nTj72YtccnXYPNkRQD6ZwKkuDaKFQ5ydv8WyEy 3NBgWYpavjVW76HBJit3bxRz3AYoh3e2ypE: -0.01400000 Waves 2020.04.14 16:34 [954149] smart account 3NBgWYpavjVW76HBJit3bxRz3AYoh3e2ypE > SELF 0.00000000 Waves
{ "type": 13, "id": "2vNnD1nTj72YtccnXYPNkRQD6ZwKkuDaKFQ5ydv8WyEy", "fee": 1400000, "feeAssetId": null, "timestamp": 1586871353765, "version": 1, "sender": "3NBgWYpavjVW76HBJit3bxRz3AYoh3e2ypE", "senderPublicKey": "EgoDg6phs3tteCtrYsHdiG964dgXGWp6tjfxXgq46ZDT", "proofs": [ "57xPg88MBq7PFRG4z72gsHScJhYBoVaAtpkXXk6PgWACSAvC3vCs4mcAoGWHSJNgwtw8gUNsGPNv6xmKfLBQXthi" ], "script": "base64:AAIDAAAAAAAAABMIARIECgIICBIJCgcBCAgICAEBAAAAAAAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABGNpdHkAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEY2l0eQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAHAAAAC2lkZW50aWZpYW50AAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAADcGVjAAAABnN0YXR1cwAAAARkYXRlBAAAAAxvd25lckFkZHJlc3MJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBAAAAApjb3VudGVyTnVtBAAAAAckbWF0Y2g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zdGF0dXMFAAAABnN0YXR1cwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAAVfZGF0ZQUAAAAEZGF0ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAAVfanNvbgUAAAAEanNvbgkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAAC19jb3VudGVyTnVtBQAAAA11cGRhdGVDb3VudGVyBQAAAANuaWwAAAAAmEeuZQ==", "chainId": 84, "height": 954149, "spentComplexity": 0 } View: original | compacted Prev: none Next: 8B6SqmBQUgybTfs9ZmqYYuVAGsq46dV95wCbtBvPu4Ge Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func updateInfos (city,intro) = { | |
8 | + | let ownerAddress = i.caller | |
9 | + | WriteSet([DataEntry((toString(ownerAddress) + "_name"), city), DataEntry((toString(ownerAddress) + "_intro"), intro)]) | |
10 | + | } | |
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | @Callable(i) | |
15 | + | func addUpdateCase (identifiant,gender,age,location,pec,status,date) = { | |
16 | + | let ownerAddress = toString(i.caller) | |
17 | + | let counterNum = match getInteger(this, (ownerAddress + "_counterNum")) { | |
18 | + | case c: Int => | |
19 | + | (c + 1) | |
20 | + | case _ => | |
21 | + | 1 | |
22 | + | } | |
23 | + | let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(identifiant)) + "_identifiant")) { | |
24 | + | case p: Int => | |
25 | + | p | |
26 | + | case _ => | |
27 | + | counterNum | |
28 | + | } | |
29 | + | let json = (((((((((((((("{identifiant:\"" + toString(patientID)) + "\",gender:\"") + gender) + "\",age:\"") + age) + "\",pec:\"") + pec) + "\",location:\"") + location) + "\",date:\"") + toString(date)) + "\",status:\"") + toString(status)) + "\"}") | |
30 | + | let updateCounter = if ((identifiant == 0)) | |
31 | + | then counterNum | |
32 | + | else patientID | |
33 | + | if (if (if ((status != 1)) | |
34 | + | then (status != 2) | |
35 | + | else false) | |
36 | + | then (status != 3) | |
37 | + | else false) | |
38 | + | 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((((ownerAddress + "_patient_") + toString(patientID)) + "_json"), json), DataEntry((ownerAddress + "_counterNum"), updateCounter)]) | |
40 | + | } | |
41 | + | ||
42 | + |
github/deemru/w8io/026f985 22.70 ms ◑