tx · 46ogj69H7LC1d1DmUAz8sX9KrnVWkToDb2rfraTNYPPW 3N9fzexZxi7HrPcfizpvpFcaAnvpyuuMKPg: -0.01400000 Waves 2019.09.05 21:16 [663080] smart account 3N9fzexZxi7HrPcfizpvpFcaAnvpyuuMKPg > SELF 0.00000000 Waves
{ "type": 13, "id": "46ogj69H7LC1d1DmUAz8sX9KrnVWkToDb2rfraTNYPPW", "fee": 1400000, "feeAssetId": null, "timestamp": 1567707397075, "version": 1, "sender": "3N9fzexZxi7HrPcfizpvpFcaAnvpyuuMKPg", "senderPublicKey": "BJB5QS4iQna1z8idKb5QQ5cACUmNgxzHc81Y7AW6ZZY7", "proofs": [ "R7JQR2VrYkhF2DjhvHmmwX2e4t3uhqA8qqQAEUDkX96oKEgstXPFXJMDdWwySmjMQLiCV87Uwy6MDv7v7i8sp1A" ], "script": "base64:AAIDAAAAAAAAAAAAAAAIAAAAABBzdGFydFJvdW5kSGVpZ2h0AAAAAAAAAAAFAQAAAApyYW5kb21pemVyAAAAAQAAAANpbnYEAAAACGxhc3RQbGF5BAAAAAckbWF0Y2gwCQAEHAAAAAIFAAAABHRoaXMCAAAACGxhc3RQbGF5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0BAAAAAFhBQAAAAckbWF0Y2gwAQAAAAxXYXZlc0xvdHRvVjIJAQAAAAV0aHJvdwAAAAAEAAAABHJhbmQJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgkAAMsAAAACBQAAAAhsYXN0UGxheQgFAAAAA2ludgAAAA10cmFuc2FjdGlvbklkCAUAAAADaW52AAAAD2NhbGxlclB1YmxpY0tleQgFAAAACWxhc3RCbG9jawAAABNnZW5lcmF0aW9uU2lnbmF0dXJlCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQABmg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tZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABZwUAAAAHJG1hdGNoMAUAAAABZwcEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAxhZGRyZXNzR2FtZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAMY3VycmVudFJvdW5kCQEAAAAVZ2V0Q3VycmVudE51bWJlclJvdW5kAAAAAAQAAAAIY291bnRCZXQJAQAAAAZnZXRCZXQAAAADCAUAAAADcG10AAAABmFtb3VudAUAAAAMY3VycmVudFJvdW5kBQAAAAxhZGRyZXNzR2FtZXIDAwMJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAGcAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAIY291bnRCZXQHBQAAAA1pc0dhbWVTdGFydGVkBwkBAAAAC3NldEdhbWVyQmV0AAAABAUAAAAMYWRkcmVzc0dhbWVyAgAAAAZfbW9yZV8CAAAADl9jb3VudEdhbWVyc1VwCAUAAAADcG10AAAABmFtb3VudAMJAABmAAAAAgUAAAAIY291bnRCZXQIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAECAAAAI1BheW1lbnQgbXVzdCBiZSBtb3JlIGZvciB0aGUgcm91bmQhCQAAAgAAAAECAAAAFXdvcmtzIHdpdGggd2F2ZXMgb25seQAAAACJRukz", "chainId": 84, "height": 663080, "spentComplexity": 0 } View: original | compacted Prev: 4vBWRhoh2qb5iSri55czCtQBfNSx8RLca2T18g7CV3s9 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | - | func n (o,p,q) = if ((p >= 1)) | |
46 | - | then { | |
47 | - | let r = { | |
48 | - | let e = getString(this, "lastRoundWinner") | |
49 | - | if ($isInstanceOf(e, "String")) | |
50 | - | then { | |
51 | - | let s = e | |
52 | - | s | |
53 | - | } | |
54 | - | else "" | |
55 | - | } | |
56 | - | let t = { | |
57 | - | let e = getString(this, (r + q)) | |
58 | - | if ($isInstanceOf(e, "String")) | |
59 | - | then { | |
60 | - | let s = e | |
61 | - | s | |
62 | - | } | |
63 | - | else "" | |
64 | - | } | |
65 | - | if (if ((p > 1)) | |
66 | - | then (t == "") | |
67 | - | else false) | |
68 | - | then (p * 2) | |
45 | + | func n (o,p,q,r) = { | |
46 | + | let s = m() | |
47 | + | let t = { | |
48 | + | let e = getInteger(this, "numberRound") | |
49 | + | if ($isInstanceOf(e, "Int")) | |
50 | + | then { | |
51 | + | let g = e | |
52 | + | g | |
53 | + | } | |
69 | 54 | else 1 | |
70 | 55 | } | |
71 | - | else 1 | |
56 | + | let u = { | |
57 | + | let e = getInteger(this, (toString(t) + q)) | |
58 | + | if ($isInstanceOf(e, "Int")) | |
59 | + | then { | |
60 | + | let v = e | |
61 | + | v | |
62 | + | } | |
63 | + | else 0 | |
64 | + | } | |
65 | + | let w = { | |
66 | + | let e = getInteger(this, "numberGame") | |
67 | + | if ($isInstanceOf(e, "Int")) | |
68 | + | then { | |
69 | + | let v = e | |
70 | + | v | |
71 | + | } | |
72 | + | else 0 | |
73 | + | } | |
74 | + | let x = { | |
75 | + | let e = getInteger(this, (toString(w) + "_bankOfGame")) | |
76 | + | if ($isInstanceOf(e, "Int")) | |
77 | + | then { | |
78 | + | let v = e | |
79 | + | v | |
80 | + | } | |
81 | + | else 0 | |
82 | + | } | |
83 | + | let y = { | |
84 | + | let e = getInteger(this, ((toString(w) + "_") + o)) | |
85 | + | if ($isInstanceOf(e, "Int")) | |
86 | + | then { | |
87 | + | let f = e | |
88 | + | f | |
89 | + | } | |
90 | + | else 0 | |
91 | + | } | |
92 | + | WriteSet([DataEntry(((toString(s) + p) + o), r), DataEntry((toString(s) + q), (u + 1)), DataEntry((toString(w) + "_bankOfGame"), (x + r)), DataEntry(((toString(w) + "_") + o), (y + r))]) | |
93 | + | } | |
72 | 94 | ||
73 | 95 | ||
74 | - | func u () = { | |
96 | + | func z (A,B,o) = { | |
97 | + | let C = 1 | |
98 | + | if ((B >= 1)) | |
99 | + | then { | |
100 | + | let D = { | |
101 | + | let e = getString(this, "lastRoundWinner") | |
102 | + | if ($isInstanceOf(e, "String")) | |
103 | + | then { | |
104 | + | let E = e | |
105 | + | E | |
106 | + | } | |
107 | + | else "" | |
108 | + | } | |
109 | + | let F = { | |
110 | + | let e = getString(this, (D + o)) | |
111 | + | if ($isInstanceOf(e, "String")) | |
112 | + | then { | |
113 | + | let E = e | |
114 | + | E | |
115 | + | } | |
116 | + | else "" | |
117 | + | } | |
118 | + | if (if ((B > 1)) | |
119 | + | then (F == "") | |
120 | + | else false) | |
121 | + | then ((C * B) * 2) | |
122 | + | else C | |
123 | + | } | |
124 | + | else C | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func G () = { | |
129 | + | let t = { | |
130 | + | let e = getInteger(this, "numberRound") | |
131 | + | if ($isInstanceOf(e, "Int")) | |
132 | + | then { | |
133 | + | let g = e | |
134 | + | g | |
135 | + | } | |
136 | + | else 1 | |
137 | + | } | |
138 | + | let H = { | |
139 | + | let e = getInteger(this, (toString(t) + "_countGamersUp")) | |
140 | + | if ($isInstanceOf(e, "Int")) | |
141 | + | then { | |
142 | + | let v = e | |
143 | + | v | |
144 | + | } | |
145 | + | else 0 | |
146 | + | } | |
147 | + | let I = { | |
148 | + | let e = getInteger(this, (toString(t) + "_countGamersDown")) | |
149 | + | if ($isInstanceOf(e, "Int")) | |
150 | + | then { | |
151 | + | let v = e | |
152 | + | v | |
153 | + | } | |
154 | + | else 0 | |
155 | + | } | |
156 | + | if ((H > 0)) | |
157 | + | then (I > 0) | |
158 | + | else false | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | func J () = { | |
75 | 163 | let e = getInteger(this, "numberGame") | |
76 | 164 | if ($isInstanceOf(e, "Int")) | |
77 | 165 | then { | |
82 | 170 | } | |
83 | 171 | ||
84 | 172 | ||
85 | - | @Callable( | |
173 | + | @Callable(K) | |
86 | 174 | func startRound () = { | |
87 | - | let | |
175 | + | let t = { | |
88 | 176 | let e = getInteger(this, "numberRound") | |
89 | 177 | if ($isInstanceOf(e, "Int")) | |
90 | 178 | then { | |
93 | 181 | } | |
94 | 182 | else 1 | |
95 | 183 | } | |
96 | - | let k = b( | |
97 | - | let | |
184 | + | let k = b(K) | |
185 | + | let L = { | |
98 | 186 | let e = getBoolean(this, "startGame") | |
99 | 187 | if ($isInstanceOf(e, "Boolean")) | |
100 | 188 | then { | |
101 | - | let | |
102 | - | | |
189 | + | let v = e | |
190 | + | v | |
103 | 191 | } | |
104 | 192 | else false | |
105 | 193 | } | |
106 | - | if (if (if (( | |
107 | - | then ( | |
194 | + | if (if (if ((t == 1)) | |
195 | + | then (K.caller == this) | |
108 | 196 | else false) | |
109 | - | then !( | |
197 | + | then !(L) | |
110 | 198 | else false) | |
111 | 199 | then { | |
112 | - | let | |
113 | - | WriteSet([DataEntry("numberGame", | |
200 | + | let M = J() | |
201 | + | WriteSet([DataEntry("numberGame", M), DataEntry("startGame", !(L)), DataEntry("numberRound", t), DataEntry((toString(M) + "_bankOfGame"), 0)]) | |
114 | 202 | } | |
115 | - | else if (if (( | |
116 | - | then ( | |
203 | + | else if (if (if ((t > 1)) | |
204 | + | then (K.caller == this) | |
117 | 205 | else false) | |
118 | - | then i(w, (toInt(k) % 1000)) | |
206 | + | then !(L) | |
207 | + | else false) | |
208 | + | then i(t, (toInt(k) % 1000)) | |
119 | 209 | else throw("Only owner can start the game.") | |
120 | 210 | } | |
121 | 211 | ||
122 | 212 | ||
123 | 213 | ||
124 | - | @Callable( | |
125 | - | func | |
126 | - | let | |
214 | + | @Callable(K) | |
215 | + | func stopGame () = { | |
216 | + | let L = { | |
127 | 217 | let e = getBoolean(this, "startGame") | |
128 | 218 | if ($isInstanceOf(e, "Boolean")) | |
129 | 219 | then { | |
130 | - | let | |
131 | - | | |
220 | + | let v = e | |
221 | + | v | |
132 | 222 | } | |
133 | 223 | else false | |
134 | 224 | } | |
135 | - | let w = { | |
136 | - | let e = getInteger(this, "numberRound") | |
137 | - | if ($isInstanceOf(e, "Int")) | |
138 | - | then { | |
139 | - | let g = e | |
140 | - | g | |
141 | - | } | |
142 | - | else 1 | |
143 | - | } | |
144 | - | let A = { | |
145 | - | let e = getInteger(this, (toString(w) + "_countGamersUp")) | |
146 | - | if ($isInstanceOf(e, "Int")) | |
147 | - | then { | |
148 | - | let y = e | |
149 | - | y | |
150 | - | } | |
151 | - | else 0 | |
152 | - | } | |
153 | - | let B = { | |
154 | - | let e = getInteger(this, (toString(w) + "_countGamersDown")) | |
155 | - | if ($isInstanceOf(e, "Int")) | |
156 | - | then { | |
157 | - | let y = e | |
158 | - | y | |
159 | - | } | |
160 | - | else 0 | |
161 | - | } | |
162 | - | if (if (if (if ((A > 0)) | |
163 | - | then (v.caller == this) | |
225 | + | if (if (if (G()) | |
226 | + | then (K.caller == this) | |
164 | 227 | else false) | |
165 | - | then | |
228 | + | then L | |
166 | 229 | else false) | |
167 | - | then (B > 0) | |
168 | - | else false) | |
169 | - | then WriteSet([DataEntry("startGame", !(x))]) | |
230 | + | then WriteSet([DataEntry("startGame", !(L))]) | |
170 | 231 | else throw("Only owner can start the game.") | |
171 | 232 | } | |
172 | 233 | ||
173 | 234 | ||
174 | 235 | ||
175 | - | @Callable( | |
236 | + | @Callable(K) | |
176 | 237 | func makeBetLess () = { | |
177 | - | let C = extract(v.payment) | |
178 | - | let q = toBase58String(v.caller.bytes) | |
179 | - | let D = m() | |
180 | - | let E = n(C.amount, D, q) | |
181 | - | if (if (!(isDefined(C.assetId))) | |
182 | - | then (C.amount >= E) | |
238 | + | let L = { | |
239 | + | let e = getBoolean(this, "startGame") | |
240 | + | if ($isInstanceOf(e, "Boolean")) | |
241 | + | then { | |
242 | + | let v = e | |
243 | + | v | |
244 | + | } | |
245 | + | else false | |
246 | + | } | |
247 | + | let N = extract(K.payment) | |
248 | + | let o = toBase58String(K.caller.bytes) | |
249 | + | let s = m() | |
250 | + | let O = z(N.amount, s, o) | |
251 | + | if (if (if (!(isDefined(N.assetId))) | |
252 | + | then (N.amount >= O) | |
183 | 253 | else false) | |
184 | - | then { | |
185 | - | let w = { | |
186 | - | let e = getInteger(this, "numberRound") | |
187 | - | if ($isInstanceOf(e, "Int")) | |
188 | - | then { | |
189 | - | let g = e | |
190 | - | g | |
191 | - | } | |
192 | - | else 1 | |
193 | - | } | |
194 | - | let B = { | |
195 | - | let e = getInteger(this, (toString(w) + "_countGamersDown")) | |
196 | - | if ($isInstanceOf(e, "Int")) | |
197 | - | then { | |
198 | - | let y = e | |
199 | - | y | |
200 | - | } | |
201 | - | else 0 | |
202 | - | } | |
203 | - | WriteSet([DataEntry(((toString(D) + "_less_") + q), C.amount), DataEntry((toString(D) + "_countGamersDown"), (B + 1))]) | |
204 | - | } | |
205 | - | else if ((E > C.amount)) | |
254 | + | then L | |
255 | + | else false) | |
256 | + | then n(o, "_less_", "_countGamersDown", N.amount) | |
257 | + | else if ((O > N.amount)) | |
206 | 258 | then throw("Payment must be more for the round!") | |
207 | 259 | else throw("works with waves only") | |
208 | 260 | } | |
209 | 261 | ||
210 | 262 | ||
211 | 263 | ||
212 | - | @Callable( | |
264 | + | @Callable(K) | |
213 | 265 | func makeBetMore () = { | |
214 | - | let C = extract(v.payment) | |
215 | - | let q = toBase58String(v.caller.bytes) | |
216 | - | let D = m() | |
217 | - | let E = n(C.amount, D, q) | |
218 | - | if (if (!(isDefined(C.assetId))) | |
219 | - | then (C.amount >= E) | |
266 | + | let L = { | |
267 | + | let e = getBoolean(this, "startGame") | |
268 | + | if ($isInstanceOf(e, "Boolean")) | |
269 | + | then { | |
270 | + | let v = e | |
271 | + | v | |
272 | + | } | |
273 | + | else false | |
274 | + | } | |
275 | + | let N = extract(K.payment) | |
276 | + | let o = toBase58String(K.caller.bytes) | |
277 | + | let s = m() | |
278 | + | let O = z(N.amount, s, o) | |
279 | + | if (if (if (!(isDefined(N.assetId))) | |
280 | + | then (N.amount >= O) | |
220 | 281 | else false) | |
221 | - | then { | |
222 | - | let w = { | |
223 | - | let e = getInteger(this, "numberRound") | |
224 | - | if ($isInstanceOf(e, "Int")) | |
225 | - | then { | |
226 | - | let g = e | |
227 | - | g | |
228 | - | } | |
229 | - | else 1 | |
230 | - | } | |
231 | - | let A = { | |
232 | - | let e = getInteger(this, (toString(w) + "_countGamersUp")) | |
233 | - | if ($isInstanceOf(e, "Int")) | |
234 | - | then { | |
235 | - | let y = e | |
236 | - | y | |
237 | - | } | |
238 | - | else 0 | |
239 | - | } | |
240 | - | WriteSet([DataEntry(((toString(D) + "_more_") + q), C.amount), DataEntry((toString(D) + "_countGamersUp"), (A + 1))]) | |
241 | - | } | |
242 | - | else if ((E > C.amount)) | |
282 | + | then L | |
283 | + | else false) | |
284 | + | then n(o, "_more_", "_countGamersUp", N.amount) | |
285 | + | else if ((O > N.amount)) | |
243 | 286 | then throw("Payment must be more for the round!") | |
244 | 287 | else throw("works with waves only") | |
245 | 288 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 5 | |
5 | 5 | ||
6 | 6 | func b (c) = { | |
7 | 7 | let d = { | |
8 | 8 | let e = getBinary(this, "lastPlay") | |
9 | 9 | if ($isInstanceOf(e, "ByteVector")) | |
10 | 10 | then { | |
11 | 11 | let f = e | |
12 | 12 | f | |
13 | 13 | } | |
14 | 14 | else if ($isInstanceOf(e, "Unit")) | |
15 | 15 | then { | |
16 | 16 | let g = e | |
17 | 17 | base58'2ee4oFDYriWJ9EMeR' | |
18 | 18 | } | |
19 | 19 | else throw() | |
20 | 20 | } | |
21 | 21 | let h = (((((d + c.transactionId) + c.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
22 | 22 | sha256(h) | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func i (j,k) = { | |
27 | 27 | let l = (j - 1) | |
28 | 28 | if ((k > 500)) | |
29 | 29 | then WriteSet([DataEntry("lastRoundWinner", (toString(l) + "_more_")), DataEntry("numberRound", j), DataEntry("startGame", true), DataEntry("randhash", k)]) | |
30 | 30 | else WriteSet([DataEntry("lastRoundWinner", (toString(l) + "_less_")), DataEntry("numberRound", j), DataEntry("startGame", true), DataEntry("randhash", k)]) | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func m () = { | |
35 | 35 | let e = getInteger(this, "numberRound") | |
36 | 36 | if ($isInstanceOf(e, "Int")) | |
37 | 37 | then { | |
38 | 38 | let g = e | |
39 | 39 | g | |
40 | 40 | } | |
41 | 41 | else 1 | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | - | func n (o,p,q) = if ((p >= 1)) | |
46 | - | then { | |
47 | - | let r = { | |
48 | - | let e = getString(this, "lastRoundWinner") | |
49 | - | if ($isInstanceOf(e, "String")) | |
50 | - | then { | |
51 | - | let s = e | |
52 | - | s | |
53 | - | } | |
54 | - | else "" | |
55 | - | } | |
56 | - | let t = { | |
57 | - | let e = getString(this, (r + q)) | |
58 | - | if ($isInstanceOf(e, "String")) | |
59 | - | then { | |
60 | - | let s = e | |
61 | - | s | |
62 | - | } | |
63 | - | else "" | |
64 | - | } | |
65 | - | if (if ((p > 1)) | |
66 | - | then (t == "") | |
67 | - | else false) | |
68 | - | then (p * 2) | |
45 | + | func n (o,p,q,r) = { | |
46 | + | let s = m() | |
47 | + | let t = { | |
48 | + | let e = getInteger(this, "numberRound") | |
49 | + | if ($isInstanceOf(e, "Int")) | |
50 | + | then { | |
51 | + | let g = e | |
52 | + | g | |
53 | + | } | |
69 | 54 | else 1 | |
70 | 55 | } | |
71 | - | else 1 | |
56 | + | let u = { | |
57 | + | let e = getInteger(this, (toString(t) + q)) | |
58 | + | if ($isInstanceOf(e, "Int")) | |
59 | + | then { | |
60 | + | let v = e | |
61 | + | v | |
62 | + | } | |
63 | + | else 0 | |
64 | + | } | |
65 | + | let w = { | |
66 | + | let e = getInteger(this, "numberGame") | |
67 | + | if ($isInstanceOf(e, "Int")) | |
68 | + | then { | |
69 | + | let v = e | |
70 | + | v | |
71 | + | } | |
72 | + | else 0 | |
73 | + | } | |
74 | + | let x = { | |
75 | + | let e = getInteger(this, (toString(w) + "_bankOfGame")) | |
76 | + | if ($isInstanceOf(e, "Int")) | |
77 | + | then { | |
78 | + | let v = e | |
79 | + | v | |
80 | + | } | |
81 | + | else 0 | |
82 | + | } | |
83 | + | let y = { | |
84 | + | let e = getInteger(this, ((toString(w) + "_") + o)) | |
85 | + | if ($isInstanceOf(e, "Int")) | |
86 | + | then { | |
87 | + | let f = e | |
88 | + | f | |
89 | + | } | |
90 | + | else 0 | |
91 | + | } | |
92 | + | WriteSet([DataEntry(((toString(s) + p) + o), r), DataEntry((toString(s) + q), (u + 1)), DataEntry((toString(w) + "_bankOfGame"), (x + r)), DataEntry(((toString(w) + "_") + o), (y + r))]) | |
93 | + | } | |
72 | 94 | ||
73 | 95 | ||
74 | - | func u () = { | |
96 | + | func z (A,B,o) = { | |
97 | + | let C = 1 | |
98 | + | if ((B >= 1)) | |
99 | + | then { | |
100 | + | let D = { | |
101 | + | let e = getString(this, "lastRoundWinner") | |
102 | + | if ($isInstanceOf(e, "String")) | |
103 | + | then { | |
104 | + | let E = e | |
105 | + | E | |
106 | + | } | |
107 | + | else "" | |
108 | + | } | |
109 | + | let F = { | |
110 | + | let e = getString(this, (D + o)) | |
111 | + | if ($isInstanceOf(e, "String")) | |
112 | + | then { | |
113 | + | let E = e | |
114 | + | E | |
115 | + | } | |
116 | + | else "" | |
117 | + | } | |
118 | + | if (if ((B > 1)) | |
119 | + | then (F == "") | |
120 | + | else false) | |
121 | + | then ((C * B) * 2) | |
122 | + | else C | |
123 | + | } | |
124 | + | else C | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func G () = { | |
129 | + | let t = { | |
130 | + | let e = getInteger(this, "numberRound") | |
131 | + | if ($isInstanceOf(e, "Int")) | |
132 | + | then { | |
133 | + | let g = e | |
134 | + | g | |
135 | + | } | |
136 | + | else 1 | |
137 | + | } | |
138 | + | let H = { | |
139 | + | let e = getInteger(this, (toString(t) + "_countGamersUp")) | |
140 | + | if ($isInstanceOf(e, "Int")) | |
141 | + | then { | |
142 | + | let v = e | |
143 | + | v | |
144 | + | } | |
145 | + | else 0 | |
146 | + | } | |
147 | + | let I = { | |
148 | + | let e = getInteger(this, (toString(t) + "_countGamersDown")) | |
149 | + | if ($isInstanceOf(e, "Int")) | |
150 | + | then { | |
151 | + | let v = e | |
152 | + | v | |
153 | + | } | |
154 | + | else 0 | |
155 | + | } | |
156 | + | if ((H > 0)) | |
157 | + | then (I > 0) | |
158 | + | else false | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | func J () = { | |
75 | 163 | let e = getInteger(this, "numberGame") | |
76 | 164 | if ($isInstanceOf(e, "Int")) | |
77 | 165 | then { | |
78 | 166 | let g = e | |
79 | 167 | (g + 1) | |
80 | 168 | } | |
81 | 169 | else 1 | |
82 | 170 | } | |
83 | 171 | ||
84 | 172 | ||
85 | - | @Callable( | |
173 | + | @Callable(K) | |
86 | 174 | func startRound () = { | |
87 | - | let | |
175 | + | let t = { | |
88 | 176 | let e = getInteger(this, "numberRound") | |
89 | 177 | if ($isInstanceOf(e, "Int")) | |
90 | 178 | then { | |
91 | 179 | let g = e | |
92 | 180 | (g + 1) | |
93 | 181 | } | |
94 | 182 | else 1 | |
95 | 183 | } | |
96 | - | let k = b( | |
97 | - | let | |
184 | + | let k = b(K) | |
185 | + | let L = { | |
98 | 186 | let e = getBoolean(this, "startGame") | |
99 | 187 | if ($isInstanceOf(e, "Boolean")) | |
100 | 188 | then { | |
101 | - | let | |
102 | - | | |
189 | + | let v = e | |
190 | + | v | |
103 | 191 | } | |
104 | 192 | else false | |
105 | 193 | } | |
106 | - | if (if (if (( | |
107 | - | then ( | |
194 | + | if (if (if ((t == 1)) | |
195 | + | then (K.caller == this) | |
108 | 196 | else false) | |
109 | - | then !( | |
197 | + | then !(L) | |
110 | 198 | else false) | |
111 | 199 | then { | |
112 | - | let | |
113 | - | WriteSet([DataEntry("numberGame", | |
200 | + | let M = J() | |
201 | + | WriteSet([DataEntry("numberGame", M), DataEntry("startGame", !(L)), DataEntry("numberRound", t), DataEntry((toString(M) + "_bankOfGame"), 0)]) | |
114 | 202 | } | |
115 | - | else if (if (( | |
116 | - | then ( | |
203 | + | else if (if (if ((t > 1)) | |
204 | + | then (K.caller == this) | |
117 | 205 | else false) | |
118 | - | then i(w, (toInt(k) % 1000)) | |
206 | + | then !(L) | |
207 | + | else false) | |
208 | + | then i(t, (toInt(k) % 1000)) | |
119 | 209 | else throw("Only owner can start the game.") | |
120 | 210 | } | |
121 | 211 | ||
122 | 212 | ||
123 | 213 | ||
124 | - | @Callable( | |
125 | - | func | |
126 | - | let | |
214 | + | @Callable(K) | |
215 | + | func stopGame () = { | |
216 | + | let L = { | |
127 | 217 | let e = getBoolean(this, "startGame") | |
128 | 218 | if ($isInstanceOf(e, "Boolean")) | |
129 | 219 | then { | |
130 | - | let | |
131 | - | | |
220 | + | let v = e | |
221 | + | v | |
132 | 222 | } | |
133 | 223 | else false | |
134 | 224 | } | |
135 | - | let w = { | |
136 | - | let e = getInteger(this, "numberRound") | |
137 | - | if ($isInstanceOf(e, "Int")) | |
138 | - | then { | |
139 | - | let g = e | |
140 | - | g | |
141 | - | } | |
142 | - | else 1 | |
143 | - | } | |
144 | - | let A = { | |
145 | - | let e = getInteger(this, (toString(w) + "_countGamersUp")) | |
146 | - | if ($isInstanceOf(e, "Int")) | |
147 | - | then { | |
148 | - | let y = e | |
149 | - | y | |
150 | - | } | |
151 | - | else 0 | |
152 | - | } | |
153 | - | let B = { | |
154 | - | let e = getInteger(this, (toString(w) + "_countGamersDown")) | |
155 | - | if ($isInstanceOf(e, "Int")) | |
156 | - | then { | |
157 | - | let y = e | |
158 | - | y | |
159 | - | } | |
160 | - | else 0 | |
161 | - | } | |
162 | - | if (if (if (if ((A > 0)) | |
163 | - | then (v.caller == this) | |
225 | + | if (if (if (G()) | |
226 | + | then (K.caller == this) | |
164 | 227 | else false) | |
165 | - | then | |
228 | + | then L | |
166 | 229 | else false) | |
167 | - | then (B > 0) | |
168 | - | else false) | |
169 | - | then WriteSet([DataEntry("startGame", !(x))]) | |
230 | + | then WriteSet([DataEntry("startGame", !(L))]) | |
170 | 231 | else throw("Only owner can start the game.") | |
171 | 232 | } | |
172 | 233 | ||
173 | 234 | ||
174 | 235 | ||
175 | - | @Callable( | |
236 | + | @Callable(K) | |
176 | 237 | func makeBetLess () = { | |
177 | - | let C = extract(v.payment) | |
178 | - | let q = toBase58String(v.caller.bytes) | |
179 | - | let D = m() | |
180 | - | let E = n(C.amount, D, q) | |
181 | - | if (if (!(isDefined(C.assetId))) | |
182 | - | then (C.amount >= E) | |
238 | + | let L = { | |
239 | + | let e = getBoolean(this, "startGame") | |
240 | + | if ($isInstanceOf(e, "Boolean")) | |
241 | + | then { | |
242 | + | let v = e | |
243 | + | v | |
244 | + | } | |
245 | + | else false | |
246 | + | } | |
247 | + | let N = extract(K.payment) | |
248 | + | let o = toBase58String(K.caller.bytes) | |
249 | + | let s = m() | |
250 | + | let O = z(N.amount, s, o) | |
251 | + | if (if (if (!(isDefined(N.assetId))) | |
252 | + | then (N.amount >= O) | |
183 | 253 | else false) | |
184 | - | then { | |
185 | - | let w = { | |
186 | - | let e = getInteger(this, "numberRound") | |
187 | - | if ($isInstanceOf(e, "Int")) | |
188 | - | then { | |
189 | - | let g = e | |
190 | - | g | |
191 | - | } | |
192 | - | else 1 | |
193 | - | } | |
194 | - | let B = { | |
195 | - | let e = getInteger(this, (toString(w) + "_countGamersDown")) | |
196 | - | if ($isInstanceOf(e, "Int")) | |
197 | - | then { | |
198 | - | let y = e | |
199 | - | y | |
200 | - | } | |
201 | - | else 0 | |
202 | - | } | |
203 | - | WriteSet([DataEntry(((toString(D) + "_less_") + q), C.amount), DataEntry((toString(D) + "_countGamersDown"), (B + 1))]) | |
204 | - | } | |
205 | - | else if ((E > C.amount)) | |
254 | + | then L | |
255 | + | else false) | |
256 | + | then n(o, "_less_", "_countGamersDown", N.amount) | |
257 | + | else if ((O > N.amount)) | |
206 | 258 | then throw("Payment must be more for the round!") | |
207 | 259 | else throw("works with waves only") | |
208 | 260 | } | |
209 | 261 | ||
210 | 262 | ||
211 | 263 | ||
212 | - | @Callable( | |
264 | + | @Callable(K) | |
213 | 265 | func makeBetMore () = { | |
214 | - | let C = extract(v.payment) | |
215 | - | let q = toBase58String(v.caller.bytes) | |
216 | - | let D = m() | |
217 | - | let E = n(C.amount, D, q) | |
218 | - | if (if (!(isDefined(C.assetId))) | |
219 | - | then (C.amount >= E) | |
266 | + | let L = { | |
267 | + | let e = getBoolean(this, "startGame") | |
268 | + | if ($isInstanceOf(e, "Boolean")) | |
269 | + | then { | |
270 | + | let v = e | |
271 | + | v | |
272 | + | } | |
273 | + | else false | |
274 | + | } | |
275 | + | let N = extract(K.payment) | |
276 | + | let o = toBase58String(K.caller.bytes) | |
277 | + | let s = m() | |
278 | + | let O = z(N.amount, s, o) | |
279 | + | if (if (if (!(isDefined(N.assetId))) | |
280 | + | then (N.amount >= O) | |
220 | 281 | else false) | |
221 | - | then { | |
222 | - | let w = { | |
223 | - | let e = getInteger(this, "numberRound") | |
224 | - | if ($isInstanceOf(e, "Int")) | |
225 | - | then { | |
226 | - | let g = e | |
227 | - | g | |
228 | - | } | |
229 | - | else 1 | |
230 | - | } | |
231 | - | let A = { | |
232 | - | let e = getInteger(this, (toString(w) + "_countGamersUp")) | |
233 | - | if ($isInstanceOf(e, "Int")) | |
234 | - | then { | |
235 | - | let y = e | |
236 | - | y | |
237 | - | } | |
238 | - | else 0 | |
239 | - | } | |
240 | - | WriteSet([DataEntry(((toString(D) + "_more_") + q), C.amount), DataEntry((toString(D) + "_countGamersUp"), (A + 1))]) | |
241 | - | } | |
242 | - | else if ((E > C.amount)) | |
282 | + | then L | |
283 | + | else false) | |
284 | + | then n(o, "_more_", "_countGamersUp", N.amount) | |
285 | + | else if ((O > N.amount)) | |
243 | 286 | then throw("Payment must be more for the round!") | |
244 | 287 | else throw("works with waves only") | |
245 | 288 | } | |
246 | 289 | ||
247 | 290 |
github/deemru/w8io/026f985 40.63 ms ◑