tx · 77XM4E5pXgfanzLaPDvsfQwPA1pLgy6L9ZWyyQp1Q1JD 3N9qNNh15o84HrRZa511KX2jQtgLcmqnEgR: -0.01500000 Waves 2024.06.11 15:44 [3146109] smart account 3N9qNNh15o84HrRZa511KX2jQtgLcmqnEgR > SELF 0.00000000 Waves
{ "type": 13, "id": "77XM4E5pXgfanzLaPDvsfQwPA1pLgy6L9ZWyyQp1Q1JD", "fee": 1500000, "feeAssetId": null, "timestamp": 1718109867538, "version": 2, "chainId": 84, "sender": "3N9qNNh15o84HrRZa511KX2jQtgLcmqnEgR", "senderPublicKey": "45oG8LXhBqNC5fxcA6iwy3DhLFnsEUzUBwEm7VrWtFSK", "proofs": [ "g1m5fjNpwWgyMUxuEKKQDrP4wspPqm3JkX5UnqQw21v3AyQgnUVUEoKNUMBeG4L5p33BWVz8qE4fnSih2zGjYpX" ], "script": "base64:CAISCAISBgoECBgICBIECgIICBIAEAAUcHJlZGljdGlvbk1heENvdW50ZXIAAwAKbWF4Q291bnRlcgAGAA1kZWZhdWx0UmF0aW5nAGQADnJhdGVBZGp1c3RtZW50ABQAB3Rva2VuSWQBIG33eiemmz/8i1OVqeOeBVscIi9bTehRMFsBoQapAMYYAAxwYXlvdXRBbW91bnQAgOHrFwAMcmF0aW5nQ3V0b2ZmADIABXJfbWF4APQDAAVzY2FsZQBkARFzZWFyY2hGb3JDb3VudGVycwIGaXRlbUlkB2NvdW50ZXIEEXNlYXJjaEZvckNvdW50ZXJzBAckbWF0Y2gwCQCiCAEJAKwCAgkArAICBQZpdGVtSWQCAV8JAKQDAQUHY291bnRlcgMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXMFByRtYXRjaDAFAXMCB05vIFVzZXIFEXNlYXJjaEZvckNvdW50ZXJzAQ9zZWFyY2hGb3JSYXRpbmcBB2FkZHJlc3MEBnJhdGluZwQHJG1hdGNoMAkAnwgBCQCsAgIFB2FkZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAFyB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BQZpdGVtSWQCAV8FDGNsaWVudEFkcmVzcwUKcHJlZGljdGlvbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQZpdGVtSWQCCF9jb3VudGVyAAEJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUGaXRlbUlkAhJfcHJlZGljdGlvbkNvdW50ZXIAAQkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgICBG5ld18FBml0ZW1JZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICCHVwZGF0ZWRfBQZpdGVtSWQFBml0ZW1JZAUDbmlsAWkBDHJlZ2lzdGVyVXNlcgAEDGNsaWVudEFkcmVzcwkApQgBCAUBaQZjYWxsZXIEDXNlYXJjaEZvclVzZXIEByRtYXRjaDAJAJ8IAQkArAICBQxjbGllbnRBZHJlc3MCB19yYXRpbmcDCQABAgUHJG1hdGNoMAIDSW50BAFzBQckbWF0Y2gwBQFzAP///////////wEDCQECIT0CBQ1zZWFyY2hGb3JVc2VyAP///////////wEJAAIBAhNVc2VyIGFscmVhZHkgZXhpc3RzCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFDGNsaWVudEFkcmVzcwIHX3JhdGluZwUNZGVmYXVsdFJhdGluZwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleXryG5k=", "height": 3146109, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9SVV4Xx418dED7FCdqDxX1ALQcY76PXdiWoiZYwdXBH8 Next: EkQ3xTy35fxw4sFQQehHByyNBiM3NyUZWMJn8qTMLy7Y Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 3 | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | - | func v (k,l) = { | |
65 | - | let w = if ((l >= 5)) | |
64 | + | func v (k,w) = { | |
65 | + | let u = { | |
66 | + | let m = getInteger(((k + "_prediction_") + w)) | |
67 | + | if ($isInstanceOf(m, "Int")) | |
68 | + | then { | |
69 | + | let n = m | |
70 | + | n | |
71 | + | } | |
72 | + | else "Not Found" | |
73 | + | } | |
74 | + | u | |
75 | + | } | |
76 | + | ||
77 | + | ||
78 | + | func x (k,l) = { | |
79 | + | let y = if ((l >= 5)) | |
66 | 80 | then { | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | let | |
72 | - | (((((nil :+ | |
81 | + | let z = j(k, 1) | |
82 | + | let A = j(k, 2) | |
83 | + | let B = j(k, 3) | |
84 | + | let C = j(k, 4) | |
85 | + | let D = j(k, 5) | |
86 | + | (((((nil :+ z) :+ A) :+ B) :+ C) :+ D) | |
73 | 87 | } | |
74 | 88 | else if ((l >= 4)) | |
75 | 89 | then { | |
76 | - | let | |
77 | - | let | |
78 | - | let | |
79 | - | let | |
80 | - | ((((nil :+ | |
90 | + | let z = j(k, 1) | |
91 | + | let A = j(k, 2) | |
92 | + | let B = j(k, 3) | |
93 | + | let C = j(k, 4) | |
94 | + | ((((nil :+ z) :+ A) :+ B) :+ C) | |
81 | 95 | } | |
82 | 96 | else if ((l >= 3)) | |
83 | 97 | then { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | (((nil :+ | |
98 | + | let z = j(k, 1) | |
99 | + | let A = j(k, 2) | |
100 | + | let B = j(k, 3) | |
101 | + | (((nil :+ z) :+ A) :+ B) | |
88 | 102 | } | |
89 | 103 | else if ((l >= 2)) | |
90 | 104 | then { | |
91 | - | let | |
92 | - | let | |
93 | - | ((nil :+ | |
105 | + | let z = j(k, 1) | |
106 | + | let A = j(k, 2) | |
107 | + | ((nil :+ z) :+ A) | |
94 | 108 | } | |
95 | 109 | else { | |
96 | - | let | |
97 | - | (nil :+ | |
110 | + | let z = j(k, 1) | |
111 | + | (nil :+ z) | |
98 | 112 | } | |
99 | - | | |
113 | + | y | |
100 | 114 | } | |
101 | 115 | ||
102 | 116 | ||
103 | - | func | |
104 | - | let | |
105 | - | let | |
106 | - | | |
117 | + | func E (F,h) = { | |
118 | + | let G = ((F * 100) / h) | |
119 | + | let H = ((f * G) / 100) | |
120 | + | H | |
107 | 121 | } | |
108 | 122 | ||
109 | 123 | ||
110 | - | func | |
111 | - | let | |
112 | - | if (( | |
124 | + | func I (F,J,K,L) = { | |
125 | + | let M = ((F * i) / h) | |
126 | + | if ((L == 1)) | |
113 | 127 | then { | |
114 | - | let | |
115 | - | ( | |
128 | + | let N = ((K * (100 - M)) / i) | |
129 | + | (F + N) | |
116 | 130 | } | |
117 | 131 | else { | |
118 | - | let | |
119 | - | ( | |
132 | + | let N = ((-(K) * (20 + M)) / i) | |
133 | + | (F + N) | |
120 | 134 | } | |
121 | 135 | } | |
122 | 136 | ||
123 | 137 | ||
124 | - | @Callable( | |
125 | - | func adjustRatingsAndPayoutParticipants (k, | |
126 | - | let | |
127 | - | if (( | |
138 | + | @Callable(O) | |
139 | + | func adjustRatingsAndPayoutParticipants (k,P,Q,R) = { | |
140 | + | let S = toString(O.caller) | |
141 | + | if ((S != toString(this))) | |
128 | 142 | then throw("You are not allowed to call this function") | |
129 | 143 | else { | |
130 | - | func | |
144 | + | func T (U,p) = { | |
131 | 145 | let q = o(p) | |
132 | - | let | |
133 | - | let | |
146 | + | let w = s(k, p) | |
147 | + | let L = if ((w == R)) | |
134 | 148 | then 1 | |
135 | 149 | else 0 | |
136 | - | let | |
137 | - | let | |
150 | + | let V = I(q, h, d, L) | |
151 | + | let H = if ((w == R)) | |
138 | 152 | then true | |
139 | 153 | else false | |
140 | - | let | |
141 | - | let | |
142 | - | if ( | |
143 | - | then ( | |
144 | - | else | |
154 | + | let W = (U :+ IntegerEntry((p + "_rating"), V)) | |
155 | + | let X = E(V, h) | |
156 | + | if (H) | |
157 | + | then (W :+ ScriptTransfer(Address(fromBase58String(p)), X, e)) | |
158 | + | else W | |
145 | 159 | } | |
146 | 160 | ||
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | func | |
152 | - | then | |
153 | - | else | |
161 | + | let Y = { | |
162 | + | let Z = P | |
163 | + | let aa = size(Z) | |
164 | + | let ab = nil | |
165 | + | func ac (ad,ae) = if ((ae >= aa)) | |
166 | + | then ad | |
167 | + | else T(ad, Z[ae]) | |
154 | 168 | ||
155 | - | func | |
156 | - | then | |
169 | + | func af (ad,ae) = if ((ae >= aa)) | |
170 | + | then ad | |
157 | 171 | else throw("List size exceeds 5") | |
158 | 172 | ||
159 | - | | |
173 | + | af(ac(ac(ac(ac(ac(ab, 0), 1), 2), 3), 4), 5) | |
160 | 174 | } | |
161 | - | ( | |
175 | + | (Y :+ BooleanEntry((k + "_adjusted"), true)) | |
162 | 176 | } | |
163 | 177 | } | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
168 | - | func savePrediction (k, | |
169 | - | let | |
170 | - | let | |
171 | - | let m = getInteger(( | |
181 | + | @Callable(O) | |
182 | + | func savePrediction (k,w) = { | |
183 | + | let ag = toString(O.caller) | |
184 | + | let ah = { | |
185 | + | let m = getInteger((ag + "_rating")) | |
172 | 186 | if ($isInstanceOf(m, "Int")) | |
173 | 187 | then { | |
174 | 188 | let n = m | |
176 | 190 | } | |
177 | 191 | else "User does not exist" | |
178 | 192 | } | |
179 | - | if (( | |
193 | + | if ((ah == "User does not exist")) | |
180 | 194 | then throw("User does not exist") | |
181 | 195 | else { | |
182 | - | let | |
196 | + | let ai = { | |
183 | 197 | let m = getBoolean((k + "_final")) | |
184 | 198 | if ($isInstanceOf(m, "Boolean")) | |
185 | 199 | then { | |
188 | 202 | } | |
189 | 203 | else false | |
190 | 204 | } | |
191 | - | if ( | |
205 | + | if (ai) | |
192 | 206 | then throw("Final prediction already made") | |
193 | 207 | else { | |
194 | - | let | |
208 | + | let aj = { | |
195 | 209 | let m = getBoolean((k + "_cancelled")) | |
196 | 210 | if ($isInstanceOf(m, "Boolean")) | |
197 | 211 | then { | |
200 | 214 | } | |
201 | 215 | else false | |
202 | 216 | } | |
203 | - | if ( | |
217 | + | if (aj) | |
204 | 218 | then throw("Final prediction already made") | |
205 | 219 | else { | |
206 | - | let | |
207 | - | if ((g >= | |
220 | + | let ak = o(ag) | |
221 | + | if ((g >= ak)) | |
208 | 222 | then throw("You are not allowed to participate anymore") | |
209 | 223 | else { | |
210 | - | let | |
224 | + | let al = { | |
211 | 225 | let m = getInteger((k + "_counter")) | |
212 | 226 | if ($isInstanceOf(m, "Int")) | |
213 | 227 | then { | |
216 | 230 | } | |
217 | 231 | else -1 | |
218 | 232 | } | |
219 | - | if (( | |
233 | + | if ((al >= 1)) | |
220 | 234 | then { | |
221 | - | let | |
222 | - | if (containsElement( | |
235 | + | let y = x(k, al) | |
236 | + | if (containsElement(y, ag)) | |
223 | 237 | then throw("This User already gave a Prediction") | |
224 | 238 | else { | |
225 | - | let | |
226 | - | let m = getInteger((k + "_ | |
239 | + | let am = { | |
240 | + | let m = getInteger(((k + "_prediction_") + w)) | |
227 | 241 | if ($isInstanceOf(m, "Int")) | |
228 | 242 | then { | |
229 | 243 | let n = m | |
230 | 244 | n | |
231 | 245 | } | |
232 | - | else | |
246 | + | else 404 | |
233 | 247 | } | |
234 | - | let am = w[(size(w) - 1)] | |
235 | - | let an = { | |
236 | - | let m = getString(((k + "_") + am)) | |
237 | - | if ($isInstanceOf(m, "String")) | |
248 | + | let an = (al + 1) | |
249 | + | if ((am != 404)) | |
250 | + | then if (((am + 1) == a)) | |
238 | 251 | then { | |
239 | - | let n = m | |
240 | - | n | |
252 | + | let V = I(ak, h, d, 1) | |
253 | + | let X = E(V, h) | |
254 | + | let ao = invoke(this, "adjustRatingsAndPayoutParticipants", [k, y, ag, w], nil) | |
255 | + | if ((ao != ao)) | |
256 | + | then throw("Strict value is not equal to itself.") | |
257 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), (am + 1)), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_final"), true), BooleanEntry((k + "_cancelled"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k), ScriptTransfer(Address(fromBase58String(ag)), X, e), IntegerEntry((ag + "_rating"), V), StringEntry((k + "_final_prediction"), w)] | |
241 | 258 | } | |
242 | - | else "no Prediction Found" | |
243 | - | } | |
244 | - | let ao = (ak + 1) | |
245 | - | if ((an == T)) | |
246 | - | then if (((al + 1) == a)) | |
247 | - | then { | |
248 | - | let U = G(aj, h, d, 1) | |
249 | - | let W = C(U, h) | |
250 | - | let ap = invoke(this, "adjustRatingsAndPayoutParticipants", [k, w, af, T], nil) | |
251 | - | if ((ap != ap)) | |
252 | - | then throw("Strict value is not equal to itself.") | |
253 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al + 1)), BooleanEntry((k + "_final"), true), BooleanEntry((k + "_cancelled"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k), ScriptTransfer(Address(fromBase58String(af)), W, e), IntegerEntry((af + "_rating"), U), StringEntry((k + "_final_prediction"), T)] | |
254 | - | } | |
255 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al + 1)), BooleanEntry((k + "_final"), false), BooleanEntry((k + "_cancelled"), false)] | |
256 | - | else if ((ao >= b)) | |
257 | - | then [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al - 1)), BooleanEntry((k + "_cancelled"), true), BooleanEntry((k + "_final"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k)] | |
258 | - | else if (((al - 1) == 0)) | |
259 | - | then [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), 1), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
260 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al - 1)), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
259 | + | else if ((an >= b)) | |
260 | + | then [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_cancelled"), true), BooleanEntry((k + "_final"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k)] | |
261 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), (am + 1)), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_final"), false), BooleanEntry((k + "_cancelled"), false)] | |
262 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), 1), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
261 | 263 | } | |
262 | 264 | } | |
263 | 265 | else { | |
264 | - | let | |
266 | + | let ap = { | |
265 | 267 | let m = getString(("new_" + k)) | |
266 | 268 | if ($isInstanceOf(m, "String")) | |
267 | 269 | then { | |
270 | 272 | } | |
271 | 273 | else "Item not Found" | |
272 | 274 | } | |
273 | - | if (( | |
275 | + | if ((ap == "Item not Found")) | |
274 | 276 | then throw("Item not found") | |
275 | - | else [StringEntry(((k + "_") + toString(1)), | |
277 | + | else [StringEntry(((k + "_") + toString(1)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry((k + "_counter"), 1), IntegerEntry((k + "_predictionCounter"), 1), DeleteEntry(("new_" + k)), StringEntry(("updated_" + k), k)] | |
276 | 278 | } | |
277 | 279 | } | |
278 | 280 | } | |
282 | 284 | ||
283 | 285 | ||
284 | 286 | ||
285 | - | @Callable( | |
287 | + | @Callable(O) | |
286 | 288 | func registerUser () = { | |
287 | - | let | |
288 | - | let | |
289 | - | let m = getInteger(( | |
289 | + | let ag = toString(O.caller) | |
290 | + | let ah = { | |
291 | + | let m = getInteger((ag + "_rating")) | |
290 | 292 | if ($isInstanceOf(m, "Int")) | |
291 | 293 | then { | |
292 | 294 | let n = m | |
294 | 296 | } | |
295 | 297 | else -1 | |
296 | 298 | } | |
297 | - | if (( | |
299 | + | if ((ah != -1)) | |
298 | 300 | then throw("User already exists") | |
299 | - | else [IntegerEntry(( | |
301 | + | else [IntegerEntry((ag + "_rating"), c)] | |
300 | 302 | } | |
301 | 303 | ||
302 | 304 | ||
303 | - | @Verifier( | |
304 | - | func | |
305 | + | @Verifier(aq) | |
306 | + | func ar () = sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
305 | 307 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 3 | |
5 | 5 | ||
6 | 6 | let b = 6 | |
7 | 7 | ||
8 | 8 | let c = 100 | |
9 | 9 | ||
10 | 10 | let d = 20 | |
11 | 11 | ||
12 | 12 | let e = base58'8QGJvsXqJ43q5ksFymoPKF1NWWhwUfr2F7h52oeWgVhH' | |
13 | 13 | ||
14 | 14 | let f = 50000000 | |
15 | 15 | ||
16 | 16 | let g = 50 | |
17 | 17 | ||
18 | 18 | let h = 500 | |
19 | 19 | ||
20 | 20 | let i = 100 | |
21 | 21 | ||
22 | 22 | func j (k,l) = { | |
23 | 23 | let j = { | |
24 | 24 | let m = getString(((k + "_") + toString(l))) | |
25 | 25 | if ($isInstanceOf(m, "String")) | |
26 | 26 | then { | |
27 | 27 | let n = m | |
28 | 28 | n | |
29 | 29 | } | |
30 | 30 | else "No User" | |
31 | 31 | } | |
32 | 32 | j | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func o (p) = { | |
37 | 37 | let q = { | |
38 | 38 | let m = getInteger((p + "_rating")) | |
39 | 39 | if ($isInstanceOf(m, "Int")) | |
40 | 40 | then { | |
41 | 41 | let r = m | |
42 | 42 | r | |
43 | 43 | } | |
44 | 44 | else c | |
45 | 45 | } | |
46 | 46 | q | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func s (k,t) = { | |
51 | 51 | let u = { | |
52 | 52 | let m = getString(((k + "_") + t)) | |
53 | 53 | if ($isInstanceOf(m, "String")) | |
54 | 54 | then { | |
55 | 55 | let n = m | |
56 | 56 | n | |
57 | 57 | } | |
58 | 58 | else "Not Found" | |
59 | 59 | } | |
60 | 60 | u | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | - | func v (k,l) = { | |
65 | - | let w = if ((l >= 5)) | |
64 | + | func v (k,w) = { | |
65 | + | let u = { | |
66 | + | let m = getInteger(((k + "_prediction_") + w)) | |
67 | + | if ($isInstanceOf(m, "Int")) | |
68 | + | then { | |
69 | + | let n = m | |
70 | + | n | |
71 | + | } | |
72 | + | else "Not Found" | |
73 | + | } | |
74 | + | u | |
75 | + | } | |
76 | + | ||
77 | + | ||
78 | + | func x (k,l) = { | |
79 | + | let y = if ((l >= 5)) | |
66 | 80 | then { | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | let | |
72 | - | (((((nil :+ | |
81 | + | let z = j(k, 1) | |
82 | + | let A = j(k, 2) | |
83 | + | let B = j(k, 3) | |
84 | + | let C = j(k, 4) | |
85 | + | let D = j(k, 5) | |
86 | + | (((((nil :+ z) :+ A) :+ B) :+ C) :+ D) | |
73 | 87 | } | |
74 | 88 | else if ((l >= 4)) | |
75 | 89 | then { | |
76 | - | let | |
77 | - | let | |
78 | - | let | |
79 | - | let | |
80 | - | ((((nil :+ | |
90 | + | let z = j(k, 1) | |
91 | + | let A = j(k, 2) | |
92 | + | let B = j(k, 3) | |
93 | + | let C = j(k, 4) | |
94 | + | ((((nil :+ z) :+ A) :+ B) :+ C) | |
81 | 95 | } | |
82 | 96 | else if ((l >= 3)) | |
83 | 97 | then { | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | (((nil :+ | |
98 | + | let z = j(k, 1) | |
99 | + | let A = j(k, 2) | |
100 | + | let B = j(k, 3) | |
101 | + | (((nil :+ z) :+ A) :+ B) | |
88 | 102 | } | |
89 | 103 | else if ((l >= 2)) | |
90 | 104 | then { | |
91 | - | let | |
92 | - | let | |
93 | - | ((nil :+ | |
105 | + | let z = j(k, 1) | |
106 | + | let A = j(k, 2) | |
107 | + | ((nil :+ z) :+ A) | |
94 | 108 | } | |
95 | 109 | else { | |
96 | - | let | |
97 | - | (nil :+ | |
110 | + | let z = j(k, 1) | |
111 | + | (nil :+ z) | |
98 | 112 | } | |
99 | - | | |
113 | + | y | |
100 | 114 | } | |
101 | 115 | ||
102 | 116 | ||
103 | - | func | |
104 | - | let | |
105 | - | let | |
106 | - | | |
117 | + | func E (F,h) = { | |
118 | + | let G = ((F * 100) / h) | |
119 | + | let H = ((f * G) / 100) | |
120 | + | H | |
107 | 121 | } | |
108 | 122 | ||
109 | 123 | ||
110 | - | func | |
111 | - | let | |
112 | - | if (( | |
124 | + | func I (F,J,K,L) = { | |
125 | + | let M = ((F * i) / h) | |
126 | + | if ((L == 1)) | |
113 | 127 | then { | |
114 | - | let | |
115 | - | ( | |
128 | + | let N = ((K * (100 - M)) / i) | |
129 | + | (F + N) | |
116 | 130 | } | |
117 | 131 | else { | |
118 | - | let | |
119 | - | ( | |
132 | + | let N = ((-(K) * (20 + M)) / i) | |
133 | + | (F + N) | |
120 | 134 | } | |
121 | 135 | } | |
122 | 136 | ||
123 | 137 | ||
124 | - | @Callable( | |
125 | - | func adjustRatingsAndPayoutParticipants (k, | |
126 | - | let | |
127 | - | if (( | |
138 | + | @Callable(O) | |
139 | + | func adjustRatingsAndPayoutParticipants (k,P,Q,R) = { | |
140 | + | let S = toString(O.caller) | |
141 | + | if ((S != toString(this))) | |
128 | 142 | then throw("You are not allowed to call this function") | |
129 | 143 | else { | |
130 | - | func | |
144 | + | func T (U,p) = { | |
131 | 145 | let q = o(p) | |
132 | - | let | |
133 | - | let | |
146 | + | let w = s(k, p) | |
147 | + | let L = if ((w == R)) | |
134 | 148 | then 1 | |
135 | 149 | else 0 | |
136 | - | let | |
137 | - | let | |
150 | + | let V = I(q, h, d, L) | |
151 | + | let H = if ((w == R)) | |
138 | 152 | then true | |
139 | 153 | else false | |
140 | - | let | |
141 | - | let | |
142 | - | if ( | |
143 | - | then ( | |
144 | - | else | |
154 | + | let W = (U :+ IntegerEntry((p + "_rating"), V)) | |
155 | + | let X = E(V, h) | |
156 | + | if (H) | |
157 | + | then (W :+ ScriptTransfer(Address(fromBase58String(p)), X, e)) | |
158 | + | else W | |
145 | 159 | } | |
146 | 160 | ||
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | func | |
152 | - | then | |
153 | - | else | |
161 | + | let Y = { | |
162 | + | let Z = P | |
163 | + | let aa = size(Z) | |
164 | + | let ab = nil | |
165 | + | func ac (ad,ae) = if ((ae >= aa)) | |
166 | + | then ad | |
167 | + | else T(ad, Z[ae]) | |
154 | 168 | ||
155 | - | func | |
156 | - | then | |
169 | + | func af (ad,ae) = if ((ae >= aa)) | |
170 | + | then ad | |
157 | 171 | else throw("List size exceeds 5") | |
158 | 172 | ||
159 | - | | |
173 | + | af(ac(ac(ac(ac(ac(ab, 0), 1), 2), 3), 4), 5) | |
160 | 174 | } | |
161 | - | ( | |
175 | + | (Y :+ BooleanEntry((k + "_adjusted"), true)) | |
162 | 176 | } | |
163 | 177 | } | |
164 | 178 | ||
165 | 179 | ||
166 | 180 | ||
167 | - | @Callable( | |
168 | - | func savePrediction (k, | |
169 | - | let | |
170 | - | let | |
171 | - | let m = getInteger(( | |
181 | + | @Callable(O) | |
182 | + | func savePrediction (k,w) = { | |
183 | + | let ag = toString(O.caller) | |
184 | + | let ah = { | |
185 | + | let m = getInteger((ag + "_rating")) | |
172 | 186 | if ($isInstanceOf(m, "Int")) | |
173 | 187 | then { | |
174 | 188 | let n = m | |
175 | 189 | n | |
176 | 190 | } | |
177 | 191 | else "User does not exist" | |
178 | 192 | } | |
179 | - | if (( | |
193 | + | if ((ah == "User does not exist")) | |
180 | 194 | then throw("User does not exist") | |
181 | 195 | else { | |
182 | - | let | |
196 | + | let ai = { | |
183 | 197 | let m = getBoolean((k + "_final")) | |
184 | 198 | if ($isInstanceOf(m, "Boolean")) | |
185 | 199 | then { | |
186 | 200 | let n = m | |
187 | 201 | n | |
188 | 202 | } | |
189 | 203 | else false | |
190 | 204 | } | |
191 | - | if ( | |
205 | + | if (ai) | |
192 | 206 | then throw("Final prediction already made") | |
193 | 207 | else { | |
194 | - | let | |
208 | + | let aj = { | |
195 | 209 | let m = getBoolean((k + "_cancelled")) | |
196 | 210 | if ($isInstanceOf(m, "Boolean")) | |
197 | 211 | then { | |
198 | 212 | let n = m | |
199 | 213 | n | |
200 | 214 | } | |
201 | 215 | else false | |
202 | 216 | } | |
203 | - | if ( | |
217 | + | if (aj) | |
204 | 218 | then throw("Final prediction already made") | |
205 | 219 | else { | |
206 | - | let | |
207 | - | if ((g >= | |
220 | + | let ak = o(ag) | |
221 | + | if ((g >= ak)) | |
208 | 222 | then throw("You are not allowed to participate anymore") | |
209 | 223 | else { | |
210 | - | let | |
224 | + | let al = { | |
211 | 225 | let m = getInteger((k + "_counter")) | |
212 | 226 | if ($isInstanceOf(m, "Int")) | |
213 | 227 | then { | |
214 | 228 | let n = m | |
215 | 229 | n | |
216 | 230 | } | |
217 | 231 | else -1 | |
218 | 232 | } | |
219 | - | if (( | |
233 | + | if ((al >= 1)) | |
220 | 234 | then { | |
221 | - | let | |
222 | - | if (containsElement( | |
235 | + | let y = x(k, al) | |
236 | + | if (containsElement(y, ag)) | |
223 | 237 | then throw("This User already gave a Prediction") | |
224 | 238 | else { | |
225 | - | let | |
226 | - | let m = getInteger((k + "_ | |
239 | + | let am = { | |
240 | + | let m = getInteger(((k + "_prediction_") + w)) | |
227 | 241 | if ($isInstanceOf(m, "Int")) | |
228 | 242 | then { | |
229 | 243 | let n = m | |
230 | 244 | n | |
231 | 245 | } | |
232 | - | else | |
246 | + | else 404 | |
233 | 247 | } | |
234 | - | let am = w[(size(w) - 1)] | |
235 | - | let an = { | |
236 | - | let m = getString(((k + "_") + am)) | |
237 | - | if ($isInstanceOf(m, "String")) | |
248 | + | let an = (al + 1) | |
249 | + | if ((am != 404)) | |
250 | + | then if (((am + 1) == a)) | |
238 | 251 | then { | |
239 | - | let n = m | |
240 | - | n | |
252 | + | let V = I(ak, h, d, 1) | |
253 | + | let X = E(V, h) | |
254 | + | let ao = invoke(this, "adjustRatingsAndPayoutParticipants", [k, y, ag, w], nil) | |
255 | + | if ((ao != ao)) | |
256 | + | then throw("Strict value is not equal to itself.") | |
257 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), (am + 1)), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_final"), true), BooleanEntry((k + "_cancelled"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k), ScriptTransfer(Address(fromBase58String(ag)), X, e), IntegerEntry((ag + "_rating"), V), StringEntry((k + "_final_prediction"), w)] | |
241 | 258 | } | |
242 | - | else "no Prediction Found" | |
243 | - | } | |
244 | - | let ao = (ak + 1) | |
245 | - | if ((an == T)) | |
246 | - | then if (((al + 1) == a)) | |
247 | - | then { | |
248 | - | let U = G(aj, h, d, 1) | |
249 | - | let W = C(U, h) | |
250 | - | let ap = invoke(this, "adjustRatingsAndPayoutParticipants", [k, w, af, T], nil) | |
251 | - | if ((ap != ap)) | |
252 | - | then throw("Strict value is not equal to itself.") | |
253 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al + 1)), BooleanEntry((k + "_final"), true), BooleanEntry((k + "_cancelled"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k), ScriptTransfer(Address(fromBase58String(af)), W, e), IntegerEntry((af + "_rating"), U), StringEntry((k + "_final_prediction"), T)] | |
254 | - | } | |
255 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al + 1)), BooleanEntry((k + "_final"), false), BooleanEntry((k + "_cancelled"), false)] | |
256 | - | else if ((ao >= b)) | |
257 | - | then [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al - 1)), BooleanEntry((k + "_cancelled"), true), BooleanEntry((k + "_final"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k)] | |
258 | - | else if (((al - 1) == 0)) | |
259 | - | then [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), 1), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
260 | - | else [StringEntry(((k + "_") + toString(ao)), af), StringEntry(((k + "_") + af), T), IntegerEntry((k + "_counter"), ao), IntegerEntry((k + "_predictionCounter"), (al - 1)), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
259 | + | else if ((an >= b)) | |
260 | + | then [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_cancelled"), true), BooleanEntry((k + "_final"), false), DeleteEntry(("updated_" + k)), StringEntry(("final_" + k), k)] | |
261 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), (am + 1)), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_final"), false), BooleanEntry((k + "_cancelled"), false)] | |
262 | + | else [StringEntry(((k + "_") + toString(an)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry(((k + "_prediction_") + w), 1), IntegerEntry((k + "_counter"), an), BooleanEntry((k + "_cancelled"), false), BooleanEntry((k + "_final"), false)] | |
261 | 263 | } | |
262 | 264 | } | |
263 | 265 | else { | |
264 | - | let | |
266 | + | let ap = { | |
265 | 267 | let m = getString(("new_" + k)) | |
266 | 268 | if ($isInstanceOf(m, "String")) | |
267 | 269 | then { | |
268 | 270 | let n = m | |
269 | 271 | n | |
270 | 272 | } | |
271 | 273 | else "Item not Found" | |
272 | 274 | } | |
273 | - | if (( | |
275 | + | if ((ap == "Item not Found")) | |
274 | 276 | then throw("Item not found") | |
275 | - | else [StringEntry(((k + "_") + toString(1)), | |
277 | + | else [StringEntry(((k + "_") + toString(1)), ag), StringEntry(((k + "_") + ag), w), IntegerEntry((k + "_counter"), 1), IntegerEntry((k + "_predictionCounter"), 1), DeleteEntry(("new_" + k)), StringEntry(("updated_" + k), k)] | |
276 | 278 | } | |
277 | 279 | } | |
278 | 280 | } | |
279 | 281 | } | |
280 | 282 | } | |
281 | 283 | } | |
282 | 284 | ||
283 | 285 | ||
284 | 286 | ||
285 | - | @Callable( | |
287 | + | @Callable(O) | |
286 | 288 | func registerUser () = { | |
287 | - | let | |
288 | - | let | |
289 | - | let m = getInteger(( | |
289 | + | let ag = toString(O.caller) | |
290 | + | let ah = { | |
291 | + | let m = getInteger((ag + "_rating")) | |
290 | 292 | if ($isInstanceOf(m, "Int")) | |
291 | 293 | then { | |
292 | 294 | let n = m | |
293 | 295 | n | |
294 | 296 | } | |
295 | 297 | else -1 | |
296 | 298 | } | |
297 | - | if (( | |
299 | + | if ((ah != -1)) | |
298 | 300 | then throw("User already exists") | |
299 | - | else [IntegerEntry(( | |
301 | + | else [IntegerEntry((ag + "_rating"), c)] | |
300 | 302 | } | |
301 | 303 | ||
302 | 304 | ||
303 | - | @Verifier( | |
304 | - | func | |
305 | + | @Verifier(aq) | |
306 | + | func ar () = sigVerify(aq.bodyBytes, aq.proofs[0], aq.senderPublicKey) | |
305 | 307 |
github/deemru/w8io/169f3d6 92.76 ms ◑