tx · 2w1WzjfYvBQKPaA4aiVcPiXmmzSLJXxVBGJzZ73R7gMX

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01400000 Waves

2024.05.28 10:58 [3125562] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "2w1WzjfYvBQKPaA4aiVcPiXmmzSLJXxVBGJzZ73R7gMX", "fee": 1400000, "feeAssetId": null, "timestamp": 1716883149515, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "fGqorMbY6Pt4WyHui2hNWp6h22huMF93tkL7AmY4WhYyaQydep1GGw99THv4UHZBMWXnY998y4xVUpwZvT6JL2b" ], "script": "base64:AAIFAAAAAAAAABIIAhIGCgQIGAgIEgQKAggIEgAAAAALAAAAABRwcmVkaWN0aW9uTWF4Q291bnRlcgAAAAAAAAAAAwAAAAAKbWF4Q291bnRlcgAAAAAAAAAABgAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAAAAAAOcmF0ZUFkanVzdG1lbnQAAAAAAAAAABQAAAAAB3Rva2VuSWQBAAAAIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAAAAAxwYXlvdXRBbW91bnQAAAAAAAX14QAAAAAADHJhdGluZ0N1dG9mZgAAAAAAAAAAMgEAAAARc2VhcmNoRm9yQ291bnRlcnMAAAACAAAABml0ZW1JZAAAAAdjb3VudGVyBAAAABFzZWFyY2hGb3JDb3VudGVycwQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAIJAAEsAAAAAgUAAAAGaXRlbUlkAgAAAAFfCQABpAAAAAEFAAAAB2NvdW50ZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwIAAAAHTm8gVXNl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AAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAP//////////AwkBAAAAAiE9AAAAAgUAAAANc2VhcmNoRm9yVXNlcgD//////////wkAAAIAAAABAgAAABNVc2VyIGFscmVhZHkgZXhpc3RzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAxjbGllbnRBZHJlc3MFAAAADWRlZmF1bHRSYXRpbmcFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5aMLLeQ==", "height": 3125562, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AuWQBNTbpHNsfeXZ7JdsNzTq2TmW9ZgJqbocuevNvLpc Next: BDRX4mrSt3PxsErP5H53fr5RVRuf4BgedeTSKmQWHhA Diff:
OldNewDifferences
130130 case s: Int =>
131131 s
132132 case _ =>
133- "no User exists"
133+ throw("User does not exist")
134134 }
135- let clientRating = searchForRating(clientAdress)
136- if ((ratingCutoff >= clientRating))
137- then throw("You are not allowed to participate anymore")
138- else if ((searchForUser == "no User exists"))
139- then throw("User does not exist")
140- else {
141- let searchForCounter = match getInteger((itemId + "_counter")) {
142- case s: Int =>
143- s
144- case _ =>
145- -1
146- }
147- if ((searchForCounter >= 1))
148- then {
149- let adressList = findPredictionAdresses(itemId, searchForCounter)
150- if (containsElement(adressList, clientAdress))
151- then throw("This User already gave a Prediction")
152- else {
153- let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
154- case s: Int =>
155- s
156- case _ =>
157- -1
158- }
159- let lastPredictionAdress = adressList[(size(adressList) - 1)]
160- let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
161- case s: String =>
162- s
163- case _ =>
164- "no Prediction Found"
165- }
166- let newCounter = (searchForCounter + 1)
167- if ((lastPrediction == prediction))
168- then if (((predictionCounter + 1) == predictionMaxCounter))
169- then {
170- let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
171- if ((invokeAdjustRating != invokeAdjustRating))
172- then throw("Strict value is not equal to itself.")
173- 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)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
135+ let isFinal = match getBoolean((itemId + "_final")) {
136+ case s: Boolean =>
137+ s
138+ case _ =>
139+ false
140+ }
141+ if (isFinal)
142+ then throw("Final prediction already made")
143+ else {
144+ let isCanceled = match getBoolean((itemId + "_cancelled")) {
145+ case s: Boolean =>
146+ s
147+ case _ =>
148+ false
149+ }
150+ if (isCanceled)
151+ then throw("Final prediction already made")
152+ else {
153+ let clientRating = searchForRating(clientAdress)
154+ if ((ratingCutoff >= clientRating))
155+ then throw("You are not allowed to participate anymore")
156+ else {
157+ let searchForCounter = match getInteger((itemId + "_counter")) {
158+ case s: Int =>
159+ s
160+ case _ =>
161+ -1
162+ }
163+ if ((searchForCounter >= 1))
164+ then {
165+ let adressList = findPredictionAdresses(itemId, searchForCounter)
166+ if (containsElement(adressList, clientAdress))
167+ then throw("This User already gave a Prediction")
168+ else {
169+ let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
170+ case s: Int =>
171+ s
172+ case _ =>
173+ -1
174174 }
175- 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)]
176- else if ((newCounter >= maxCounter))
177- 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)]
178- else if (((predictionCounter - 1) == -1))
179- 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))]
180- 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))]
181- }
182- }
183- else {
184- let searchForNewItem = match getString(("new_" + itemId)) {
185- case s: String =>
186- s
187- case _ =>
188- "not Found"
189- }
190- if ((searchForNewItem != itemId))
191- then throw("Item not Found")
192- 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)]
193- }
194- }
175+ let lastPredictionAdress = adressList[(size(adressList) - 1)]
176+ let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
177+ case s: String =>
178+ s
179+ case _ =>
180+ "no Prediction Found"
181+ }
182+ let newCounter = (searchForCounter + 1)
183+ if ((lastPrediction == prediction))
184+ then if (((predictionCounter + 1) == predictionMaxCounter))
185+ then {
186+ let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
187+ if ((invokeAdjustRating != invokeAdjustRating))
188+ then throw("Strict value is not equal to itself.")
189+ 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)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
190+ }
191+ 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)]
192+ else if ((newCounter >= maxCounter))
193+ 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)]
194+ else if (((predictionCounter - 1) == -1))
195+ 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))]
196+ 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))]
197+ }
198+ }
199+ else {
200+ let searchForNewItem = match getString(("new_" + itemId)) {
201+ case s: String =>
202+ s
203+ case _ =>
204+ throw("Item not Found")
205+ }
206+[StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)]
207+ }
208+ }
209+ }
210+ }
195211 }
196212
197213
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 = 100000000
1515
1616 let ratingCutoff = 50
1717
1818 func searchForCounters (itemId,counter) = {
1919 let searchForCounters = match getString(((itemId + "_") + toString(counter))) {
2020 case s: String =>
2121 s
2222 case _ =>
2323 "No User"
2424 }
2525 searchForCounters
2626 }
2727
2828
2929 func searchForRating (address) = {
3030 let rating = match getInteger(address) {
3131 case r: Int =>
3232 r
3333 case _ =>
3434 defaultRating
3535 }
3636 rating
3737 }
3838
3939
4040 func searchForAddressPrediction (itemId,adress) = {
4141 let searchForPrediction = match getString(((itemId + "_") + adress)) {
4242 case s: String =>
4343 s
4444 case _ =>
4545 "Not Found"
4646 }
4747 searchForPrediction
4848 }
4949
5050
5151 func findPredictionAdresses (itemId,counter) = {
5252 let adressList = if ((counter >= 5))
5353 then {
5454 let adress1 = searchForCounters(itemId, 1)
5555 let adress2 = searchForCounters(itemId, 2)
5656 let adress3 = searchForCounters(itemId, 3)
5757 let adress4 = searchForCounters(itemId, 4)
5858 let adress5 = searchForCounters(itemId, 5)
5959 (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5)
6060 }
6161 else if ((counter >= 4))
6262 then {
6363 let adress1 = searchForCounters(itemId, 1)
6464 let adress2 = searchForCounters(itemId, 2)
6565 let adress3 = searchForCounters(itemId, 3)
6666 let adress4 = searchForCounters(itemId, 4)
6767 ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4)
6868 }
6969 else if ((counter >= 3))
7070 then {
7171 let adress1 = searchForCounters(itemId, 1)
7272 let adress2 = searchForCounters(itemId, 2)
7373 let adress3 = searchForCounters(itemId, 3)
7474 (((nil :+ adress1) :+ adress2) :+ adress3)
7575 }
7676 else if ((counter >= 2))
7777 then {
7878 let adress1 = searchForCounters(itemId, 1)
7979 let adress2 = searchForCounters(itemId, 2)
8080 ((nil :+ adress1) :+ adress2)
8181 }
8282 else {
8383 let adress1 = searchForCounters(itemId, 1)
8484 (nil :+ adress1)
8585 }
8686 adressList
8787 }
8888
8989
9090 @Callable(i)
9191 func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = {
9292 func updateRatingsFunc (accum,address) = {
9393 let rating = searchForRating(address)
9494 let prediction = searchForAddressPrediction(itemId, address)
9595 let updatedRating = if ((prediction == finalPrediction))
9696 then (rating + rateAdjustment)
9797 else (rating - rateAdjustment)
9898 let payout = if ((prediction == finalPrediction))
9999 then payoutAmount
100100 else 0
101101 let updatedEntries = (accum :+ IntegerEntry(address, updatedRating))
102102 if ((payout > 0))
103103 then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), payout, tokenId))
104104 else updatedEntries
105105 }
106106
107107 let updatedRatings = {
108108 let $l = addressList
109109 let $s = size($l)
110110 let $acc0 = nil
111111 func $f0_1 ($a,$i) = if (($i >= $s))
112112 then $a
113113 else updateRatingsFunc($a, $l[$i])
114114
115115 func $f0_2 ($a,$i) = if (($i >= $s))
116116 then $a
117117 else throw("List size exceeds 5")
118118
119119 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
120120 }
121121 (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true))
122122 }
123123
124124
125125
126126 @Callable(i)
127127 func savePrediction (itemId,prediction) = {
128128 let clientAdress = toString(i.caller)
129129 let searchForUser = match getInteger(clientAdress) {
130130 case s: Int =>
131131 s
132132 case _ =>
133- "no User exists"
133+ throw("User does not exist")
134134 }
135- let clientRating = searchForRating(clientAdress)
136- if ((ratingCutoff >= clientRating))
137- then throw("You are not allowed to participate anymore")
138- else if ((searchForUser == "no User exists"))
139- then throw("User does not exist")
140- else {
141- let searchForCounter = match getInteger((itemId + "_counter")) {
142- case s: Int =>
143- s
144- case _ =>
145- -1
146- }
147- if ((searchForCounter >= 1))
148- then {
149- let adressList = findPredictionAdresses(itemId, searchForCounter)
150- if (containsElement(adressList, clientAdress))
151- then throw("This User already gave a Prediction")
152- else {
153- let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
154- case s: Int =>
155- s
156- case _ =>
157- -1
158- }
159- let lastPredictionAdress = adressList[(size(adressList) - 1)]
160- let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
161- case s: String =>
162- s
163- case _ =>
164- "no Prediction Found"
165- }
166- let newCounter = (searchForCounter + 1)
167- if ((lastPrediction == prediction))
168- then if (((predictionCounter + 1) == predictionMaxCounter))
169- then {
170- let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
171- if ((invokeAdjustRating != invokeAdjustRating))
172- then throw("Strict value is not equal to itself.")
173- 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)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
135+ let isFinal = match getBoolean((itemId + "_final")) {
136+ case s: Boolean =>
137+ s
138+ case _ =>
139+ false
140+ }
141+ if (isFinal)
142+ then throw("Final prediction already made")
143+ else {
144+ let isCanceled = match getBoolean((itemId + "_cancelled")) {
145+ case s: Boolean =>
146+ s
147+ case _ =>
148+ false
149+ }
150+ if (isCanceled)
151+ then throw("Final prediction already made")
152+ else {
153+ let clientRating = searchForRating(clientAdress)
154+ if ((ratingCutoff >= clientRating))
155+ then throw("You are not allowed to participate anymore")
156+ else {
157+ let searchForCounter = match getInteger((itemId + "_counter")) {
158+ case s: Int =>
159+ s
160+ case _ =>
161+ -1
162+ }
163+ if ((searchForCounter >= 1))
164+ then {
165+ let adressList = findPredictionAdresses(itemId, searchForCounter)
166+ if (containsElement(adressList, clientAdress))
167+ then throw("This User already gave a Prediction")
168+ else {
169+ let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
170+ case s: Int =>
171+ s
172+ case _ =>
173+ -1
174174 }
175- 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)]
176- else if ((newCounter >= maxCounter))
177- 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)]
178- else if (((predictionCounter - 1) == -1))
179- 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))]
180- 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))]
181- }
182- }
183- else {
184- let searchForNewItem = match getString(("new_" + itemId)) {
185- case s: String =>
186- s
187- case _ =>
188- "not Found"
189- }
190- if ((searchForNewItem != itemId))
191- then throw("Item not Found")
192- 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)]
193- }
194- }
175+ let lastPredictionAdress = adressList[(size(adressList) - 1)]
176+ let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
177+ case s: String =>
178+ s
179+ case _ =>
180+ "no Prediction Found"
181+ }
182+ let newCounter = (searchForCounter + 1)
183+ if ((lastPrediction == prediction))
184+ then if (((predictionCounter + 1) == predictionMaxCounter))
185+ then {
186+ let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
187+ if ((invokeAdjustRating != invokeAdjustRating))
188+ then throw("Strict value is not equal to itself.")
189+ 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)), payoutAmount, tokenId), IntegerEntry(clientAdress, (clientRating + 20))]
190+ }
191+ 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)]
192+ else if ((newCounter >= maxCounter))
193+ 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)]
194+ else if (((predictionCounter - 1) == -1))
195+ 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))]
196+ 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))]
197+ }
198+ }
199+ else {
200+ let searchForNewItem = match getString(("new_" + itemId)) {
201+ case s: String =>
202+ s
203+ case _ =>
204+ throw("Item not Found")
205+ }
206+[StringEntry(((itemId + "_") + toString(1)), clientAdress), StringEntry(((itemId + "_") + clientAdress), prediction), IntegerEntry((itemId + "_counter"), 1), IntegerEntry((itemId + "_predictionCounter"), 1), DeleteEntry(("new_" + itemId)), StringEntry(("updated_" + itemId), itemId)]
207+ }
208+ }
209+ }
210+ }
195211 }
196212
197213
198214
199215 @Callable(i)
200216 func registerUser () = {
201217 let clientAdress = toString(i.caller)
202218 let searchForUser = match getInteger(clientAdress) {
203219 case s: Int =>
204220 s
205221 case _ =>
206222 -1
207223 }
208224 if ((searchForUser != -1))
209225 then throw("User already exists")
210226 else [IntegerEntry(clientAdress, defaultRating)]
211227 }
212228
213229
214230 @Verifier(tx)
215231 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
216232

github/deemru/w8io/026f985 
74.83 ms