tx · 2S6ZAdgmZPHjY9vonDQX7VTi1YsZuSpLAaLmTKSpHsJE 3NCBPVcJx9nAoyKPc4SnfYe4k9v5uTBQda1: -0.01000000 Waves 2020.04.07 12:27 [943687] smart account 3NCBPVcJx9nAoyKPc4SnfYe4k9v5uTBQda1 > SELF 0.00000000 Waves
{ "type": 13, "id": "2S6ZAdgmZPHjY9vonDQX7VTi1YsZuSpLAaLmTKSpHsJE", "fee": 1000000, "feeAssetId": null, "timestamp": 1586251674310, "version": 1, "sender": "3NCBPVcJx9nAoyKPc4SnfYe4k9v5uTBQda1", "senderPublicKey": "EbYtMXUtdwLSLxK3Un5zqR1unEamGfHBHaVTnHsWfe2b", "proofs": [ "22cruXWkdNWLsAR4NddNZYMzAFazybjQ89m3HZK8m3WuFbGWRxgJS9oQg6q9aGnvaUwizEv6Ry86tkwsZyj5s1aw" ], "script": "base64:AAIDAAAAAAAAACwIARIECgIICBIECgIICBIDCgEIEgQKAggIEgQKAggIEgQKAggBEgUKAwgIAQAAAAMAAAAAC0VNVFBZU1RSSU5HAgAAAAABAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADc3RyBQAAAAckbWF0Y2gwBQAAAANzdHIFAAAAC0VNVFBZU1RSSU5HAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQAAAAZzZW5kZXIEAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwkBAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABBQAAAAZzZW5kZXIDCQAAAAAAAAIFAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwUAAAALRU1UUFlTVFJJTkcHBgAAAAcAAAABaQEAAAAJYWRkT3B0aW9uAAAAAgAAAApuYW1lT3B0aW9uAAAAEWRlc2NyaXB0aW9uT3B0aW9uBAAAAAZzZW5kZXIJ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b24AAAAGaWRDcml0AAAACmNvbXBsaWFuY2UEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAADWlzVmFsaWRTZW5kZXIAAAABBQAAAAZzZW5kZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAhpZE9wdGlvbgIAAAABXwUAAAAGaWRDcml0AgAAAAFfCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQCAAAABV9jb21wBQAAAApjb21wbGlhbmNlBQAAAANuaWwJAAACAAAAAQIAAAA0U2VuZGVyIG5vdCBhbGxvd2VkIHRvIGV2YWx1YXRlIG9yIGV2YWx1YXRlZCBhbHJlYWR5IQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4B4cKGnk=", "chainId": 84, "height": 943687, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let EMTPYSTRING = "" | |
5 | + | ||
6 | + | func getStringFromKey (key) = match getString(this, key) { | |
7 | + | case str: String => | |
8 | + | str | |
9 | + | case _ => | |
10 | + | EMTPYSTRING | |
11 | + | } | |
12 | + | ||
13 | + | ||
14 | + | func isValidSender (sender) = { | |
15 | + | let entryForSenderAddress = getStringFromKey(sender) | |
16 | + | if ((entryForSenderAddress == EMTPYSTRING)) | |
17 | + | then false | |
18 | + | else true | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | @Callable(i) | |
23 | + | func addOption (nameOption,descriptionOption) = { | |
24 | + | let sender = toBase58String(i.caller.bytes) | |
25 | + | if (isValidSender(sender)) | |
26 | + | then WriteSet([DataEntry((toBase58String(i.transactionId) + "_name_option"), nameOption), DataEntry((toBase58String(i.transactionId) + "_description_option"), descriptionOption)]) | |
27 | + | else throw("Sender not allowed to store options!") | |
28 | + | } | |
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | @Callable(i) | |
33 | + | func addCriterion (nameCriterion,descriptionCriterion) = { | |
34 | + | let sender = toBase58String(i.caller.bytes) | |
35 | + | if (isValidSender(sender)) | |
36 | + | then WriteSet([DataEntry((toBase58String(i.transactionId) + "_name_criterion"), nameCriterion), DataEntry((toBase58String(i.transactionId) + "_description_criterion"), descriptionCriterion)]) | |
37 | + | else throw("Sender not allowed to store criteria!") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | @Callable(i) | |
43 | + | func addUser (name) = { | |
44 | + | let sender = toBase58String(i.caller.bytes) | |
45 | + | if (isValidSender(sender)) | |
46 | + | then WriteSet([DataEntry(name, "user")]) | |
47 | + | else throw("Sender not allowed to add users!") | |
48 | + | } | |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | @Callable(i) | |
53 | + | func addConsolidatedOption (nameOption,descriptionOption) = { | |
54 | + | let sender = toBase58String(i.caller.bytes) | |
55 | + | if (isValidSender(sender)) | |
56 | + | then WriteSet([DataEntry((toBase58String(i.transactionId) + "_consolidated_option_name"), nameOption), DataEntry((toBase58String(i.transactionId) + "_consolidated_option_description"), descriptionOption)]) | |
57 | + | else throw("Sender not allowed to consolidate options!") | |
58 | + | } | |
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | @Callable(i) | |
63 | + | func addConsolidatedCriterion (nameCriterion,descriptionCriterion) = { | |
64 | + | let sender = toBase58String(i.caller.bytes) | |
65 | + | if (isValidSender(sender)) | |
66 | + | then WriteSet([DataEntry((toBase58String(i.transactionId) + "_consolidated_criterion_name"), nameCriterion), DataEntry((toBase58String(i.transactionId) + "_consolidated_criterion_description"), descriptionCriterion)]) | |
67 | + | else throw("Sender not allowed to consolidate criteria!") | |
68 | + | } | |
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | @Callable(i) | |
73 | + | func evaluateCriterion (idCriterion,importanceCriterion) = { | |
74 | + | let sender = toBase58String(i.caller.bytes) | |
75 | + | if (isValidSender(sender)) | |
76 | + | then WriteSet([DataEntry((((idCriterion + "_") + toBase58String(i.transactionId)) + "_imp"), importanceCriterion)]) | |
77 | + | else throw("Sender not allowed to evaluate or evaluated already!") | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | ||
82 | + | @Callable(i) | |
83 | + | func evaluateOption (idOption,idCrit,compliance) = { | |
84 | + | let sender = toBase58String(i.caller.bytes) | |
85 | + | if (isValidSender(sender)) | |
86 | + | then WriteSet([DataEntry((((((idOption + "_") + idCrit) + "_") + toBase58String(i.transactionId)) + "_comp"), compliance)]) | |
87 | + | else throw("Sender not allowed to evaluate or evaluated already!") | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | @Verifier(tx) | |
92 | + | func verify () = match tx { | |
93 | + | case _ => | |
94 | + | false | |
95 | + | } | |
96 | + |
github/deemru/w8io/026f985 19.19 ms ◑