tx · BDRX4mrSt3PxsErP5H53fr5RVRuf4BgedeTSKmQWHhA

3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos:  -0.01400000 Waves

2024.05.28 11:05 [3125567] smart account 3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos > SELF 0.00000000 Waves

{ "type": 13, "id": "BDRX4mrSt3PxsErP5H53fr5RVRuf4BgedeTSKmQWHhA", "fee": 1400000, "feeAssetId": null, "timestamp": 1716883557687, "version": 2, "chainId": 84, "sender": "3N8YkRZsgDVNAxtmwU1F65EpcYMb8f7QPos", "senderPublicKey": "F7SLwr7RYVQpyocmVScFC6ooaAwewaGq6wNRDYvyiPj1", "proofs": [ "52Ao5JSBnj7WegPca3ACWhHHHDV7PvfNhQjZX2Hv2KzJnEWANzauFBHYhFsTiBhy3ofccej9ztuoyKYFjBKg9JpC" ], "script": "base64:AAIFAAAAAAAAABIIAhIGCgQIGAgIEgQKAggIEgAAAAALAAAAABRwcmVkaWN0aW9uTWF4Q291bnRlcgAAAAAAAAAAAwAAAAAKbWF4Q291bnRlcgAAAAAAAAAABgAAAAANZGVmYXVsdFJhdGluZwAAAAAAAAAAZAAAAAAOcmF0ZUFkanVzdG1lbnQAAAAAAAAAABQAAAAAB3Rva2VuSWQBAAAAIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAAAAAxwYXlvdXRBbW91bnQAAAAAAAX14QAAAAAADHJhdGluZ0N1dG9mZgAAAAAAAAAAMgEAAAARc2VhcmNoRm9yQ291bnRlcnMAAAACAAAABml0ZW1JZAAAAAdjb3VudGVyBAAAABFzZWFyY2hGb3JDb3VudGVycwQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAIJAAEsAAAAAgUAAAAGaXRlbUlkAgAAAAFfCQABpAAAAAEFAAAAB2NvdW50ZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwIAAAAHTm8gVXNlcgU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lsAAAAAWkBAAAADHJlZ2lzdGVyVXNlcgAAAAAEAAAADGNsaWVudEFkcmVzcwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAADXNlYXJjaEZvclVzZXIEAAAAByRtYXRjaDAJAAQfAAAAAQUAAAAMY2xpZW50QWRyZXNzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMA//////////8DCQEAAAACIT0AAAACBQAAAA1zZWFyY2hGb3JVc2VyAP//////////CQAAAgAAAAECAAAAE1VzZXIgYWxyZWFkeSBleGlzdHMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAADGNsaWVudEFkcmVzcwUAAAANZGVmYXVsdFJhdGluZwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlYUatZ", "height": 3125567, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2w1WzjfYvBQKPaA4aiVcPiXmmzSLJXxVBGJzZ73R7gMX Next: BYDqHfWL2ZtbyAjDWSeji468h9XirGuDAtq2tgmKZBw2 Diff:
OldNewDifferences
130130 case s: Int =>
131131 s
132132 case _ =>
133- throw("User does not exist")
133+ "User does not exist"
134134 }
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")
135+ if ((searchForUser == "User does not exist"))
136+ then throw("User does not exist")
143137 else {
144- let isCanceled = match getBoolean((itemId + "_cancelled")) {
138+ let isFinal = match getBoolean((itemId + "_final")) {
145139 case s: Boolean =>
146140 s
147141 case _ =>
148142 false
149143 }
150- if (isCanceled)
144+ if (isFinal)
151145 then throw("Final prediction already made")
152146 else {
153- let clientRating = searchForRating(clientAdress)
154- if ((ratingCutoff >= clientRating))
155- then throw("You are not allowed to participate anymore")
147+ let isCanceled = match getBoolean((itemId + "_cancelled")) {
148+ case s: Boolean =>
149+ s
150+ case _ =>
151+ false
152+ }
153+ if (isCanceled)
154+ then throw("Final prediction already made")
156155 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")
156+ let clientRating = searchForRating(clientAdress)
157+ if ((ratingCutoff >= clientRating))
158+ then throw("You are not allowed to participate anymore")
159+ else {
160+ let searchForCounter = match getInteger((itemId + "_counter")) {
161+ case s: Int =>
162+ s
163+ case _ =>
164+ -1
165+ }
166+ if ((searchForCounter >= 1))
167+ then {
168+ let adressList = findPredictionAdresses(itemId, searchForCounter)
169+ if (containsElement(adressList, clientAdress))
170+ then throw("This User already gave a Prediction")
171+ else {
172+ let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
173+ case s: Int =>
174+ s
175+ case _ =>
176+ -1
177+ }
178+ let lastPredictionAdress = adressList[(size(adressList) - 1)]
179+ let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
180+ case s: String =>
181+ s
182+ case _ =>
183+ "no Prediction Found"
184+ }
185+ let newCounter = (searchForCounter + 1)
186+ if ((lastPrediction == prediction))
187+ then if (((predictionCounter + 1) == predictionMaxCounter))
188+ then {
189+ let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
190+ if ((invokeAdjustRating != invokeAdjustRating))
191+ then throw("Strict value is not equal to itself.")
192+ 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))]
193+ }
194+ 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)]
195+ else if ((newCounter >= maxCounter))
196+ 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)]
197+ else if (((predictionCounter - 1) == -1))
198+ 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))]
199+ 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))]
200+ }
201+ }
168202 else {
169- let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
170- case s: Int =>
171- s
172- case _ =>
173- -1
174- }
175- let lastPredictionAdress = adressList[(size(adressList) - 1)]
176- let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
203+ let searchForNewItem = match getString(("new_" + itemId)) {
177204 case s: String =>
178205 s
179206 case _ =>
180- "no Prediction Found"
207+ "Item not Found"
181208 }
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))]
209+ if ((searchForNewItem == "Item not Found"))
210+ then throw("Item not found")
211+ 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)]
197212 }
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)]
207213 }
208214 }
209215 }
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- throw("User does not exist")
133+ "User does not exist"
134134 }
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")
135+ if ((searchForUser == "User does not exist"))
136+ then throw("User does not exist")
143137 else {
144- let isCanceled = match getBoolean((itemId + "_cancelled")) {
138+ let isFinal = match getBoolean((itemId + "_final")) {
145139 case s: Boolean =>
146140 s
147141 case _ =>
148142 false
149143 }
150- if (isCanceled)
144+ if (isFinal)
151145 then throw("Final prediction already made")
152146 else {
153- let clientRating = searchForRating(clientAdress)
154- if ((ratingCutoff >= clientRating))
155- then throw("You are not allowed to participate anymore")
147+ let isCanceled = match getBoolean((itemId + "_cancelled")) {
148+ case s: Boolean =>
149+ s
150+ case _ =>
151+ false
152+ }
153+ if (isCanceled)
154+ then throw("Final prediction already made")
156155 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")
156+ let clientRating = searchForRating(clientAdress)
157+ if ((ratingCutoff >= clientRating))
158+ then throw("You are not allowed to participate anymore")
159+ else {
160+ let searchForCounter = match getInteger((itemId + "_counter")) {
161+ case s: Int =>
162+ s
163+ case _ =>
164+ -1
165+ }
166+ if ((searchForCounter >= 1))
167+ then {
168+ let adressList = findPredictionAdresses(itemId, searchForCounter)
169+ if (containsElement(adressList, clientAdress))
170+ then throw("This User already gave a Prediction")
171+ else {
172+ let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
173+ case s: Int =>
174+ s
175+ case _ =>
176+ -1
177+ }
178+ let lastPredictionAdress = adressList[(size(adressList) - 1)]
179+ let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
180+ case s: String =>
181+ s
182+ case _ =>
183+ "no Prediction Found"
184+ }
185+ let newCounter = (searchForCounter + 1)
186+ if ((lastPrediction == prediction))
187+ then if (((predictionCounter + 1) == predictionMaxCounter))
188+ then {
189+ let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil)
190+ if ((invokeAdjustRating != invokeAdjustRating))
191+ then throw("Strict value is not equal to itself.")
192+ 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))]
193+ }
194+ 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)]
195+ else if ((newCounter >= maxCounter))
196+ 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)]
197+ else if (((predictionCounter - 1) == -1))
198+ 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))]
199+ 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))]
200+ }
201+ }
168202 else {
169- let predictionCounter = match getInteger((itemId + "_predictionCounter")) {
170- case s: Int =>
171- s
172- case _ =>
173- -1
174- }
175- let lastPredictionAdress = adressList[(size(adressList) - 1)]
176- let lastPrediction = match getString(((itemId + "_") + lastPredictionAdress)) {
203+ let searchForNewItem = match getString(("new_" + itemId)) {
177204 case s: String =>
178205 s
179206 case _ =>
180- "no Prediction Found"
207+ "Item not Found"
181208 }
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))]
209+ if ((searchForNewItem == "Item not Found"))
210+ then throw("Item not found")
211+ 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)]
197212 }
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)]
207213 }
208214 }
209215 }
210216 }
211217 }
212218
213219
214220
215221 @Callable(i)
216222 func registerUser () = {
217223 let clientAdress = toString(i.caller)
218224 let searchForUser = match getInteger(clientAdress) {
219225 case s: Int =>
220226 s
221227 case _ =>
222228 -1
223229 }
224230 if ((searchForUser != -1))
225231 then throw("User already exists")
226232 else [IntegerEntry(clientAdress, defaultRating)]
227233 }
228234
229235
230236 @Verifier(tx)
231237 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
232238

github/deemru/w8io/026f985 
36.55 ms