tx · 4qa52T7FpFtiCvsX4B6azX2FzUDvUtz3HJizxep4Zgds

3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ:  -0.01000000 Waves

2024.06.11 17:51 [3146231] smart account 3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ > SELF 0.00000000 Waves

{ "type": 13, "id": "4qa52T7FpFtiCvsX4B6azX2FzUDvUtz3HJizxep4Zgds", "fee": 1000000, "feeAssetId": null, "timestamp": 1718117503455, "version": 2, "chainId": 84, "sender": "3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ", "senderPublicKey": "97GV9vh8gVwcCVk5uVkuYSiKY9tAhptVmzhp87xY9wKy", "proofs": [ "5ZWbdUaNmH9bK9GPGpr5xgifFtKtXtiJeGPTwJbVJhdaML4jqfNKERLSQ77Urhg97iWmNVdHDRbsPeCiUqkTSy6a" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIAAwAKbWF4Q291bnRlcgAGAA1kZWZhdWx0UmF0aW5nAGQADnJhdGVBZGp1c3RtZW50ABQAB3Rva2VuSWQBIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAxwYXlvdXRBbW91bnQAgOHrFwAMcmF0aW5nQ3V0b2ZmADIABXJfbWF4APQDAAVzY2FsZQBkARFzZWFyY2hGb3JDb3VudGVycwIGaXRlbUlkB2NvdW50ZXIEEXNlYXJjaEZvckNvdW50ZXJzBAckbWF0Y2gwCQCiCAEJAKwCAgkArAICBQZpdGVtSWQCAV8JAKQDAQUHY291bnRlcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAFAXMCB05vIFVzZXIFEXNlYXJjaEZvckNvdW50ZXJzAQ9zZWFyY2hGb3JSYXRpbmcBB2FkZHJlc3MEBnJhdGluZwQHJG1hdGNoMAkAnwgBCQCsAgIFB2FkZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAID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MCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgIIdXBkYXRlZF8FBml0ZW1JZAUGaXRlbUlkBQNuaWwBaQEMcmVnaXN0ZXJVc2VyAAQMY2xpZW50QWRyZXNzCQClCAEIBQFpBmNhbGxlcgQNc2VhcmNoRm9yVXNlcgQHJG1hdGNoMAkAnwgBCQCsAgIFDGNsaWVudEFkcmVzcwIHX3JhdGluZwMJAAECBQckbWF0Y2gwAgNJbnQEAXMFByRtYXRjaDAFAXMA////////////AQMJAQIhPQIFDXNlYXJjaEZvclVzZXIA////////////AQkAAgECE1VzZXIgYWxyZWFkeSBleGlzdHMJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUMY2xpZW50QWRyZXNzAgdfcmF0aW5nBQ1kZWZhdWx0UmF0aW5nBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V58iqbOA==", "height": 3146231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTqDQAda7LeSL1fqZjyHouKAzBu7eg6r5kaVyFDoUnUv Next: none Diff:
OldNewDifferences
119119 (r_player + adjustment)
120120 }
121121 else {
122- let adjustment = -70
122+ let adjustment = ((-(k) * (20 + ratin_factor)) / scale)
123123 (r_player + adjustment)
124124 }
125125 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 8 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let predictionMaxCounter = 3
55
66 let maxCounter = 6
77
88 let defaultRating = 100
99
1010 let rateAdjustment = 20
1111
1212 let tokenId = base58'8QGJvsXqJ43q5ksFymoPKF1NWWhwUfr2F7h52oeWgVhH'
1313
1414 let payoutAmount = 50000000
1515
1616 let ratingCutoff = 50
1717
1818 let r_max = 500
1919
2020 let scale = 100
2121
2222 func searchForCounters (itemId,counter) = {
2323 let searchForCounters = match getString(((itemId + "_") + toString(counter))) {
2424 case s: String =>
2525 s
2626 case _ =>
2727 "No User"
2828 }
2929 searchForCounters
3030 }
3131
3232
3333 func searchForRating (address) = {
3434 let rating = match getInteger((address + "_rating")) {
3535 case r: Int =>
3636 r
3737 case _ =>
3838 defaultRating
3939 }
4040 rating
4141 }
4242
4343
4444 func searchForAddressPrediction (itemId,adress) = {
4545 let searchForPrediction = match getString(((itemId + "_") + adress)) {
4646 case s: String =>
4747 s
4848 case _ =>
4949 "Not Found"
5050 }
5151 searchForPrediction
5252 }
5353
5454
5555 func searchForPredictionCounter (itemId,prediction) = {
5656 let searchForPrediction = match getInteger(((itemId + "_prediction_") + prediction)) {
5757 case s: Int =>
5858 s
5959 case _ =>
6060 "Not Found"
6161 }
6262 searchForPrediction
6363 }
6464
6565
6666 func findPredictionAdresses (itemId,counter) = {
6767 let adressList = if ((counter >= 5))
6868 then {
6969 let adress1 = searchForCounters(itemId, 1)
7070 let adress2 = searchForCounters(itemId, 2)
7171 let adress3 = searchForCounters(itemId, 3)
7272 let adress4 = searchForCounters(itemId, 4)
7373 let adress5 = searchForCounters(itemId, 5)
7474 (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
7575 }
7676 else if ((counter >= 4))
7777 then {
7878 let adress1 = searchForCounters(itemId, 1)
7979 let adress2 = searchForCounters(itemId, 2)
8080 let adress3 = searchForCounters(itemId, 3)
8181 let adress4 = searchForCounters(itemId, 4)
8282 ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4)
8383 }
8484 else if ((counter >= 3))
8585 then {
8686 let adress1 = searchForCounters(itemId, 1)
8787 let adress2 = searchForCounters(itemId, 2)
8888 let adress3 = searchForCounters(itemId, 3)
8989 (((nil :+ adress1) :+ adress2) :+ adress3)
9090 }
9191 else if ((counter >= 2))
9292 then {
9393 let adress1 = searchForCounters(itemId, 1)
9494 let adress2 = searchForCounters(itemId, 2)
9595 ((nil :+ adress1) :+ adress2)
9696 }
9797 else {
9898 let adress1 = searchForCounters(itemId, 1)
9999 (nil :+ adress1)
100100 }
101101 adressList
102102 }
103103
104104
105105 func calculatePayout (r_player,r_max) = {
106106 let ratio = ((r_player * 100) / r_max)
107107 let payout = ((payoutAmount * ratio) / 100)
108108 if ((0 >= payout))
109109 then 1
110110 else payout
111111 }
112112
113113
114114 func calculateNewRating (r_player,r_average,k,actualScore) = {
115115 let ratin_factor = ((r_player * scale) / r_max)
116116 if ((actualScore == 1))
117117 then {
118118 let adjustment = ((k * (100 - ratin_factor)) / scale)
119119 (r_player + adjustment)
120120 }
121121 else {
122- let adjustment = -70
122+ let adjustment = ((-(k) * (20 + ratin_factor)) / scale)
123123 (r_player + adjustment)
124124 }
125125 }
126126
127127
128128 @Callable(i)
129129 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
130130 let caller = toString(i.caller)
131131 if ((caller != toString(this)))
132132 then throw("You are not allowed to call this function")
133133 else {
134134 func updateRatingsFunc (accum,address) = {
135135 let rating = searchForRating(address)
136136 let prediction = searchForAddressPrediction(itemId, address)
137137 let actualScore = if ((prediction == finalPrediction))
138138 then 1
139139 else 0
140140 let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore)
141141 let payout = if ((prediction == finalPrediction))
142142 then true
143143 else false
144144 let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating))
145145 let calculatedAmount = calculatePayout(newRating, r_max)
146146 if (payout)
147147 then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId))
148148 else updatedEntries
149149 }
150150
151151 let updatedRatings = {
152152 let $l = addressList
153153 let $s = size($l)
154154 let $acc0 = nil
155155 func $f0_1 ($a,$i) = if (($i >= $s))
156156 then $a
157157 else updateRatingsFunc($a, $l[$i])
158158
159159 func $f0_2 ($a,$i) = if (($i >= $s))
160160 then $a
161161 else throw("List size exceeds 5")
162162
163163 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
164164 }
165165 (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true))
166166 }
167167 }
168168
169169
170170
171171 @Callable(i)
172172 func savePrediction (itemId,prediction) = {
173173 let clientAdress = toString(i.caller)
174174 let searchForUser = match getInteger((clientAdress + "_rating")) {
175175 case s: Int =>
176176 s
177177 case _ =>
178178 "User does not exist"
179179 }
180180 if ((searchForUser == "User does not exist"))
181181 then throw("User does not exist")
182182 else {
183183 let isFinal = match getBoolean((itemId + "_final")) {
184184 case s: Boolean =>
185185 s
186186 case _ =>
187187 false
188188 }
189189 if (isFinal)
190190 then throw("Final prediction already made")
191191 else {
192192 let isCanceled = match getBoolean((itemId + "_cancelled")) {
193193 case s: Boolean =>
194194 s
195195 case _ =>
196196 false
197197 }
198198 if (isCanceled)
199199 then throw("Final prediction already made")
200200 else {
201201 let clientRating = searchForRating(clientAdress)
202202 if ((ratingCutoff >= clientRating))
203203 then throw("You are not allowed to participate anymore")
204204 else {
205205 let searchForCounter = match getInteger((itemId + "_counter")) {
206206 case s: Int =>
207207 s
208208 case _ =>
209209 -1
210210 }
211211 if ((searchForCounter >= 1))
212212 then {
213213 let adressList = findPredictionAdresses(itemId, searchForCounter)
214214 if (containsElement(adressList, clientAdress))
215215 then throw("This User already gave a Prediction")
216216 else {
217217 let predictionCounter = match getInteger(((itemId + "_prediction_") + prediction)) {
218218 case s: Int =>
219219 s
220220 case _ =>
221221 404
222222 }
223223 let newCounter = (searchForCounter + 1)
224224 if ((predictionCounter != 404))
225225 then if (((predictionCounter + 1) == predictionMaxCounter))
226226 then {
227227 let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1)
228228 let calculatedAmount = calculatePayout(newRating, r_max)
229229 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
230230 if ((invokeAdjustRating != invokeAdjustRating))
231231 then throw("Strict value is not equal to itself.")
232232 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)]
233233 }
234234 else if ((newCounter >= maxCounter))
235235 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)]
236236 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)]
237237 else if ((newCounter >= maxCounter))
238238 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)]
239239 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)]
240240 }
241241 }
242242 else {
243243 let searchForNewItem = match getString(("new_" + itemId)) {
244244 case s: String =>
245245 s
246246 case _ =>
247247 "Item not Found"
248248 }
249249 if ((searchForNewItem == "Item not Found"))
250250 then throw("Item not found")
251251 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)]
252252 }
253253 }
254254 }
255255 }
256256 }
257257 }
258258
259259
260260
261261 @Callable(i)
262262 func registerUser () = {
263263 let clientAdress = toString(i.caller)
264264 let searchForUser = match getInteger((clientAdress + "_rating")) {
265265 case s: Int =>
266266 s
267267 case _ =>
268268 -1
269269 }
270270 if ((searchForUser != -1))
271271 then throw("User already exists")
272272 else [IntegerEntry((clientAdress + "_rating"), defaultRating)]
273273 }
274274
275275
276276 @Verifier(tx)
277277 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
278278

github/deemru/w8io/026f985 
31.67 ms