tx · 3aAfMSztm3AD95jQt92qQi43vj6uTAjsD42aCPCsZpPN

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01400000 Waves

2024.05.21 16:41 [3115839] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "3aAfMSztm3AD95jQt92qQi43vj6uTAjsD42aCPCsZpPN", "fee": 1400000, "feeAssetId": null, "timestamp": 1716298899386, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "4jigwFiq92oLDkdHCoCk1SMSHutHo4NWWmUAexReAQ2ATUfovruZ5cvZFRBHfE5XCjjDAEpSiPM3rLT7A941o4Ly" ], "script": "base64:AAIFAAAAAAAAABIIAhIGCgQIGAgIEgQKAggIEgAAAAAGAAAAABRwcmVkaWN0aW9uTWF4Q291bnRlcgAAAAAAAAAAAwAAAAAKbWF4Q291bnRlcgAAAAAAAAAABgAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAEAAAARc2VhcmNoRm9yQ291bnRlcnMAAAACAAAABml0ZW1JZAAAAAdjb3VudGVyBAAAABFzZWFyY2hGb3JDb3VudGVycwQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAIJAAEsAAAAAgUAAAAGaXRlbUlkAgAAAAFfCQABpAAAAAEFAAAAB2NvdW50ZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwIAAAAHTm8gVXNlcgUAAAARc2VhcmNoRm9yQ291bnRlcnMBAAAAGXNlYXJjaEZvckFkcmVzc1ByZWRpY3Rpb24AAAACAAAABml0ZW1JZAAAAAZhZHJlc3MEAAAAE3NlYXJjaEZvclByZWRpY3Rpb24EAAAAByRtYXRjaDAJAAQiAAAAAQkAASwAAAACCQABLA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0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkS8z6t", "height": 3115839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E1PDUVGtGBEZHcXpw7EAcmTpNmuuUdZN5R9zfnchKhqY Next: 2FXyyNShVLvmPuoMdH5SrMT5HeJLoabgpoDdiF8PSLcw Diff:
OldNewDifferences
3131
3232 func findPredictionAdresses (itemId,counter) = {
3333 let adressList = nil
34- if ((counter >= 1))
34+ if ((counter >= 5))
3535 then {
3636 let adress1 = searchForCounters(itemId, 1)
37- (adressList :+ adress1)
37+ let adress2 = searchForCounters(itemId, 2)
38+ let adress3 = searchForCounters(itemId, 3)
39+ let adress4 = searchForCounters(itemId, 4)
40+ let adress5 = searchForCounters(itemId, 5)
41+ (((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
3842 }
39- else if ((counter >= 2))
43+ else if ((counter >= 4))
4044 then {
4145 let adress1 = searchForCounters(itemId, 1)
4246 let adress2 = searchForCounters(itemId, 2)
43- ((adressList :+ adress1) :+ adress2)
47+ let adress3 = searchForCounters(itemId, 3)
48+ let adress4 = searchForCounters(itemId, 4)
49+ ((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4)
4450 }
4551 else if ((counter >= 3))
4652 then {
4955 let adress3 = searchForCounters(itemId, 3)
5056 (((adressList :+ adress1) :+ adress2) :+ adress3)
5157 }
52- else if ((counter >= 4))
58+ else if ((counter >= 2))
5359 then {
5460 let adress1 = searchForCounters(itemId, 1)
5561 let adress2 = searchForCounters(itemId, 2)
56- let adress3 = searchForCounters(itemId, 3)
57- let adress4 = searchForCounters(itemId, 4)
58- ((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4)
62+ ((adressList :+ adress1) :+ adress2)
5963 }
6064 else {
6165 let adress1 = searchForCounters(itemId, 1)
62- let adress2 = searchForCounters(itemId, 2)
63- let adress3 = searchForCounters(itemId, 3)
64- let adress4 = searchForCounters(itemId, 4)
65- let adress5 = searchForCounters(itemId, 5)
66- (((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
66+ (adressList :+ adress1)
6767 }
6868 }
6969
122122 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)]
123123 else if ((newCounter >= maxCounter))
124124 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)]
125- 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), StringEntry("test", lastPrediction), StringEntry("test2", adressList[1])]
125+ 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), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
126126 }
127127 }
128128 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let predictionMaxCounter = 3
55
66 let maxCounter = 6
77
88 let defaultRating = 100
99
1010 func searchForCounters (itemId,counter) = {
1111 let searchForCounters = match getString(((itemId + "_") + toString(counter))) {
1212 case s: String =>
1313 s
1414 case _ =>
1515 "No User"
1616 }
1717 searchForCounters
1818 }
1919
2020
2121 func searchForAdressPrediction (itemId,adress) = {
2222 let searchForPrediction = match getString(((itemId + "_") + adress)) {
2323 case s: String =>
2424 s
2525 case _ =>
2626 "Not Found"
2727 }
2828 searchForPrediction
2929 }
3030
3131
3232 func findPredictionAdresses (itemId,counter) = {
3333 let adressList = nil
34- if ((counter >= 1))
34+ if ((counter >= 5))
3535 then {
3636 let adress1 = searchForCounters(itemId, 1)
37- (adressList :+ adress1)
37+ let adress2 = searchForCounters(itemId, 2)
38+ let adress3 = searchForCounters(itemId, 3)
39+ let adress4 = searchForCounters(itemId, 4)
40+ let adress5 = searchForCounters(itemId, 5)
41+ (((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
3842 }
39- else if ((counter >= 2))
43+ else if ((counter >= 4))
4044 then {
4145 let adress1 = searchForCounters(itemId, 1)
4246 let adress2 = searchForCounters(itemId, 2)
43- ((adressList :+ adress1) :+ adress2)
47+ let adress3 = searchForCounters(itemId, 3)
48+ let adress4 = searchForCounters(itemId, 4)
49+ ((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4)
4450 }
4551 else if ((counter >= 3))
4652 then {
4753 let adress1 = searchForCounters(itemId, 1)
4854 let adress2 = searchForCounters(itemId, 2)
4955 let adress3 = searchForCounters(itemId, 3)
5056 (((adressList :+ adress1) :+ adress2) :+ adress3)
5157 }
52- else if ((counter >= 4))
58+ else if ((counter >= 2))
5359 then {
5460 let adress1 = searchForCounters(itemId, 1)
5561 let adress2 = searchForCounters(itemId, 2)
56- let adress3 = searchForCounters(itemId, 3)
57- let adress4 = searchForCounters(itemId, 4)
58- ((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4)
62+ ((adressList :+ adress1) :+ adress2)
5963 }
6064 else {
6165 let adress1 = searchForCounters(itemId, 1)
62- let adress2 = searchForCounters(itemId, 2)
63- let adress3 = searchForCounters(itemId, 3)
64- let adress4 = searchForCounters(itemId, 4)
65- let adress5 = searchForCounters(itemId, 5)
66- (((((adressList :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
66+ (adressList :+ adress1)
6767 }
6868 }
6969
7070
7171 @Callable(i)
7272 func adjustRatingsAndPayoutParticipants (itemId,adressList,lastCallerAdress,finalPrediction) = nil
7373
7474
7575
7676 @Callable(i)
7777 func savePrediction (itemId,prediction) = {
7878 let clientAdress = toString(i.caller)
7979 let searchForUser = match getInteger(clientAdress) {
8080 case s: Int =>
8181 s
8282 case _ =>
8383 "no User exists"
8484 }
8585 if ((searchForUser == "no User exists"))
8686 then throw("User does not exist")
8787 else {
8888 let searchForCounter = match getInteger((itemId + "_counter")) {
8989 case s: Int =>
9090 s
9191 case _ =>
9292 -1
9393 }
9494 if ((searchForCounter >= 1))
9595 then {
9696 let adressList = findPredictionAdresses(itemId, searchForCounter)
9797 if (containsElement(adressList, clientAdress))
9898 then throw("This User already gave a Prediction")
9999 else {
100100 let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
101101 case s: Int =>
102102 s
103103 case _ =>
104104 -1
105105 }
106106 let lastPredictionAdress = adressList[(size(adressList) - 1)]
107107 let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
108108 case s: String =>
109109 s
110110 case _ =>
111111 "no Prediction Found"
112112 }
113113 let newCounter = (searchForCounter + 1)
114114 if ((lastPrediction == prediction))
115115 then if (((predictionCounter + 1) == predictionMaxCounter))
116116 then {
117117 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
118118 if ((invokeAdjustRating != invokeAdjustRating))
119119 then throw("Strict value is not equal to itself.")
120120 else [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)]
121121 }
122122 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)]
123123 else if ((newCounter >= maxCounter))
124124 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)]
125- 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), StringEntry("test", lastPrediction), StringEntry("test2", adressList[1])]
125+ 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), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
126126 }
127127 }
128128 else {
129129 let searchForNewItem = match getString(("new_" + itemId)) {
130130 case s: String =>
131131 s
132132 case _ =>
133133 "not Found"
134134 }
135135 if ((searchForNewItem != itemId))
136136 then throw("Item not Found")
137137 else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1), DeleteEntry(("new_" + itemId))]
138138 }
139139 }
140140 }
141141
142142
143143
144144 @Callable(i)
145145 func registerUser () = {
146146 let clientAdress = toString(i.caller)
147147 let searchForUser = match getInteger(clientAdress) {
148148 case s: Int =>
149149 s
150150 case _ =>
151151 "No user found"
152152 }
153153 if ((searchForUser == "No user Found"))
154154 then throw("User already exists")
155155 else [IntegerEntry(clientAdress, defaultRating)]
156156 }
157157
158158
159159 @Verifier(tx)
160160 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
161161

github/deemru/w8io/026f985 
84.48 ms