tx · a9WDsvvtRGtMyGwqxUymkougA2zvG4wg29as56HLzu4 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8: -0.01300000 Waves 2022.11.10 20:14 [2311339] smart account 3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8 > SELF 0.00000000 Waves
{ "type": 13, "id": "a9WDsvvtRGtMyGwqxUymkougA2zvG4wg29as56HLzu4", "fee": 1300000, "feeAssetId": null, "timestamp": 1668100444436, "version": 2, "chainId": 84, "sender": "3Mungn3ygy3DzpbDUKPbJQaeNKfQHu9fkK8", "senderPublicKey": "6L7iBerXuPa5E74WCM6fLSB2VM1bMG9jgASH8tu9orHN", "proofs": [ "v6ZABN7Ftme5utetpwRpo9JJ6yVoyPKcLVEAeQ5Ta1u1qEWWQpMwuCqzGJceLCeFMGCLJo4PfbCGG6rMr4yhwoc" ], "script": "base64:BgIoCAISBwoFAQgBAQgSBgoEAQEICBIDCgEBEgQKAgEIEgQKAhEYEgASACoAD0dBTUVfVFlQRV9HUk9VUAIFR3JvdXAAEUdBTUVfVFlQRV9QTEFUT0ZGAghQbGF5LW9mZgAKR0FNRV9UWVBFUwkAzAgCBQ9HQU1FX1RZUEVfR1JPVVAJAMwIAgURR0FNRV9UWVBFX1BMQVRPRkYFA25pbAAEVVNEVAEgbySjyqsw3FIpmOgsYVruWn8jTcItdbvpnapU4NLQB8EAB01JTl9CRVQAwIQ9AAhPTkVfSE9VUgkAaAIJAGgCAAUAPADoBwARTU9ORVlfQk9YX0FERFJFRVMJAQdBZGRyZXNzAQEaAVSxYgy7BRV2F+zuKtUZtXyHmoiep9yqU84AB0JFVF9GRUUA9AMACUZFRV9TQ0FMRQCQTgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtHYW1lU3RyYVRpbWUCDl9zdGFydEdhbWVUaW1lAAlrR2FtZVR5cGUCCV9HYW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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ey56cvi11nPBonVsYTRiLmC35Bh3KVLMTgfSFDqNV57h Next: 3dwwLKhoSMJmjsXhKrPU93xySYpTPEh79PBm6b1PJTkH Diff:
Old | New | Differences | |
---|---|---|---|
177 | 177 | let an = (valueOrElse(getInteger(this, Y(V, 1, am)), 0) + (if ((W == 1)) | |
178 | 178 | then ah | |
179 | 179 | else 0)) | |
180 | - | let ao = (valueOrElse(getInteger(this, Y(V, 2, | |
180 | + | let ao = (valueOrElse(getInteger(this, Y(V, 2, ak)), 0) + (if ((W == 2)) | |
181 | 181 | then ah | |
182 | 182 | else 0)) | |
183 | 183 | let ap = (valueOrElse(getInteger(this, Y(V, 3, ((am + "_") + toString(al)))), 0) + (if ((W == 3)) | |
184 | 184 | then ah | |
185 | 185 | else 0)) | |
186 | 186 | let aq = ((an + ao) + ap) | |
187 | - | let ar = valueOrElse(getInteger(this, (toString(V) + p)), 0) | |
187 | + | let ar = (valueOrElse(getInteger(this, (toString(V) + p)), 0) + ah) | |
188 | 188 | let as = (ar - aq) | |
189 | 189 | let at = fraction(as, h, i) | |
190 | 190 | let au = (as - at) | |
203 | 203 | else (((an + ((an / ay) * au)) * av) / an) | |
204 | 204 | let aA = if ((ao == 0)) | |
205 | 205 | then 0 | |
206 | - | else (((ao + ((ao / ay) * au)) * aw) / ao) | |
206 | + | else (((ao + (((ao * 3) / ay) * au)) * aw) / ao) | |
207 | 207 | let aB = if ((ap == 0)) | |
208 | 208 | then 0 | |
209 | - | else (((ap + ((ap / ay) * au)) * ax) / ap) | |
209 | + | else (((ap + (((ap * 2) / ay) * au)) * ax) / ap) | |
210 | 210 | let aC = ((az + aA) + aB) | |
211 | 211 | $Tuple2(nil, aC) | |
212 | 212 | } | |
313 | 313 | else (((an + ((an / ay) * au)) * av) / an) | |
314 | 314 | let aA = if ((ao == 0)) | |
315 | 315 | then 0 | |
316 | - | else (((ao + ((ao / ay) * au)) * aw) / ao) | |
316 | + | else (((ao + (((ao * 3) / ay) * au)) * aw) / ao) | |
317 | 317 | let aB = if ((ap == 0)) | |
318 | 318 | then 0 | |
319 | - | else (((ap + ((ap / ay) * au)) * ax) / ap) | |
319 | + | else (((ap + (((ap * 2) / ay) * au)) * ax) / ap) | |
320 | 320 | let aC = ((az + aA) + aB) | |
321 | 321 | if ((aC == 0)) | |
322 | 322 | then throw("Nothing to claim") |
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 | @Callable(Q) | |
153 | 153 | func potentialWinnings (V,ag,ah,W,X) = { | |
154 | 154 | let ai = split(X, "_") | |
155 | 155 | let aj = if ((W == 1)) | |
156 | 156 | then if ((X == "A")) | |
157 | 157 | then $Tuple3("1_0", 1, 0) | |
158 | 158 | else if ((X == "B")) | |
159 | 159 | then $Tuple3("0_1", 0, 1) | |
160 | 160 | else $Tuple3("1_1", 1, 1) | |
161 | 161 | else if ((W == 2)) | |
162 | 162 | then $Tuple3(X, parseIntValue(ai[0]), parseIntValue(ai[1])) | |
163 | 163 | else if ((ai[0] == "A")) | |
164 | 164 | then $Tuple3((ai[1] + "_0"), parseIntValue(ai[1]), 0) | |
165 | 165 | else $Tuple3(("0_" + ai[1]), 0, parseIntValue(ai[1])) | |
166 | 166 | let ak = aj._1 | |
167 | 167 | let ac = aj._2 | |
168 | 168 | let ad = aj._3 | |
169 | 169 | let al = if ((ac > ad)) | |
170 | 170 | then (ac - ad) | |
171 | 171 | else (ad - ac) | |
172 | 172 | let am = if ((ac > ad)) | |
173 | 173 | then "A" | |
174 | 174 | else if ((ad > ac)) | |
175 | 175 | then "B" | |
176 | 176 | else "D" | |
177 | 177 | let an = (valueOrElse(getInteger(this, Y(V, 1, am)), 0) + (if ((W == 1)) | |
178 | 178 | then ah | |
179 | 179 | else 0)) | |
180 | - | let ao = (valueOrElse(getInteger(this, Y(V, 2, | |
180 | + | let ao = (valueOrElse(getInteger(this, Y(V, 2, ak)), 0) + (if ((W == 2)) | |
181 | 181 | then ah | |
182 | 182 | else 0)) | |
183 | 183 | let ap = (valueOrElse(getInteger(this, Y(V, 3, ((am + "_") + toString(al)))), 0) + (if ((W == 3)) | |
184 | 184 | then ah | |
185 | 185 | else 0)) | |
186 | 186 | let aq = ((an + ao) + ap) | |
187 | - | let ar = valueOrElse(getInteger(this, (toString(V) + p)), 0) | |
187 | + | let ar = (valueOrElse(getInteger(this, (toString(V) + p)), 0) + ah) | |
188 | 188 | let as = (ar - aq) | |
189 | 189 | let at = fraction(as, h, i) | |
190 | 190 | let au = (as - at) | |
191 | 191 | let av = (valueOrElse(getInteger(this, T(ag, V, 1, am)), 0) + (if ((W == 1)) | |
192 | 192 | then ah | |
193 | 193 | else 0)) | |
194 | 194 | let aw = (valueOrElse(getInteger(this, T(ag, V, 2, ak)), 0) + (if ((W == 2)) | |
195 | 195 | then ah | |
196 | 196 | else 0)) | |
197 | 197 | let ax = (valueOrElse(getInteger(this, T(ag, V, 3, ((am + "_") + toString(al)))), 0) + (if ((W == 3)) | |
198 | 198 | then ah | |
199 | 199 | else 0)) | |
200 | 200 | let ay = ((an + (ao * 3)) + (ap * 2)) | |
201 | 201 | let az = if ((an == 0)) | |
202 | 202 | then 0 | |
203 | 203 | else (((an + ((an / ay) * au)) * av) / an) | |
204 | 204 | let aA = if ((ao == 0)) | |
205 | 205 | then 0 | |
206 | - | else (((ao + ((ao / ay) * au)) * aw) / ao) | |
206 | + | else (((ao + (((ao * 3) / ay) * au)) * aw) / ao) | |
207 | 207 | let aB = if ((ap == 0)) | |
208 | 208 | then 0 | |
209 | - | else (((ap + ((ap / ay) * au)) * ax) / ap) | |
209 | + | else (((ap + (((ap * 2) / ay) * au)) * ax) / ap) | |
210 | 210 | let aC = ((az + aA) + aB) | |
211 | 211 | $Tuple2(nil, aC) | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | ||
216 | 216 | @Callable(Q) | |
217 | 217 | func bet (V,W,X,aD) = valueOrElse(O(), { | |
218 | 218 | let U = toString(Q.caller) | |
219 | 219 | let aE = toString(V) | |
220 | 220 | let aF = $Tuple2(Q.payments[0].amount, Q.payments[0].assetId) | |
221 | 221 | let aG = aF._1 | |
222 | 222 | let aH = aF._2 | |
223 | 223 | let aI = valueOrElse(getInteger(this, (toString(V) + m)), 0) | |
224 | 224 | let aa = getStringValue(this, (toString(V) + n)) | |
225 | 225 | if ((aH != d)) | |
226 | 226 | then throw("Pamyment must be In USDT asset") | |
227 | 227 | else if ((e > aG)) | |
228 | 228 | then throw((("Min bet " + toString((e / 1000000))) + "USDT")) | |
229 | 229 | else if ((aI == 0)) | |
230 | 230 | then throw(("There is no game with id" + toString(V))) | |
231 | 231 | else if (((lastBlock.timestamp + f) >= aI)) | |
232 | 232 | then throw("Bets on this game are no longer accepted") | |
233 | 233 | else if (!(Z(aa, W, X))) | |
234 | 234 | then throw("Incorrect bet type") | |
235 | 235 | else { | |
236 | 236 | let ai = split(X, "_") | |
237 | 237 | let aJ = T(U, V, W, X) | |
238 | 238 | let aK = Y(V, W, X) | |
239 | 239 | let aL = (valueOrElse(getInteger(this, aJ), 0) + aG) | |
240 | 240 | let aM = (valueOrElse(getInteger(this, aK), 0) + aG) | |
241 | 241 | let ar = (valueOrElse(getInteger(this, (aE + p)), 0) + aG) | |
242 | 242 | let aN = (valueOrElse(getInteger(this, (aE + q)), 0) + (if (if ((W == 1)) | |
243 | 243 | then (X == "A") | |
244 | 244 | else false) | |
245 | 245 | then aG | |
246 | 246 | else if (if ((W == 2)) | |
247 | 247 | then (parseIntValue(ai[0]) > parseIntValue(ai[1])) | |
248 | 248 | else false) | |
249 | 249 | then aG | |
250 | 250 | else if (if ((W == 3)) | |
251 | 251 | then (ai[0] == "A") | |
252 | 252 | else false) | |
253 | 253 | then aG | |
254 | 254 | else 0)) | |
255 | 255 | let aO = (valueOrElse(getInteger(this, (aE + r)), 0) + (if (if ((W == 1)) | |
256 | 256 | then (X == "B") | |
257 | 257 | else false) | |
258 | 258 | then aG | |
259 | 259 | else if (if ((W == 2)) | |
260 | 260 | then (parseIntValue(ai[1]) > parseIntValue(ai[0])) | |
261 | 261 | else false) | |
262 | 262 | then aG | |
263 | 263 | else if (if ((W == 3)) | |
264 | 264 | then (ai[0] == "B") | |
265 | 265 | else false) | |
266 | 266 | then aG | |
267 | 267 | else 0)) | |
268 | 268 | let aP = (valueOrElse(getInteger(this, (aE + s)), 0) + (if (if ((W == 1)) | |
269 | 269 | then (X == "D") | |
270 | 270 | else false) | |
271 | 271 | then aG | |
272 | 272 | else 0)) | |
273 | 273 | ([IntegerEntry(aJ, aL), IntegerEntry(aK, aM), IntegerEntry((aE + p), ar), IntegerEntry((aE + q), aN), IntegerEntry((aE + r), aO), IntegerEntry((aE + s), aP)] ++ (if (!(isDefined(getString(this, (U + y))))) | |
274 | 274 | then [StringEntry((U + y), aD)] | |
275 | 275 | else nil)) | |
276 | 276 | } | |
277 | 277 | }) | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | ||
281 | 281 | @Callable(Q) | |
282 | 282 | func claim (V) = valueOrElse(O(), { | |
283 | 283 | let U = toString(Q.caller) | |
284 | 284 | let aE = toString(V) | |
285 | 285 | let aQ = valueOrErrorMessage(getInteger(this, (aE + v)), "You can claim only after game finish") | |
286 | 286 | if ((lastBlock.timestamp > (aQ + f))) | |
287 | 287 | then throw("You can claim only after one hour pass after final time") | |
288 | 288 | else if (isDefined(getBoolean(this, (((U + "_") + aE) + z)))) | |
289 | 289 | then throw("You are alredy claimed") | |
290 | 290 | else { | |
291 | 291 | let ak = getStringValue(this, (aE + t)) | |
292 | 292 | let ai = split(ak, "_") | |
293 | 293 | let ac = valueOrErrorMessage(parseInt(ai[0]), "Inncorrect game result") | |
294 | 294 | let ad = valueOrErrorMessage(parseInt(ai[1]), "Inncorrect game result") | |
295 | 295 | let al = if ((ac > ad)) | |
296 | 296 | then (ac - ad) | |
297 | 297 | else (ad - ac) | |
298 | 298 | let am = if ((ac > ad)) | |
299 | 299 | then "A" | |
300 | 300 | else if ((ad > ac)) | |
301 | 301 | then "B" | |
302 | 302 | else "D" | |
303 | 303 | let au = getIntegerValue(this, (aE + u)) | |
304 | 304 | let av = valueOrElse(getIntegerValue(this, T(U, V, 1, am)), 0) | |
305 | 305 | let aw = valueOrElse(getIntegerValue(this, T(U, V, 2, ak)), 0) | |
306 | 306 | let ax = valueOrElse(getIntegerValue(this, T(U, V, 3, ((am + "_") + toString(al)))), 0) | |
307 | 307 | let an = valueOrElse(getInteger(this, Y(V, 1, am)), 0) | |
308 | 308 | let ao = valueOrElse(getInteger(this, Y(V, 2, ak)), 0) | |
309 | 309 | let ap = valueOrElse(getInteger(this, Y(V, 3, ((am + "_") + toString(al)))), 0) | |
310 | 310 | let ay = ((an + (ao * 3)) + (ap * 2)) | |
311 | 311 | let az = if ((an == 0)) | |
312 | 312 | then 0 | |
313 | 313 | else (((an + ((an / ay) * au)) * av) / an) | |
314 | 314 | let aA = if ((ao == 0)) | |
315 | 315 | then 0 | |
316 | - | else (((ao + ((ao / ay) * au)) * aw) / ao) | |
316 | + | else (((ao + (((ao * 3) / ay) * au)) * aw) / ao) | |
317 | 317 | let aB = if ((ap == 0)) | |
318 | 318 | then 0 | |
319 | - | else (((ap + ((ap / ay) * au)) * ax) / ap) | |
319 | + | else (((ap + (((ap * 2) / ay) * au)) * ax) / ap) | |
320 | 320 | let aC = ((az + aA) + aB) | |
321 | 321 | if ((aC == 0)) | |
322 | 322 | then throw("Nothing to claim") | |
323 | 323 | else $Tuple2([BooleanEntry((((U + "_") + aE) + z), true), ScriptTransfer(Q.caller, aC, d)], aC) | |
324 | 324 | } | |
325 | 325 | }) | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | ||
329 | 329 | @Callable(Q) | |
330 | 330 | func gameSummary (V,X) = { | |
331 | 331 | let aE = toString(V) | |
332 | 332 | let aI = valueOrElse(getInteger(this, (toString(V) + m)), 0) | |
333 | 333 | if ((aI == 0)) | |
334 | 334 | then throw(("There is no game with id" + toString(V))) | |
335 | 335 | else { | |
336 | 336 | let ai = split(X, "_") | |
337 | 337 | let ac = valueOrErrorMessage(parseInt(ai[0]), "Inncorrect game result") | |
338 | 338 | let ad = valueOrErrorMessage(parseInt(ai[1]), "Inncorrect game result") | |
339 | 339 | let al = if ((ac > ad)) | |
340 | 340 | then (ac - ad) | |
341 | 341 | else (ad - ac) | |
342 | 342 | let am = if ((ac > ad)) | |
343 | 343 | then "A" | |
344 | 344 | else if ((ad > ac)) | |
345 | 345 | then "B" | |
346 | 346 | else "D" | |
347 | 347 | let aR = valueOrElse(getInteger(this, Y(V, 1, am)), 0) | |
348 | 348 | let aS = valueOrElse(getInteger(this, Y(V, 2, X)), 0) | |
349 | 349 | let aT = valueOrElse(getInteger(this, Y(V, 3, ((am + "_") + toString(al)))), 0) | |
350 | 350 | let aq = ((aR + aS) + aT) | |
351 | 351 | let ar = valueOrElse(getInteger(this, (toString(V) + p)), 0) | |
352 | 352 | let as = (ar - aq) | |
353 | 353 | let aU = if ((aq == 0)) | |
354 | 354 | then $Tuple2(as, 0) | |
355 | 355 | else { | |
356 | 356 | let aV = fraction(as, h, i) | |
357 | 357 | $Tuple2(aV, (as - aV)) | |
358 | 358 | } | |
359 | 359 | let at = aU._1 | |
360 | 360 | let aW = aU._2 | |
361 | 361 | [StringEntry((aE + t), X), IntegerEntry((aE + u), aW), IntegerEntry((aE + v), lastBlock.timestamp), ScriptTransfer(g, at, d)] | |
362 | 362 | } | |
363 | 363 | } | |
364 | 364 | ||
365 | 365 | ||
366 | 366 | ||
367 | 367 | @Callable(Q) | |
368 | 368 | func initGames (aX,aY) = { | |
369 | 369 | func aZ (ba,bb) = { | |
370 | 370 | let bc = ba | |
371 | 371 | let bd = bc._1 | |
372 | 372 | let be = bc._2 | |
373 | 373 | let bf = bc._3 | |
374 | 374 | let bg = (be + 1) | |
375 | 375 | if ((lastBlock.timestamp > bb)) | |
376 | 376 | then throw("startGameTime must be in the future") | |
377 | 377 | else if (!(containsElement(c, aY[bf]))) | |
378 | 378 | then throw(("type must contain one of values: " + makeString(c, ","))) | |
379 | 379 | else { | |
380 | 380 | let bh = [IntegerEntry((toString(bg) + m), bb), StringEntry((toString(bg) + n), aY[bf])] | |
381 | 381 | $Tuple3((bd ++ bh), bg, (bf + 1)) | |
382 | 382 | } | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | let be = valueOrElse(getInteger(this, o), 0) | |
386 | 386 | let bi = { | |
387 | 387 | let bj = aX | |
388 | 388 | let bk = size(bj) | |
389 | 389 | let bl = $Tuple3(nil, be, 0) | |
390 | 390 | func bm (bn,bo) = if ((bo >= bk)) | |
391 | 391 | then bn | |
392 | 392 | else aZ(bn, bj[bo]) | |
393 | 393 | ||
394 | 394 | func bp (bn,bo) = if ((bo >= bk)) | |
395 | 395 | then bn | |
396 | 396 | else throw("List size exceeds 50") | |
397 | 397 | ||
398 | 398 | bp(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bm(bl, 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) | |
399 | 399 | } | |
400 | 400 | let bq = bi._1 | |
401 | 401 | let br = bi._2 | |
402 | 402 | (bq :+ IntegerEntry(o, br)) | |
403 | 403 | } | |
404 | 404 | ||
405 | 405 | ||
406 | 406 | ||
407 | 407 | @Callable(Q) | |
408 | 408 | func shutdown () = if (!(M)) | |
409 | 409 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
410 | 410 | else if (!(containsElement([J, K, L], Q.callerPublicKey))) | |
411 | 411 | then throw("Only admin can call this function") | |
412 | 412 | else R("Paused by admin") | |
413 | 413 | ||
414 | 414 | ||
415 | 415 | ||
416 | 416 | @Callable(Q) | |
417 | 417 | func activate () = if (M) | |
418 | 418 | then throw("DApp is already active") | |
419 | 419 | else if (!(containsElement([J, K, L], Q.callerPublicKey))) | |
420 | 420 | then throw("Only admin can call this function") | |
421 | 421 | else [BooleanEntry(j, true), DeleteEntry(l)] | |
422 | 422 | ||
423 | 423 |
github/deemru/w8io/026f985 54.77 ms ◑