tx · DGsR1vDJrNaRA1WeRT65YhtvBeNefZrwUSMGXTQ1f4cU

3MyrsoUShtK8LVWE6mGVinCdwiJeedCtkvr:  -0.01400000 Waves

2023.11.28 13:36 [2863132] smart account 3MyrsoUShtK8LVWE6mGVinCdwiJeedCtkvr > SELF 0.00000000 Waves

{ "type": 13, "id": "DGsR1vDJrNaRA1WeRT65YhtvBeNefZrwUSMGXTQ1f4cU", "fee": 1400000, "feeAssetId": null, "timestamp": 1701167803265, "version": 1, "sender": "3MyrsoUShtK8LVWE6mGVinCdwiJeedCtkvr", "senderPublicKey": "53WfUfPHKFYj846Npe6Bu5indsxPueAsu9YWe8fnprXh", "proofs": [ "5c6URsJwZugGdwfdm4TagU3EwZp3JxF9Au1H1rySZ6A7BLtDkPqbdzmUyftrprU4VFF95pubZwZsRBn1ttz81Khc" ], "script": "base64:BgIaCAISBgoECAgBCBIDCgEEEgMKAQgSBAoCCAJCAANTRVACAl9fAAdXQVZFU0lEAQQTq9kzAAZXQVZFU0QAgMLXLwAJR0FNRV9OQU1FAg9DYXJkIG9mIHRoZSBEYXkADFJBTkRPTV9SQU5HRQAoAAhOVU1fQkVUUwABAAhXSU5fQ0FSRAkApAMBCQBlAgUMUkFORE9NX1JBTkdFAAEBDGdldFN0ck9yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJALkJAgkAzAgCAgptYW5kYXRvcnkgCQDMCAIJAKUIAQUHYWRkcmVzcwkAzAgCAgEuCQDMCAIFA2tleQkAzAgCAg8gaXMgbm90IGRlZmluZWQFA25pbAIAAQxnZXRJbnRPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQC5CQIJAMwIAgIKbWFuZGF0b3J5IAkAzAgCCQClCAEFB2FkZHJlc3MJAMwIAgIBLgkAzAgCBQNrZXkJAMwIAgIPIGlzI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3ICCQEYa2V5UmVzZXJ2YXRpb25CeUFzc2V0U3RyAQUFYXNzZXQAAAAABwoAAiRsBQZBU1NFVFMKAAIkcwkAkAMBBQIkbAoABSRhY2MwBgoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEHY2hlY2tlcgIFAiRhCQCRAwIFAiRsBQIkaQoBBSRmMF8yAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQACAQIUTGlzdCBzaXplIGV4Y2VlZHMgMTAJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgcHKYev3Q==", "chainId": 84, "height": 2863132, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6HkiJZhvmR393T8YxBmF85gjSsyRMGhGGpe1W1C2nAgF Next: GgxepTxMZteQCP5HtU6VQe9fehEdoMP5sgRr4BjqkuCw Diff:
OldNewDifferences
1313
1414 let f = 1
1515
16-func g (h,i) = valueOrErrorMessage(getString(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
16+let g = toString((e - 1))
17+
18+func h (i,j) = valueOrErrorMessage(getString(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
1719
1820
19-func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
21+func k (i,j) = valueOrErrorMessage(getInteger(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
2022
2123
22-func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
24+func l (i,j) = valueOrErrorMessage(getBoolean(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
2325
2426
25-let l = "%s%s__cfg__allowedAssets"
27+let m = "%s%s__cfg__allowedAssets"
2628
27-let m = "%s%s__cfg__assetsDecimals"
29+let n = "%s%s__cfg__assetsDecimals"
2830
29-let n = "%s%s__cfg__assetsBetDividers"
31+let o = "%s%s__cfg__assetsBetDividers"
3032
31-let o = "%s%s__cfg__rsaPublic64"
33+let p = "%s%s__cfg__rsaPublic64"
3234
33-let p = "%s%s__cfg__benzAddress"
35+let q = "%s%s__cfg__benzAddress"
3436
35-let q = "%s%s__cfg__withdrawTimeFrame"
37+let r = "%s%s__cfg__withdrawTimeFrame"
3638
37-let r = "%s%s__runtime__gameNum"
39+let s = "%s%s__runtime__gameNum"
3840
39-let s = "%s%s__runtime__contractIsBlocked"
41+let t = "%s%s__runtime__contractIsBlocked"
4042
41-func t (i) = {
42- let u = g(this, i)
43- func v (w,x) = (w :+ parseIntValue(x))
43+func u (j) = {
44+ let v = h(this, j)
45+ func w (x,y) = (x :+ parseIntValue(y))
4446
45- let y = split(u, a)
46- let z = size(y)
47- let A = nil
48- func B (C,D) = if ((D >= z))
49- then C
50- else v(C, y[D])
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])
5153
52- func E (C,D) = if ((D >= z))
53- then C
54+ func F (D,E) = if ((E >= A))
55+ then D
5456 else throw("List size exceeds 10")
5557
56- E(B(B(B(B(B(B(B(B(B(B(A, 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)
5759 }
5860
5961
60-let F = split(g(this, l), a)
62+let G = split(h(this, m), a)
6163
62-let G = t(m)
64+let H = u(n)
6365
64-let H = t(n)
66+let I = u(o)
6567
66-func I (J) = ("$RESERVED_AMOUNT_" + J)
68+func J (K) = ("$RESERVED_AMOUNT_" + K)
6769
6870
69-func K (L) = I(F[L])
71+func L (M) = J(G[M])
7072
7173
72-let M = ((5 * c) / 1000)
74+let N = ((5 * c) / 1000)
7375
74-let N = 0
76+let O = 0
7577
76-let O = 1
78+let P = 1
7779
78-let P = 2
80+let Q = 2
7981
80-let Q = 1
82+let R = 1
8183
82-let R = 2
84+let S = 2
8385
84-let S = 4
86+let T = 4
8587
86-let T = 8
88+let U = 8
8789
88-let U = 14
90+let V = 14
8991
90-let V = 10000
92+let W = 10000
9193
92-let W = 250000
94+let X = 250000
9395
94-let X = [R]
96+let Y = [S]
9597
96-let Y = 0
98+let Z = 0
9799
98-let Z = 1
100+let aa = 1
99101
100-let aa = 2
102+let ab = 2
101103
102-let ab = 3
104+let ac = 3
103105
104-let ac = 4
106+let ad = 4
105107
106-let ad = 5
108+let ae = 5
107109
108-let ae = "SUBMITTED"
110+let af = "SUBMITTED"
109111
110-let af = "WON"
112+let ag = "WON"
111113
112-let ag = "LOST"
114+let ah = "LOST"
113115
114-func ah (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state"))
116+func ai (j) = valueOrErrorMessage(getString(this, j), (j + " key is not specified in this.state"))
115117
116118
117-let ai = fromBase64String(ah(o))
119+let aj = fromBase64String(ai(p))
118120
119-let aj = addressFromStringValue(ah(p))
121+let ak = addressFromStringValue(ai(q))
120122
121-let ak = valueOrElse(getInteger(this, q), 7200)
123+let al = valueOrElse(getInteger(this, r), 7200)
122124
123-func al (i,am) = if (isDefined(getInteger(i)))
124- then getIntegerValue(i)
125- else am
125+func am (j,an) = if (isDefined(getInteger(j)))
126+ then getIntegerValue(j)
127+ else an
126128
127129
128-func an (i,ao) = IntegerEntry(i, ao)
130+func ao (j,ap) = IntegerEntry(j, ap)
129131
130132
131-func ap (i) = an(i, (al(i, -1) + 1))
133+func aq (j) = ao(j, (am(j, -1) + 1))
132134
133135
134-func aq (i,ar) = an(i, (al(i, 0) + ar))
136+func ar (j,as) = ao(j, (am(j, 0) + as))
135137
136138
137-func as (at) = {
138- let au = at
139- if ($isInstanceOf(au, "ByteVector"))
139+func at (au) = {
140+ let av = au
141+ if ($isInstanceOf(av, "ByteVector"))
140142 then {
141- let av = au
142- toBase58String(av)
143+ let aw = av
144+ toBase58String(aw)
143145 }
144146 else "WAVES"
145147 }
146148
147149
148-func aw (ax) = if ((ax == "WAVES"))
150+func ax (ay) = if ((ay == "WAVES"))
149151 then unit
150- else fromBase58String(ax)
152+ else fromBase58String(ay)
151153
152154
153-func ay (at) = {
154- let au = at
155- if ($isInstanceOf(au, "ByteVector"))
155+func az (au) = {
156+ let av = au
157+ if ($isInstanceOf(av, "ByteVector"))
156158 then {
157- let az = au
158- assetBalance(this, az)
159+ let aA = av
160+ assetBalance(this, aA)
159161 }
160162 else wavesBalance(this).available
161163 }
162164
163165
164-func aA (aB,L) = {
165- let ax = F[L]
166- let aC = (al(K(L), 0) + aB)
167- if ((aC > ay(aw(ax))))
166+func aB (aC,M) = {
167+ let ay = G[M]
168+ let aD = (am(L(M), 0) + aC)
169+ if ((aD > az(ax(ay))))
168170 then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety."))
169- else aC
171+ else aD
170172 }
171173
172174
173-func aD (aE,L,aB) = if ((0 > (al(K(L), 0) - aB)))
175+func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC)))
174176 then throw((("Invalid " + d) + " account state - reserved amount is less than 0"))
175- else aq(K(L), -(aB))
177+ else ar(L(M), -(aC))
176178
177179
178-func aF (ax) = {
179- let aG = indexOf(F, ax)
180- if (!(isDefined(aG)))
180+func aG (ay) = {
181+ let aH = indexOf(G, ay)
182+ if (!(isDefined(aH)))
181183 then throw("Invalid payment asset")
182- else value(aG)
184+ else value(aH)
183185 }
184186
185187
186-func aH (aI,aJ,aK) = {
187- let aL = size(aK)
188- func aM (u,aN) = if (u)
188+func aI (aJ,aK,aL) = {
189+ let aM = size(aL)
190+ func aN (v,aO) = if (v)
189191 then true
190- else (aI == ((aN * G[aJ]) / H[aJ]))
192+ else (aJ == ((aO * H[aK]) / I[aK]))
191193
192194 if (!({
193- let y = X
194- let z = size(y)
195- let A = false
196- func B (C,D) = if ((D >= z))
197- then C
198- else aM(C, y[D])
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])
199201
200- func E (C,D) = if ((D >= z))
201- then C
202+ func F (D,E) = if ((E >= A))
203+ then D
202204 else throw("List size exceeds 5")
203205
204- E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5)
206+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
205207 }))
206208 then throw("Bet amount is not valid")
207- else if ((parseInt(aK) == unit))
209+ else if ((parseInt(aL) == unit))
208210 then throw("Invalid player's choice")
209- else fraction(aI, W, V)
211+ else fraction(aJ, X, W)
210212 }
211213
212214
213-func aO (aE,aP,aK) = {
214- let aQ = rsaVerify_16Kb(SHA256, toBytes(aE), aP, ai)
215- if (!(aQ))
215+func aP (aF,aQ,aL) = {
216+ let aR = rsaVerify_16Kb(SHA256, toBytes(aF), aQ, aj)
217+ if (!(aR))
216218 then throw("Invalid RSA signature")
217219 else {
218- let aR = (toInt(sha256((aP + toBytes(aK)))) % e)
219- toString(aR)
220+ let aS = (toInt(sha256((aQ + toBytes(aL)))) % e)
221+ toString(aS)
220222 }
221223 }
222224
223225
224-func aS (aK,aT) = if ((size(aK) == f))
225- then (aT == toString((e - 1)))
226- else false
226+func aT (aL,aU) = (aL == aU)
227227
228228
229-func aU (aV,aK,aW,aX,aB,L,aY) = makeString([aV, aK, aW, aX, aB, L, if ((aY == ""))
229+func aV (aW,aL,aX,aY,aC,M,aZ) = makeString([aW, aL, aX, aY, aC, M, if ((aZ == ""))
230230 then ""
231- else aY], "_")
231+ else aZ], "_")
232232
233233
234-func aZ (aV,aK,aW,aX,aB,L,aY) = aU(aV, aK, aW, toString(aX), toString(aB), toString(L), aY)
234+func ba (aW,aL,aX,aY,aC,M,aZ) = aV(aW, aL, aX, toString(aY), toString(aC), toString(M), aZ)
235235
236236
237-func ba (bb,aV,aR,bc) = {
238- let ba = aU(aV, bb[Z], bb[aa], bb[ab], bb[ac], bb[ad], aR)
239- if (bc)
240- then (ba + "_TIMEOUT")
241- else ba
237+func bb (bc,aW,aS,bd) = {
238+ let bb = aV(aW, aS, bc[ab], bc[ac], bc[ad], bc[ae], g)
239+ if (bd)
240+ then (bb + "_TIMEOUT")
241+ else bb
242242 }
243243
244244
245-func bd (aE) = split({
246- let au = getString(this, aE)
247- if ($isInstanceOf(au, "String"))
245+func be (aF) = split({
246+ let av = getString(this, aF)
247+ if ($isInstanceOf(av, "String"))
248248 then {
249- let be = au
250- be
249+ let bf = av
250+ bf
251251 }
252- else throw((("Game: " + aE) + " not found."))
252+ else throw((("Game: " + aF) + " not found."))
253253 }, "_")
254254
255255
256-@Callable(bf)
257-func constructorV1 (bg,bh,bi,bj) = if ((bf.caller != aj))
256+@Callable(bg)
257+func constructorV1 (bh,bi,bj,bk) = if ((bg.caller != ak))
258258 then throw("not authorized")
259259 else {
260- func bk (w,bl) = {
261- let bm = split(bl, ":")
262- if ((size(bm) != 4))
260+ func bl (x,bm) = {
261+ let bn = split(bm, ":")
262+ if ((size(bn) != 4))
263263 then throw("Invalid asset record")
264- else $Tuple3((w._1 :+ bm[N]), (w._2 :+ bm[O]), (w._3 :+ bm[P]))
264+ else $Tuple3((x._1 :+ bn[O]), (x._2 :+ bn[P]), (x._3 :+ bn[Q]))
265265 }
266266
267- let bn = {
268- let y = split_4C(bj, "_")
269- let z = size(y)
270- let A = $Tuple3(nil, nil, nil)
271- func B (C,D) = if ((D >= z))
272- then C
273- else bk(C, y[D])
267+ let bo = {
268+ let z = split_4C(bk, "_")
269+ let A = size(z)
270+ let B = $Tuple3(nil, nil, nil)
271+ func C (D,E) = if ((E >= A))
272+ then D
273+ else bl(D, z[E])
274274
275- func E (C,D) = if ((D >= z))
276- then C
275+ func F (D,E) = if ((E >= A))
276+ then D
277277 else throw("List size exceeds 10")
278278
279- E(B(B(B(B(B(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
279+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
280280 }
281-[StringEntry(o, bg), StringEntry(p, bh), IntegerEntry(q, bi), StringEntry(l, makeString_2C(bn._1, a)), StringEntry(m, makeString(bn._2, a)), StringEntry(n, makeString(bn._3, a))]
281+[StringEntry(p, bh), StringEntry(q, bi), IntegerEntry(r, bj), StringEntry(m, makeString_2C(bo._1, a)), StringEntry(n, makeString(bo._2, a)), StringEntry(o, makeString(bo._3, a))]
282282 }
283283
284284
285285
286-@Callable(bf)
287-func maintenance (bo) = if ((bf.caller != aj))
286+@Callable(bg)
287+func maintenance (bp) = if ((bg.caller != ak))
288288 then throw("not authorized")
289- else [BooleanEntry(s, bo)]
289+ else [BooleanEntry(t, bp)]
290290
291291
292292
293-@Callable(bf)
294-func bet (aK) = if (valueOrElse(getBoolean(s), false))
293+@Callable(bg)
294+func bet (aL) = if (valueOrElse(getBoolean(t), false))
295295 then throw("Game is stopped for maintenence")
296296 else {
297- let aE = toBase58String(bf.transactionId)
298- if ((1 >= size(bf.payments)))
297+ let aF = toBase58String(bg.transactionId)
298+ if ((1 >= size(bg.payments)))
299299 then throw("2 payments must be attached")
300- else if (isDefined(getString(this, aE)))
301- then throw((("Bet for: " + aE) + " was already made."))
300+ else if (isDefined(getString(this, aF)))
301+ then throw((("Bet for: " + aF) + " was already made."))
302302 else {
303- let bp = value(bf.payments[0])
304- let bq = value(bf.payments[1])
305- if (isDefined(bq.assetId))
303+ let bq = value(bg.payments[0])
304+ let br = value(bg.payments[1])
305+ if (isDefined(br.assetId))
306306 then throw("feePmt (2nd payment) assetId must be in Waves")
307- else if ((M > bq.amount))
307+ else if ((N > br.amount))
308308 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
309309 else {
310- let ax = as(bp.assetId)
311- let aJ = aF(ax)
312- let br = bq.amount
313- let aB = aH(bp.amount, aJ, aK)
314- let aW = toBase58String(bf.callerPublicKey)
315- let bs = aZ(ae, aK, aW, height, aB, aJ, "")
316-[IntegerEntry(K(aJ), aA(aB, aJ)), ap(r), StringEntry(aE, bs), ScriptTransfer(aj, br, bq.assetId)]
310+ let ay = at(bq.assetId)
311+ let aK = aG(ay)
312+ let bs = br.amount
313+ let aC = aI(bq.amount, aK, aL)
314+ let aX = toBase58String(bg.callerPublicKey)
315+ let bt = ba(af, aL, aX, height, aC, aK, "")
316+[IntegerEntry(L(aK), aB(aC, aK)), aq(s), StringEntry(aF, bt), ScriptTransfer(ak, bs, br.assetId)]
317317 }
318318 }
319319 }
320320
321321
322322
323-@Callable(bf)
324-func withdraw (aE,aP) = {
325- let bs = bd(aE)
326- let bt = bs[Y]
327- let aK = bs[Z]
328- let aX = parseIntValue(bs[ab])
329- let aB = parseIntValue(bs[ac])
330- let L = parseIntValue(bs[ad])
331- let aW = bs[aa]
332- let bu = addressFromPublicKey(fromBase58String(aW))
333- if ((bt != ae))
323+@Callable(bg)
324+func withdraw (aF,aQ) = {
325+ let bt = be(aF)
326+ let bu = bt[Z]
327+ let aL = bt[aa]
328+ let aY = parseIntValue(bt[ac])
329+ let aC = parseIntValue(bt[ad])
330+ let M = parseIntValue(bt[ae])
331+ let aX = bt[ab]
332+ let bv = addressFromPublicKey(fromBase58String(aX))
333+ if ((bu != af))
334334 then throw("Invalid game state for passed gameId")
335- else if ((bf.caller != aj))
335+ else if ((bg.caller != ak))
336336 then throw("Regular withdraw can be done by server only")
337337 else {
338- let bc = ((height - aX) > ak)
339- let aT = if (bc)
340- then aK
341- else aO(aE, aP, aK)
342- let bv = aS(aK, aT)
343- let bw = if (bv)
344- then af
345- else ag
346- let bx = ba(bs, bw, aT, bc)
347- ([StringEntry(aE, bx), aD(aE, L, aB)] ++ (if (bv)
348- then [ScriptTransfer(bu, aB, aw(F[L]))]
338+ let bd = ((height - aY) > al)
339+ let aU = if (bd)
340+ then g
341+ else aP(aF, aQ, aL)
342+ let bw = aT(aU, g)
343+ let bx = if (bw)
344+ then ag
345+ else ah
346+ let by = bb(bt, bx, aU, bd)
347+ ([StringEntry(aF, by), aE(aF, M, aC)] ++ (if (bw)
348+ then [ScriptTransfer(bv, aC, ax(G[M]))]
349349 else nil))
350350 }
351351 }
352352
353353
354-@Verifier(by)
355-func bz () = if (sigVerify(by.bodyBytes, by.proofs[0], by.senderPublicKey))
354+@Verifier(bz)
355+func bA () = if (sigVerify(bz.bodyBytes, bz.proofs[0], bz.senderPublicKey))
356356 then {
357- let au = by
358- if ($isInstanceOf(au, "TransferTransaction"))
357+ let av = bz
358+ if ($isInstanceOf(av, "TransferTransaction"))
359359 then {
360- let bA = au
361- let L = aF(as(bA.assetId))
362- ((ay(bA.assetId) - bA.amount) >= al(K(L), 0))
360+ let bB = av
361+ let M = aG(at(bB.assetId))
362+ ((az(bB.assetId) - bB.amount) >= am(L(M), 0))
363363 }
364- else if ($isInstanceOf(au, "SetScriptTransaction"))
364+ else if ($isInstanceOf(av, "SetScriptTransaction"))
365365 then {
366- let bB = au
367- func bC (w,bD) = if (w)
368- then (al(I(bD), 0) == 0)
366+ let bC = av
367+ func bD (x,bE) = if (x)
368+ then (am(J(bE), 0) == 0)
369369 else false
370370
371- let y = F
372- let z = size(y)
373- let A = true
374- func B (C,D) = if ((D >= z))
375- then C
376- else bC(C, y[D])
371+ let z = G
372+ let A = size(z)
373+ let B = true
374+ func C (D,E) = if ((E >= A))
375+ then D
376+ else bD(D, z[E])
377377
378- func E (C,D) = if ((D >= z))
379- then C
378+ func F (D,E) = if ((E >= A))
379+ then D
380380 else throw("List size exceeds 10")
381381
382- E(B(B(B(B(B(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
382+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
383383 }
384384 else false
385385 }
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 = "Card of the Day"
1111
1212 let e = 40
1313
1414 let f = 1
1515
16-func g (h,i) = valueOrErrorMessage(getString(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
16+let g = toString((e - 1))
17+
18+func h (i,j) = valueOrErrorMessage(getString(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
1719
1820
19-func j (h,i) = valueOrErrorMessage(getInteger(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
21+func k (i,j) = valueOrErrorMessage(getInteger(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
2022
2123
22-func k (h,i) = valueOrErrorMessage(getBoolean(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], ""))
24+func l (i,j) = valueOrErrorMessage(getBoolean(i, j), makeString(["mandatory ", toString(i), ".", j, " is not defined"], ""))
2325
2426
25-let l = "%s%s__cfg__allowedAssets"
27+let m = "%s%s__cfg__allowedAssets"
2628
27-let m = "%s%s__cfg__assetsDecimals"
29+let n = "%s%s__cfg__assetsDecimals"
2830
29-let n = "%s%s__cfg__assetsBetDividers"
31+let o = "%s%s__cfg__assetsBetDividers"
3032
31-let o = "%s%s__cfg__rsaPublic64"
33+let p = "%s%s__cfg__rsaPublic64"
3234
33-let p = "%s%s__cfg__benzAddress"
35+let q = "%s%s__cfg__benzAddress"
3436
35-let q = "%s%s__cfg__withdrawTimeFrame"
37+let r = "%s%s__cfg__withdrawTimeFrame"
3638
37-let r = "%s%s__runtime__gameNum"
39+let s = "%s%s__runtime__gameNum"
3840
39-let s = "%s%s__runtime__contractIsBlocked"
41+let t = "%s%s__runtime__contractIsBlocked"
4042
41-func t (i) = {
42- let u = g(this, i)
43- func v (w,x) = (w :+ parseIntValue(x))
43+func u (j) = {
44+ let v = h(this, j)
45+ func w (x,y) = (x :+ parseIntValue(y))
4446
45- let y = split(u, a)
46- let z = size(y)
47- let A = nil
48- func B (C,D) = if ((D >= z))
49- then C
50- else v(C, y[D])
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])
5153
52- func E (C,D) = if ((D >= z))
53- then C
54+ func F (D,E) = if ((E >= A))
55+ then D
5456 else throw("List size exceeds 10")
5557
56- E(B(B(B(B(B(B(B(B(B(B(A, 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)
5759 }
5860
5961
60-let F = split(g(this, l), a)
62+let G = split(h(this, m), a)
6163
62-let G = t(m)
64+let H = u(n)
6365
64-let H = t(n)
66+let I = u(o)
6567
66-func I (J) = ("$RESERVED_AMOUNT_" + J)
68+func J (K) = ("$RESERVED_AMOUNT_" + K)
6769
6870
69-func K (L) = I(F[L])
71+func L (M) = J(G[M])
7072
7173
72-let M = ((5 * c) / 1000)
74+let N = ((5 * c) / 1000)
7375
74-let N = 0
76+let O = 0
7577
76-let O = 1
78+let P = 1
7779
78-let P = 2
80+let Q = 2
7981
80-let Q = 1
82+let R = 1
8183
82-let R = 2
84+let S = 2
8385
84-let S = 4
86+let T = 4
8587
86-let T = 8
88+let U = 8
8789
88-let U = 14
90+let V = 14
8991
90-let V = 10000
92+let W = 10000
9193
92-let W = 250000
94+let X = 250000
9395
94-let X = [R]
96+let Y = [S]
9597
96-let Y = 0
98+let Z = 0
9799
98-let Z = 1
100+let aa = 1
99101
100-let aa = 2
102+let ab = 2
101103
102-let ab = 3
104+let ac = 3
103105
104-let ac = 4
106+let ad = 4
105107
106-let ad = 5
108+let ae = 5
107109
108-let ae = "SUBMITTED"
110+let af = "SUBMITTED"
109111
110-let af = "WON"
112+let ag = "WON"
111113
112-let ag = "LOST"
114+let ah = "LOST"
113115
114-func ah (i) = valueOrErrorMessage(getString(this, i), (i + " key is not specified in this.state"))
116+func ai (j) = valueOrErrorMessage(getString(this, j), (j + " key is not specified in this.state"))
115117
116118
117-let ai = fromBase64String(ah(o))
119+let aj = fromBase64String(ai(p))
118120
119-let aj = addressFromStringValue(ah(p))
121+let ak = addressFromStringValue(ai(q))
120122
121-let ak = valueOrElse(getInteger(this, q), 7200)
123+let al = valueOrElse(getInteger(this, r), 7200)
122124
123-func al (i,am) = if (isDefined(getInteger(i)))
124- then getIntegerValue(i)
125- else am
125+func am (j,an) = if (isDefined(getInteger(j)))
126+ then getIntegerValue(j)
127+ else an
126128
127129
128-func an (i,ao) = IntegerEntry(i, ao)
130+func ao (j,ap) = IntegerEntry(j, ap)
129131
130132
131-func ap (i) = an(i, (al(i, -1) + 1))
133+func aq (j) = ao(j, (am(j, -1) + 1))
132134
133135
134-func aq (i,ar) = an(i, (al(i, 0) + ar))
136+func ar (j,as) = ao(j, (am(j, 0) + as))
135137
136138
137-func as (at) = {
138- let au = at
139- if ($isInstanceOf(au, "ByteVector"))
139+func at (au) = {
140+ let av = au
141+ if ($isInstanceOf(av, "ByteVector"))
140142 then {
141- let av = au
142- toBase58String(av)
143+ let aw = av
144+ toBase58String(aw)
143145 }
144146 else "WAVES"
145147 }
146148
147149
148-func aw (ax) = if ((ax == "WAVES"))
150+func ax (ay) = if ((ay == "WAVES"))
149151 then unit
150- else fromBase58String(ax)
152+ else fromBase58String(ay)
151153
152154
153-func ay (at) = {
154- let au = at
155- if ($isInstanceOf(au, "ByteVector"))
155+func az (au) = {
156+ let av = au
157+ if ($isInstanceOf(av, "ByteVector"))
156158 then {
157- let az = au
158- assetBalance(this, az)
159+ let aA = av
160+ assetBalance(this, aA)
159161 }
160162 else wavesBalance(this).available
161163 }
162164
163165
164-func aA (aB,L) = {
165- let ax = F[L]
166- let aC = (al(K(L), 0) + aB)
167- if ((aC > ay(aw(ax))))
166+func aB (aC,M) = {
167+ let ay = G[M]
168+ let aD = (am(L(M), 0) + aC)
169+ if ((aD > az(ax(ay))))
168170 then throw((("Insufficient funds on " + d) + " account. Transaction was rejected for your safety."))
169- else aC
171+ else aD
170172 }
171173
172174
173-func aD (aE,L,aB) = if ((0 > (al(K(L), 0) - aB)))
175+func aE (aF,M,aC) = if ((0 > (am(L(M), 0) - aC)))
174176 then throw((("Invalid " + d) + " account state - reserved amount is less than 0"))
175- else aq(K(L), -(aB))
177+ else ar(L(M), -(aC))
176178
177179
178-func aF (ax) = {
179- let aG = indexOf(F, ax)
180- if (!(isDefined(aG)))
180+func aG (ay) = {
181+ let aH = indexOf(G, ay)
182+ if (!(isDefined(aH)))
181183 then throw("Invalid payment asset")
182- else value(aG)
184+ else value(aH)
183185 }
184186
185187
186-func aH (aI,aJ,aK) = {
187- let aL = size(aK)
188- func aM (u,aN) = if (u)
188+func aI (aJ,aK,aL) = {
189+ let aM = size(aL)
190+ func aN (v,aO) = if (v)
189191 then true
190- else (aI == ((aN * G[aJ]) / H[aJ]))
192+ else (aJ == ((aO * H[aK]) / I[aK]))
191193
192194 if (!({
193- let y = X
194- let z = size(y)
195- let A = false
196- func B (C,D) = if ((D >= z))
197- then C
198- else aM(C, y[D])
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])
199201
200- func E (C,D) = if ((D >= z))
201- then C
202+ func F (D,E) = if ((E >= A))
203+ then D
202204 else throw("List size exceeds 5")
203205
204- E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5)
206+ F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5)
205207 }))
206208 then throw("Bet amount is not valid")
207- else if ((parseInt(aK) == unit))
209+ else if ((parseInt(aL) == unit))
208210 then throw("Invalid player's choice")
209- else fraction(aI, W, V)
211+ else fraction(aJ, X, W)
210212 }
211213
212214
213-func aO (aE,aP,aK) = {
214- let aQ = rsaVerify_16Kb(SHA256, toBytes(aE), aP, ai)
215- if (!(aQ))
215+func aP (aF,aQ,aL) = {
216+ let aR = rsaVerify_16Kb(SHA256, toBytes(aF), aQ, aj)
217+ if (!(aR))
216218 then throw("Invalid RSA signature")
217219 else {
218- let aR = (toInt(sha256((aP + toBytes(aK)))) % e)
219- toString(aR)
220+ let aS = (toInt(sha256((aQ + toBytes(aL)))) % e)
221+ toString(aS)
220222 }
221223 }
222224
223225
224-func aS (aK,aT) = if ((size(aK) == f))
225- then (aT == toString((e - 1)))
226- else false
226+func aT (aL,aU) = (aL == aU)
227227
228228
229-func aU (aV,aK,aW,aX,aB,L,aY) = makeString([aV, aK, aW, aX, aB, L, if ((aY == ""))
229+func aV (aW,aL,aX,aY,aC,M,aZ) = makeString([aW, aL, aX, aY, aC, M, if ((aZ == ""))
230230 then ""
231- else aY], "_")
231+ else aZ], "_")
232232
233233
234-func aZ (aV,aK,aW,aX,aB,L,aY) = aU(aV, aK, aW, toString(aX), toString(aB), toString(L), aY)
234+func ba (aW,aL,aX,aY,aC,M,aZ) = aV(aW, aL, aX, toString(aY), toString(aC), toString(M), aZ)
235235
236236
237-func ba (bb,aV,aR,bc) = {
238- let ba = aU(aV, bb[Z], bb[aa], bb[ab], bb[ac], bb[ad], aR)
239- if (bc)
240- then (ba + "_TIMEOUT")
241- else ba
237+func bb (bc,aW,aS,bd) = {
238+ let bb = aV(aW, aS, bc[ab], bc[ac], bc[ad], bc[ae], g)
239+ if (bd)
240+ then (bb + "_TIMEOUT")
241+ else bb
242242 }
243243
244244
245-func bd (aE) = split({
246- let au = getString(this, aE)
247- if ($isInstanceOf(au, "String"))
245+func be (aF) = split({
246+ let av = getString(this, aF)
247+ if ($isInstanceOf(av, "String"))
248248 then {
249- let be = au
250- be
249+ let bf = av
250+ bf
251251 }
252- else throw((("Game: " + aE) + " not found."))
252+ else throw((("Game: " + aF) + " not found."))
253253 }, "_")
254254
255255
256-@Callable(bf)
257-func constructorV1 (bg,bh,bi,bj) = if ((bf.caller != aj))
256+@Callable(bg)
257+func constructorV1 (bh,bi,bj,bk) = if ((bg.caller != ak))
258258 then throw("not authorized")
259259 else {
260- func bk (w,bl) = {
261- let bm = split(bl, ":")
262- if ((size(bm) != 4))
260+ func bl (x,bm) = {
261+ let bn = split(bm, ":")
262+ if ((size(bn) != 4))
263263 then throw("Invalid asset record")
264- else $Tuple3((w._1 :+ bm[N]), (w._2 :+ bm[O]), (w._3 :+ bm[P]))
264+ else $Tuple3((x._1 :+ bn[O]), (x._2 :+ bn[P]), (x._3 :+ bn[Q]))
265265 }
266266
267- let bn = {
268- let y = split_4C(bj, "_")
269- let z = size(y)
270- let A = $Tuple3(nil, nil, nil)
271- func B (C,D) = if ((D >= z))
272- then C
273- else bk(C, y[D])
267+ let bo = {
268+ let z = split_4C(bk, "_")
269+ let A = size(z)
270+ let B = $Tuple3(nil, nil, nil)
271+ func C (D,E) = if ((E >= A))
272+ then D
273+ else bl(D, z[E])
274274
275- func E (C,D) = if ((D >= z))
276- then C
275+ func F (D,E) = if ((E >= A))
276+ then D
277277 else throw("List size exceeds 10")
278278
279- E(B(B(B(B(B(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
279+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
280280 }
281-[StringEntry(o, bg), StringEntry(p, bh), IntegerEntry(q, bi), StringEntry(l, makeString_2C(bn._1, a)), StringEntry(m, makeString(bn._2, a)), StringEntry(n, makeString(bn._3, a))]
281+[StringEntry(p, bh), StringEntry(q, bi), IntegerEntry(r, bj), StringEntry(m, makeString_2C(bo._1, a)), StringEntry(n, makeString(bo._2, a)), StringEntry(o, makeString(bo._3, a))]
282282 }
283283
284284
285285
286-@Callable(bf)
287-func maintenance (bo) = if ((bf.caller != aj))
286+@Callable(bg)
287+func maintenance (bp) = if ((bg.caller != ak))
288288 then throw("not authorized")
289- else [BooleanEntry(s, bo)]
289+ else [BooleanEntry(t, bp)]
290290
291291
292292
293-@Callable(bf)
294-func bet (aK) = if (valueOrElse(getBoolean(s), false))
293+@Callable(bg)
294+func bet (aL) = if (valueOrElse(getBoolean(t), false))
295295 then throw("Game is stopped for maintenence")
296296 else {
297- let aE = toBase58String(bf.transactionId)
298- if ((1 >= size(bf.payments)))
297+ let aF = toBase58String(bg.transactionId)
298+ if ((1 >= size(bg.payments)))
299299 then throw("2 payments must be attached")
300- else if (isDefined(getString(this, aE)))
301- then throw((("Bet for: " + aE) + " was already made."))
300+ else if (isDefined(getString(this, aF)))
301+ then throw((("Bet for: " + aF) + " was already made."))
302302 else {
303- let bp = value(bf.payments[0])
304- let bq = value(bf.payments[1])
305- if (isDefined(bq.assetId))
303+ let bq = value(bg.payments[0])
304+ let br = value(bg.payments[1])
305+ if (isDefined(br.assetId))
306306 then throw("feePmt (2nd payment) assetId must be in Waves")
307- else if ((M > bq.amount))
307+ else if ((N > br.amount))
308308 then throw("feePmt (2nd payment) must be >= 0.005 Waves")
309309 else {
310- let ax = as(bp.assetId)
311- let aJ = aF(ax)
312- let br = bq.amount
313- let aB = aH(bp.amount, aJ, aK)
314- let aW = toBase58String(bf.callerPublicKey)
315- let bs = aZ(ae, aK, aW, height, aB, aJ, "")
316-[IntegerEntry(K(aJ), aA(aB, aJ)), ap(r), StringEntry(aE, bs), ScriptTransfer(aj, br, bq.assetId)]
310+ let ay = at(bq.assetId)
311+ let aK = aG(ay)
312+ let bs = br.amount
313+ let aC = aI(bq.amount, aK, aL)
314+ let aX = toBase58String(bg.callerPublicKey)
315+ let bt = ba(af, aL, aX, height, aC, aK, "")
316+[IntegerEntry(L(aK), aB(aC, aK)), aq(s), StringEntry(aF, bt), ScriptTransfer(ak, bs, br.assetId)]
317317 }
318318 }
319319 }
320320
321321
322322
323-@Callable(bf)
324-func withdraw (aE,aP) = {
325- let bs = bd(aE)
326- let bt = bs[Y]
327- let aK = bs[Z]
328- let aX = parseIntValue(bs[ab])
329- let aB = parseIntValue(bs[ac])
330- let L = parseIntValue(bs[ad])
331- let aW = bs[aa]
332- let bu = addressFromPublicKey(fromBase58String(aW))
333- if ((bt != ae))
323+@Callable(bg)
324+func withdraw (aF,aQ) = {
325+ let bt = be(aF)
326+ let bu = bt[Z]
327+ let aL = bt[aa]
328+ let aY = parseIntValue(bt[ac])
329+ let aC = parseIntValue(bt[ad])
330+ let M = parseIntValue(bt[ae])
331+ let aX = bt[ab]
332+ let bv = addressFromPublicKey(fromBase58String(aX))
333+ if ((bu != af))
334334 then throw("Invalid game state for passed gameId")
335- else if ((bf.caller != aj))
335+ else if ((bg.caller != ak))
336336 then throw("Regular withdraw can be done by server only")
337337 else {
338- let bc = ((height - aX) > ak)
339- let aT = if (bc)
340- then aK
341- else aO(aE, aP, aK)
342- let bv = aS(aK, aT)
343- let bw = if (bv)
344- then af
345- else ag
346- let bx = ba(bs, bw, aT, bc)
347- ([StringEntry(aE, bx), aD(aE, L, aB)] ++ (if (bv)
348- then [ScriptTransfer(bu, aB, aw(F[L]))]
338+ let bd = ((height - aY) > al)
339+ let aU = if (bd)
340+ then g
341+ else aP(aF, aQ, aL)
342+ let bw = aT(aU, g)
343+ let bx = if (bw)
344+ then ag
345+ else ah
346+ let by = bb(bt, bx, aU, bd)
347+ ([StringEntry(aF, by), aE(aF, M, aC)] ++ (if (bw)
348+ then [ScriptTransfer(bv, aC, ax(G[M]))]
349349 else nil))
350350 }
351351 }
352352
353353
354-@Verifier(by)
355-func bz () = if (sigVerify(by.bodyBytes, by.proofs[0], by.senderPublicKey))
354+@Verifier(bz)
355+func bA () = if (sigVerify(bz.bodyBytes, bz.proofs[0], bz.senderPublicKey))
356356 then {
357- let au = by
358- if ($isInstanceOf(au, "TransferTransaction"))
357+ let av = bz
358+ if ($isInstanceOf(av, "TransferTransaction"))
359359 then {
360- let bA = au
361- let L = aF(as(bA.assetId))
362- ((ay(bA.assetId) - bA.amount) >= al(K(L), 0))
360+ let bB = av
361+ let M = aG(at(bB.assetId))
362+ ((az(bB.assetId) - bB.amount) >= am(L(M), 0))
363363 }
364- else if ($isInstanceOf(au, "SetScriptTransaction"))
364+ else if ($isInstanceOf(av, "SetScriptTransaction"))
365365 then {
366- let bB = au
367- func bC (w,bD) = if (w)
368- then (al(I(bD), 0) == 0)
366+ let bC = av
367+ func bD (x,bE) = if (x)
368+ then (am(J(bE), 0) == 0)
369369 else false
370370
371- let y = F
372- let z = size(y)
373- let A = true
374- func B (C,D) = if ((D >= z))
375- then C
376- else bC(C, y[D])
371+ let z = G
372+ let A = size(z)
373+ let B = true
374+ func C (D,E) = if ((E >= A))
375+ then D
376+ else bD(D, z[E])
377377
378- func E (C,D) = if ((D >= z))
379- then C
378+ func F (D,E) = if ((E >= A))
379+ then D
380380 else throw("List size exceeds 10")
381381
382- E(B(B(B(B(B(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
382+ F(C(C(C(C(C(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
383383 }
384384 else false
385385 }
386386 else false
387387

github/deemru/w8io/026f985 
153.56 ms