tx · 3BfikUH99GiAxFWWdS1fcNTSjF5zzKtB4oAqzSJX8Rzy 3N88AKRewjqioexekkYeYXCEgXtEo3zb4Sn: -0.00100000 Waves 2024.11.14 14:25 [3371028] smart account 3N88AKRewjqioexekkYeYXCEgXtEo3zb4Sn > SELF 0.00000000 Waves
{ "type": 13, "id": "3BfikUH99GiAxFWWdS1fcNTSjF5zzKtB4oAqzSJX8Rzy", "fee": 100000, "feeAssetId": null, "timestamp": 1731583531371, "version": 2, "chainId": 84, "sender": "3N88AKRewjqioexekkYeYXCEgXtEo3zb4Sn", "senderPublicKey": "99kRWgrHieaDTtDjFCy2CE3gGi2N9WqyFeMQhzBr4dmc", "proofs": [ "44MNfqkeZmSJWS1Y9CZhpF4CLBJFTftfJo6Bebow2zYreTU9iTg9UprcRdWsJfQrcVbuEXrVqT1Ddb9rerEuK74D" ], "script": "base64:CAIWCAISBQoDCAgIEgUKAwgICBIECgIICAIBCGdldENvdW50AQt2YWNjaW5hdGlvbgQHJG1hdGNoMAkAnwgBCQCsAgIFC3ZhY2NpbmF0aW9uAgZfY291bnQDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwCQBkAgUBYQABAAEBE2dldE9wZW5WYWNjaW5hdGlvbnMABAckbWF0Y2gwCQCfCAECBWNvdW50AwkAAQIFByRtYXRjaDACA0ludAQBYQUHJG1hdGNoMAUBYQAAAwFpAQ5hZGRWYWNjaW5hdGlvbgMLdmFjY2luYXRpb24EZGF0ZQlzaWduYXR1cmUEBWNvdW50CQCkAwEJAGQCCQETZ2V0T3BlblZhY2NpbmF0aW9ucwAAAQkAlAoCCQDMCAIJAQxCb29sZWFuRW50cnkCCQCsAgIFBWNvdW50AglfdmVyaWZpZWQHCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUFY291bnQCBV9kYXRlBQRkYXRlCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUFY291bnQCEV9zaWduYXR1cmVfZG9jdG9yBQlzaWduYXR1cmUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVjb3VudAIMX3ZhY2NpbmF0aW9uBQt2YWNjaW5hdGlvbgUDbmlsBQR1bml0AWkBBnZlcmlmeQMOdmFjY2luYXRpb25faWQJc2lnbmF0dXJlC3ZhY2NpbmF0aW9uCQCUCgIJAMwIAgkBDEJvb2xlYW5FbnRyeQIJAKwCAgUOdmFjY2luYXRpb25faWQCCV92ZXJpZmllZAYJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQ52YWNjaW5hdGlvbl9pZAIRX3NpZ25hdHVyZV9mYXJtZXIFCXNpZ25hdHVyZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFDnZhY2NpbmF0aW9uX2lkAgxfdmFjY2luYXRpb24FC3ZhY2NpbmF0aW9uBQNuaWwFBHVuaXQBaQEJdmFjY2luYXRlAgt2YWNjaW5hdGlvbgRkYXRlBAVjb3VudAkBCGdldENvdW50AQULdmFjY2luYXRpb24JAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQt2YWNjaW5hdGlvbgIGX2NvdW50BQVjb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFC3ZhY2NpbmF0aW9uAgVfZGF0ZQUEZGF0ZQUDbmlsBQR1bml0AEUOWNE=", "height": 3371028, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 8 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getCount (vaccination) = match getInteger((vaccination + "_count")) { | |
5 | + | case a: Int => | |
6 | + | (a + 1) | |
7 | + | case _ => | |
8 | + | 1 | |
9 | + | } | |
10 | + | ||
11 | + | ||
12 | + | func getOpenVaccinations () = match getInteger("count") { | |
13 | + | case a: Int => | |
14 | + | a | |
15 | + | case _ => | |
16 | + | 0 | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | @Callable(i) | |
21 | + | func addVaccination (vaccination,date,signature) = { | |
22 | + | let count = toString((getOpenVaccinations() + 1)) | |
23 | + | $Tuple2([BooleanEntry((count + "_verified"), false), StringEntry((count + "_date"), date), StringEntry((count + "_signature_doctor"), signature), StringEntry((count + "_vaccination"), vaccination)], unit) | |
24 | + | } | |
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | @Callable(i) | |
29 | + | func verify (vaccination_id,signature,vaccination) = $Tuple2([BooleanEntry((vaccination_id + "_verified"), true), StringEntry((vaccination_id + "_signature_farmer"), signature), StringEntry((vaccination_id + "_vaccination"), vaccination)], unit) | |
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | @Callable(i) | |
34 | + | func vaccinate (vaccination,date) = { | |
35 | + | let count = getCount(vaccination) | |
36 | + | $Tuple2([IntegerEntry((vaccination + "_count"), count), StringEntry((vaccination + "_date"), date)], unit) | |
37 | + | } | |
38 | + | ||
39 | + |
github/deemru/w8io/026f985 12.06 ms ◑