tx · CfPFMxDkvxFr4BNcWpW6bPkg8vErv18DZzvLyPdKLwaA 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos: -0.01000000 Waves 2024.04.30 13:04 [3085452] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves
{ "type": 13, "id": "CfPFMxDkvxFr4BNcWpW6bPkg8vErv18DZzvLyPdKLwaA", "fee": 1000000, "feeAssetId": null, "timestamp": 1714471479899, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "2paG5spzYZtKDhuoKVuxV3xFjk2qk2T2eaDSMdMXDRPUj191KSuL57GhVQS78uFtw4ckXyBgLrcstHbsPoDnVQTu" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIICAAAAAMAAAAACm1heENvdW50ZXIAAAAAAAAAAAMBAAAAFHNlYXJjaEZvclByZWRpY3Rpb25zAAAAAgAAAAZpdGVtSWQAAAAHY291bnRlcgQAAAANc2VhcmNoRm9yVXNlcgQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAIJAAEsAAAAAgUAAAAGaXRlbUlkAgAAAAFfCQABpAAAAAEFAAAAB2NvdW50ZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwIAAAAHTm8gVXNlcgUAAAANc2VhcmNoRm9yVXNlcgEAAAAWZmluZFByZWRpY3Rpb25BZHJlc3NlcwAAAAIAAAAGaXRlbUlkAAAAB2NvdW50ZXIEAAAACmFkcmVzc0xpc3QFAAAAA25pbAMJAABnAAAAAgUAAAAHY291bnRlcgAAAAAAAAAAAQQAAAAHYWRyZXNzMQkBAAAAFHNlYXJjaEZvclByZWRpY3Rpb25zAAAAAgUAAAAGaXRlbUlkAAAAAAAAAAABCQAETQAAAAIFAAAACmF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WwHBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABml0ZW1JZAIAAAABXwkAAaQAAAABAAAAAAAAAAABBQAAAAxjbGllbnRBZHJlc3MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABml0ZW1JZAIAAAABXwUAAAAMY2xpZW50QWRyZXNzBQAAAApwcmVkaWN0aW9uCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAABml0ZW1JZAIAAAAIX2NvdW50ZXIAAAAAAAAAAAEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgUAAAAGaXRlbUlkAgAAABJfcHJlZGljdGlvbkNvdW50ZXIAAAAAAAAAAAEFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ZSIC8g==", "height": 3085452, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: DSgTqxw9vomsU4KfLjjYLMDUdJW3rkYPafHn4q1sR39k Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let maxCounter = 3 | |
5 | + | ||
6 | + | func searchForPredictions (itemId,counter) = { | |
7 | + | let searchForUser = match getString(((itemId + "_") + toString(counter))) { | |
8 | + | case s: String => | |
9 | + | s | |
10 | + | case _ => | |
11 | + | "No User" | |
12 | + | } | |
13 | + | searchForUser | |
14 | + | } | |
15 | + | ||
16 | + | ||
17 | + | func findPredictionAdresses (itemId,counter) = { | |
18 | + | let adressList = nil | |
19 | + | if ((counter >= 1)) | |
20 | + | then { | |
21 | + | let adress1 = searchForPredictions(itemId, 1) | |
22 | + | (adressList :+ adress1) | |
23 | + | } | |
24 | + | else if ((counter >= 2)) | |
25 | + | then { | |
26 | + | let adress1 = searchForPredictions(itemId, 1) | |
27 | + | let adress2 = searchForPredictions(itemId, 2) | |
28 | + | ((adressList :+ adress1) :+ adress2) | |
29 | + | } | |
30 | + | else if ((counter >= 3)) | |
31 | + | then { | |
32 | + | let adress1 = searchForPredictions(itemId, 1) | |
33 | + | let adress2 = searchForPredictions(itemId, 2) | |
34 | + | let adress3 = searchForPredictions(itemId, 3) | |
35 | + | (((adressList :+ adress1) :+ adress2) :+ adress3) | |
36 | + | } | |
37 | + | else if ((counter >= 4)) | |
38 | + | then { | |
39 | + | let adress1 = searchForPredictions(itemId, 1) | |
40 | + | let adress2 = searchForPredictions(itemId, 2) | |
41 | + | let adress3 = searchForPredictions(itemId, 3) | |
42 | + | let adress4 = searchForPredictions(itemId, 4) | |
43 | + | ((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) | |
44 | + | } | |
45 | + | else { | |
46 | + | let adress1 = searchForPredictions(itemId, 1) | |
47 | + | let adress2 = searchForPredictions(itemId, 2) | |
48 | + | let adress3 = searchForPredictions(itemId, 3) | |
49 | + | let adress4 = searchForPredictions(itemId, 4) | |
50 | + | let adress5 = searchForPredictions(itemId, 5) | |
51 | + | (((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5) | |
52 | + | } | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | @Callable(i) | |
57 | + | func savePrediction (itemId,prediction) = { | |
58 | + | let clientAdress = toString(i.caller) | |
59 | + | let searchForItem = match getString(itemId) { | |
60 | + | case s: String => | |
61 | + | s | |
62 | + | case _ => | |
63 | + | "no Data exists" | |
64 | + | } | |
65 | + | if ((searchForItem == "no Data exists")) | |
66 | + | then throw("This ItemID does not exist!") | |
67 | + | else { | |
68 | + | let searchForUser = match getString(clientAdress) { | |
69 | + | case s: String => | |
70 | + | s | |
71 | + | case _ => | |
72 | + | "no User exists" | |
73 | + | } | |
74 | + | if ((searchForUser == "no User exists")) | |
75 | + | then throw("User does not exist") | |
76 | + | else { | |
77 | + | let searchForCounter = match getInteger((itemId + "_counter")) { | |
78 | + | case s: Int => | |
79 | + | s | |
80 | + | case _ => | |
81 | + | -1 | |
82 | + | } | |
83 | + | let adressList = findPredictionAdresses(itemId, searchForCounter) | |
84 | + | if (containsElement(adressList, clientAdress)) | |
85 | + | then throw("This User already gave a Prediction") | |
86 | + | else if ((searchForCounter >= 1)) | |
87 | + | then { | |
88 | + | let predictionCounter = match getInteger((itemId + "_predictionCounter")) { | |
89 | + | case s: Int => | |
90 | + | s | |
91 | + | case _ => | |
92 | + | -1 | |
93 | + | } | |
94 | + | let lastPredictionAdress = adressList[(size(adressList) - 1)] | |
95 | + | let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) { | |
96 | + | case s: String => | |
97 | + | s | |
98 | + | case _ => | |
99 | + | "no Prediction Found" | |
100 | + | } | |
101 | + | let newCounter = (searchForCounter + 1) | |
102 | + | if ((lastPrediction == prediction)) | |
103 | + | then if (((predictionCounter + 1) == maxCounter)) | |
104 | + | then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false)] | |
105 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter + 1)), BooleanEntry((itemId + "_final"), false), BooleanEntry((itemId + "_cancelled"), false)] | |
106 | + | else if ((newCounter >= 6)) | |
107 | + | then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter - 1)), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false)] | |
108 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), (predictionCounter - 1)), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false)] | |
109 | + | } | |
110 | + | else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1)] | |
111 | + | } | |
112 | + | } | |
113 | + | } | |
114 | + | ||
115 | + | ||
116 | + | @Verifier(tx) | |
117 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
118 | + |
github/deemru/w8io/026f985 40.38 ms ◑