tx · GnJHLhLJXpjHWv7X3H7r3dvCnK29GRBg89tT3EKynkrG 3MsKieaJTjyfcToGvdJGJke1eJVbwmA6avD: -0.01000000 Waves 2024.06.12 14:39 [3147501] smart account 3MsKieaJTjyfcToGvdJGJke1eJVbwmA6avD > SELF 0.00000000 Waves
{ "type": 13, "id": "GnJHLhLJXpjHWv7X3H7r3dvCnK29GRBg89tT3EKynkrG", "fee": 1000000, "feeAssetId": null, "timestamp": 1718192432114, "version": 2, "chainId": 84, "sender": "3MsKieaJTjyfcToGvdJGJke1eJVbwmA6avD", "senderPublicKey": "Eb4Vimxr79DRhHC1c2vLZt9DNTNP8dLVdUZ4JFSWoxXY", "proofs": [ "3RCyAwcfG7P7WWxFjcqyb5w7phhfvhyytcr629pSnWfB318hpBeAP6eULyC3GhCxbs1rMLi1Un29EwHaNMWcjXeE" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIAAwAKbWF4Q291bnRlcgAGAA1kZWZhdWx0UmF0aW5nAGQADnJhdGVBZGp1c3RtZW50ABQAB3Rva2VuSWQBIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAxwYXlvdXRBbW91bnQAgOHrFwAMcmF0aW5nQ3V0b2ZmADIABXJfbWF4APQDAAVzY2FsZQBkARFzZWFyY2hGb3JDb3VudGVycwIGaXRlbUlkB2NvdW50ZXIEEXNlYXJjaEZvckNvdW50ZXJzBAckbWF0Y2gwCQCiCAEJAKwCAgkArAICBQZpdGVtSWQCAV8JAKQDAQUHY291bnRlcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAFAXMCB05vIFVzZXIFEXNlYXJjaEZvckNvdW50ZXJzAQ9zZWFyY2hGb3JSYXRpbmcBB2FkZHJlc3MEBnJhdGluZwQHJG1hdGNoMAkAnwgBCQCsAgIFB2FkZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAFyBQckbWF0Y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xsZXIEDXNlYXJjaEZvclVzZXIEByRtYXRjaDAJAJ8IAQkArAICBQxjbGllbnRBZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAFzBQckbWF0Y2gwBQFzAP///////////wEDCQECIT0CBQ1zZWFyY2hGb3JVc2VyAP///////////wEJAAIBAhNVc2VyIGFscmVhZHkgZXhpc3RzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDGNsaWVudEFkcmVzcwIHX3JhdGluZwUNZGVmYXVsdFJhdGluZwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleT02rj0=", "height": 3147501, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H9wB6VetocPazzR6daHeqir3bhSoc9vLGLw2NdiYAkJv Next: none Diff:
Old | New | Differences | |
---|---|---|---|
235 | 235 | then { | |
236 | 236 | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
237 | 237 | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
238 | - | [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
238 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
239 | + | then throw("Strict value is not equal to itself.") | |
240 | + | else [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
239 | 241 | } | |
240 | 242 | 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)] | |
241 | 243 | else if ((newCounter >= maxCounter)) | |
242 | 244 | then { | |
243 | 245 | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
244 | 246 | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
245 | - | [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
247 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
248 | + | then throw("Strict value is not equal to itself.") | |
249 | + | else [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
246 | 250 | } | |
247 | 251 | 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)] | |
248 | 252 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let predictionMaxCounter = 3 | |
5 | 5 | ||
6 | 6 | let maxCounter = 6 | |
7 | 7 | ||
8 | 8 | let defaultRating = 100 | |
9 | 9 | ||
10 | 10 | let rateAdjustment = 20 | |
11 | 11 | ||
12 | 12 | let tokenId = base58'8QGJvsXqJ43q5ksFymoPKF1NWWhwUfr2F7h52oeWgVhH' | |
13 | 13 | ||
14 | 14 | let payoutAmount = 50000000 | |
15 | 15 | ||
16 | 16 | let ratingCutoff = 50 | |
17 | 17 | ||
18 | 18 | let r_max = 500 | |
19 | 19 | ||
20 | 20 | let scale = 100 | |
21 | 21 | ||
22 | 22 | func searchForCounters (itemId,counter) = { | |
23 | 23 | let searchForCounters = match getString(((itemId + "_") + toString(counter))) { | |
24 | 24 | case s: String => | |
25 | 25 | s | |
26 | 26 | case _ => | |
27 | 27 | "No User" | |
28 | 28 | } | |
29 | 29 | searchForCounters | |
30 | 30 | } | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func searchForRating (address) = { | |
34 | 34 | let rating = match getInteger((address + "_rating")) { | |
35 | 35 | case r: Int => | |
36 | 36 | r | |
37 | 37 | case _ => | |
38 | 38 | defaultRating | |
39 | 39 | } | |
40 | 40 | rating | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func searchForAddressPrediction (itemId,adress) = { | |
45 | 45 | let searchForPrediction = match getString(((itemId + "_") + adress)) { | |
46 | 46 | case s: String => | |
47 | 47 | s | |
48 | 48 | case _ => | |
49 | 49 | "Not Found" | |
50 | 50 | } | |
51 | 51 | searchForPrediction | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func searchForPredictionCounter (itemId,prediction) = { | |
56 | 56 | let searchForPrediction = match getInteger(((itemId + "_prediction_") + prediction)) { | |
57 | 57 | case s: Int => | |
58 | 58 | s | |
59 | 59 | case _ => | |
60 | 60 | "Not Found" | |
61 | 61 | } | |
62 | 62 | searchForPrediction | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func findPredictionAdresses (itemId,counter) = { | |
67 | 67 | let adressList = if ((counter >= 5)) | |
68 | 68 | then { | |
69 | 69 | let adress1 = searchForCounters(itemId, 1) | |
70 | 70 | let adress2 = searchForCounters(itemId, 2) | |
71 | 71 | let adress3 = searchForCounters(itemId, 3) | |
72 | 72 | let adress4 = searchForCounters(itemId, 4) | |
73 | 73 | let adress5 = searchForCounters(itemId, 5) | |
74 | 74 | (((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) :+ adress5) | |
75 | 75 | } | |
76 | 76 | else if ((counter >= 4)) | |
77 | 77 | then { | |
78 | 78 | let adress1 = searchForCounters(itemId, 1) | |
79 | 79 | let adress2 = searchForCounters(itemId, 2) | |
80 | 80 | let adress3 = searchForCounters(itemId, 3) | |
81 | 81 | let adress4 = searchForCounters(itemId, 4) | |
82 | 82 | ((((nil :+ adress1) :+ adress2) :+ adress3) :+ adress4) | |
83 | 83 | } | |
84 | 84 | else if ((counter >= 3)) | |
85 | 85 | then { | |
86 | 86 | let adress1 = searchForCounters(itemId, 1) | |
87 | 87 | let adress2 = searchForCounters(itemId, 2) | |
88 | 88 | let adress3 = searchForCounters(itemId, 3) | |
89 | 89 | (((nil :+ adress1) :+ adress2) :+ adress3) | |
90 | 90 | } | |
91 | 91 | else if ((counter >= 2)) | |
92 | 92 | then { | |
93 | 93 | let adress1 = searchForCounters(itemId, 1) | |
94 | 94 | let adress2 = searchForCounters(itemId, 2) | |
95 | 95 | ((nil :+ adress1) :+ adress2) | |
96 | 96 | } | |
97 | 97 | else { | |
98 | 98 | let adress1 = searchForCounters(itemId, 1) | |
99 | 99 | (nil :+ adress1) | |
100 | 100 | } | |
101 | 101 | adressList | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func calculatePayout (r_player,r_max) = { | |
106 | 106 | let ratio = ((r_player * 100) / r_max) | |
107 | 107 | let payout = ((payoutAmount * ratio) / 100) | |
108 | 108 | if ((0 >= payout)) | |
109 | 109 | then 1 | |
110 | 110 | else payout | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func calculateNewRating (r_player,r_max,k,actualScore) = { | |
115 | 115 | let ratin_factor = ((r_player * scale) / r_max) | |
116 | 116 | if ((actualScore == 1)) | |
117 | 117 | then { | |
118 | 118 | let adjustment = ((k * (100 - ratin_factor)) / scale) | |
119 | 119 | (r_player + adjustment) | |
120 | 120 | } | |
121 | 121 | else { | |
122 | 122 | let adjustment = ((-(k) * (20 + ratin_factor)) / scale) | |
123 | 123 | (r_player + adjustment) | |
124 | 124 | } | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | @Callable(i) | |
129 | 129 | func adjustRatingsAndPayoutParticipants (itemId,addressList,lastCallerAddress,finalPrediction) = { | |
130 | 130 | let caller = toString(i.caller) | |
131 | 131 | if ((caller != toString(this))) | |
132 | 132 | then throw("You are not allowed to call this function") | |
133 | 133 | else { | |
134 | 134 | func updateRatingsFunc (accum,address) = { | |
135 | 135 | let rating = searchForRating(address) | |
136 | 136 | let prediction = searchForAddressPrediction(itemId, address) | |
137 | 137 | let actualScore = if ((prediction == finalPrediction)) | |
138 | 138 | then 1 | |
139 | 139 | else 0 | |
140 | 140 | let newRating = calculateNewRating(rating, r_max, rateAdjustment, actualScore) | |
141 | 141 | let payout = if ((prediction == finalPrediction)) | |
142 | 142 | then true | |
143 | 143 | else false | |
144 | 144 | let updatedEntries = (accum :+ IntegerEntry((address + "_rating"), newRating)) | |
145 | 145 | let calculatedAmount = calculatePayout(newRating, r_max) | |
146 | 146 | if (payout) | |
147 | 147 | then (updatedEntries :+ ScriptTransfer(Address(fromBase58String(address)), calculatedAmount, tokenId)) | |
148 | 148 | else updatedEntries | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | let updatedRatings = { | |
152 | 152 | let $l = addressList | |
153 | 153 | let $s = size($l) | |
154 | 154 | let $acc0 = nil | |
155 | 155 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
156 | 156 | then $a | |
157 | 157 | else updateRatingsFunc($a, $l[$i]) | |
158 | 158 | ||
159 | 159 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
160 | 160 | then $a | |
161 | 161 | else throw("List size exceeds 5") | |
162 | 162 | ||
163 | 163 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
164 | 164 | } | |
165 | 165 | (updatedRatings :+ BooleanEntry((itemId + "_adjusted"), true)) | |
166 | 166 | } | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | 171 | @Callable(i) | |
172 | 172 | func savePrediction (itemId,prediction) = { | |
173 | 173 | let clientAdress = toString(i.caller) | |
174 | 174 | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
175 | 175 | case s: Int => | |
176 | 176 | s | |
177 | 177 | case _ => | |
178 | 178 | "User does not exist" | |
179 | 179 | } | |
180 | 180 | if ((searchForUser == "User does not exist")) | |
181 | 181 | then throw("User does not exist") | |
182 | 182 | else { | |
183 | 183 | let isFinal = match getBoolean((itemId + "_final")) { | |
184 | 184 | case s: Boolean => | |
185 | 185 | s | |
186 | 186 | case _ => | |
187 | 187 | false | |
188 | 188 | } | |
189 | 189 | if (isFinal) | |
190 | 190 | then throw("Final prediction already made") | |
191 | 191 | else { | |
192 | 192 | let isCanceled = match getBoolean((itemId + "_cancelled")) { | |
193 | 193 | case s: Boolean => | |
194 | 194 | s | |
195 | 195 | case _ => | |
196 | 196 | false | |
197 | 197 | } | |
198 | 198 | if (isCanceled) | |
199 | 199 | then throw("Final prediction already made") | |
200 | 200 | else { | |
201 | 201 | let clientRating = searchForRating(clientAdress) | |
202 | 202 | if ((ratingCutoff >= clientRating)) | |
203 | 203 | then throw("You are not allowed to participate anymore") | |
204 | 204 | else { | |
205 | 205 | let searchForCounter = match getInteger((itemId + "_counter")) { | |
206 | 206 | case s: Int => | |
207 | 207 | s | |
208 | 208 | case _ => | |
209 | 209 | -1 | |
210 | 210 | } | |
211 | 211 | if ((searchForCounter >= 1)) | |
212 | 212 | then { | |
213 | 213 | let adressList = findPredictionAdresses(itemId, searchForCounter) | |
214 | 214 | if (containsElement(adressList, clientAdress)) | |
215 | 215 | then throw("This User already gave a Prediction") | |
216 | 216 | else { | |
217 | 217 | let predictionCounter = match getInteger(((itemId + "_prediction_") + prediction)) { | |
218 | 218 | case s: Int => | |
219 | 219 | s | |
220 | 220 | case _ => | |
221 | 221 | 404 | |
222 | 222 | } | |
223 | 223 | let newCounter = (searchForCounter + 1) | |
224 | 224 | if ((predictionCounter != 404)) | |
225 | 225 | then if (((predictionCounter + 1) == predictionMaxCounter)) | |
226 | 226 | then { | |
227 | 227 | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
228 | 228 | let calculatedAmount = calculatePayout(newRating, r_max) | |
229 | 229 | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, prediction], nil) | |
230 | 230 | if ((invokeAdjustRating != invokeAdjustRating)) | |
231 | 231 | then throw("Strict value is not equal to itself.") | |
232 | 232 | 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)] | |
233 | 233 | } | |
234 | 234 | else if ((newCounter >= maxCounter)) | |
235 | 235 | then { | |
236 | 236 | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
237 | 237 | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
238 | - | [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
238 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
239 | + | then throw("Strict value is not equal to itself.") | |
240 | + | else [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
239 | 241 | } | |
240 | 242 | 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)] | |
241 | 243 | else if ((newCounter >= maxCounter)) | |
242 | 244 | then { | |
243 | 245 | let newRating = calculateNewRating(clientRating, r_max, rateAdjustment, 1) | |
244 | 246 | let invokeAdjustRating = invoke(this, "adjustRatingsAndPayoutParticipants", [itemId, adressList, clientAdress, "None"], nil) | |
245 | - | [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
247 | + | if ((invokeAdjustRating != invokeAdjustRating)) | |
248 | + | then throw("Strict value is not equal to itself.") | |
249 | + | else [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), IntegerEntry((clientAdress + "_rating"), newRating)] | |
246 | 250 | } | |
247 | 251 | 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)] | |
248 | 252 | } | |
249 | 253 | } | |
250 | 254 | else { | |
251 | 255 | let searchForNewItem = match getString(("new_" + itemId)) { | |
252 | 256 | case s: String => | |
253 | 257 | s | |
254 | 258 | case _ => | |
255 | 259 | "Item not Found" | |
256 | 260 | } | |
257 | 261 | if ((searchForNewItem == "Item not Found")) | |
258 | 262 | then throw("Item not found") | |
259 | 263 | 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)] | |
260 | 264 | } | |
261 | 265 | } | |
262 | 266 | } | |
263 | 267 | } | |
264 | 268 | } | |
265 | 269 | } | |
266 | 270 | ||
267 | 271 | ||
268 | 272 | ||
269 | 273 | @Callable(i) | |
270 | 274 | func registerUser () = { | |
271 | 275 | let clientAdress = toString(i.caller) | |
272 | 276 | let searchForUser = match getInteger((clientAdress + "_rating")) { | |
273 | 277 | case s: Int => | |
274 | 278 | s | |
275 | 279 | case _ => | |
276 | 280 | -1 | |
277 | 281 | } | |
278 | 282 | if ((searchForUser != -1)) | |
279 | 283 | then throw("User already exists") | |
280 | 284 | else [IntegerEntry((clientAdress + "_rating"), defaultRating)] | |
281 | 285 | } | |
282 | 286 | ||
283 | 287 | ||
284 | 288 | @Verifier(tx) | |
285 | 289 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
286 | 290 |
github/deemru/w8io/026f985 41.71 ms ◑