tx · 5tdrBtY5Y9NTfeYbV2XqAyWWKcqSx9tJyshjbFeqd54p

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01500000 Waves

2024.06.10 10:39 [3144361] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "5tdrBtY5Y9NTfeYbV2XqAyWWKcqSx9tJyshjbFeqd54p", "fee": 1500000, "feeAssetId": null, "timestamp": 1718005157307, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "ie2bFqfKX8PsCvWBQwSSjhzoNRzdhPZANVccUxRFoHMjiy9ushVCoX72nccPT4yctRHg5PtAewUMqnw1aJ3Myj2" ], "script": "base64:AAIFAAAAAAAAABIIAhIGCgQIGAgIEgQKAggIEgAAAAAPAAAAABRwcmVkaWN0aW9uTWF4Q291bnRlcgAAAAAAAAAAAwAAAAAKbWF4Q291bnRlcgAAAAAAAAAABgAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAAAAAAOcmF0ZUFkanVzdG1lbnQAAAAAAAAAABQAAAAAB3Rva2VuSWQBAAAAIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAAAAAxwYXlvdXRBbW91bnQAAAAAAAL68IAAAAAADHJhdGluZ0N1dG9mZgAAAAAAAAAAMgAAAAAFcl9tYXgAAAAAAAAAAfQAAAAABXNjYWxlAAAAAAAAAABkAQAAABFzZWFyY2hGb3JDb3VudGVycwAAAAIAAAAGaXRlbUlkAAAAB2NvdW50ZXIEAAAAEXNlYXJjaEZvckNvdW50ZXJzBAAAAAckbWF0Y2gwCQAEIgAAAAEJAAEsAAAAAgkAASwAAAACBQAAAAZpdGVtSWQCAAAAAV8JAAGkAAAAAQUAAAAHY291bnRlcgMJAAABAAAAAgUAAAAHJG1hdGNoMA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iNOA==", "height": 3144361, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4mmixvcrru92yoyqKzaGjnqKhsUjush4SaRmr66PunQY Next: 2GDEKDCLzU434mnfv8GYFHPF8n4xiDAHyYfs2xVwrbXE Diff:
OldNewDifferences
223223 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
224224 if ((invokeAdjustRating != invokeAdjustRating))
225225 then throw("Strict value is not equal to itself.")
226- 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), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
226+ 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), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
227227 }
228228 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)]
229229 else if ((newCounter >= maxCounter))
230- 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)]
230+ 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), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId)]
231231 else if (((predictionCounter - 1) == 0))
232- then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), 1), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
233- 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))]
232+ then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), 1), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false)]
233+ 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)]
234234 }
235235 }
236236 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 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 findPredictionAdresses (itemId,counter) = {
5656 let adressList = if ((counter >= 5))
5757 then {
5858 let adress1 = searchForCounters(itemId, 1)
5959 let adress2 = searchForCounters(itemId, 2)
6060 let adress3 = searchForCounters(itemId, 3)
6161 let adress4 = searchForCounters(itemId, 4)
6262 let adress5 = searchForCounters(itemId, 5)
6363 (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
6464 }
6565 else if ((counter >= 4))
6666 then {
6767 let adress1 = searchForCounters(itemId, 1)
6868 let adress2 = searchForCounters(itemId, 2)
6969 let adress3 = searchForCounters(itemId, 3)
7070 let adress4 = searchForCounters(itemId, 4)
7171 ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4)
7272 }
7373 else if ((counter >= 3))
7474 then {
7575 let adress1 = searchForCounters(itemId, 1)
7676 let adress2 = searchForCounters(itemId, 2)
7777 let adress3 = searchForCounters(itemId, 3)
7878 (((nil :+ adress1) :+ adress2) :+ adress3)
7979 }
8080 else if ((counter >= 2))
8181 then {
8282 let adress1 = searchForCounters(itemId, 1)
8383 let adress2 = searchForCounters(itemId, 2)
8484 ((nil :+ adress1) :+ adress2)
8585 }
8686 else {
8787 let adress1 = searchForCounters(itemId, 1)
8888 (nil :+ adress1)
8989 }
9090 adressList
9191 }
9292
9393
9494 func calculatePayout (r_player,r_max) = {
9595 let ratio = ((r_player * 100) / r_max)
9696 let payout = ((payoutAmount * ratio) / 100)
9797 payout
9898 }
9999
100100
101101 func calculateNewRating (r_player,r_average,k,actualScore) = {
102102 let ratin_factor = ((r_player * scale) / r_max)
103103 if ((actualScore == 1))
104104 then {
105105 let adjustment = ((k * (100 - ratin_factor)) / scale)
106106 (r_player + adjustment)
107107 }
108108 else {
109109 let adjustment = ((-(k) * (20 + ratin_factor)) / scale)
110110 (r_player + adjustment)
111111 }
112112 }
113113
114114
115115 @Callable(i)
116116 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
117117 let caller = toString(i.caller)
118118 if ((caller != toString(this)))
119119 then throw("You are not allowed to call this function")
120120 else {
121121 func updateRatingsFunc (accum,address) = {
122122 let rating = searchForRating(address)
123123 let prediction = searchForAddressPrediction(itemId, address)
124124 let actualScore = if ((prediction == finalPrediction))
125125 then 1
126126 else 0
127127 let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore)
128128 let payout = if ((prediction == finalPrediction))
129129 then true
130130 else false
131131 let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating))
132132 let calculatedAmount = calculatePayout(newRating, r_max)
133133 if (payout)
134134 then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId))
135135 else updatedEntries
136136 }
137137
138138 let updatedRatings = {
139139 let $l = addressList
140140 let $s = size($l)
141141 let $acc0 = nil
142142 func $f0_1 ($a,$i) = if (($i >= $s))
143143 then $a
144144 else updateRatingsFunc($a, $l[$i])
145145
146146 func $f0_2 ($a,$i) = if (($i >= $s))
147147 then $a
148148 else throw("List size exceeds 5")
149149
150150 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
151151 }
152152 (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true))
153153 }
154154 }
155155
156156
157157
158158 @Callable(i)
159159 func savePrediction (itemId,prediction) = {
160160 let clientAdress = toString(i.caller)
161161 let searchForUser = match getInteger((clientAdress + "_rating")) {
162162 case s: Int =>
163163 s
164164 case _ =>
165165 "User does not exist"
166166 }
167167 if ((searchForUser == "User does not exist"))
168168 then throw("User does not exist")
169169 else {
170170 let isFinal = match getBoolean((itemId + "_final")) {
171171 case s: Boolean =>
172172 s
173173 case _ =>
174174 false
175175 }
176176 if (isFinal)
177177 then throw("Final prediction already made")
178178 else {
179179 let isCanceled = match getBoolean((itemId + "_cancelled")) {
180180 case s: Boolean =>
181181 s
182182 case _ =>
183183 false
184184 }
185185 if (isCanceled)
186186 then throw("Final prediction already made")
187187 else {
188188 let clientRating = searchForRating(clientAdress)
189189 if ((ratingCutoff >= clientRating))
190190 then throw("You are not allowed to participate anymore")
191191 else {
192192 let searchForCounter = match getInteger((itemId + "_counter")) {
193193 case s: Int =>
194194 s
195195 case _ =>
196196 -1
197197 }
198198 if ((searchForCounter >= 1))
199199 then {
200200 let adressList = findPredictionAdresses(itemId, searchForCounter)
201201 if (containsElement(adressList, clientAdress))
202202 then throw("This User already gave a Prediction")
203203 else {
204204 let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
205205 case s: Int =>
206206 s
207207 case _ =>
208208 -1
209209 }
210210 let lastPredictionAdress = adressList[(size(adressList) - 1)]
211211 let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
212212 case s: String =>
213213 s
214214 case _ =>
215215 "no Prediction Found"
216216 }
217217 let newCounter = (searchForCounter + 1)
218218 if ((lastPrediction == prediction))
219219 then if (((predictionCounter + 1) == predictionMaxCounter))
220220 then {
221221 let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1)
222222 let calculatedAmount = calculatePayout(newRating, r_max)
223223 let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
224224 if ((invokeAdjustRating != invokeAdjustRating))
225225 then throw("Strict value is not equal to itself.")
226- 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), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
226+ 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), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId), ScriptTransfer(Address(fromBase58String(clientAdress)), calculatedAmount, tokenId), IntegerEntry((clientAdress + "_rating"), newRating)]
227227 }
228228 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)]
229229 else if ((newCounter >= maxCounter))
230- 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)]
230+ 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), DeleteEntry(("updated_" + itemId)), StringEntry(("final_" + itemId), itemId)]
231231 else if (((predictionCounter - 1) == 0))
232- then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), 1), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false), StringEntry("test", lastPrediction), IntegerEntry("test2", size(adressList))]
233- 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))]
232+ then [StringEntry(((itemId + "_") + toString(newCounter)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), newCounter), IntegerEntry((itemId + "_predictionCounter"), 1), BooleanEntry((itemId + "_cancelled"), false), BooleanEntry((itemId + "_final"), false)]
233+ 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)]
234234 }
235235 }
236236 else {
237237 let searchForNewItem = match getString(("new_" + itemId)) {
238238 case s: String =>
239239 s
240240 case _ =>
241241 "Item not Found"
242242 }
243243 if ((searchForNewItem == "Item not Found"))
244244 then throw("Item not found")
245245 else [StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)]
246246 }
247247 }
248248 }
249249 }
250250 }
251251 }
252252
253253
254254
255255 @Callable(i)
256256 func registerUser () = {
257257 let clientAdress = toString(i.caller)
258258 let searchForUser = match getInteger((clientAdress + "_rating")) {
259259 case s: Int =>
260260 s
261261 case _ =>
262262 -1
263263 }
264264 if ((searchForUser != -1))
265265 then throw("User already exists")
266266 else [IntegerEntry((clientAdress + "_rating"), defaultRating)]
267267 }
268268
269269
270270 @Verifier(tx)
271271 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
272272

github/deemru/w8io/026f985 
82.88 ms