tx · CLkt2Pv4NSBZtBj5TdfVXrZ6em71oni56eEGXRCsV8Hc 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8: -0.11200000 Waves 2022.11.16 13:00 [2319520] smart account 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8 > SELF 0.00000000 Waves
{ "type": 13, "id": "CLkt2Pv4NSBZtBj5TdfVXrZ6em71oni56eEGXRCsV8Hc", "fee": 11200000, "feeAssetId": null, "timestamp": 1668592824469, "version": 2, "chainId": 84, "sender": "3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8", "senderPublicKey": "6L7iBerXuPa5E74WCM6fLSB2VM1bMG9jgASH8tu9orHN", "proofs": [ "4vog1zUZtq8YxFPcizTCi1UYT1ykhcmZTwfLTnPManWxnzRZ2k2hXhXX82yM4pvTna8pooWmFoFuBXjpEfXbhwwJ" ], "script": "base64:BgIoCAISBwoFAQgBAQgSBgoEAQEICBIDCgEBEgQKAgEIEgQKAhEYEgASACsAD0dBTUVfVFlQRV9HUk9VUAIFR3JvdXAAEUdBTUVfVFlQRV9QTEFUT0ZGAghQbGF5LW9mZgAKR0FNRV9UWVBFUwkAzAgCBQ9HQU1FX1RZUEVfR1JPVVAJAMwIAgURR0FNRV9UWVBFX1BMQVRPRkYFA25pbAAEVVNEVAEgbySjyqsw3FIpmOgsYVruWn8jTcItdbvpnapU4NLQB8EAB01JTl9CRVQAwIQ9AAhPTkVfSE9VUgkAaAIJAGgCAAUAPADoBwARTU9ORVlfQk9YX0FERFJFRVMJAQdBZGRyZXNzAQEaAVSxYgy7BRV2F+zuKtUZtXyHmoiep9yqU84AB0JFVF9GRUUA9AMACUZFRV9TQ0FMRQCQTgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtHYW1lU3RyYVRpbWUCDl9zdGFydEdhbWVUaW1lAAlrR2FtZVR5cG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AzQgCBQxnYW1lc0VudHJpZXMJAQxJbnRlZ2VyRW50cnkCBQtrTGFzdEdhbWVJZAUHbmV3TEdJZAFpAQhzaHV0ZG93bgADCQEBIQEFBmFjdGl2ZQkAAgEJAKwCAgIiREFwcCBpcyBhbHJlYWR5IHN1c3BlbmRlZC4gQ2F1c2U6IAkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQZrQ2F1c2UCGnRoZSBjYXVzZSB3YXNuJ3Qgc3BlY2lmaWVkAwkBASEBCQEPY29udGFpbnNFbGVtZW50AgkAzAgCBQxhZG1pblB1YktleTEJAMwIAgUMYWRtaW5QdWJLZXkyCQDMCAIFDGFkbWluUHViS2V5MwUDbmlsCAUBaQ9jYWxsZXJQdWJsaWNLZXkJAAIBAiFPbmx5IGFkbWluIGNhbiBjYWxsIHRoaXMgZnVuY3Rpb24JAQdzdXNwZW5kAQIPUGF1c2VkIGJ5IGFkbWluAWkBCGFjdGl2YXRlAAMFBmFjdGl2ZQkAAgECFkRBcHAgaXMgYWxyZWFkeSBhY3RpdmUDCQEBIQEJAQ9jb250YWluc0VsZW1lbnQCCQDMCAIFDGFkbWluUHViS2V5MQkAzAgCBQxhZG1pblB1YktleTIJAMwIAgUMYWRtaW5QdWJLZXkzBQNuaWwIBQFpD2NhbGxlclB1YmxpY0tleQkAAgECIU9ubHkgYWRtaW4gY2FuIGNhbGwgdGhpcyBmdW5jdGlvbgkAzAgCCQEMQm9vbGVhbkVudHJ5AgUHa0FjdGl2ZQYJAMwIAgkBC0RlbGV0ZUVudHJ5AQUGa0NhdXNlBQNuaWwAxmce5Q==", "height": 2319520, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2BsK41cRUTmGFMd2P2aPTgKX8didF1h9uQtL5GDYh78G Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "Group" | |
5 | 5 | ||
6 | 6 | let b = "Play-off" | |
7 | 7 | ||
8 | 8 | let c = [a, b] | |
9 | 9 | ||
10 | 10 | let d = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
11 | 11 | ||
12 | 12 | let e = 1000000 | |
13 | 13 | ||
14 | 14 | let f = ((5 * 60) * 1000) | |
15 | 15 | ||
16 | 16 | let g = Address(base58'3N65zqVKchaFdW4gS7FxCRibjfkVgJvo7PT') | |
17 | 17 | ||
18 | 18 | let h = 500 | |
19 | 19 | ||
20 | 20 | let i = 10000 | |
21 | 21 | ||
22 | 22 | let j = "active" | |
23 | 23 | ||
24 | 24 | let k = "active_all_contracts" | |
25 | 25 | ||
26 | 26 | let l = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let m = "_startGameTime" | |
29 | 29 | ||
30 | 30 | let n = "_GameType" | |
31 | 31 | ||
32 | 32 | let o = "last_game_id" | |
33 | 33 | ||
34 | 34 | let p = "_totalBets" | |
35 | 35 | ||
36 | 36 | let q = "_toWinA" | |
37 | 37 | ||
38 | 38 | let r = "_toWinB" | |
39 | 39 | ||
40 | 40 | let s = "_onDraw" | |
41 | 41 | ||
42 | 42 | let t = "_result" | |
43 | 43 | ||
44 | 44 | let u = "_bank" | |
45 | 45 | ||
46 | 46 | let v = "_finalTime" | |
47 | 47 | ||
48 | 48 | let w = "_totalBetsForType" | |
49 | 49 | ||
50 | 50 | let x = "_userBet" | |
51 | 51 | ||
52 | 52 | let y = "_refId" | |
53 | 53 | ||
54 | 54 | let z = "_claimed" | |
55 | 55 | ||
56 | 56 | let A = "admin_pub_1" | |
57 | 57 | ||
58 | 58 | let B = "admin_pub_2" | |
59 | 59 | ||
60 | 60 | let C = "admin_pub_3" | |
61 | 61 | ||
62 | 62 | let D = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
63 | 63 | ||
64 | 64 | func E (F) = { | |
65 | 65 | let G = getString(D, F) | |
66 | 66 | if ($isInstanceOf(G, "String")) | |
67 | 67 | then { | |
68 | 68 | let H = G | |
69 | 69 | fromBase58String(H) | |
70 | 70 | } | |
71 | 71 | else { | |
72 | 72 | let I = G | |
73 | 73 | throw((F + "is empty")) | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | let J = E(A) | |
79 | 79 | ||
80 | 80 | let K = E(B) | |
81 | 81 | ||
82 | 82 | let L = E(C) | |
83 | 83 | ||
84 | 84 | let M = valueOrElse(getBoolean(this, j), true) | |
85 | 85 | ||
86 | 86 | let N = valueOrElse(getBoolean(D, k), true) | |
87 | 87 | ||
88 | 88 | func O () = if (if (M) | |
89 | 89 | then N | |
90 | 90 | else false) | |
91 | 91 | then unit | |
92 | 92 | else throw("DApp is inactive at this moment") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func P (Q) = if (containsElement([J, K, L], Q.callerPublicKey)) | |
96 | 96 | then unit | |
97 | 97 | else throw("Only admin can call this function") | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func R (S) = [BooleanEntry(j, false), StringEntry(l, S)] | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func T (U,V,W,X) = (((((((U + "_") + toString(V)) + "_") + toString(W)) + "_") + X) + x) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func Y (V,W,X) = (((((toString(V) + "_") + toString(W)) + "_") + X) + w) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func Z (aa,W,X) = if ((W == 1)) | |
110 | 110 | then if ((size(X) != 1)) | |
111 | 111 | then throw("Game result must contain only one letter: A,B,D") | |
112 | 112 | else if (!(contains("ABD", X))) | |
113 | 113 | then throw("Game result must contain only one letter: A,B,D") | |
114 | 114 | else if (if ((aa == b)) | |
115 | 115 | then !(contains("AB", X)) | |
116 | 116 | else false) | |
117 | 117 | then throw("Game result must contain only one letter: A,B") | |
118 | 118 | else true | |
119 | 119 | else if ((W == 2)) | |
120 | 120 | then { | |
121 | 121 | let ab = split(X, "_") | |
122 | 122 | if ((size(ab) != 2)) | |
123 | 123 | then throw("Inncorrect game result") | |
124 | 124 | else { | |
125 | 125 | let ac = valueOrErrorMessage(parseInt(ab[0]), "Inncorrect game result") | |
126 | 126 | let ad = valueOrErrorMessage(parseInt(ab[1]), "Inncorrect game result") | |
127 | 127 | if ((ac == ad)) | |
128 | 128 | then throw("Inncorrect game result. A and B cannot be equal") | |
129 | 129 | else true | |
130 | 130 | } | |
131 | 131 | } | |
132 | 132 | else if ((W == 3)) | |
133 | 133 | then { | |
134 | 134 | let ab = split(X, "_") | |
135 | 135 | if ((size(ab) != 2)) | |
136 | 136 | then throw("Inncorrect game result") | |
137 | 137 | else { | |
138 | 138 | let ae = ab[0] | |
139 | 139 | let af = valueOrErrorMessage(parseInt(ab[1]), "Inncorrect game result") | |
140 | 140 | if ((0 >= af)) | |
141 | 141 | then throw("Inncorrect game result, balls amount must be greater then 0") | |
142 | 142 | else if (if ((size(ae) != 1)) | |
143 | 143 | then true | |
144 | 144 | else !(contains("AB", ae))) | |
145 | 145 | then throw("Game result must contain only one letter: A,B") | |
146 | 146 | else true | |
147 | 147 | } | |
148 | 148 | } | |
149 | 149 | else false | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func ag (V,ah,X,W,ai) = { | |
153 | 153 | let aj = split(X, "_") | |
154 | 154 | let ak = if ((W == 1)) | |
155 | 155 | then if ((X == "A")) | |
156 | 156 | then $Tuple3("1_0", 1, 0) | |
157 | 157 | else if ((X == "B")) | |
158 | 158 | then $Tuple3("0_1", 0, 1) | |
159 | 159 | else $Tuple3("1_1", 1, 1) | |
160 | 160 | else if ((W == 2)) | |
161 | 161 | then $Tuple3(X, parseIntValue(aj[0]), parseIntValue(aj[1])) | |
162 | 162 | else if ((W == 3)) | |
163 | 163 | then if ((aj[0] == "A")) | |
164 | 164 | then $Tuple3((aj[1] + "_0"), parseIntValue(aj[1]), 0) | |
165 | 165 | else $Tuple3(("0_" + aj[1]), 0, parseIntValue(aj[1])) | |
166 | 166 | else $Tuple3(X, parseIntValue(aj[0]), parseIntValue(aj[1])) | |
167 | 167 | let al = ak._1 | |
168 | 168 | let ac = ak._2 | |
169 | 169 | let ad = ak._3 | |
170 | 170 | let am = if ((ac > ad)) | |
171 | 171 | then (ac - ad) | |
172 | 172 | else (ad - ac) | |
173 | 173 | let an = if ((ac > ad)) | |
174 | 174 | then "A" | |
175 | 175 | else if ((ad > ac)) | |
176 | 176 | then "B" | |
177 | 177 | else "D" | |
178 | 178 | let ao = (valueOrElse(getInteger(this, Y(V, 1, an)), 0) + (if ((W == 1)) | |
179 | 179 | then ai | |
180 | 180 | else 0)) | |
181 | 181 | let ap = (valueOrElse(getInteger(this, Y(V, 2, al)), 0) + (if ((W == 2)) | |
182 | 182 | then ai | |
183 | 183 | else 0)) | |
184 | 184 | let aq = (valueOrElse(getInteger(this, Y(V, 3, ((an + "_") + toString(am)))), 0) + (if ((W == 3)) | |
185 | 185 | then ai | |
186 | 186 | else 0)) | |
187 | 187 | let ar = ((ao + ap) + aq) | |
188 | 188 | let as = (valueOrElse(getInteger(this, (toString(V) + p)), 0) + ai) | |
189 | 189 | let at = (as - ar) | |
190 | 190 | let au = fraction(at, h, i) | |
191 | 191 | let av = (at - au) | |
192 | 192 | let aw = (valueOrElse(getInteger(this, T(ah, V, 1, an)), 0) + (if ((W == 1)) | |
193 | 193 | then ai | |
194 | 194 | else 0)) | |
195 | 195 | let ax = (valueOrElse(getInteger(this, T(ah, V, 2, al)), 0) + (if ((W == 2)) | |
196 | 196 | then ai | |
197 | 197 | else 0)) | |
198 | 198 | let ay = (valueOrElse(getInteger(this, T(ah, V, 3, ((an + "_") + toString(am)))), 0) + (if ((W == 3)) | |
199 | 199 | then ai | |
200 | 200 | else 0)) | |
201 | 201 | let az = ((ao + (ap * 3)) + (aq * 2)) | |
202 | 202 | let aA = if ((ao == 0)) | |
203 | 203 | then 0 | |
204 | 204 | else fraction((ao + fraction((ao * av), 1, az)), aw, ao) | |
205 | 205 | let aB = if ((ap == 0)) | |
206 | 206 | then 0 | |
207 | 207 | else fraction((ap + fraction((ap * av), 3, az)), ax, ap) | |
208 | 208 | let aC = if ((aq == 0)) | |
209 | 209 | then 0 | |
210 | 210 | else fraction((aq + fraction((aq * av), 2, az)), ay, aq) | |
211 | 211 | let aD = if ((av == 0)) | |
212 | 212 | then ((aw + ax) + ay) | |
213 | 213 | else ((aA + aB) + aC) | |
214 | 214 | aD | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | @Callable(Q) | |
219 | 219 | func potentialWinnings (V,ah,ai,W,X) = { | |
220 | 220 | let aD = ag(V, ah, X, W, ai) | |
221 | 221 | $Tuple2(nil, aD) | |
222 | 222 | } | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | ||
226 | 226 | @Callable(Q) | |
227 | 227 | func bet (V,W,X,aE) = valueOrElse(O(), { | |
228 | 228 | let U = toString(Q.caller) | |
229 | 229 | let aF = toString(V) | |
230 | 230 | let aG = $Tuple2(Q.payments[0].amount, Q.payments[0].assetId) | |
231 | 231 | let aH = aG._1 | |
232 | 232 | let aI = aG._2 | |
233 | 233 | let aJ = valueOrElse(getInteger(this, (toString(V) + m)), 0) | |
234 | 234 | let aa = getStringValue(this, (toString(V) + n)) | |
235 | 235 | if ((aI != d)) | |
236 | 236 | then throw("Pamyment must be In USDT asset") | |
237 | 237 | else if ((e > aH)) | |
238 | 238 | then throw((("Min bet " + toString((e / 1000000))) + "USDT")) | |
239 | 239 | else if ((aJ == 0)) | |
240 | 240 | then throw(("There is no game with id" + toString(V))) | |
241 | 241 | else if (((lastBlock.timestamp + f) >= aJ)) | |
242 | 242 | then throw("Bets on this game are no longer accepted") | |
243 | 243 | else if (!(Z(aa, W, X))) | |
244 | 244 | then throw("Incorrect bet type") | |
245 | 245 | else { | |
246 | 246 | let aj = split(X, "_") | |
247 | 247 | let aK = T(U, V, W, X) | |
248 | 248 | let aL = Y(V, W, X) | |
249 | 249 | let aM = (valueOrElse(getInteger(this, aK), 0) + aH) | |
250 | 250 | let aN = (valueOrElse(getInteger(this, aL), 0) + aH) | |
251 | 251 | let as = (valueOrElse(getInteger(this, (aF + p)), 0) + aH) | |
252 | 252 | let aO = (valueOrElse(getInteger(this, (aF + q)), 0) + (if (if ((W == 1)) | |
253 | 253 | then (X == "A") | |
254 | 254 | else false) | |
255 | 255 | then aH | |
256 | 256 | else if (if ((W == 2)) | |
257 | 257 | then (parseIntValue(aj[0]) > parseIntValue(aj[1])) | |
258 | 258 | else false) | |
259 | 259 | then aH | |
260 | 260 | else if (if ((W == 3)) | |
261 | 261 | then (aj[0] == "A") | |
262 | 262 | else false) | |
263 | 263 | then aH | |
264 | 264 | else 0)) | |
265 | 265 | let aP = (valueOrElse(getInteger(this, (aF + r)), 0) + (if (if ((W == 1)) | |
266 | 266 | then (X == "B") | |
267 | 267 | else false) | |
268 | 268 | then aH | |
269 | 269 | else if (if ((W == 2)) | |
270 | 270 | then (parseIntValue(aj[1]) > parseIntValue(aj[0])) | |
271 | 271 | else false) | |
272 | 272 | then aH | |
273 | 273 | else if (if ((W == 3)) | |
274 | 274 | then (aj[0] == "B") | |
275 | 275 | else false) | |
276 | 276 | then aH | |
277 | 277 | else 0)) | |
278 | 278 | let aQ = (valueOrElse(getInteger(this, (aF + s)), 0) + (if (if ((W == 1)) | |
279 | 279 | then (X == "D") | |
280 | 280 | else false) | |
281 | 281 | then aH | |
282 | 282 | else 0)) | |
283 | 283 | ([IntegerEntry(aK, aM), IntegerEntry(aL, aN), IntegerEntry((aF + p), as), IntegerEntry((aF + q), aO), IntegerEntry((aF + r), aP), IntegerEntry((aF + s), aQ)] ++ (if (!(isDefined(getString(this, (U + y))))) | |
284 | 284 | then [StringEntry((U + y), aE)] | |
285 | 285 | else nil)) | |
286 | 286 | } | |
287 | 287 | }) | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(Q) | |
292 | 292 | func claim (V) = valueOrElse(O(), { | |
293 | 293 | let U = toString(Q.caller) | |
294 | 294 | let aF = toString(V) | |
295 | 295 | let aR = valueOrErrorMessage(getInteger(this, (aF + v)), "You can claim only after game finish") | |
296 | 296 | if (((aR + f) > lastBlock.timestamp)) | |
297 | 297 | then throw("You can claim only after one hour pass after final time") | |
298 | 298 | else if (isDefined(getBoolean(this, (((U + "_") + aF) + z)))) | |
299 | 299 | then throw("You are alredy claimed") | |
300 | 300 | else { | |
301 | 301 | let al = getStringValue(this, (aF + t)) | |
302 | 302 | let aD = ag(V, U, al, 0, 0) | |
303 | 303 | if ((aD == 0)) | |
304 | 304 | then throw("Nothing to claim") | |
305 | 305 | else $Tuple2([BooleanEntry((((U + "_") + aF) + z), true), ScriptTransfer(Q.caller, aD, d)], aD) | |
306 | 306 | } | |
307 | 307 | }) | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | ||
311 | 311 | @Callable(Q) | |
312 | 312 | func gameSummary (V,X) = { | |
313 | 313 | let aF = toString(V) | |
314 | 314 | let aJ = valueOrElse(getInteger(this, (toString(V) + m)), 0) | |
315 | 315 | if ((aJ == 0)) | |
316 | 316 | then throw(("There is no game with id" + toString(V))) | |
317 | 317 | else { | |
318 | 318 | let aj = split(X, "_") | |
319 | 319 | let ac = valueOrErrorMessage(parseInt(aj[0]), "Inncorrect game result") | |
320 | 320 | let ad = valueOrErrorMessage(parseInt(aj[1]), "Inncorrect game result") | |
321 | 321 | let am = if ((ac > ad)) | |
322 | 322 | then (ac - ad) | |
323 | 323 | else (ad - ac) | |
324 | 324 | let an = if ((ac > ad)) | |
325 | 325 | then "A" | |
326 | 326 | else if ((ad > ac)) | |
327 | 327 | then "B" | |
328 | 328 | else "D" | |
329 | 329 | let aS = valueOrElse(getInteger(this, Y(V, 1, an)), 0) | |
330 | 330 | let aT = valueOrElse(getInteger(this, Y(V, 2, X)), 0) | |
331 | 331 | let aU = valueOrElse(getInteger(this, Y(V, 3, ((an + "_") + toString(am)))), 0) | |
332 | 332 | let ar = ((aS + aT) + aU) | |
333 | 333 | let as = valueOrElse(getInteger(this, (toString(V) + p)), 0) | |
334 | 334 | let at = (as - ar) | |
335 | 335 | let aV = if ((ar == 0)) | |
336 | 336 | then $Tuple2(at, 0) | |
337 | 337 | else { | |
338 | 338 | let aW = fraction(at, h, i) | |
339 | 339 | $Tuple2(aW, (at - aW)) | |
340 | 340 | } | |
341 | 341 | let au = aV._1 | |
342 | 342 | let aX = aV._2 | |
343 | 343 | [StringEntry((aF + t), X), IntegerEntry((aF + u), aX), IntegerEntry((aF + v), lastBlock.timestamp), ScriptTransfer(g, au, d)] | |
344 | 344 | } | |
345 | 345 | } | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | 349 | @Callable(Q) | |
350 | 350 | func initGames (aY,aZ) = { | |
351 | 351 | func ba (bb,bc) = { | |
352 | 352 | let bd = bb | |
353 | 353 | let be = bd._1 | |
354 | 354 | let bf = bd._2 | |
355 | 355 | let bg = bd._3 | |
356 | 356 | let bh = (bf + 1) | |
357 | 357 | if ((lastBlock.timestamp > bc)) | |
358 | 358 | then throw("startGameTime must be in the future") | |
359 | 359 | else if (!(containsElement(c, aZ[bg]))) | |
360 | 360 | then throw(("type must contain one of values: " + makeString(c, ","))) | |
361 | 361 | else { | |
362 | 362 | let bi = [IntegerEntry((toString(bh) + m), bc), StringEntry((toString(bh) + n), aZ[bg])] | |
363 | 363 | $Tuple3((be ++ bi), bh, (bg + 1)) | |
364 | 364 | } | |
365 | 365 | } | |
366 | 366 | ||
367 | 367 | let bf = valueOrElse(getInteger(this, o), 0) | |
368 | 368 | let bj = { | |
369 | 369 | let bk = aY | |
370 | 370 | let bl = size(bk) | |
371 | 371 | let bm = $Tuple3(nil, bf, 0) | |
372 | 372 | func bn (bo,bp) = if ((bp >= bl)) | |
373 | 373 | then bo | |
374 | 374 | else ba(bo, bk[bp]) | |
375 | 375 | ||
376 | 376 | func bq (bo,bp) = if ((bp >= bl)) | |
377 | 377 | then bo | |
378 | 378 | else throw("List size exceeds 50") | |
379 | 379 | ||
380 | 380 | bq(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bm, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50) | |
381 | 381 | } | |
382 | 382 | let br = bj._1 | |
383 | 383 | let bs = bj._2 | |
384 | 384 | (br :+ IntegerEntry(o, bs)) | |
385 | 385 | } | |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | 389 | @Callable(Q) | |
390 | 390 | func shutdown () = if (!(M)) | |
391 | 391 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
392 | 392 | else if (!(containsElement([J, K, L], Q.callerPublicKey))) | |
393 | 393 | then throw("Only admin can call this function") | |
394 | 394 | else R("Paused by admin") | |
395 | 395 | ||
396 | 396 | ||
397 | 397 | ||
398 | 398 | @Callable(Q) | |
399 | 399 | func activate () = if (M) | |
400 | 400 | then throw("DApp is already active") | |
401 | 401 | else if (!(containsElement([J, K, L], Q.callerPublicKey))) | |
402 | 402 | then throw("Only admin can call this function") | |
403 | 403 | else [BooleanEntry(j, true), DeleteEntry(l)] | |
404 | 404 | ||
405 | 405 |
github/deemru/w8io/026f985 42.53 ms ◑