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:BgIaCAISBgoECAgBCBIDCgEEEgMKAQgSBAoCCAJGAANTRVACAl9fAAdXQVZFU0lEAQQTq9kzAAZXQVZFU0QAgMLXLwAJR0FNRV9OQU1FAglYbWFzIFRyZWUADFJBTkRPTV9SQU5HRQAFAAhOVU1fQkVUUwABAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQC5CQIJAMwIAgIKbWFuZGF0b3J5IAkAzAgCCQClCAEFB2FkZHJlc3MJAMwIAgIBLgkAzAgCBQNrZXkJAMwIAgIPIGlzIG5vdCBkZWZpbmVkBQNuaWwCAAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAg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HJG1hdGNoMAoBB2NoZWNrZXICA2FjYwVhc3NldAMFA2FjYwkAAAIJAQhnZXRJbnRPcgIJARhrZXlSZXNlcnZhdGlvbkJ5QXNzZXRTdHIBBQVhc3NldAAAAAAHCgACJGwFBkFTU0VUUwoAAiRzCQCQAwEFAiRsCgAFJGFjYzAGCgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQdjaGVja2VyAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhRMaXN0IHNpemUgZXhjZWVkcyAxMAkBBSRmMF8yAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgkBBSRmMF8xAgUFJGFjYzAAAAABAAIAAwAEAAUABgAHAAgACQAKAwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpdHgFByRtYXRjaDADCQAAAggFA2l0eARkQXBwBQR0aGlzCQAAAggFA2l0eAhmdW5jdGlvbgINY29uc3RydWN0b3JWMQcHBwHq5S4=", "height": 2883744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9pLrAG7Mx534ypsMBVJRpL2Deo2cMyNdBajZsjcooiPM Next: 2fKnLFXeMRi15d4aYSuwwSv34kWdRbmGpWC3qgVUyJf5 Diff:
OldNewDifferences
1313
1414 let f = 1
1515
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"], ""))
1917
2018
21-func k (i,j) = valueOrErrorMessage(getInteger(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
19+func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
2220
2321
24-func l (i,j) = valueOrErrorMessage(getBoolean(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
22+func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
2523
2624
27-let m = "%s%s__cfg__allowedAssets"
25+let l = "%s%s__cfg__allowedAssets"
2826
29-let n = "%s%s__cfg__assetsDecimals"
27+let m = "%s%s__cfg__assetsDecimals"
3028
31-let o = "%s%s__cfg__assetsBetDividers"
29+let n = "%s%s__cfg__assetsBetDividers"
3230
33-let p = "%s%s__cfg__rsaPublic64"
31+let o = "%s%s__cfg__rsaPublic64"
3432
35-let q = "%s%s__cfg__benzAddress"
33+let p = "%s%s__cfg__benzAddress"
3634
37-let r = "%s%s__cfg__withdrawTimeFrame"
35+let q = "%s%s__cfg__withdrawTimeFrame"
3836
39-let s = "%s%s__runtime__gameNum"
37+let r = "%s%s__runtime__gameNum"
4038
41-let t = "%s%s__runtime__contractIsBlocked"
39+let s = "%s%s__runtime__contractIsBlocked"
4240
43-let u = "%s%s__runtime__reservedAmounts"
41+let t = "%s%s__runtime__reservedAmounts"
4442
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))
4646
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])
4753
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
6156 else throw("List size exceeds 10")
6257
63- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
58+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
6459 }
6560
6661
67-let J = split(h(this, m), a)
62+let G = split(g(this, l), a)
6863
69-let K = x(n)
64+let H = u(m)
7065
71-let L = x(o)
66+let I = u(n)
7267
73-func M (N) = ("$RESERVED_AMOUNT_" + N)
68+func J (K) = ("$RESERVED_AMOUNT_" + K)
7469
7570
76-func O (P) = M(J[P])
71+func L (M) = J(G[M])
7772
7873
79-let Q = ((5 * c) / 1000)
74+let N = ((5 * c) / 1000)
8075
81-let R = 0
76+let O = 0
8277
83-let S = 1
78+let P = 1
8479
85-let T = 2
80+let Q = 2
8681
87-let U = 1
82+let R = 1
8883
89-let V = 2
84+let S = 2
9085
91-let W = 4
86+let T = 4
9287
93-let X = 8
88+let U = 8
9489
95-let Y = 14
90+let V = 14
9691
97-let Z = 10000
92+let W = 10000
9893
99-let aa = 250000
94+let X = 250000
10095
101-let ab = [V]
96+let Y = [S]
10297
103-let ac = 0
98+let Z = 0
10499
105-let ad = 1
100+let aa = 1
106101
107-let ae = 2
102+let ab = 2
108103
109-let af = 3
104+let ac = 3
110105
111-let ag = 4
106+let ad = 4
112107
113-let ah = 5
108+let ae = 5
114109
115-let ai = "SUBMITTED"
110+let af = "SUBMITTED"
116111
117-let aj = "WON"
112+let ag = "WON"
118113
119-let ak = "LOST"
114+let ah = "LOST"
120115
121-func al (j) = valueOrErrorMessage(getString(this, j), (j + " key is not specified in this.state"))
116+func ai (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state"))
122117
123118
124-let am = fromBase64String(al(p))
119+let aj = fromBase64String(ai(o))
125120
126-let an = addressFromStringValue(al(q))
121+let ak = addressFromStringValue(ai(p))
127122
128-let ao = valueOrElse(getInteger(this, r), 7200)
123+let al = valueOrElse(getInteger(this, q), 7200)
129124
130-func ap (j,aq) = if (isDefined(getInteger(j)))
131- then getIntegerValue(j)
132- else aq
125+func am (i,an) = if (isDefined(getInteger(i)))
126+ then getIntegerValue(i)
127+ else an
133128
134129
135-func ar (j,as) = IntegerEntry(j, as)
130+func ao (i,ap) = IntegerEntry(i, ap)
136131
137132
138-func at (j) = ar(j, (ap(j, -1) + 1))
133+func aq (i) = ao(i, (am(i, -1) + 1))
139134
140135
141-func au (j,av) = ar(j, (ap(j, 0) + av))
136+func ar (i,as) = ao(i, (am(i, 0) + as))
142137
143138
144-func aw (ax) = {
145- let ay = ax
146- if ($isInstanceOf(ay, "ByteVector"))
139+func at (au) = {
140+ let av = au
141+ if ($isInstanceOf(av, "ByteVector"))
147142 then {
148- let az = ay
149- toBase58String(az)
143+ let aw = av
144+ toBase58String(aw)
150145 }
151146 else "WAVES"
152147 }
153148
154149
155-func aA (aB) = if ((aB == "WAVES"))
150+func ax (ay) = if ((ay == "WAVES"))
156151 then unit
157- else fromBase58String(aB)
152+ else fromBase58String(ay)
158153
159154
160-func aC (ax) = {
161- let ay = ax
162- if ($isInstanceOf(ay, "ByteVector"))
155+func az (au) = {
156+ let av = au
157+ if ($isInstanceOf(av, "ByteVector"))
163158 then {
164- let aD = ay
165- assetBalance(this, aD)
159+ let aA = av
160+ assetBalance(this, aA)
166161 }
167162 else wavesBalance(this).available
168163 }
169164
170165
171-func aE (aF,P) = {
172- let aB = J[P]
173- let aG = (ap(O(P), 0) + aF)
174- if ((aG > aC(aA(aB))))
166+func aB (aC,M) = {
167+ let ay = G[M]
168+ let aD = (am(L(M), 0) + aC)
169+ if ((aD > az(ax(ay))))
175170 then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety."))
176- else aG
171+ else aD
177172 }
178173
179174
180-func aH (w,P,aF) = if ((0 > (ap(O(P), 0) - aF)))
175+func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC)))
181176 then throw((("Invalid " + d) + " account state - reserved amount is less than 0"))
182- else au(O(P), -(aF))
177+ else ar(L(M), -(aC))
183178
184179
185-func aI (aB) = {
186- let aJ = indexOf(J, aB)
187- if (!(isDefined(aJ)))
180+func aG (ay) = {
181+ let aH = indexOf(G, ay)
182+ if (!(isDefined(aH)))
188183 then throw("Invalid payment asset")
189- else value(aJ)
184+ else value(aH)
190185 }
191186
192187
193-func aK (aL,aM,aN) = {
194- let aO = size(aN)
195- func aP (y,aQ) = if (y)
188+func aI (aJ,aK,aL) = {
189+ let aM = size(aL)
190+ func aN (v,aO) = if (v)
196191 then true
197- else (aL == ((aQ * K[aM]) / L[aM]))
192+ else (aJ == ((aO * H[aK]) / I[aK]))
198193
199194 if (!({
200- let C = ab
201- let D = size(C)
202- let E = false
203- func F (G,H) = if ((H >= D))
204- then G
205- else aP(G, C[H])
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])
206201
207- func I (G,H) = if ((H >= D))
208- then G
202+ func F (D,E) = if ((E >= A))
203+ then D
209204 else throw("List size exceeds 5")
210205
211- I(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5)
206+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
212207 }))
213208 then throw("Bet amount is not valid")
214- else if ((parseInt(aN) == unit))
209+ else if ((parseInt(aL) == unit))
215210 then throw("Invalid player's choice")
216- else if ((aO != f))
211+ else if ((aM != f))
217212 then throw("Invalid length of player's choice")
218- else fraction(aL, aa, Z)
213+ else fraction(aJ, X, W)
219214 }
220215
221216
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))
225292 then throw("Invalid RSA signature")
226293 else {
227- let aU = (toInt(sha256(aS)) % e)
228- toString((aU + 1))
294+ let bd = (toInt(sha256(aT)) % e)
295+ toString((bd + 1))
229296 }
230297 }
231298
232299
233-func aV (aN,aW) = {
234- let aX = size(aN)
235- func aY (y,aQ) = if (y)
300+func bw (aL,bx) = {
301+ let by = size(aL)
302+ func be (v,aO) = if (v)
236303 then true
237- else if ((aX >= aQ))
238- then (take(drop(aN, (aQ - 1)), 1) == aW)
304+ else if ((by >= aO))
305+ then (take(drop(aL, (aO - 1)), 1) == bx)
239306 else false
240307
241- let C = [1, 2, 3, 4, 5]
242- let D = size(C)
243- let E = false
244- func F (G,H) = if ((H >= D))
245- then G
246- else aY(G, C[H])
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])
247314
248- func I (G,H) = if ((H >= D))
249- then G
315+ func F (D,E) = if ((E >= A))
316+ then D
250317 else throw("List size exceeds 5")
251318
252- I(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5)
319+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
253320 }
254321
255322
256-func aZ (ba,aN,bb,bc,aF,P,bd) = makeString([ba, aN, bb, bc, aF, P, if ((bd == ""))
323+func bz (bA,aL,bB,bC,aC,M,bD,bE,bF) = makeString([bA, aL, bB, bC, aC, M, if ((bD == ""))
257324 then ""
258- else bd], "_")
325+ else bD, bE, bF], "_")
259326
260327
261-func be (ba,aN,bb,bc,aF,P,bd) = aZ(ba, aN, bb, toString(bc), toString(aF), toString(P), bd)
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))
262329
263330
264-func bf (bg,ba,aU,bh) = {
265- let bf = aZ(ba, bg[ad], bg[ae], bg[af], bg[ag], bg[ah], aU)
266- if (bh)
267- then (bf + "_TIMEOUT")
268- else bf
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
269336 }
270337
271338
272-func bi (w) = split({
273- let ay = getString(this, w)
274- if ($isInstanceOf(ay, "String"))
339+func bK (aF) = split({
340+ let av = getString(this, aF)
341+ if ($isInstanceOf(av, "String"))
275342 then {
276- let bj = ay
277- bj
343+ let bL = av
344+ bL
278345 }
279- else throw((("Game: " + w) + " not found."))
346+ else throw((("Game: " + aF) + " not found."))
280347 }, "_")
281348
282349
283-@Callable(bk)
284-func constructorV1 (bl,bm,bn,bo) = if ((bk.caller != an))
350+@Callable(aW)
351+func constructorV1 (bM,bN,bO,bP) = if ((aW.caller != this))
285352 then throw("not authorized")
286353 else {
287- func bp (A,bq) = {
288- let br = split(bq, ":")
289- if ((size(br) != 3))
354+ func bQ (x,bR) = {
355+ let bS = split(bR, ":")
356+ if ((size(bS) != 3))
290357 then throw("Invalid asset record")
291- else $Tuple3((A._1 :+ br[R]), (A._2 :+ br[S]), (A._3 :+ br[T]))
358+ else $Tuple3((x._1 :+ bS[O]), (x._2 :+ bS[P]), (x._3 :+ bS[Q]))
292359 }
293360
294- let bs = {
295- let C = split_4C(bo, "_")
296- let D = size(C)
297- let E = $Tuple3(nil, nil, nil)
298- func F (G,H) = if ((H >= D))
299- then G
300- else bp(G, C[H])
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])
301368
302- func I (G,H) = if ((H >= D))
303- then G
369+ func F (D,E) = if ((E >= A))
370+ then D
304371 else throw("List size exceeds 10")
305372
306- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
373+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
307374 }
308-[StringEntry(p, bl), StringEntry(q, bm), IntegerEntry(r, bn), StringEntry(m, makeString_2C(bs._1, a)), StringEntry(n, makeString(bs._2, a)), StringEntry(o, makeString(bs._3, a))]
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))]
309376 }
310377
311378
312379
313-@Callable(bk)
314-func maintenance (bt) = if ((bk.caller != an))
380+@Callable(aW)
381+func maintenance (bU) = if ((aW.caller != ak))
315382 then throw("not authorized")
316- else [BooleanEntry(t, bt)]
383+ else [BooleanEntry(s, bU)]
317384
318385
319386
320-@Callable(bk)
321-func bet (aN) = if (valueOrElse(getBoolean(t), false))
387+@Callable(aW)
388+func bet (aL) = if (valueOrElse(getBoolean(s), false))
322389 then throw("Game is stopped for maintenence")
323390 else {
324- let w = toBase58String(bk.transactionId)
325- if ((1 >= size(bk.payments)))
391+ let aF = toBase58String(aW.transactionId)
392+ if ((1 >= size(aW.payments)))
326393 then throw("2 payments must be attached")
327- else if (isDefined(getString(this, w)))
328- then throw((("Bet for: " + w) + " was already made."))
394+ else if (isDefined(getString(this, aF)))
395+ then throw((("Bet for: " + aF) + " was already made."))
329396 else {
330- let bu = value(bk.payments[0])
331- let bv = value(bk.payments[1])
332- if (isDefined(bv.assetId))
397+ let bV = value(aW.payments[0])
398+ let bW = value(aW.payments[1])
399+ if (isDefined(bW.assetId))
333400 then throw("feePmt (2nd payment) assetId must be in Waves")
334- else if ((Q > bv.amount))
401+ else if ((N > bW.amount))
335402 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
336403 else {
337- let aB = aw(bu.assetId)
338- let aM = aI(aB)
339- let bw = bv.amount
340- let aF = aK(bu.amount, aM, aN)
341- let bb = toBase58String(bk.callerPublicKey)
342- let bx = be(ai, aN, bb, height, aF, aM, "")
343-[IntegerEntry(O(aM), aE(aF, aM)), at(s), StringEntry(w, bx), ScriptTransfer(an, bw, bv.assetId)]
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)]
344411 }
345412 }
346413 }
347414
348415
349416
350-@Callable(bk)
351-func withdraw (w,aS) = {
352- let bx = bi(w)
353- let by = bx[ac]
354- let aN = bx[ad]
355- let bc = parseIntValue(bx[af])
356- let aF = parseIntValue(bx[ag])
357- let P = parseIntValue(bx[ah])
358- let bb = bx[ae]
359- let bz = addressFromPublicKey(fromBase58String(bb))
360- if ((by != ai))
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))
361428 then throw("Invalid game state for passed gameId")
362- else if ((bk.caller != an))
429+ else if ((aW.caller != ak))
363430 then throw("Regular withdraw can be done by server only")
364431 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))
377447 }
378448 }
379449
380450
381-@Verifier(bE)
382-func bF () = if (sigVerify(bE.bodyBytes, bE.proofs[0], bE.senderPublicKey))
451+@Verifier(cg)
452+func ch () = if (sigVerify(cg.bodyBytes, cg.proofs[0], cg.senderPublicKey))
383453 then {
384- let ay = bE
385- if ($isInstanceOf(ay, "TransferTransaction"))
454+ let av = cg
455+ if ($isInstanceOf(av, "TransferTransaction"))
386456 then {
387- let bG = ay
388- let P = aI(aw(bG.assetId))
389- ((aC(bG.assetId) - bG.amount) >= ap(O(P), 0))
457+ let ci = av
458+ let M = aG(at(ci.assetId))
459+ ((az(ci.assetId) - ci.amount) >= am(L(M), 0))
390460 }
391- else if ($isInstanceOf(ay, "SetScriptTransaction"))
461+ else if ($isInstanceOf(av, "SetScriptTransaction"))
392462 then {
393- let bH = ay
394- func bI (A,bJ) = if (A)
395- then (ap(M(bJ), 0) == 0)
463+ let cj = av
464+ func ck (x,cl) = if (x)
465+ then (am(J(cl), 0) == 0)
396466 else false
397467
398- let C = J
399- let D = size(C)
400- let E = true
401- func F (G,H) = if ((H >= D))
402- then G
403- else bI(G, C[H])
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])
404474
405- func I (G,H) = if ((H >= D))
406- then G
475+ func F (D,E) = if ((E >= A))
476+ then D
407477 else throw("List size exceeds 10")
408478
409- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
479+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
410480 }
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
412489 }
413490 else false
414491
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = base58'WAVES'
77
88 let c = 100000000
99
1010 let d = "Xmas Tree"
1111
1212 let e = 5
1313
1414 let f = 1
1515
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"], ""))
1917
2018
21-func k (i,j) = valueOrErrorMessage(getInteger(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
19+func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
2220
2321
24-func l (i,j) = valueOrErrorMessage(getBoolean(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
22+func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
2523
2624
27-let m = "%s%s__cfg__allowedAssets"
25+let l = "%s%s__cfg__allowedAssets"
2826
29-let n = "%s%s__cfg__assetsDecimals"
27+let m = "%s%s__cfg__assetsDecimals"
3028
31-let o = "%s%s__cfg__assetsBetDividers"
29+let n = "%s%s__cfg__assetsBetDividers"
3230
33-let p = "%s%s__cfg__rsaPublic64"
31+let o = "%s%s__cfg__rsaPublic64"
3432
35-let q = "%s%s__cfg__benzAddress"
33+let p = "%s%s__cfg__benzAddress"
3634
37-let r = "%s%s__cfg__withdrawTimeFrame"
35+let q = "%s%s__cfg__withdrawTimeFrame"
3836
39-let s = "%s%s__runtime__gameNum"
37+let r = "%s%s__runtime__gameNum"
4038
41-let t = "%s%s__runtime__contractIsBlocked"
39+let s = "%s%s__runtime__contractIsBlocked"
4240
43-let u = "%s%s__runtime__reservedAmounts"
41+let t = "%s%s__runtime__reservedAmounts"
4442
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))
4646
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])
4753
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
6156 else throw("List size exceeds 10")
6257
63- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
58+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
6459 }
6560
6661
67-let J = split(h(this, m), a)
62+let G = split(g(this, l), a)
6863
69-let K = x(n)
64+let H = u(m)
7065
71-let L = x(o)
66+let I = u(n)
7267
73-func M (N) = ("$RESERVED_AMOUNT_" + N)
68+func J (K) = ("$RESERVED_AMOUNT_" + K)
7469
7570
76-func O (P) = M(J[P])
71+func L (M) = J(G[M])
7772
7873
79-let Q = ((5 * c) / 1000)
74+let N = ((5 * c) / 1000)
8075
81-let R = 0
76+let O = 0
8277
83-let S = 1
78+let P = 1
8479
85-let T = 2
80+let Q = 2
8681
87-let U = 1
82+let R = 1
8883
89-let V = 2
84+let S = 2
9085
91-let W = 4
86+let T = 4
9287
93-let X = 8
88+let U = 8
9489
95-let Y = 14
90+let V = 14
9691
97-let Z = 10000
92+let W = 10000
9893
99-let aa = 250000
94+let X = 250000
10095
101-let ab = [V]
96+let Y = [S]
10297
103-let ac = 0
98+let Z = 0
10499
105-let ad = 1
100+let aa = 1
106101
107-let ae = 2
102+let ab = 2
108103
109-let af = 3
104+let ac = 3
110105
111-let ag = 4
106+let ad = 4
112107
113-let ah = 5
108+let ae = 5
114109
115-let ai = "SUBMITTED"
110+let af = "SUBMITTED"
116111
117-let aj = "WON"
112+let ag = "WON"
118113
119-let ak = "LOST"
114+let ah = "LOST"
120115
121-func al (j) = valueOrErrorMessage(getString(this, j), (j + " key is not specified in this.state"))
116+func ai (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state"))
122117
123118
124-let am = fromBase64String(al(p))
119+let aj = fromBase64String(ai(o))
125120
126-let an = addressFromStringValue(al(q))
121+let ak = addressFromStringValue(ai(p))
127122
128-let ao = valueOrElse(getInteger(this, r), 7200)
123+let al = valueOrElse(getInteger(this, q), 7200)
129124
130-func ap (j,aq) = if (isDefined(getInteger(j)))
131- then getIntegerValue(j)
132- else aq
125+func am (i,an) = if (isDefined(getInteger(i)))
126+ then getIntegerValue(i)
127+ else an
133128
134129
135-func ar (j,as) = IntegerEntry(j, as)
130+func ao (i,ap) = IntegerEntry(i, ap)
136131
137132
138-func at (j) = ar(j, (ap(j, -1) + 1))
133+func aq (i) = ao(i, (am(i, -1) + 1))
139134
140135
141-func au (j,av) = ar(j, (ap(j, 0) + av))
136+func ar (i,as) = ao(i, (am(i, 0) + as))
142137
143138
144-func aw (ax) = {
145- let ay = ax
146- if ($isInstanceOf(ay, "ByteVector"))
139+func at (au) = {
140+ let av = au
141+ if ($isInstanceOf(av, "ByteVector"))
147142 then {
148- let az = ay
149- toBase58String(az)
143+ let aw = av
144+ toBase58String(aw)
150145 }
151146 else "WAVES"
152147 }
153148
154149
155-func aA (aB) = if ((aB == "WAVES"))
150+func ax (ay) = if ((ay == "WAVES"))
156151 then unit
157- else fromBase58String(aB)
152+ else fromBase58String(ay)
158153
159154
160-func aC (ax) = {
161- let ay = ax
162- if ($isInstanceOf(ay, "ByteVector"))
155+func az (au) = {
156+ let av = au
157+ if ($isInstanceOf(av, "ByteVector"))
163158 then {
164- let aD = ay
165- assetBalance(this, aD)
159+ let aA = av
160+ assetBalance(this, aA)
166161 }
167162 else wavesBalance(this).available
168163 }
169164
170165
171-func aE (aF,P) = {
172- let aB = J[P]
173- let aG = (ap(O(P), 0) + aF)
174- if ((aG > aC(aA(aB))))
166+func aB (aC,M) = {
167+ let ay = G[M]
168+ let aD = (am(L(M), 0) + aC)
169+ if ((aD > az(ax(ay))))
175170 then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety."))
176- else aG
171+ else aD
177172 }
178173
179174
180-func aH (w,P,aF) = if ((0 > (ap(O(P), 0) - aF)))
175+func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC)))
181176 then throw((("Invalid " + d) + " account state - reserved amount is less than 0"))
182- else au(O(P), -(aF))
177+ else ar(L(M), -(aC))
183178
184179
185-func aI (aB) = {
186- let aJ = indexOf(J, aB)
187- if (!(isDefined(aJ)))
180+func aG (ay) = {
181+ let aH = indexOf(G, ay)
182+ if (!(isDefined(aH)))
188183 then throw("Invalid payment asset")
189- else value(aJ)
184+ else value(aH)
190185 }
191186
192187
193-func aK (aL,aM,aN) = {
194- let aO = size(aN)
195- func aP (y,aQ) = if (y)
188+func aI (aJ,aK,aL) = {
189+ let aM = size(aL)
190+ func aN (v,aO) = if (v)
196191 then true
197- else (aL == ((aQ * K[aM]) / L[aM]))
192+ else (aJ == ((aO * H[aK]) / I[aK]))
198193
199194 if (!({
200- let C = ab
201- let D = size(C)
202- let E = false
203- func F (G,H) = if ((H >= D))
204- then G
205- else aP(G, C[H])
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])
206201
207- func I (G,H) = if ((H >= D))
208- then G
202+ func F (D,E) = if ((E >= A))
203+ then D
209204 else throw("List size exceeds 5")
210205
211- I(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5)
206+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
212207 }))
213208 then throw("Bet amount is not valid")
214- else if ((parseInt(aN) == unit))
209+ else if ((parseInt(aL) == unit))
215210 then throw("Invalid player's choice")
216- else if ((aO != f))
211+ else if ((aM != f))
217212 then throw("Invalid length of player's choice")
218- else fraction(aL, aa, Z)
213+ else fraction(aJ, X, W)
219214 }
220215
221216
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))
225292 then throw("Invalid RSA signature")
226293 else {
227- let aU = (toInt(sha256(aS)) % e)
228- toString((aU + 1))
294+ let bd = (toInt(sha256(aT)) % e)
295+ toString((bd + 1))
229296 }
230297 }
231298
232299
233-func aV (aN,aW) = {
234- let aX = size(aN)
235- func aY (y,aQ) = if (y)
300+func bw (aL,bx) = {
301+ let by = size(aL)
302+ func be (v,aO) = if (v)
236303 then true
237- else if ((aX >= aQ))
238- then (take(drop(aN, (aQ - 1)), 1) == aW)
304+ else if ((by >= aO))
305+ then (take(drop(aL, (aO - 1)), 1) == bx)
239306 else false
240307
241- let C = [1, 2, 3, 4, 5]
242- let D = size(C)
243- let E = false
244- func F (G,H) = if ((H >= D))
245- then G
246- else aY(G, C[H])
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])
247314
248- func I (G,H) = if ((H >= D))
249- then G
315+ func F (D,E) = if ((E >= A))
316+ then D
250317 else throw("List size exceeds 5")
251318
252- I(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5)
319+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
253320 }
254321
255322
256-func aZ (ba,aN,bb,bc,aF,P,bd) = makeString([ba, aN, bb, bc, aF, P, if ((bd == ""))
323+func bz (bA,aL,bB,bC,aC,M,bD,bE,bF) = makeString([bA, aL, bB, bC, aC, M, if ((bD == ""))
257324 then ""
258- else bd], "_")
325+ else bD, bE, bF], "_")
259326
260327
261-func be (ba,aN,bb,bc,aF,P,bd) = aZ(ba, aN, bb, toString(bc), toString(aF), toString(P), bd)
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))
262329
263330
264-func bf (bg,ba,aU,bh) = {
265- let bf = aZ(ba, bg[ad], bg[ae], bg[af], bg[ag], bg[ah], aU)
266- if (bh)
267- then (bf + "_TIMEOUT")
268- else bf
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
269336 }
270337
271338
272-func bi (w) = split({
273- let ay = getString(this, w)
274- if ($isInstanceOf(ay, "String"))
339+func bK (aF) = split({
340+ let av = getString(this, aF)
341+ if ($isInstanceOf(av, "String"))
275342 then {
276- let bj = ay
277- bj
343+ let bL = av
344+ bL
278345 }
279- else throw((("Game: " + w) + " not found."))
346+ else throw((("Game: " + aF) + " not found."))
280347 }, "_")
281348
282349
283-@Callable(bk)
284-func constructorV1 (bl,bm,bn,bo) = if ((bk.caller != an))
350+@Callable(aW)
351+func constructorV1 (bM,bN,bO,bP) = if ((aW.caller != this))
285352 then throw("not authorized")
286353 else {
287- func bp (A,bq) = {
288- let br = split(bq, ":")
289- if ((size(br) != 3))
354+ func bQ (x,bR) = {
355+ let bS = split(bR, ":")
356+ if ((size(bS) != 3))
290357 then throw("Invalid asset record")
291- else $Tuple3((A._1 :+ br[R]), (A._2 :+ br[S]), (A._3 :+ br[T]))
358+ else $Tuple3((x._1 :+ bS[O]), (x._2 :+ bS[P]), (x._3 :+ bS[Q]))
292359 }
293360
294- let bs = {
295- let C = split_4C(bo, "_")
296- let D = size(C)
297- let E = $Tuple3(nil, nil, nil)
298- func F (G,H) = if ((H >= D))
299- then G
300- else bp(G, C[H])
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])
301368
302- func I (G,H) = if ((H >= D))
303- then G
369+ func F (D,E) = if ((E >= A))
370+ then D
304371 else throw("List size exceeds 10")
305372
306- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
373+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
307374 }
308-[StringEntry(p, bl), StringEntry(q, bm), IntegerEntry(r, bn), StringEntry(m, makeString_2C(bs._1, a)), StringEntry(n, makeString(bs._2, a)), StringEntry(o, makeString(bs._3, a))]
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))]
309376 }
310377
311378
312379
313-@Callable(bk)
314-func maintenance (bt) = if ((bk.caller != an))
380+@Callable(aW)
381+func maintenance (bU) = if ((aW.caller != ak))
315382 then throw("not authorized")
316- else [BooleanEntry(t, bt)]
383+ else [BooleanEntry(s, bU)]
317384
318385
319386
320-@Callable(bk)
321-func bet (aN) = if (valueOrElse(getBoolean(t), false))
387+@Callable(aW)
388+func bet (aL) = if (valueOrElse(getBoolean(s), false))
322389 then throw("Game is stopped for maintenence")
323390 else {
324- let w = toBase58String(bk.transactionId)
325- if ((1 >= size(bk.payments)))
391+ let aF = toBase58String(aW.transactionId)
392+ if ((1 >= size(aW.payments)))
326393 then throw("2 payments must be attached")
327- else if (isDefined(getString(this, w)))
328- then throw((("Bet for: " + w) + " was already made."))
394+ else if (isDefined(getString(this, aF)))
395+ then throw((("Bet for: " + aF) + " was already made."))
329396 else {
330- let bu = value(bk.payments[0])
331- let bv = value(bk.payments[1])
332- if (isDefined(bv.assetId))
397+ let bV = value(aW.payments[0])
398+ let bW = value(aW.payments[1])
399+ if (isDefined(bW.assetId))
333400 then throw("feePmt (2nd payment) assetId must be in Waves")
334- else if ((Q > bv.amount))
401+ else if ((N > bW.amount))
335402 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
336403 else {
337- let aB = aw(bu.assetId)
338- let aM = aI(aB)
339- let bw = bv.amount
340- let aF = aK(bu.amount, aM, aN)
341- let bb = toBase58String(bk.callerPublicKey)
342- let bx = be(ai, aN, bb, height, aF, aM, "")
343-[IntegerEntry(O(aM), aE(aF, aM)), at(s), StringEntry(w, bx), ScriptTransfer(an, bw, bv.assetId)]
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)]
344411 }
345412 }
346413 }
347414
348415
349416
350-@Callable(bk)
351-func withdraw (w,aS) = {
352- let bx = bi(w)
353- let by = bx[ac]
354- let aN = bx[ad]
355- let bc = parseIntValue(bx[af])
356- let aF = parseIntValue(bx[ag])
357- let P = parseIntValue(bx[ah])
358- let bb = bx[ae]
359- let bz = addressFromPublicKey(fromBase58String(bb))
360- if ((by != ai))
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))
361428 then throw("Invalid game state for passed gameId")
362- else if ((bk.caller != an))
429+ else if ((aW.caller != ak))
363430 then throw("Regular withdraw can be done by server only")
364431 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))
377447 }
378448 }
379449
380450
381-@Verifier(bE)
382-func bF () = if (sigVerify(bE.bodyBytes, bE.proofs[0], bE.senderPublicKey))
451+@Verifier(cg)
452+func ch () = if (sigVerify(cg.bodyBytes, cg.proofs[0], cg.senderPublicKey))
383453 then {
384- let ay = bE
385- if ($isInstanceOf(ay, "TransferTransaction"))
454+ let av = cg
455+ if ($isInstanceOf(av, "TransferTransaction"))
386456 then {
387- let bG = ay
388- let P = aI(aw(bG.assetId))
389- ((aC(bG.assetId) - bG.amount) >= ap(O(P), 0))
457+ let ci = av
458+ let M = aG(at(ci.assetId))
459+ ((az(ci.assetId) - ci.amount) >= am(L(M), 0))
390460 }
391- else if ($isInstanceOf(ay, "SetScriptTransaction"))
461+ else if ($isInstanceOf(av, "SetScriptTransaction"))
392462 then {
393- let bH = ay
394- func bI (A,bJ) = if (A)
395- then (ap(M(bJ), 0) == 0)
463+ let cj = av
464+ func ck (x,cl) = if (x)
465+ then (am(J(cl), 0) == 0)
396466 else false
397467
398- let C = J
399- let D = size(C)
400- let E = true
401- func F (G,H) = if ((H >= D))
402- then G
403- else bI(G, C[H])
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])
404474
405- func I (G,H) = if ((H >= D))
406- then G
475+ func F (D,E) = if ((E >= A))
476+ then D
407477 else throw("List size exceeds 10")
408478
409- I(F(F(F(F(F(F(F(F(F(F(E, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
479+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
410480 }
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
412489 }
413490 else false
414491

github/deemru/w8io/169f3d6 
138.91 ms