tx · 3FHm95tQc7gumeZy8NqHLfHV7Te3vt5wkpkqSQW2TXmj 3N1UM3ZYqw4q2NpLuKb4ezjNS39KF1g6MRS: -0.01000000 Waves 2024.09.28 23:32 [3303939] smart account 3N1UM3ZYqw4q2NpLuKb4ezjNS39KF1g6MRS > SELF 0.00000000 Waves
{ "type": 13, "id": "3FHm95tQc7gumeZy8NqHLfHV7Te3vt5wkpkqSQW2TXmj", "fee": 1000000, "feeAssetId": null, "timestamp": 1727555601744, "version": 2, "chainId": 84, "sender": "3N1UM3ZYqw4q2NpLuKb4ezjNS39KF1g6MRS", "senderPublicKey": "EQgP8uZ8CN5UkwQUudbvRCz4p3ocEg32KHdfegZDUjNc", "proofs": [ "FndqpiFHemCzbatY93YFF7zkQNwieyYiwBaAsrUYRpMKv7cuaEpFCfW5MMbRYPatxVDSY1kLW6XsawV34vhxiu6" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIArAIACm1heENvdW50ZXIAFAANZGVmYXVsdFJhdGluZwBkAA5yYXRlQWRqdXN0bWVudAAUAAd0b2tlbklkASBt93onpps//ItTlanjngVbHCIvW03oUTBbAaEGqQDGGAAMcGF5b3V0QW1vdW50AIDh6xcADHJhdGluZ0N1dG9mZgA8AAVyX21heAD0AwAFc2NhbGUAZAERc2VhcmNoRm9yQ291bnRlcnMCBml0ZW1JZAdjb3VudGVyBBFzZWFyY2hGb3JDb3VudGVycwQHJG1hdGNoMAkAoggBCQCsAgIJAKwCAgUGaXRlbUlkAgFfCQCkAwEFB2NvdW50ZXIDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFzBQckbWF0Y2gwBQFzAgdObyBVc2VyBRFzZWFyY2hGb3JDb3VudGVycwEPc2VhcmNoRm9yUmF0aW5nAQdhZGRyZXNzBAZyYXRpbmcEByRtYXRjaDAJAJ8IAQkArAICBQdhZGRyZXNzAgdfcmF0aW5nAwkAAQIFByRtYXRjaDACA0ludAQBcgUHJG1h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AICAgh1cGRhdGVkXwUGaXRlbUlkBQZpdGVtSWQFA25pbAFpAQxyZWdpc3RlclVzZXIABAxjbGllbnRBZHJlc3MJAKUIAQgFAWkGY2FsbGVyBA1zZWFyY2hGb3JVc2VyBAckbWF0Y2gwCQCfCAEJAKwCAgUMY2xpZW50QWRyZXNzAgdfcmF0aW5nAwkAAQIFByRtYXRjaDACA0ludAQBcwUHJG1hdGNoMAUBcwD///////////8BAwkBAiE9AgUNc2VhcmNoRm9yVXNlcgD///////////8BCQACAQITVXNlciBhbHJlYWR5IGV4aXN0cwkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQxjbGllbnRBZHJlc3MCB19yYXRpbmcFDWRlZmF1bHRSYXRpbmcFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkh553U", "height": 3303939, "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 | + | let predictionMaxCounter = 300 | |
5 | + | ||
6 | + | let maxCounter = 20 | |
7 | + | ||
8 | + | let defaultRating = 100 | |
9 | + | ||
10 | + | let rateAdjustment = 20 | |
11 | + | ||
12 | + | let tokenId = base58'8QGJvsXqJ43q5ksFymoPKF1NWWhwUfr2F7h52oeWgVhH' | |
13 | + | ||
14 | + | let payoutAmount = 50000000 | |
15 | + | ||
16 | + | let ratingCutoff = 60 | |
17 | + | ||
18 | + | let r_max = 500 | |
19 | + | ||
20 | + | let scale = 100 | |
21 | + | ||
22 | + | func searchForCounters (itemId,counter) = { | |
23 | + | let searchForCounters = match getString(((itemId + "_") + toString(counter))) { | |
24 | + | case s: String => | |
25 | + | s | |
26 | + | case _ => | |
27 | + | "No User" | |
28 | + | } | |
29 | + | searchForCounters | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func searchForRating (address) = { | |
34 | + | let rating = match getInteger((address + "_rating")) { | |
35 | + | case r: Int => | |
36 | + | r | |
37 | + | case _ => | |
38 | + | defaultRating | |
39 | + | } | |
40 | + | rating | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func searchForAddressPrediction (itemId,adress) = { | |
45 | + | let searchForPrediction = match getString(((itemId + "_") + adress)) { | |
46 | + | case s: String => | |
47 | + | s | |
48 | + | case _ => | |
49 | + | "Not Found" | |
50 | + | } | |
51 | + | searchForPrediction | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | func searchForPredictionCounter (itemId,prediction) = { | |
56 | + | let searchForPrediction = match getInteger(((itemId + "_prediction_") + prediction)) { | |
57 | + | case s: Int => | |
58 | + | s | |
59 | + | case _ => | |
60 | + | "Not Found" | |
61 | + | } | |
62 | + | searchForPrediction | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func findPredictionAdresses (itemId,counter) = { | |
67 | + | let adressList = if ((counter >= 5)) | |
68 | + | then { | |
69 | + | let adress1 = searchForCounters(itemId, 1) | |
70 | + | let adress2 = searchForCounters(itemId, 2) | |
71 | + | let adress3 = searchForCounters(itemId, 3) | |
72 | + | let adress4 = searchForCounters(itemId, 4) | |
73 | + | let adress5 = searchForCounters(itemId, 5) | |
74 | + | (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5) | |
75 | + | } | |
76 | + | else if ((counter >= 4)) | |
77 | + | then { | |
78 | + | let adress1 = searchForCounters(itemId, 1) | |
79 | + | let adress2 = searchForCounters(itemId, 2) | |
80 | + | let adress3 = searchForCounters(itemId, 3) | |
81 | + | let adress4 = searchForCounters(itemId, 4) | |
82 | + | ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) | |
83 | + | } | |
84 | + | else if ((counter >= 3)) | |
85 | + | then { | |
86 | + | let adress1 = searchForCounters(itemId, 1) | |
87 | + | let adress2 = searchForCounters(itemId, 2) | |
88 | + | let adress3 = searchForCounters(itemId, 3) | |
89 | + | (((nil :+ adress1) :+ adress2) :+ adress3) | |
90 | + | } | |
91 | + | else if ((counter >= 2)) | |
92 | + | then { | |
93 | + | let adress1 = searchForCounters(itemId, 1) | |
94 | + | let adress2 = searchForCounters(itemId, 2) | |
95 | + | ((nil :+ adress1) :+ adress2) | |
96 | + | } | |
97 | + | else { | |
98 | + | let adress1 = searchForCounters(itemId, 1) | |
99 | + | (nil :+ adress1) | |
100 | + | } | |
101 | + | adressList | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | func calculatePayout (r_player,r_max) = { | |
106 | + | let ratio = ((r_player * 100) / r_max) | |
107 | + | let payout = ((payoutAmount * ratio) / 100) | |
108 | + | if ((0 >= payout)) | |
109 | + | then 1 | |
110 | + | else payout | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | func calculateNewRating (r_player,r_max,k,actualScore) = { | |
115 | + | let ratin_factor = ((r_player * scale) / r_max) | |
116 | + | if ((actualScore == 1)) | |
117 | + | then { | |
118 | + | let adjustment = ((k * (100 - ratin_factor)) / scale) | |
119 | + | (r_player + adjustment) | |
120 | + | } | |
121 | + | else { | |
122 | + | let adjustment = ((-(k) * (20 + ratin_factor)) / scale) | |
123 | + | (r_player + adjustment) | |
124 | + | } | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | @Callable(i) | |
129 | + | func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = { | |
130 | + | let caller = toString(i.caller) | |
131 | + | if ((caller != toString(this))) | |
132 | + | then throw("You are not allowed to call this function") | |
133 | + | else { | |
134 | + | func updateRatingsFunc (accum,address) = { | |
135 | + | let rating = searchForRating(address) | |
136 | + | let prediction = searchForAddressPrediction(itemId, address) | |
137 | + | let actualScore = if ((prediction == finalPrediction)) | |
138 | + | then 1 | |
139 | + | else 0 | |
140 | + | let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore) | |
141 | + | let payout = if ((prediction == finalPrediction)) | |
142 | + | then true | |
143 | + | else false | |
144 | + | let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating)) | |
145 | + | let calculatedAmount = calculatePayout(newRating, r_max) | |
146 | + | if (payout) | |
147 | + | then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId)) | |
148 | + | else updatedEntries | |
149 | + | } | |
150 | + | ||
151 | + | let updatedRatings = { | |
152 | + | let $l = addressList | |
153 | + | let $s = size($l) | |
154 | + | let $acc0 = nil | |
155 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
156 | + | then $a | |
157 | + | else updateRatingsFunc($a, $l[$i]) | |
158 | + | ||
159 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
160 | + | then $a | |
161 | + | else throw("List size exceeds 5") | |
162 | + | ||
163 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
164 | + | } | |
165 | + | (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true)) | |
166 | + | } | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | ||
171 | + | @Callable(i) | |
172 | + | func savePrediction (itemId,prediction) = { | |
173 | + | let clientAdress = toString(i.caller) | |
174 | + | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
175 | + | case s: Int => | |
176 | + | s | |
177 | + | case _ => | |
178 | + | "User does not exist" | |
179 | + | } | |
180 | + | if ((searchForUser == "User does not exist")) | |
181 | + | then throw("User does not exist") | |
182 | + | else { | |
183 | + | let isFinal = match getBoolean((itemId + "_final")) { | |
184 | + | case s: Boolean => | |
185 | + | s | |
186 | + | case _ => | |
187 | + | false | |
188 | + | } | |
189 | + | if (isFinal) | |
190 | + | then throw("Final prediction already made") | |
191 | + | else { | |
192 | + | let isCanceled = match getBoolean((itemId + "_cancelled")) { | |
193 | + | case s: Boolean => | |
194 | + | s | |
195 | + | case _ => | |
196 | + | false | |
197 | + | } | |
198 | + | if (isCanceled) | |
199 | + | then throw("Final prediction already made") | |
200 | + | else { | |
201 | + | let clientRating = searchForRating(clientAdress) | |
202 | + | if ((ratingCutoff >= clientRating)) | |
203 | + | then throw("You are not allowed to participate anymore") | |
204 | + | else { | |
205 | + | let searchForCounter = match getInteger((itemId + "_counter")) { | |
206 | + | case s: Int => | |
207 | + | s | |
208 | + | case _ => | |
209 | + | -1 | |
210 | + | } | |
211 | + | if ((searchForCounter >= 1)) | |
212 | + | then { | |
213 | + | let adressList = findPredictionAdresses(itemId, searchForCounter) | |
214 | + | if (containsElement(adressList, clientAdress)) | |
215 | + | then throw("This User already gave a Prediction") | |
216 | + | else { | |
217 | + | let predictionCounter = match getInteger(((itemId + "_prediction_") + prediction)) { | |
218 | + | case s: Int => | |
219 | + | s | |
220 | + | case _ => | |
221 | + | 404 | |
222 | + | } | |
223 | + | let newCounter = (searchForCounter + 1) | |
224 | + | if ((predictionCounter != 404)) | |
225 | + | then if (((predictionCounter + clientRating) >= predictionMaxCounter)) | |
226 | + | then { | |
227 | + | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
228 | + | let calculatedAmount = calculatePayout(newRating, r_max) | |
229 | + | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil) | |
230 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
231 | + | then throw("Strict value is not equal to itself.") | |
232 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + clientRating)), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_final"), true), BooleanEntry((itemId + "_cancelled"), false), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating), StringEntry((itemId + "_final_prediction"), prediction)] | |
233 | + | } | |
234 | + | else if ((newCounter >= maxCounter)) | |
235 | + | then { | |
236 | + | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
237 | + | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
238 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
239 | + | then throw("Strict value is not equal to itself.") | |
240 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + clientRating)), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId), IntegerEntry((clientAdress + "_rating"), newRating)] | |
241 | + | } | |
242 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + clientRating)), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_final"), false), BooleanEntry((itemId + "_cancelled"), false)] | |
243 | + | else if ((newCounter >= maxCounter)) | |
244 | + | then { | |
245 | + | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
246 | + | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
247 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
248 | + | then throw("Strict value is not equal to itself.") | |
249 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), clientRating), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId), IntegerEntry((clientAdress + "_rating"), newRating)] | |
250 | + | } | |
251 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), clientRating), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false)] | |
252 | + | } | |
253 | + | } | |
254 | + | else { | |
255 | + | let searchForNewItem = match getString(("new_" + itemId)) { | |
256 | + | case s: String => | |
257 | + | s | |
258 | + | case _ => | |
259 | + | "Item not Found" | |
260 | + | } | |
261 | + | if ((searchForNewItem == "Item not Found")) | |
262 | + | then throw("Item not found") | |
263 | + | else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry(((itemId + "_prediction_") + prediction), clientRating), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)] | |
264 | + | } | |
265 | + | } | |
266 | + | } | |
267 | + | } | |
268 | + | } | |
269 | + | } | |
270 | + | ||
271 | + | ||
272 | + | ||
273 | + | @Callable(i) | |
274 | + | func registerUser () = { | |
275 | + | let clientAdress = toString(i.caller) | |
276 | + | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
277 | + | case s: Int => | |
278 | + | s | |
279 | + | case _ => | |
280 | + | -1 | |
281 | + | } | |
282 | + | if ((searchForUser != -1)) | |
283 | + | then throw("User already exists") | |
284 | + | else [IntegerEntry((clientAdress + "_rating"), defaultRating)] | |
285 | + | } | |
286 | + | ||
287 | + | ||
288 | + | @Verifier(tx) | |
289 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
290 | + |
github/deemru/w8io/169f3d6 23.23 ms ◑