tx · CXtZxmiLbCS1WyiDGNyzE5hJBam3ruiHYHnx2c97dYzD 3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ: -0.01000000 Waves 2024.06.11 16:57 [3146178] smart account 3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ > SELF 0.00000000 Waves
{ "type": 13, "id": "CXtZxmiLbCS1WyiDGNyzE5hJBam3ruiHYHnx2c97dYzD", "fee": 1000000, "feeAssetId": null, "timestamp": 1718114283997, "version": 2, "chainId": 84, "sender": "3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ", "senderPublicKey": "97GV9vh8gVwcCVk5uVkuYSiKY9tAhptVmzhp87xY9wKy", "proofs": [ "5y4XotQYEPM7raqDakbTLFDg93zaUAnTKmbp3LWU3oJ822GaFpwugJhRr9ueZhDictybgL4sU2fFxDxafRPiieYT" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIAAwAKbWF4Q291bnRlcgAGAA1kZWZhdWx0UmF0aW5nAGQADnJhdGVBZGp1c3RtZW50ABQAB3Rva2VuSWQBIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAxwYXlvdXRBbW91bnQAgOHrFwAMcmF0aW5nQ3V0b2ZmADIABXJfbWF4APQDAAVzY2FsZQBkARFzZWFyY2hGb3JDb3VudGVycwIGaXRlbUlkB2NvdW50ZXIEEXNlYXJjaEZvckNvdW50ZXJzBAckbWF0Y2gwCQCiCAEJAKwCAgkArAICBQZpdGVtSWQCAV8JAKQDAQUHY291bnRlcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAFAXMCB05vIFVzZXIFEXNlYXJjaEZvckNvdW50ZXJzAQ9zZWFyY2hGb3JSYXRpbmcBB2FkZHJlc3MEBnJhdGluZwQHJG1hdGNoMAkAnwgBCQCsAgIFB2FkZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAF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xyZWdpc3RlclVzZXIABAxjbGllbnRBZHJlc3MJAKUIAQgFAWkGY2FsbGVyBA1zZWFyY2hGb3JVc2VyBAckbWF0Y2gwCQCfCAEJAKwCAgUMY2xpZW50QWRyZXNzAgdfcmF0aW5nAwkAAQIFByRtYXRjaDACA0ludAQBcwUHJG1hdGNoMAUBcwD///////////8BAwkBAiE9AgUNc2VhcmNoRm9yVXNlcgD///////////8BCQACAQITVXNlciBhbHJlYWR5IGV4aXN0cwkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQxjbGllbnRBZHJlc3MCB19yYXRpbmcFDWRlZmF1bHRSYXRpbmcFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlmbD0w", "height": 3146178, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HTqDQAda7LeSL1fqZjyHouKAzBu7eg6r5kaVyFDoUnUv Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 8 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let predictionMaxCounter = 3 | |
5 | + | ||
6 | + | let maxCounter = 6 | |
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 = 50 | |
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 | + | payout | |
109 | + | } | |
110 | + | ||
111 | + | ||
112 | + | func calculateNewRating (r_player,r_average,k,actualScore) = { | |
113 | + | let ratin_factor = ((r_player * scale) / r_max) | |
114 | + | if ((actualScore == 1)) | |
115 | + | then { | |
116 | + | let adjustment = ((k * (100 - ratin_factor)) / scale) | |
117 | + | (r_player + adjustment) | |
118 | + | } | |
119 | + | else { | |
120 | + | let adjustment = -70 | |
121 | + | (r_player + adjustment) | |
122 | + | } | |
123 | + | } | |
124 | + | ||
125 | + | ||
126 | + | @Callable(i) | |
127 | + | func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = { | |
128 | + | let caller = toString(i.caller) | |
129 | + | if ((caller != toString(this))) | |
130 | + | then throw("You are not allowed to call this function") | |
131 | + | else { | |
132 | + | func updateRatingsFunc (accum,address) = { | |
133 | + | let rating = searchForRating(address) | |
134 | + | let prediction = searchForAddressPrediction(itemId, address) | |
135 | + | let actualScore = if ((prediction == finalPrediction)) | |
136 | + | then 1 | |
137 | + | else 0 | |
138 | + | let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore) | |
139 | + | let payout = if ((prediction == finalPrediction)) | |
140 | + | then true | |
141 | + | else false | |
142 | + | let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating)) | |
143 | + | let calculatedAmount = calculatePayout(newRating, r_max) | |
144 | + | if (payout) | |
145 | + | then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId)) | |
146 | + | else updatedEntries | |
147 | + | } | |
148 | + | ||
149 | + | let updatedRatings = { | |
150 | + | let $l = addressList | |
151 | + | let $s = size($l) | |
152 | + | let $acc0 = nil | |
153 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
154 | + | then $a | |
155 | + | else updateRatingsFunc($a, $l[$i]) | |
156 | + | ||
157 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
158 | + | then $a | |
159 | + | else throw("List size exceeds 5") | |
160 | + | ||
161 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
162 | + | } | |
163 | + | (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true)) | |
164 | + | } | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(i) | |
170 | + | func savePrediction (itemId,prediction) = { | |
171 | + | let clientAdress = toString(i.caller) | |
172 | + | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
173 | + | case s: Int => | |
174 | + | s | |
175 | + | case _ => | |
176 | + | "User does not exist" | |
177 | + | } | |
178 | + | if ((searchForUser == "User does not exist")) | |
179 | + | then throw("User does not exist") | |
180 | + | else { | |
181 | + | let isFinal = match getBoolean((itemId + "_final")) { | |
182 | + | case s: Boolean => | |
183 | + | s | |
184 | + | case _ => | |
185 | + | false | |
186 | + | } | |
187 | + | if (isFinal) | |
188 | + | then throw("Final prediction already made") | |
189 | + | else { | |
190 | + | let isCanceled = match getBoolean((itemId + "_cancelled")) { | |
191 | + | case s: Boolean => | |
192 | + | s | |
193 | + | case _ => | |
194 | + | false | |
195 | + | } | |
196 | + | if (isCanceled) | |
197 | + | then throw("Final prediction already made") | |
198 | + | else { | |
199 | + | let clientRating = searchForRating(clientAdress) | |
200 | + | if ((ratingCutoff >= clientRating)) | |
201 | + | then throw("You are not allowed to participate anymore") | |
202 | + | else { | |
203 | + | let searchForCounter = match getInteger((itemId + "_counter")) { | |
204 | + | case s: Int => | |
205 | + | s | |
206 | + | case _ => | |
207 | + | -1 | |
208 | + | } | |
209 | + | if ((searchForCounter >= 1)) | |
210 | + | then { | |
211 | + | let adressList = findPredictionAdresses(itemId, searchForCounter) | |
212 | + | if (containsElement(adressList, clientAdress)) | |
213 | + | then throw("This User already gave a Prediction") | |
214 | + | else { | |
215 | + | let predictionCounter = match getInteger(((itemId + "_prediction_") + prediction)) { | |
216 | + | case s: Int => | |
217 | + | s | |
218 | + | case _ => | |
219 | + | 404 | |
220 | + | } | |
221 | + | let newCounter = (searchForCounter + 1) | |
222 | + | if ((predictionCounter != 404)) | |
223 | + | then if (((predictionCounter + 1) == predictionMaxCounter)) | |
224 | + | then { | |
225 | + | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
226 | + | let calculatedAmount = calculatePayout(newRating, r_max) | |
227 | + | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil) | |
228 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
229 | + | then throw("Strict value is not equal to itself.") | |
230 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + 1)), 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)] | |
231 | + | } | |
232 | + | else if ((newCounter >= maxCounter)) | |
233 | + | then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + 1)), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId)] | |
234 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), (predictionCounter + 1)), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_final"), false), BooleanEntry((itemId + "_cancelled"), false)] | |
235 | + | else if ((newCounter >= maxCounter)) | |
236 | + | then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), 1), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), true), BooleanEntry((itemId + "_final"), false), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId)] | |
237 | + | else [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry(((itemId + "_prediction_") + prediction), 1), IntegerEntry((itemId + "_counter"), newCounter), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false)] | |
238 | + | } | |
239 | + | } | |
240 | + | else { | |
241 | + | let searchForNewItem = match getString(("new_" + itemId)) { | |
242 | + | case s: String => | |
243 | + | s | |
244 | + | case _ => | |
245 | + | "Item not Found" | |
246 | + | } | |
247 | + | if ((searchForNewItem == "Item not Found")) | |
248 | + | then throw("Item not found") | |
249 | + | else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry(((itemId + "_prediction_") + prediction), 1), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)] | |
250 | + | } | |
251 | + | } | |
252 | + | } | |
253 | + | } | |
254 | + | } | |
255 | + | } | |
256 | + | ||
257 | + | ||
258 | + | ||
259 | + | @Callable(i) | |
260 | + | func registerUser () = { | |
261 | + | let clientAdress = toString(i.caller) | |
262 | + | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
263 | + | case s: Int => | |
264 | + | s | |
265 | + | case _ => | |
266 | + | -1 | |
267 | + | } | |
268 | + | if ((searchForUser != -1)) | |
269 | + | then throw("User already exists") | |
270 | + | else [IntegerEntry((clientAdress + "_rating"), defaultRating)] | |
271 | + | } | |
272 | + | ||
273 | + | ||
274 | + | @Verifier(tx) | |
275 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
276 | + |
github/deemru/w8io/026f985 20.04 ms ◑