tx · HTqDQAda7LeSL1fqZjyHouKAzBu7eg6r5kaVyFDoUnUv

3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ:  -0.01000000 Waves

2024.06.11 17:29 [3146210] smart account 3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ > SELF 0.00000000 Waves

{ "type": 13, "id": "HTqDQAda7LeSL1fqZjyHouKAzBu7eg6r5kaVyFDoUnUv", "fee": 1000000, "feeAssetId": null, "timestamp": 1718116226643, "version": 2, "chainId": 84, "sender": "3MsWCoaYDNCfHR8VzPB3cwLMrt7xfQWcWZJ", "senderPublicKey": "97GV9vh8gVwcCVk5uVkuYSiKY9tAhptVmzhp87xY9wKy", "proofs": [ "4ypesWmmWDVzQbyvijuV9QnWVx3Xmhb7uSwicu5w187ZqmpSkUbkn26CCZVMkXtsTTzeqAcQuXpT9d1T7w7bGgDV" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIAAwAKbWF4Q291bnRlcgAGAA1kZWZhdWx0UmF0aW5nAGQADnJhdGVBZGp1c3RtZW50ABQAB3Rva2VuSWQBIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAxwYXlvdXRBbW91bnQAgOHrFwAMcmF0aW5nQ3V0b2ZmADIABXJfbWF4APQDAAVzY2FsZQBkARFzZWFyY2hGb3JDb3VudGVycwIGaXRlbUlkB2NvdW50ZXIEEXNlYXJjaEZvckNvdW50ZXJzBAckbWF0Y2gwCQCiCAEJAKwCAgkArAICBQZpdGVtSWQCAV8JAKQDAQUHY291bnRlcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAFAXMCB05vIFVzZXIFEXNlYXJjaEZvckNvdW50ZXJzAQ9zZWFyY2hGb3JSYXRpbmcBB2FkZHJlc3MEBnJhdGluZwQHJG1hdGNoMAkAnwgBCQCsAgIFB2FkZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMA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DHJlZ2lzdGVyVXNlcgAEDGNsaWVudEFkcmVzcwkApQgBCAUBaQZjYWxsZXIEDXNlYXJjaEZvclVzZXIEByRtYXRjaDAJAJ8IAQkArAICBQxjbGllbnRBZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAFzBQckbWF0Y2gwBQFzAP///////////wEDCQECIT0CBQ1zZWFyY2hGb3JVc2VyAP///////////wEJAAIBAhNVc2VyIGFscmVhZHkgZXhpc3RzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDGNsaWVudEFkcmVzcwIHX3JhdGluZwUNZGVmYXVsdFJhdGluZwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleV4pXlY=", "height": 3146210, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CXtZxmiLbCS1WyiDGNyzE5hJBam3ruiHYHnx2c97dYzD Next: 4qa52T7FpFtiCvsX4B6azX2FzUDvUtz3HJizxep4Zgds Diff:
OldNewDifferences
105105 func calculatePayout (r_player,r_max) = {
106106 let ratio = ((r_player * 100) / r_max)
107107 let payout = ((payoutAmount * ratio) / 100)
108- payout
108+ if ((0 >= payout))
109+ then 1
110+ else payout
109111 }
110112
111113
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)
108- payout
108+ if ((0 >= payout))
109+ then 1
110+ else payout
109111 }
110112
111113
112114 func calculateNewRating (r_player,r_average,k,actualScore) = {
113115 let ratin_factor = ((r_player * scale) / r_max)
114116 if ((actualScore == 1))
115117 then {
116118 let adjustment = ((k * (100 - ratin_factor)) / scale)
117119 (r_player + adjustment)
118120 }
119121 else {
120122 let adjustment = -70
121123 (r_player + adjustment)
122124 }
123125 }
124126
125127
126128 @Callable(i)
127129 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
128130 let caller = toString(i.caller)
129131 if ((caller != toString(this)))
130132 then throw("You are not allowed to call this function")
131133 else {
132134 func updateRatingsFunc (accum,address) = {
133135 let rating = searchForRating(address)
134136 let prediction = searchForAddressPrediction(itemId, address)
135137 let actualScore = if ((prediction == finalPrediction))
136138 then 1
137139 else 0
138140 let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore)
139141 let payout = if ((prediction == finalPrediction))
140142 then true
141143 else false
142144 let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating))
143145 let calculatedAmount = calculatePayout(newRating, r_max)
144146 if (payout)
145147 then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId))
146148 else updatedEntries
147149 }
148150
149151 let updatedRatings = {
150152 let $l = addressList
151153 let $s = size($l)
152154 let $acc0 = nil
153155 func $f0_1 ($a,$i) = if (($i >= $s))
154156 then $a
155157 else updateRatingsFunc($a, $l[$i])
156158
157159 func $f0_2 ($a,$i) = if (($i >= $s))
158160 then $a
159161 else throw("List size exceeds 5")
160162
161163 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
162164 }
163165 (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true))
164166 }
165167 }
166168
167169
168170
169171 @Callable(i)
170172 func savePrediction (itemId,prediction) = {
171173 let clientAdress = toString(i.caller)
172174 let searchForUser = match getInteger((clientAdress + "_rating")) {
173175 case s: Int =>
174176 s
175177 case _ =>
176178 "User does not exist"
177179 }
178180 if ((searchForUser == "User does not exist"))
179181 then throw("User does not exist")
180182 else {
181183 let isFinal = match getBoolean((itemId + "_final")) {
182184 case s: Boolean =>
183185 s
184186 case _ =>
185187 false
186188 }
187189 if (isFinal)
188190 then throw("Final prediction already made")
189191 else {
190192 let isCanceled = match getBoolean((itemId + "_cancelled")) {
191193 case s: Boolean =>
192194 s
193195 case _ =>
194196 false
195197 }
196198 if (isCanceled)
197199 then throw("Final prediction already made")
198200 else {
199201 let clientRating = searchForRating(clientAdress)
200202 if ((ratingCutoff >= clientRating))
201203 then throw("You are not allowed to participate anymore")
202204 else {
203205 let searchForCounter = match getInteger((itemId + "_counter")) {
204206 case s: Int =>
205207 s
206208 case _ =>
207209 -1
208210 }
209211 if ((searchForCounter >= 1))
210212 then {
211213 let adressList = findPredictionAdresses(itemId, searchForCounter)
212214 if (containsElement(adressList, clientAdress))
213215 then throw("This User already gave a Prediction")
214216 else {
215217 let predictionCounter = match getInteger(((itemId + "_prediction_") + prediction)) {
216218 case s: Int =>
217219 s
218220 case _ =>
219221 404
220222 }
221223 let newCounter = (searchForCounter + 1)
222224 if ((predictionCounter != 404))
223225 then if (((predictionCounter + 1) == predictionMaxCounter))
224226 then {
225227 let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1)
226228 let calculatedAmount = calculatePayout(newRating, r_max)
227229 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
228230 if ((invokeAdjustRating != invokeAdjustRating))
229231 then throw("Strict value is not equal to itself.")
230232 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)]
231233 }
232234 else if ((newCounter >= maxCounter))
233235 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)]
234236 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)]
235237 else if ((newCounter >= maxCounter))
236238 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)]
237239 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)]
238240 }
239241 }
240242 else {
241243 let searchForNewItem = match getString(("new_" + itemId)) {
242244 case s: String =>
243245 s
244246 case _ =>
245247 "Item not Found"
246248 }
247249 if ((searchForNewItem == "Item not Found"))
248250 then throw("Item not found")
249251 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)]
250252 }
251253 }
252254 }
253255 }
254256 }
255257 }
256258
257259
258260
259261 @Callable(i)
260262 func registerUser () = {
261263 let clientAdress = toString(i.caller)
262264 let searchForUser = match getInteger((clientAdress + "_rating")) {
263265 case s: Int =>
264266 s
265267 case _ =>
266268 -1
267269 }
268270 if ((searchForUser != -1))
269271 then throw("User already exists")
270272 else [IntegerEntry((clientAdress + "_rating"), defaultRating)]
271273 }
272274
273275
274276 @Verifier(tx)
275277 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
276278

github/deemru/w8io/026f985 
38.40 ms