tx · 7RrVXbS9iZysVMma83Mfngye5tYkgeGKreJKMrmQ8EpG 3NAPaXExp1QYFswTuVNDc7DJ2xPW9jg5c1v: -0.01000000 Waves 2023.10.04 09:17 [2783516] smart account 3NAPaXExp1QYFswTuVNDc7DJ2xPW9jg5c1v > SELF 0.00000000 Waves
{ "type": 13, "id": "7RrVXbS9iZysVMma83Mfngye5tYkgeGKreJKMrmQ8EpG", "fee": 1000000, "feeAssetId": null, "timestamp": 1696400258630, "version": 1, "sender": "3NAPaXExp1QYFswTuVNDc7DJ2xPW9jg5c1v", "senderPublicKey": "6KA6K6VQ3MTbv4WqMNWZnb3fqEjGLiz6Es78kY6bb6DG", "proofs": [ "2zWRgXB6nw9YmT2JQzJ51vZRbc4E5hqd6UmGSPPfboRcv5Ws8eCoRn9WC7EsbWBhqt1BfoW2ec5YiBKgvQWwoTDs" ], "script": "base64:AAIFAAAAAAAAACwIAhIECgIICBIECgIICBIDCgEIEgQKAggIEgQKAggIEgQKAggBEgUKAwgIAQAAAAMAAAAAC0VNVFBZU1RSSU5HAgAAAAABAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADc3RyBQAAAAckbWF0Y2gwBQAAAANzdHIFAAAAC0VNVFBZU1RSSU5HAQAAAA1pc1ZhbGlkU2VuZGVyAAAAAQAAAAZzZW5kZXIEAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwkBAAAAEGdldFN0cmluZ0Zyb21LZXkAAAABBQAAAAZzZW5kZXIDCQAAAAAAAAIFAAAAFWVudHJ5Rm9yU2VuZGVyQWRkcmVzcwUAAAALRU1UUFlTVFJJTkcHBgAAAAcAAAABaQEAAAAJYWRkT3B0aW9uAAAAAgAAAApuYW1lT3B0aW9uAAAAEWRlc2NyaXB0aW9uT3B0aW9uBAAAAAZzZW5kZXI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W5kZXIAAAABBQAAAAZzZW5kZXIJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAhpZE9wdGlvbgIAAAABXwUAAAAGaWRDcml0AgAAAAFfCQABLwAAAAIJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAAAAAAAAAAACAIAAAACX2MFAAAACmNvbXBsaWFuY2UFAAAAA25pbAkAAAIAAAABAgAAADRTZW5kZXIgbm90IGFsbG93ZWQgdG8gZXZhbHVhdGUgb3IgZXZhbHVhdGVkIGFscmVhZHkhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgHvQmMAw==", "chainId": 84, "height": 2783516, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
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 [StringEntry((toBase58String(i.transactionId) + "_name_option"), nameOption), StringEntry((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 [StringEntry((toBase58String(i.transactionId) + "_name_criterion"), nameCriterion), StringEntry((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 [StringEntry(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 [StringEntry((toBase58String(i.transactionId) + "_consolidated_option_name"), nameOption), StringEntry((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 [StringEntry((toBase58String(i.transactionId) + "_consolidated_criterion_name"), nameCriterion), StringEntry((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 [IntegerEntry((((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 [IntegerEntry((((((idOption + "_") + idCrit) + "_") + take(toBase58String(i.transactionId), 8)) + "_c"), 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 20.07 ms ◑