tx · CFJTzodtTfc9BN6gqaKMCjoN9S9G4Er3fHxoYvtWZ8EZ 3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ: -0.01700000 Waves 2023.12.12 19:18 [2883744] smart account 3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ > SELF 0.00000000 Waves
{ "type": 13, "id": "CFJTzodtTfc9BN6gqaKMCjoN9S9G4Er3fHxoYvtWZ8EZ", "fee": 1700000, "feeAssetId": null, "timestamp": 1702397936732, "version": 2, "chainId": 84, "sender": "3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ", "senderPublicKey": "CQoe8BRHR78TuPQLcK3Ykv39w9CeNLhjKdj6TNbJ5FrM", "proofs": [ "3HxcftkfdWDtAehWv4UUvW4EePw5VkMaL87SVfXkTzTHWo4pyQ6cmyVbNxwde5RxzGc9vR36aAwvhCJtnfADfVX4" ], "script": "base64:BgIaCAISBgoECAgBCBIDCgEEEgMKAQgSBAoCCAJGAANTRVACAl9fAAdXQVZFU0lEAQQTq9kzAAZXQVZFU0QAgMLXLwAJR0FNRV9OQU1FAglYbWFzIFRyZWUADFJBTkRPTV9SQU5HRQAFAAhOVU1fQkVUUwABAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQC5CQIJAMwIAgIKbWFuZGF0b3J5IAkAzAgCCQClCAEFB2FkZHJlc3MJAMwIAgIBLgkAzAgCBQNrZXkJAMwIAgIPIGlzIG5vdCBkZWZpbmVkBQNuaWwCAAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgAB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JG1hdGNoMAoBB2NoZWNrZXICA2FjYwVhc3NldAMFA2FjYwkAAAIJAQhnZXRJbnRPcgIJARhrZXlSZXNlcnZhdGlvbkJ5QXNzZXRTdHIBBQVhc3NldAAAAAAHCgACJGwFBkFTU0VUUwoAAiRzCQCQAwEFAiRsCgAFJGFjYzAGCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQdjaGVja2VyAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpdHgFByRtYXRjaDADCQAAAggFA2l0eARkQXBwBQR0aGlzCQAAAggFA2l0eAhmdW5jdGlvbgINY29uc3RydWN0b3JWMQcHBwHq5S4=", "height": 2883744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9pLrAG7Mx534ypsMBVJRpL2Deo2cMyNdBajZsjcooiPM Next: 2fKnLFXeMRi15d4aYSuwwSv34kWdRbmGpWC3qgVUyJf5 Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | ||
14 | 14 | let f = 1 | |
15 | 15 | ||
16 | - | let g = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]] | |
17 | - | ||
18 | - | func h (i,j) = valueOrErrorMessage(getString(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], "")) | |
16 | + | func g (h,i) = valueOrErrorMessage(getString(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
19 | 17 | ||
20 | 18 | ||
21 | - | func | |
19 | + | func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
22 | 20 | ||
23 | 21 | ||
24 | - | func | |
22 | + | func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
25 | 23 | ||
26 | 24 | ||
27 | - | let | |
25 | + | let l = "%s%s__cfg__allowedAssets" | |
28 | 26 | ||
29 | - | let | |
27 | + | let m = "%s%s__cfg__assetsDecimals" | |
30 | 28 | ||
31 | - | let | |
29 | + | let n = "%s%s__cfg__assetsBetDividers" | |
32 | 30 | ||
33 | - | let | |
31 | + | let o = "%s%s__cfg__rsaPublic64" | |
34 | 32 | ||
35 | - | let | |
33 | + | let p = "%s%s__cfg__benzAddress" | |
36 | 34 | ||
37 | - | let | |
35 | + | let q = "%s%s__cfg__withdrawTimeFrame" | |
38 | 36 | ||
39 | - | let | |
37 | + | let r = "%s%s__runtime__gameNum" | |
40 | 38 | ||
41 | - | let | |
39 | + | let s = "%s%s__runtime__contractIsBlocked" | |
42 | 40 | ||
43 | - | let | |
41 | + | let t = "%s%s__runtime__reservedAmounts" | |
44 | 42 | ||
45 | - | func v (w) = ("%s%s%s__runtime__coordsByGameId__" + w) | |
43 | + | func u (i) = { | |
44 | + | let v = g(this, i) | |
45 | + | func w (x,y) = (x :+ parseIntValue(y)) | |
46 | 46 | ||
47 | + | let z = split(v, a) | |
48 | + | let A = size(z) | |
49 | + | let B = nil | |
50 | + | func C (D,E) = if ((E >= A)) | |
51 | + | then D | |
52 | + | else w(D, z[E]) | |
47 | 53 | ||
48 | - | func x (j) = { | |
49 | - | let y = h(this, j) | |
50 | - | func z (A,B) = (A :+ parseIntValue(B)) | |
51 | - | ||
52 | - | let C = split(y, a) | |
53 | - | let D = size(C) | |
54 | - | let E = nil | |
55 | - | func F (G,H) = if ((H >= D)) | |
56 | - | then G | |
57 | - | else z(G, C[H]) | |
58 | - | ||
59 | - | func I (G,H) = if ((H >= D)) | |
60 | - | then G | |
54 | + | func F (D,E) = if ((E >= A)) | |
55 | + | then D | |
61 | 56 | else throw("List size exceeds 10") | |
62 | 57 | ||
63 | - | | |
58 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
64 | 59 | } | |
65 | 60 | ||
66 | 61 | ||
67 | - | let | |
62 | + | let G = split(g(this, l), a) | |
68 | 63 | ||
69 | - | let | |
64 | + | let H = u(m) | |
70 | 65 | ||
71 | - | let | |
66 | + | let I = u(n) | |
72 | 67 | ||
73 | - | func | |
68 | + | func J (K) = ("$RESERVED_AMOUNT_" + K) | |
74 | 69 | ||
75 | 70 | ||
76 | - | func | |
71 | + | func L (M) = J(G[M]) | |
77 | 72 | ||
78 | 73 | ||
79 | - | let | |
74 | + | let N = ((5 * c) / 1000) | |
80 | 75 | ||
81 | - | let | |
76 | + | let O = 0 | |
82 | 77 | ||
83 | - | let | |
78 | + | let P = 1 | |
84 | 79 | ||
85 | - | let | |
80 | + | let Q = 2 | |
86 | 81 | ||
87 | - | let | |
82 | + | let R = 1 | |
88 | 83 | ||
89 | - | let | |
84 | + | let S = 2 | |
90 | 85 | ||
91 | - | let | |
86 | + | let T = 4 | |
92 | 87 | ||
93 | - | let | |
88 | + | let U = 8 | |
94 | 89 | ||
95 | - | let | |
90 | + | let V = 14 | |
96 | 91 | ||
97 | - | let | |
92 | + | let W = 10000 | |
98 | 93 | ||
99 | - | let | |
94 | + | let X = 250000 | |
100 | 95 | ||
101 | - | let | |
96 | + | let Y = [S] | |
102 | 97 | ||
103 | - | let | |
98 | + | let Z = 0 | |
104 | 99 | ||
105 | - | let | |
100 | + | let aa = 1 | |
106 | 101 | ||
107 | - | let | |
102 | + | let ab = 2 | |
108 | 103 | ||
109 | - | let | |
104 | + | let ac = 3 | |
110 | 105 | ||
111 | - | let | |
106 | + | let ad = 4 | |
112 | 107 | ||
113 | - | let | |
108 | + | let ae = 5 | |
114 | 109 | ||
115 | - | let | |
110 | + | let af = "SUBMITTED" | |
116 | 111 | ||
117 | - | let | |
112 | + | let ag = "WON" | |
118 | 113 | ||
119 | - | let | |
114 | + | let ah = "LOST" | |
120 | 115 | ||
121 | - | func | |
116 | + | func ai (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state")) | |
122 | 117 | ||
123 | 118 | ||
124 | - | let | |
119 | + | let aj = fromBase64String(ai(o)) | |
125 | 120 | ||
126 | - | let | |
121 | + | let ak = addressFromStringValue(ai(p)) | |
127 | 122 | ||
128 | - | let | |
123 | + | let al = valueOrElse(getInteger(this, q), 7200) | |
129 | 124 | ||
130 | - | func | |
131 | - | then getIntegerValue( | |
132 | - | else | |
125 | + | func am (i,an) = if (isDefined(getInteger(i))) | |
126 | + | then getIntegerValue(i) | |
127 | + | else an | |
133 | 128 | ||
134 | 129 | ||
135 | - | func | |
130 | + | func ao (i,ap) = IntegerEntry(i, ap) | |
136 | 131 | ||
137 | 132 | ||
138 | - | func | |
133 | + | func aq (i) = ao(i, (am(i, -1) + 1)) | |
139 | 134 | ||
140 | 135 | ||
141 | - | func | |
136 | + | func ar (i,as) = ao(i, (am(i, 0) + as)) | |
142 | 137 | ||
143 | 138 | ||
144 | - | func | |
145 | - | let | |
146 | - | if ($isInstanceOf( | |
139 | + | func at (au) = { | |
140 | + | let av = au | |
141 | + | if ($isInstanceOf(av, "ByteVector")) | |
147 | 142 | then { | |
148 | - | let | |
149 | - | toBase58String( | |
143 | + | let aw = av | |
144 | + | toBase58String(aw) | |
150 | 145 | } | |
151 | 146 | else "WAVES" | |
152 | 147 | } | |
153 | 148 | ||
154 | 149 | ||
155 | - | func | |
150 | + | func ax (ay) = if ((ay == "WAVES")) | |
156 | 151 | then unit | |
157 | - | else fromBase58String( | |
152 | + | else fromBase58String(ay) | |
158 | 153 | ||
159 | 154 | ||
160 | - | func | |
161 | - | let | |
162 | - | if ($isInstanceOf( | |
155 | + | func az (au) = { | |
156 | + | let av = au | |
157 | + | if ($isInstanceOf(av, "ByteVector")) | |
163 | 158 | then { | |
164 | - | let | |
165 | - | assetBalance(this, | |
159 | + | let aA = av | |
160 | + | assetBalance(this, aA) | |
166 | 161 | } | |
167 | 162 | else wavesBalance(this).available | |
168 | 163 | } | |
169 | 164 | ||
170 | 165 | ||
171 | - | func | |
172 | - | let | |
173 | - | let | |
174 | - | if (( | |
166 | + | func aB (aC,M) = { | |
167 | + | let ay = G[M] | |
168 | + | let aD = (am(L(M), 0) + aC) | |
169 | + | if ((aD > az(ax(ay)))) | |
175 | 170 | then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety.")) | |
176 | - | else | |
171 | + | else aD | |
177 | 172 | } | |
178 | 173 | ||
179 | 174 | ||
180 | - | func | |
175 | + | func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC))) | |
181 | 176 | then throw((("Invalid " + d) + " account state - reserved amount is less than 0")) | |
182 | - | else | |
177 | + | else ar(L(M), -(aC)) | |
183 | 178 | ||
184 | 179 | ||
185 | - | func | |
186 | - | let | |
187 | - | if (!(isDefined( | |
180 | + | func aG (ay) = { | |
181 | + | let aH = indexOf(G, ay) | |
182 | + | if (!(isDefined(aH))) | |
188 | 183 | then throw("Invalid payment asset") | |
189 | - | else value( | |
184 | + | else value(aH) | |
190 | 185 | } | |
191 | 186 | ||
192 | 187 | ||
193 | - | func | |
194 | - | let | |
195 | - | func | |
188 | + | func aI (aJ,aK,aL) = { | |
189 | + | let aM = size(aL) | |
190 | + | func aN (v,aO) = if (v) | |
196 | 191 | then true | |
197 | - | else ( | |
192 | + | else (aJ == ((aO * H[aK]) / I[aK])) | |
198 | 193 | ||
199 | 194 | if (!({ | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | func | |
204 | - | then | |
205 | - | else | |
195 | + | let z = Y | |
196 | + | let A = size(z) | |
197 | + | let B = false | |
198 | + | func C (D,E) = if ((E >= A)) | |
199 | + | then D | |
200 | + | else aN(D, z[E]) | |
206 | 201 | ||
207 | - | func | |
208 | - | then | |
202 | + | func F (D,E) = if ((E >= A)) | |
203 | + | then D | |
209 | 204 | else throw("List size exceeds 5") | |
210 | 205 | ||
211 | - | | |
206 | + | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
212 | 207 | })) | |
213 | 208 | then throw("Bet amount is not valid") | |
214 | - | else if ((parseInt( | |
209 | + | else if ((parseInt(aL) == unit)) | |
215 | 210 | then throw("Invalid player's choice") | |
216 | - | else if (( | |
211 | + | else if ((aM != f)) | |
217 | 212 | then throw("Invalid length of player's choice") | |
218 | - | else fraction( | |
213 | + | else fraction(aJ, X, W) | |
219 | 214 | } | |
220 | 215 | ||
221 | 216 | ||
222 | - | func aR (w,aS) = { | |
223 | - | let aT = rsaVerify_16Kb(SHA256, toBytes(w), aS, am) | |
224 | - | if (!(aT)) | |
217 | + | let aP = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [423, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]] | |
218 | + | ||
219 | + | let aQ = 5000 | |
220 | + | ||
221 | + | let aR = 10000 | |
222 | + | ||
223 | + | func aS (aF,aT) = { | |
224 | + | func aU (x,aV) = { | |
225 | + | let aW = x._3 | |
226 | + | let aX = aP[aW] | |
227 | + | let aY = aP[(aW + 1)] | |
228 | + | let aZ = (((((aX[1] - aX[0]) + aY[1]) - aY[0]) * (aY[2] - aX[2])) * 5000) | |
229 | + | $Tuple3((x._1 :+ aZ), (x._2 + aZ), (x._3 + 1)) | |
230 | + | } | |
231 | + | ||
232 | + | let ba = { | |
233 | + | let z = aP | |
234 | + | let A = size(z) | |
235 | + | let B = $Tuple3(nil, 0, 0) | |
236 | + | func C (D,E) = if ((E >= A)) | |
237 | + | then D | |
238 | + | else aU(D, z[E]) | |
239 | + | ||
240 | + | func F (D,E) = if ((E >= A)) | |
241 | + | then D | |
242 | + | else throw("List size exceeds 14") | |
243 | + | ||
244 | + | F(C(C(C(C(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14) | |
245 | + | } | |
246 | + | let bb = ba._1 | |
247 | + | let bc = ba._2 | |
248 | + | let bd = (toInt(sha256(aT)) % bc) | |
249 | + | func be (x,bf) = { | |
250 | + | let aW = x._1 | |
251 | + | let bg = (x._2 + bf) | |
252 | + | $Tuple3((aW + 1), bg, if ((bg > bd)) | |
253 | + | then aW | |
254 | + | else x._3) | |
255 | + | } | |
256 | + | ||
257 | + | let bh = ( let z = bb | |
258 | + | let A = size(z) | |
259 | + | let B = $Tuple3(0, 0, -1) | |
260 | + | func bi (D,E) = if ((E >= A)) | |
261 | + | then D | |
262 | + | else be(D, z[E]) | |
263 | + | ||
264 | + | func bj (D,E) = if ((E >= A)) | |
265 | + | then D | |
266 | + | else throw("List size exceeds 14") | |
267 | + | ||
268 | + | bj(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14))._3 | |
269 | + | let aX = aP[bh] | |
270 | + | let aY = aP[(bh + 1)] | |
271 | + | let bk = ((aX[0] + aY[0]) * aQ) | |
272 | + | let bl = ((aX[1] + aY[1]) * aQ) | |
273 | + | let bm = ((aY[2] - aX[2]) * aR) | |
274 | + | let bn = ((aX[2] + aY[2]) * aQ) | |
275 | + | let bo = (bk + (toInt(sha256((aT + toBytes(bh)))) % (bl - bk))) | |
276 | + | let bp = (aX[2] + (toInt(sha256((aT + toBytes(bo)))) % bm)) | |
277 | + | let bq = ((aX[2] * aR) - bp) | |
278 | + | let br = ((aY[2] * aR) - bp) | |
279 | + | let bs = fraction(((aX[0] * br) - (aY[0] * bq)), aR, bm) | |
280 | + | let bt = fraction(((aX[1] * br) - (aY[1] * bq)), aR, bm) | |
281 | + | if ((bs > bo)) | |
282 | + | then [((2 * bk) - bo), ((2 * bn) - bp)] | |
283 | + | else if ((bo > bt)) | |
284 | + | then [((2 * bl) - bo), ((2 * bn) - bp)] | |
285 | + | else [bo, bp] | |
286 | + | } | |
287 | + | ||
288 | + | ||
289 | + | func bu (aF,aT) = { | |
290 | + | let bv = rsaVerify_16Kb(SHA256, toBytes(aF), aT, aj) | |
291 | + | if (!(bv)) | |
225 | 292 | then throw("Invalid RSA signature") | |
226 | 293 | else { | |
227 | - | let | |
228 | - | toString(( | |
294 | + | let bd = (toInt(sha256(aT)) % e) | |
295 | + | toString((bd + 1)) | |
229 | 296 | } | |
230 | 297 | } | |
231 | 298 | ||
232 | 299 | ||
233 | - | func | |
234 | - | let | |
235 | - | func | |
300 | + | func bw (aL,bx) = { | |
301 | + | let by = size(aL) | |
302 | + | func be (v,aO) = if (v) | |
236 | 303 | then true | |
237 | - | else if (( | |
238 | - | then (take(drop( | |
304 | + | else if ((by >= aO)) | |
305 | + | then (take(drop(aL, (aO - 1)), 1) == bx) | |
239 | 306 | else false | |
240 | 307 | ||
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | func | |
245 | - | then | |
246 | - | else | |
308 | + | let z = [1, 2, 3, 4, 5] | |
309 | + | let A = size(z) | |
310 | + | let B = false | |
311 | + | func C (D,E) = if ((E >= A)) | |
312 | + | then D | |
313 | + | else be(D, z[E]) | |
247 | 314 | ||
248 | - | func | |
249 | - | then | |
315 | + | func F (D,E) = if ((E >= A)) | |
316 | + | then D | |
250 | 317 | else throw("List size exceeds 5") | |
251 | 318 | ||
252 | - | | |
319 | + | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
253 | 320 | } | |
254 | 321 | ||
255 | 322 | ||
256 | - | func | |
323 | + | func bz (bA,aL,bB,bC,aC,M,bD,bE,bF) = makeString([bA, aL, bB, bC, aC, M, if ((bD == "")) | |
257 | 324 | then "" | |
258 | - | else | |
325 | + | else bD, bE, bF], "_") | |
259 | 326 | ||
260 | 327 | ||
261 | - | func | |
328 | + | func bG (bA,aL,bB,bC,aC,M,bD,bE,bF) = bz(bA, aL, bB, toString(bC), toString(aC), toString(M), bD, toString(bE), toString(bF)) | |
262 | 329 | ||
263 | 330 | ||
264 | - | func | |
265 | - | let | |
266 | - | if ( | |
267 | - | then ( | |
268 | - | else | |
331 | + | func bH (bI,bA,bd,bJ,bE,bF) = { | |
332 | + | let bH = bz(bA, bI[aa], bI[ab], bI[ac], bI[ad], bI[ae], bd, toString(bE), toString(bF)) | |
333 | + | if (bJ) | |
334 | + | then (bH + "_TIMEOUT") | |
335 | + | else bH | |
269 | 336 | } | |
270 | 337 | ||
271 | 338 | ||
272 | - | func | |
273 | - | let | |
274 | - | if ($isInstanceOf( | |
339 | + | func bK (aF) = split({ | |
340 | + | let av = getString(this, aF) | |
341 | + | if ($isInstanceOf(av, "String")) | |
275 | 342 | then { | |
276 | - | let | |
277 | - | | |
343 | + | let bL = av | |
344 | + | bL | |
278 | 345 | } | |
279 | - | else throw((("Game: " + | |
346 | + | else throw((("Game: " + aF) + " not found.")) | |
280 | 347 | }, "_") | |
281 | 348 | ||
282 | 349 | ||
283 | - | @Callable( | |
284 | - | func constructorV1 ( | |
350 | + | @Callable(aW) | |
351 | + | func constructorV1 (bM,bN,bO,bP) = if ((aW.caller != this)) | |
285 | 352 | then throw("not authorized") | |
286 | 353 | else { | |
287 | - | func | |
288 | - | let | |
289 | - | if ((size( | |
354 | + | func bQ (x,bR) = { | |
355 | + | let bS = split(bR, ":") | |
356 | + | if ((size(bS) != 3)) | |
290 | 357 | then throw("Invalid asset record") | |
291 | - | else $Tuple3(( | |
358 | + | else $Tuple3((x._1 :+ bS[O]), (x._2 :+ bS[P]), (x._3 :+ bS[Q])) | |
292 | 359 | } | |
293 | 360 | ||
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | func | |
299 | - | then | |
300 | - | else | |
361 | + | let bT = { | |
362 | + | let z = split_4C(bP, "_") | |
363 | + | let A = size(z) | |
364 | + | let B = $Tuple3(nil, nil, nil) | |
365 | + | func C (D,E) = if ((E >= A)) | |
366 | + | then D | |
367 | + | else bQ(D, z[E]) | |
301 | 368 | ||
302 | - | func | |
303 | - | then | |
369 | + | func F (D,E) = if ((E >= A)) | |
370 | + | then D | |
304 | 371 | else throw("List size exceeds 10") | |
305 | 372 | ||
306 | - | | |
373 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
307 | 374 | } | |
308 | - | [StringEntry(p, | |
375 | + | [StringEntry(o, bM), StringEntry(p, bN), IntegerEntry(q, bO), StringEntry(l, makeString_2C(bT._1, a)), StringEntry(m, makeString(bT._2, a)), StringEntry(n, makeString(bT._3, a))] | |
309 | 376 | } | |
310 | 377 | ||
311 | 378 | ||
312 | 379 | ||
313 | - | @Callable( | |
314 | - | func maintenance ( | |
380 | + | @Callable(aW) | |
381 | + | func maintenance (bU) = if ((aW.caller != ak)) | |
315 | 382 | then throw("not authorized") | |
316 | - | else [BooleanEntry( | |
383 | + | else [BooleanEntry(s, bU)] | |
317 | 384 | ||
318 | 385 | ||
319 | 386 | ||
320 | - | @Callable( | |
321 | - | func bet ( | |
387 | + | @Callable(aW) | |
388 | + | func bet (aL) = if (valueOrElse(getBoolean(s), false)) | |
322 | 389 | then throw("Game is stopped for maintenence") | |
323 | 390 | else { | |
324 | - | let | |
325 | - | if ((1 >= size( | |
391 | + | let aF = toBase58String(aW.transactionId) | |
392 | + | if ((1 >= size(aW.payments))) | |
326 | 393 | then throw("2 payments must be attached") | |
327 | - | else if (isDefined(getString(this, | |
328 | - | then throw((("Bet for: " + | |
394 | + | else if (isDefined(getString(this, aF))) | |
395 | + | then throw((("Bet for: " + aF) + " was already made.")) | |
329 | 396 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | if (isDefined( | |
397 | + | let bV = value(aW.payments[0]) | |
398 | + | let bW = value(aW.payments[1]) | |
399 | + | if (isDefined(bW.assetId)) | |
333 | 400 | then throw("feePmt (2nd payment) assetId must be in Waves") | |
334 | - | else if (( | |
401 | + | else if ((N > bW.amount)) | |
335 | 402 | then throw("feePmt (2nd payment) must be >= 0.005 Waves") | |
336 | 403 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | [IntegerEntry( | |
404 | + | let ay = at(bV.assetId) | |
405 | + | let aK = aG(ay) | |
406 | + | let bX = bW.amount | |
407 | + | let aC = aI(bV.amount, aK, aL) | |
408 | + | let bB = toBase58String(aW.callerPublicKey) | |
409 | + | let bY = bG(af, aL, bB, height, aC, aK, "", -1, -1) | |
410 | + | [IntegerEntry(L(aK), aB(aC, aK)), aq(r), StringEntry(aF, bY), ScriptTransfer(ak, bX, bW.assetId)] | |
344 | 411 | } | |
345 | 412 | } | |
346 | 413 | } | |
347 | 414 | ||
348 | 415 | ||
349 | 416 | ||
350 | - | @Callable( | |
351 | - | func withdraw ( | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | if (( | |
417 | + | @Callable(aW) | |
418 | + | func withdraw (aF,aT) = { | |
419 | + | let bY = bK(aF) | |
420 | + | let bZ = bY[Z] | |
421 | + | let aL = bY[aa] | |
422 | + | let bC = parseIntValue(bY[ac]) | |
423 | + | let aC = parseIntValue(bY[ad]) | |
424 | + | let M = parseIntValue(bY[ae]) | |
425 | + | let bB = bY[ab] | |
426 | + | let ca = addressFromPublicKey(fromBase58String(bB)) | |
427 | + | if ((bZ != af)) | |
361 | 428 | then throw("Invalid game state for passed gameId") | |
362 | - | else if (( | |
429 | + | else if ((aW.caller != ak)) | |
363 | 430 | then throw("Regular withdraw can be done by server only") | |
364 | 431 | else { | |
365 | - | let bh = ((height - bc) > ao) | |
366 | - | let bA = if (bh) | |
367 | - | then take(aN, 1) | |
368 | - | else aR(w, aS) | |
369 | - | let bB = aV(aN, bA) | |
370 | - | let bC = if (bB) | |
371 | - | then aj | |
372 | - | else ak | |
373 | - | let bD = bf(bx, bC, bA, bh) | |
374 | - | ([StringEntry(w, bD), aH(w, P, aF)] ++ (if (bB) | |
375 | - | then [ScriptTransfer(bz, aF, aA(J[P]))] | |
376 | - | else [StringEntry(v(w), "500_280")])) | |
432 | + | let bJ = ((height - bC) > al) | |
433 | + | let cb = if (bJ) | |
434 | + | then take(aL, 1) | |
435 | + | else bu(aF, aT) | |
436 | + | let cc = bw(aL, cb) | |
437 | + | let cd = if (cc) | |
438 | + | then ag | |
439 | + | else ah | |
440 | + | let ce = if (cc) | |
441 | + | then [-(aR), -(aR)] | |
442 | + | else aS(aF, aT) | |
443 | + | let cf = bH(bY, cd, cb, bJ, (ce[0] / aR), (ce[1] / aR)) | |
444 | + | ([StringEntry(aF, cf), aE(aF, M, aC)] ++ (if (cc) | |
445 | + | then [ScriptTransfer(ca, aC, ax(G[M]))] | |
446 | + | else nil)) | |
377 | 447 | } | |
378 | 448 | } | |
379 | 449 | ||
380 | 450 | ||
381 | - | @Verifier( | |
382 | - | func | |
451 | + | @Verifier(cg) | |
452 | + | func ch () = if (sigVerify(cg.bodyBytes, cg.proofs[0], cg.senderPublicKey)) | |
383 | 453 | then { | |
384 | - | let | |
385 | - | if ($isInstanceOf( | |
454 | + | let av = cg | |
455 | + | if ($isInstanceOf(av, "TransferTransaction")) | |
386 | 456 | then { | |
387 | - | let | |
388 | - | let | |
389 | - | (( | |
457 | + | let ci = av | |
458 | + | let M = aG(at(ci.assetId)) | |
459 | + | ((az(ci.assetId) - ci.amount) >= am(L(M), 0)) | |
390 | 460 | } | |
391 | - | else if ($isInstanceOf( | |
461 | + | else if ($isInstanceOf(av, "SetScriptTransaction")) | |
392 | 462 | then { | |
393 | - | let | |
394 | - | func | |
395 | - | then ( | |
463 | + | let cj = av | |
464 | + | func ck (x,cl) = if (x) | |
465 | + | then (am(J(cl), 0) == 0) | |
396 | 466 | else false | |
397 | 467 | ||
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | func | |
402 | - | then | |
403 | - | else | |
468 | + | let z = G | |
469 | + | let A = size(z) | |
470 | + | let B = true | |
471 | + | func C (D,E) = if ((E >= A)) | |
472 | + | then D | |
473 | + | else ck(D, z[E]) | |
404 | 474 | ||
405 | - | func | |
406 | - | then | |
475 | + | func F (D,E) = if ((E >= A)) | |
476 | + | then D | |
407 | 477 | else throw("List size exceeds 10") | |
408 | 478 | ||
409 | - | | |
479 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
410 | 480 | } | |
411 | - | else false | |
481 | + | else if ($isInstanceOf(av, "InvokeScriptTransaction")) | |
482 | + | then { | |
483 | + | let cm = av | |
484 | + | if ((cm.dApp == this)) | |
485 | + | then (cm.function == "constructorV1") | |
486 | + | else false | |
487 | + | } | |
488 | + | else false | |
412 | 489 | } | |
413 | 490 | else false | |
414 | 491 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = base58'WAVES' | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = "Xmas Tree" | |
11 | 11 | ||
12 | 12 | let e = 5 | |
13 | 13 | ||
14 | 14 | let f = 1 | |
15 | 15 | ||
16 | - | let g = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]] | |
17 | - | ||
18 | - | func h (i,j) = valueOrErrorMessage(getString(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], "")) | |
16 | + | func g (h,i) = valueOrErrorMessage(getString(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
19 | 17 | ||
20 | 18 | ||
21 | - | func | |
19 | + | func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
22 | 20 | ||
23 | 21 | ||
24 | - | func | |
22 | + | func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
25 | 23 | ||
26 | 24 | ||
27 | - | let | |
25 | + | let l = "%s%s__cfg__allowedAssets" | |
28 | 26 | ||
29 | - | let | |
27 | + | let m = "%s%s__cfg__assetsDecimals" | |
30 | 28 | ||
31 | - | let | |
29 | + | let n = "%s%s__cfg__assetsBetDividers" | |
32 | 30 | ||
33 | - | let | |
31 | + | let o = "%s%s__cfg__rsaPublic64" | |
34 | 32 | ||
35 | - | let | |
33 | + | let p = "%s%s__cfg__benzAddress" | |
36 | 34 | ||
37 | - | let | |
35 | + | let q = "%s%s__cfg__withdrawTimeFrame" | |
38 | 36 | ||
39 | - | let | |
37 | + | let r = "%s%s__runtime__gameNum" | |
40 | 38 | ||
41 | - | let | |
39 | + | let s = "%s%s__runtime__contractIsBlocked" | |
42 | 40 | ||
43 | - | let | |
41 | + | let t = "%s%s__runtime__reservedAmounts" | |
44 | 42 | ||
45 | - | func v (w) = ("%s%s%s__runtime__coordsByGameId__" + w) | |
43 | + | func u (i) = { | |
44 | + | let v = g(this, i) | |
45 | + | func w (x,y) = (x :+ parseIntValue(y)) | |
46 | 46 | ||
47 | + | let z = split(v, a) | |
48 | + | let A = size(z) | |
49 | + | let B = nil | |
50 | + | func C (D,E) = if ((E >= A)) | |
51 | + | then D | |
52 | + | else w(D, z[E]) | |
47 | 53 | ||
48 | - | func x (j) = { | |
49 | - | let y = h(this, j) | |
50 | - | func z (A,B) = (A :+ parseIntValue(B)) | |
51 | - | ||
52 | - | let C = split(y, a) | |
53 | - | let D = size(C) | |
54 | - | let E = nil | |
55 | - | func F (G,H) = if ((H >= D)) | |
56 | - | then G | |
57 | - | else z(G, C[H]) | |
58 | - | ||
59 | - | func I (G,H) = if ((H >= D)) | |
60 | - | then G | |
54 | + | func F (D,E) = if ((E >= A)) | |
55 | + | then D | |
61 | 56 | else throw("List size exceeds 10") | |
62 | 57 | ||
63 | - | | |
58 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
64 | 59 | } | |
65 | 60 | ||
66 | 61 | ||
67 | - | let | |
62 | + | let G = split(g(this, l), a) | |
68 | 63 | ||
69 | - | let | |
64 | + | let H = u(m) | |
70 | 65 | ||
71 | - | let | |
66 | + | let I = u(n) | |
72 | 67 | ||
73 | - | func | |
68 | + | func J (K) = ("$RESERVED_AMOUNT_" + K) | |
74 | 69 | ||
75 | 70 | ||
76 | - | func | |
71 | + | func L (M) = J(G[M]) | |
77 | 72 | ||
78 | 73 | ||
79 | - | let | |
74 | + | let N = ((5 * c) / 1000) | |
80 | 75 | ||
81 | - | let | |
76 | + | let O = 0 | |
82 | 77 | ||
83 | - | let | |
78 | + | let P = 1 | |
84 | 79 | ||
85 | - | let | |
80 | + | let Q = 2 | |
86 | 81 | ||
87 | - | let | |
82 | + | let R = 1 | |
88 | 83 | ||
89 | - | let | |
84 | + | let S = 2 | |
90 | 85 | ||
91 | - | let | |
86 | + | let T = 4 | |
92 | 87 | ||
93 | - | let | |
88 | + | let U = 8 | |
94 | 89 | ||
95 | - | let | |
90 | + | let V = 14 | |
96 | 91 | ||
97 | - | let | |
92 | + | let W = 10000 | |
98 | 93 | ||
99 | - | let | |
94 | + | let X = 250000 | |
100 | 95 | ||
101 | - | let | |
96 | + | let Y = [S] | |
102 | 97 | ||
103 | - | let | |
98 | + | let Z = 0 | |
104 | 99 | ||
105 | - | let | |
100 | + | let aa = 1 | |
106 | 101 | ||
107 | - | let | |
102 | + | let ab = 2 | |
108 | 103 | ||
109 | - | let | |
104 | + | let ac = 3 | |
110 | 105 | ||
111 | - | let | |
106 | + | let ad = 4 | |
112 | 107 | ||
113 | - | let | |
108 | + | let ae = 5 | |
114 | 109 | ||
115 | - | let | |
110 | + | let af = "SUBMITTED" | |
116 | 111 | ||
117 | - | let | |
112 | + | let ag = "WON" | |
118 | 113 | ||
119 | - | let | |
114 | + | let ah = "LOST" | |
120 | 115 | ||
121 | - | func | |
116 | + | func ai (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state")) | |
122 | 117 | ||
123 | 118 | ||
124 | - | let | |
119 | + | let aj = fromBase64String(ai(o)) | |
125 | 120 | ||
126 | - | let | |
121 | + | let ak = addressFromStringValue(ai(p)) | |
127 | 122 | ||
128 | - | let | |
123 | + | let al = valueOrElse(getInteger(this, q), 7200) | |
129 | 124 | ||
130 | - | func | |
131 | - | then getIntegerValue( | |
132 | - | else | |
125 | + | func am (i,an) = if (isDefined(getInteger(i))) | |
126 | + | then getIntegerValue(i) | |
127 | + | else an | |
133 | 128 | ||
134 | 129 | ||
135 | - | func | |
130 | + | func ao (i,ap) = IntegerEntry(i, ap) | |
136 | 131 | ||
137 | 132 | ||
138 | - | func | |
133 | + | func aq (i) = ao(i, (am(i, -1) + 1)) | |
139 | 134 | ||
140 | 135 | ||
141 | - | func | |
136 | + | func ar (i,as) = ao(i, (am(i, 0) + as)) | |
142 | 137 | ||
143 | 138 | ||
144 | - | func | |
145 | - | let | |
146 | - | if ($isInstanceOf( | |
139 | + | func at (au) = { | |
140 | + | let av = au | |
141 | + | if ($isInstanceOf(av, "ByteVector")) | |
147 | 142 | then { | |
148 | - | let | |
149 | - | toBase58String( | |
143 | + | let aw = av | |
144 | + | toBase58String(aw) | |
150 | 145 | } | |
151 | 146 | else "WAVES" | |
152 | 147 | } | |
153 | 148 | ||
154 | 149 | ||
155 | - | func | |
150 | + | func ax (ay) = if ((ay == "WAVES")) | |
156 | 151 | then unit | |
157 | - | else fromBase58String( | |
152 | + | else fromBase58String(ay) | |
158 | 153 | ||
159 | 154 | ||
160 | - | func | |
161 | - | let | |
162 | - | if ($isInstanceOf( | |
155 | + | func az (au) = { | |
156 | + | let av = au | |
157 | + | if ($isInstanceOf(av, "ByteVector")) | |
163 | 158 | then { | |
164 | - | let | |
165 | - | assetBalance(this, | |
159 | + | let aA = av | |
160 | + | assetBalance(this, aA) | |
166 | 161 | } | |
167 | 162 | else wavesBalance(this).available | |
168 | 163 | } | |
169 | 164 | ||
170 | 165 | ||
171 | - | func | |
172 | - | let | |
173 | - | let | |
174 | - | if (( | |
166 | + | func aB (aC,M) = { | |
167 | + | let ay = G[M] | |
168 | + | let aD = (am(L(M), 0) + aC) | |
169 | + | if ((aD > az(ax(ay)))) | |
175 | 170 | then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety.")) | |
176 | - | else | |
171 | + | else aD | |
177 | 172 | } | |
178 | 173 | ||
179 | 174 | ||
180 | - | func | |
175 | + | func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC))) | |
181 | 176 | then throw((("Invalid " + d) + " account state - reserved amount is less than 0")) | |
182 | - | else | |
177 | + | else ar(L(M), -(aC)) | |
183 | 178 | ||
184 | 179 | ||
185 | - | func | |
186 | - | let | |
187 | - | if (!(isDefined( | |
180 | + | func aG (ay) = { | |
181 | + | let aH = indexOf(G, ay) | |
182 | + | if (!(isDefined(aH))) | |
188 | 183 | then throw("Invalid payment asset") | |
189 | - | else value( | |
184 | + | else value(aH) | |
190 | 185 | } | |
191 | 186 | ||
192 | 187 | ||
193 | - | func | |
194 | - | let | |
195 | - | func | |
188 | + | func aI (aJ,aK,aL) = { | |
189 | + | let aM = size(aL) | |
190 | + | func aN (v,aO) = if (v) | |
196 | 191 | then true | |
197 | - | else ( | |
192 | + | else (aJ == ((aO * H[aK]) / I[aK])) | |
198 | 193 | ||
199 | 194 | if (!({ | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | func | |
204 | - | then | |
205 | - | else | |
195 | + | let z = Y | |
196 | + | let A = size(z) | |
197 | + | let B = false | |
198 | + | func C (D,E) = if ((E >= A)) | |
199 | + | then D | |
200 | + | else aN(D, z[E]) | |
206 | 201 | ||
207 | - | func | |
208 | - | then | |
202 | + | func F (D,E) = if ((E >= A)) | |
203 | + | then D | |
209 | 204 | else throw("List size exceeds 5") | |
210 | 205 | ||
211 | - | | |
206 | + | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
212 | 207 | })) | |
213 | 208 | then throw("Bet amount is not valid") | |
214 | - | else if ((parseInt( | |
209 | + | else if ((parseInt(aL) == unit)) | |
215 | 210 | then throw("Invalid player's choice") | |
216 | - | else if (( | |
211 | + | else if ((aM != f)) | |
217 | 212 | then throw("Invalid length of player's choice") | |
218 | - | else fraction( | |
213 | + | else fraction(aJ, X, W) | |
219 | 214 | } | |
220 | 215 | ||
221 | 216 | ||
222 | - | func aR (w,aS) = { | |
223 | - | let aT = rsaVerify_16Kb(SHA256, toBytes(w), aS, am) | |
224 | - | if (!(aT)) | |
217 | + | let aP = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [423, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]] | |
218 | + | ||
219 | + | let aQ = 5000 | |
220 | + | ||
221 | + | let aR = 10000 | |
222 | + | ||
223 | + | func aS (aF,aT) = { | |
224 | + | func aU (x,aV) = { | |
225 | + | let aW = x._3 | |
226 | + | let aX = aP[aW] | |
227 | + | let aY = aP[(aW + 1)] | |
228 | + | let aZ = (((((aX[1] - aX[0]) + aY[1]) - aY[0]) * (aY[2] - aX[2])) * 5000) | |
229 | + | $Tuple3((x._1 :+ aZ), (x._2 + aZ), (x._3 + 1)) | |
230 | + | } | |
231 | + | ||
232 | + | let ba = { | |
233 | + | let z = aP | |
234 | + | let A = size(z) | |
235 | + | let B = $Tuple3(nil, 0, 0) | |
236 | + | func C (D,E) = if ((E >= A)) | |
237 | + | then D | |
238 | + | else aU(D, z[E]) | |
239 | + | ||
240 | + | func F (D,E) = if ((E >= A)) | |
241 | + | then D | |
242 | + | else throw("List size exceeds 14") | |
243 | + | ||
244 | + | F(C(C(C(C(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14) | |
245 | + | } | |
246 | + | let bb = ba._1 | |
247 | + | let bc = ba._2 | |
248 | + | let bd = (toInt(sha256(aT)) % bc) | |
249 | + | func be (x,bf) = { | |
250 | + | let aW = x._1 | |
251 | + | let bg = (x._2 + bf) | |
252 | + | $Tuple3((aW + 1), bg, if ((bg > bd)) | |
253 | + | then aW | |
254 | + | else x._3) | |
255 | + | } | |
256 | + | ||
257 | + | let bh = ( let z = bb | |
258 | + | let A = size(z) | |
259 | + | let B = $Tuple3(0, 0, -1) | |
260 | + | func bi (D,E) = if ((E >= A)) | |
261 | + | then D | |
262 | + | else be(D, z[E]) | |
263 | + | ||
264 | + | func bj (D,E) = if ((E >= A)) | |
265 | + | then D | |
266 | + | else throw("List size exceeds 14") | |
267 | + | ||
268 | + | bj(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(bi(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14))._3 | |
269 | + | let aX = aP[bh] | |
270 | + | let aY = aP[(bh + 1)] | |
271 | + | let bk = ((aX[0] + aY[0]) * aQ) | |
272 | + | let bl = ((aX[1] + aY[1]) * aQ) | |
273 | + | let bm = ((aY[2] - aX[2]) * aR) | |
274 | + | let bn = ((aX[2] + aY[2]) * aQ) | |
275 | + | let bo = (bk + (toInt(sha256((aT + toBytes(bh)))) % (bl - bk))) | |
276 | + | let bp = (aX[2] + (toInt(sha256((aT + toBytes(bo)))) % bm)) | |
277 | + | let bq = ((aX[2] * aR) - bp) | |
278 | + | let br = ((aY[2] * aR) - bp) | |
279 | + | let bs = fraction(((aX[0] * br) - (aY[0] * bq)), aR, bm) | |
280 | + | let bt = fraction(((aX[1] * br) - (aY[1] * bq)), aR, bm) | |
281 | + | if ((bs > bo)) | |
282 | + | then [((2 * bk) - bo), ((2 * bn) - bp)] | |
283 | + | else if ((bo > bt)) | |
284 | + | then [((2 * bl) - bo), ((2 * bn) - bp)] | |
285 | + | else [bo, bp] | |
286 | + | } | |
287 | + | ||
288 | + | ||
289 | + | func bu (aF,aT) = { | |
290 | + | let bv = rsaVerify_16Kb(SHA256, toBytes(aF), aT, aj) | |
291 | + | if (!(bv)) | |
225 | 292 | then throw("Invalid RSA signature") | |
226 | 293 | else { | |
227 | - | let | |
228 | - | toString(( | |
294 | + | let bd = (toInt(sha256(aT)) % e) | |
295 | + | toString((bd + 1)) | |
229 | 296 | } | |
230 | 297 | } | |
231 | 298 | ||
232 | 299 | ||
233 | - | func | |
234 | - | let | |
235 | - | func | |
300 | + | func bw (aL,bx) = { | |
301 | + | let by = size(aL) | |
302 | + | func be (v,aO) = if (v) | |
236 | 303 | then true | |
237 | - | else if (( | |
238 | - | then (take(drop( | |
304 | + | else if ((by >= aO)) | |
305 | + | then (take(drop(aL, (aO - 1)), 1) == bx) | |
239 | 306 | else false | |
240 | 307 | ||
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | func | |
245 | - | then | |
246 | - | else | |
308 | + | let z = [1, 2, 3, 4, 5] | |
309 | + | let A = size(z) | |
310 | + | let B = false | |
311 | + | func C (D,E) = if ((E >= A)) | |
312 | + | then D | |
313 | + | else be(D, z[E]) | |
247 | 314 | ||
248 | - | func | |
249 | - | then | |
315 | + | func F (D,E) = if ((E >= A)) | |
316 | + | then D | |
250 | 317 | else throw("List size exceeds 5") | |
251 | 318 | ||
252 | - | | |
319 | + | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
253 | 320 | } | |
254 | 321 | ||
255 | 322 | ||
256 | - | func | |
323 | + | func bz (bA,aL,bB,bC,aC,M,bD,bE,bF) = makeString([bA, aL, bB, bC, aC, M, if ((bD == "")) | |
257 | 324 | then "" | |
258 | - | else | |
325 | + | else bD, bE, bF], "_") | |
259 | 326 | ||
260 | 327 | ||
261 | - | func | |
328 | + | func bG (bA,aL,bB,bC,aC,M,bD,bE,bF) = bz(bA, aL, bB, toString(bC), toString(aC), toString(M), bD, toString(bE), toString(bF)) | |
262 | 329 | ||
263 | 330 | ||
264 | - | func | |
265 | - | let | |
266 | - | if ( | |
267 | - | then ( | |
268 | - | else | |
331 | + | func bH (bI,bA,bd,bJ,bE,bF) = { | |
332 | + | let bH = bz(bA, bI[aa], bI[ab], bI[ac], bI[ad], bI[ae], bd, toString(bE), toString(bF)) | |
333 | + | if (bJ) | |
334 | + | then (bH + "_TIMEOUT") | |
335 | + | else bH | |
269 | 336 | } | |
270 | 337 | ||
271 | 338 | ||
272 | - | func | |
273 | - | let | |
274 | - | if ($isInstanceOf( | |
339 | + | func bK (aF) = split({ | |
340 | + | let av = getString(this, aF) | |
341 | + | if ($isInstanceOf(av, "String")) | |
275 | 342 | then { | |
276 | - | let | |
277 | - | | |
343 | + | let bL = av | |
344 | + | bL | |
278 | 345 | } | |
279 | - | else throw((("Game: " + | |
346 | + | else throw((("Game: " + aF) + " not found.")) | |
280 | 347 | }, "_") | |
281 | 348 | ||
282 | 349 | ||
283 | - | @Callable( | |
284 | - | func constructorV1 ( | |
350 | + | @Callable(aW) | |
351 | + | func constructorV1 (bM,bN,bO,bP) = if ((aW.caller != this)) | |
285 | 352 | then throw("not authorized") | |
286 | 353 | else { | |
287 | - | func | |
288 | - | let | |
289 | - | if ((size( | |
354 | + | func bQ (x,bR) = { | |
355 | + | let bS = split(bR, ":") | |
356 | + | if ((size(bS) != 3)) | |
290 | 357 | then throw("Invalid asset record") | |
291 | - | else $Tuple3(( | |
358 | + | else $Tuple3((x._1 :+ bS[O]), (x._2 :+ bS[P]), (x._3 :+ bS[Q])) | |
292 | 359 | } | |
293 | 360 | ||
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | func | |
299 | - | then | |
300 | - | else | |
361 | + | let bT = { | |
362 | + | let z = split_4C(bP, "_") | |
363 | + | let A = size(z) | |
364 | + | let B = $Tuple3(nil, nil, nil) | |
365 | + | func C (D,E) = if ((E >= A)) | |
366 | + | then D | |
367 | + | else bQ(D, z[E]) | |
301 | 368 | ||
302 | - | func | |
303 | - | then | |
369 | + | func F (D,E) = if ((E >= A)) | |
370 | + | then D | |
304 | 371 | else throw("List size exceeds 10") | |
305 | 372 | ||
306 | - | | |
373 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
307 | 374 | } | |
308 | - | [StringEntry(p, | |
375 | + | [StringEntry(o, bM), StringEntry(p, bN), IntegerEntry(q, bO), StringEntry(l, makeString_2C(bT._1, a)), StringEntry(m, makeString(bT._2, a)), StringEntry(n, makeString(bT._3, a))] | |
309 | 376 | } | |
310 | 377 | ||
311 | 378 | ||
312 | 379 | ||
313 | - | @Callable( | |
314 | - | func maintenance ( | |
380 | + | @Callable(aW) | |
381 | + | func maintenance (bU) = if ((aW.caller != ak)) | |
315 | 382 | then throw("not authorized") | |
316 | - | else [BooleanEntry( | |
383 | + | else [BooleanEntry(s, bU)] | |
317 | 384 | ||
318 | 385 | ||
319 | 386 | ||
320 | - | @Callable( | |
321 | - | func bet ( | |
387 | + | @Callable(aW) | |
388 | + | func bet (aL) = if (valueOrElse(getBoolean(s), false)) | |
322 | 389 | then throw("Game is stopped for maintenence") | |
323 | 390 | else { | |
324 | - | let | |
325 | - | if ((1 >= size( | |
391 | + | let aF = toBase58String(aW.transactionId) | |
392 | + | if ((1 >= size(aW.payments))) | |
326 | 393 | then throw("2 payments must be attached") | |
327 | - | else if (isDefined(getString(this, | |
328 | - | then throw((("Bet for: " + | |
394 | + | else if (isDefined(getString(this, aF))) | |
395 | + | then throw((("Bet for: " + aF) + " was already made.")) | |
329 | 396 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | if (isDefined( | |
397 | + | let bV = value(aW.payments[0]) | |
398 | + | let bW = value(aW.payments[1]) | |
399 | + | if (isDefined(bW.assetId)) | |
333 | 400 | then throw("feePmt (2nd payment) assetId must be in Waves") | |
334 | - | else if (( | |
401 | + | else if ((N > bW.amount)) | |
335 | 402 | then throw("feePmt (2nd payment) must be >= 0.005 Waves") | |
336 | 403 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | [IntegerEntry( | |
404 | + | let ay = at(bV.assetId) | |
405 | + | let aK = aG(ay) | |
406 | + | let bX = bW.amount | |
407 | + | let aC = aI(bV.amount, aK, aL) | |
408 | + | let bB = toBase58String(aW.callerPublicKey) | |
409 | + | let bY = bG(af, aL, bB, height, aC, aK, "", -1, -1) | |
410 | + | [IntegerEntry(L(aK), aB(aC, aK)), aq(r), StringEntry(aF, bY), ScriptTransfer(ak, bX, bW.assetId)] | |
344 | 411 | } | |
345 | 412 | } | |
346 | 413 | } | |
347 | 414 | ||
348 | 415 | ||
349 | 416 | ||
350 | - | @Callable( | |
351 | - | func withdraw ( | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | if (( | |
417 | + | @Callable(aW) | |
418 | + | func withdraw (aF,aT) = { | |
419 | + | let bY = bK(aF) | |
420 | + | let bZ = bY[Z] | |
421 | + | let aL = bY[aa] | |
422 | + | let bC = parseIntValue(bY[ac]) | |
423 | + | let aC = parseIntValue(bY[ad]) | |
424 | + | let M = parseIntValue(bY[ae]) | |
425 | + | let bB = bY[ab] | |
426 | + | let ca = addressFromPublicKey(fromBase58String(bB)) | |
427 | + | if ((bZ != af)) | |
361 | 428 | then throw("Invalid game state for passed gameId") | |
362 | - | else if (( | |
429 | + | else if ((aW.caller != ak)) | |
363 | 430 | then throw("Regular withdraw can be done by server only") | |
364 | 431 | else { | |
365 | - | let bh = ((height - bc) > ao) | |
366 | - | let bA = if (bh) | |
367 | - | then take(aN, 1) | |
368 | - | else aR(w, aS) | |
369 | - | let bB = aV(aN, bA) | |
370 | - | let bC = if (bB) | |
371 | - | then aj | |
372 | - | else ak | |
373 | - | let bD = bf(bx, bC, bA, bh) | |
374 | - | ([StringEntry(w, bD), aH(w, P, aF)] ++ (if (bB) | |
375 | - | then [ScriptTransfer(bz, aF, aA(J[P]))] | |
376 | - | else [StringEntry(v(w), "500_280")])) | |
432 | + | let bJ = ((height - bC) > al) | |
433 | + | let cb = if (bJ) | |
434 | + | then take(aL, 1) | |
435 | + | else bu(aF, aT) | |
436 | + | let cc = bw(aL, cb) | |
437 | + | let cd = if (cc) | |
438 | + | then ag | |
439 | + | else ah | |
440 | + | let ce = if (cc) | |
441 | + | then [-(aR), -(aR)] | |
442 | + | else aS(aF, aT) | |
443 | + | let cf = bH(bY, cd, cb, bJ, (ce[0] / aR), (ce[1] / aR)) | |
444 | + | ([StringEntry(aF, cf), aE(aF, M, aC)] ++ (if (cc) | |
445 | + | then [ScriptTransfer(ca, aC, ax(G[M]))] | |
446 | + | else nil)) | |
377 | 447 | } | |
378 | 448 | } | |
379 | 449 | ||
380 | 450 | ||
381 | - | @Verifier( | |
382 | - | func | |
451 | + | @Verifier(cg) | |
452 | + | func ch () = if (sigVerify(cg.bodyBytes, cg.proofs[0], cg.senderPublicKey)) | |
383 | 453 | then { | |
384 | - | let | |
385 | - | if ($isInstanceOf( | |
454 | + | let av = cg | |
455 | + | if ($isInstanceOf(av, "TransferTransaction")) | |
386 | 456 | then { | |
387 | - | let | |
388 | - | let | |
389 | - | (( | |
457 | + | let ci = av | |
458 | + | let M = aG(at(ci.assetId)) | |
459 | + | ((az(ci.assetId) - ci.amount) >= am(L(M), 0)) | |
390 | 460 | } | |
391 | - | else if ($isInstanceOf( | |
461 | + | else if ($isInstanceOf(av, "SetScriptTransaction")) | |
392 | 462 | then { | |
393 | - | let | |
394 | - | func | |
395 | - | then ( | |
463 | + | let cj = av | |
464 | + | func ck (x,cl) = if (x) | |
465 | + | then (am(J(cl), 0) == 0) | |
396 | 466 | else false | |
397 | 467 | ||
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | func | |
402 | - | then | |
403 | - | else | |
468 | + | let z = G | |
469 | + | let A = size(z) | |
470 | + | let B = true | |
471 | + | func C (D,E) = if ((E >= A)) | |
472 | + | then D | |
473 | + | else ck(D, z[E]) | |
404 | 474 | ||
405 | - | func | |
406 | - | then | |
475 | + | func F (D,E) = if ((E >= A)) | |
476 | + | then D | |
407 | 477 | else throw("List size exceeds 10") | |
408 | 478 | ||
409 | - | | |
479 | + | F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
410 | 480 | } | |
411 | - | else false | |
481 | + | else if ($isInstanceOf(av, "InvokeScriptTransaction")) | |
482 | + | then { | |
483 | + | let cm = av | |
484 | + | if ((cm.dApp == this)) | |
485 | + | then (cm.function == "constructorV1") | |
486 | + | else false | |
487 | + | } | |
488 | + | else false | |
412 | 489 | } | |
413 | 490 | else false | |
414 | 491 |
github/deemru/w8io/169f3d6 138.91 ms ◑