tx · BypPR9VgXKjr9LKFr1LS1JnRz79o8gxExHSsqRUwre1n 3Ms1tCCM1iMN7Ri2iAmmRfTzGpQpCxSKpxt: -0.01400000 Waves 2020.04.07 11:27 [943623] smart account 3Ms1tCCM1iMN7Ri2iAmmRfTzGpQpCxSKpxt > SELF 0.00000000 Waves
{ "type": 13, "id": "BypPR9VgXKjr9LKFr1LS1JnRz79o8gxExHSsqRUwre1n", "fee": 1400000, "feeAssetId": null, "timestamp": 1586248116480, "version": 1, "sender": "3Ms1tCCM1iMN7Ri2iAmmRfTzGpQpCxSKpxt", "senderPublicKey": "A9oqCj1ciUvMLSEBPJsmGSsq5xdZUsYgZ8rT9dwpymM6", "proofs": [ "45qLirRvsaiPJppancGK2ZquSLmhvkZKzcksU975cBqSokzbpSUGFGTbcL3HChusWTPJgudRcmUQhzRUj1ZTCpcd" ], "script": "base64:AAIDAAAAAAAAABEIARIECgIICBIHCgUBCAgIAQAAAAMAAAAABkFDVElWRQAAAAAAAAAAAQAAAAAJUkVDT1ZFUkVEAAAAAAAAAAACAAAAAAhERUNFQVNFRAAAAAAAAAAAAwAAAAIAAAABaQEAAAALdXBkYXRlSW5mb3MAAAACAAAABGNpdHkAAAAFaW50cm8EAAAADG93bmVyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQUAAAAMb3duZXJBZGRyZXNzAgAAAAVfbmFtZQUAAAAEY2l0eQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQAEJQAAAAEFAAAADG93bmVyQWRkcmVzcwIAAAAGX2ludHJvBQAAAAVpbnRybwUAAAADbmlsAAAAAWkBAAAADWFkZFVwZGF0ZUNhc2UAAAAFAAAAAmlkAAAABmdlbmRlcgAAAANhZ2UAAAAIbG9jYXRpb24AAAAGc3RhdHVzBAAAAAxvd25lckFkZHJlc3MJAAQlA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dGllbnRJRAIAAAADX0lEBQAAAAlwYXRpZW50SUQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAADG93bmVyQWRkcmVzcwIAAAAJX3BhdGllbnRfCQABpAAAAAEFAAAACXBhdGllbnRJRAIAAAAHX2dlbmRlcgUAAAAGZ2VuZGVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAABF9hZ2UFAAAAA2FnZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAMb3duZXJBZGRyZXNzAgAAAAlfcGF0aWVudF8JAAGkAAAAAQUAAAAJcGF0aWVudElEAgAAAAlfbG9jYXRpb24FAAAACGxvY2F0aW9uCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAACV9wYXRpZW50XwkAAaQAAAABBQAAAAlwYXRpZW50SUQCAAAAB19zdGF0dXMFAAAADHN0cmluZ1N0YXR1cwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAxvd25lckFkZHJlc3MCAAAAC19jb3VudGVyTnVtBQAAAA11cGRhdGVDb3VudGVyBQAAAANuaWwAAAAAQaWP+A==", "chainId": 84, "height": 943623, "spentComplexity": 0 } View: original | compacted Prev: GHB29YhiK4KNfBwmLjvZrZg39auhwpgf7vN3opR1efFR Next: none Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | case c: Int => | |
23 | 23 | (c + 1) | |
24 | 24 | case _ => | |
25 | - | | |
25 | + | 1 | |
26 | 26 | } | |
27 | 27 | let patientID = match getInteger(this, (((ownerAddress + "_patient_") + toString(id)) + "_ID")) { | |
28 | 28 | case p: Int => |
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 + 1) | |
24 | 24 | case _ => | |
25 | - | | |
25 | + | 1 | |
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 | |
32 | 32 | } | |
33 | 33 | let updateCounter = if ((id == 0)) | |
34 | 34 | then counterNum | |
35 | 35 | else patientID | |
36 | 36 | let stringStatus = if ((status == ACTIVE)) | |
37 | 37 | then "active" | |
38 | 38 | else if ((status == RECOVERED)) | |
39 | 39 | then "recovered" | |
40 | 40 | else if ((status == DECEASED)) | |
41 | 41 | then "deceased" | |
42 | 42 | else throw("Wrong status") | |
43 | 43 | if ((stringStatus == "Wrong status")) | |
44 | 44 | then throw("Wrong status") | |
45 | 45 | else WriteSet([DataEntry((((ownerAddress + "_patient_") + toString(patientID)) + "_ID"), patientID), 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"), updateCounter)]) | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 |
github/deemru/w8io/026f985 32.77 ms ◑