tx · aor7LFVpHayLX9ZCExAuiPS5SXEm1MvkFMG2tmvqZr7

3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX:  -0.10000000 Waves

2022.01.14 02:19 [1877836] smart account 3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX > SELF 0.00000000 Waves

{ "type": 13, "id": "aor7LFVpHayLX9ZCExAuiPS5SXEm1MvkFMG2tmvqZr7", "fee": 10000000, "feeAssetId": null, "timestamp": 1642116019471, "version": 2, "chainId": 84, "sender": "3NCCNgEjGtWKLt78jWc9DiA3Jd2jmfg7BZX", "senderPublicKey": "AcdhXSF5aWK6Lmdtv3cyCZ7vehbxsNNGagWCd2FpZo1M", "proofs": [ "53ikMgE9TE9sCmW6T1fZUTwRe1XWdkbv4FvGqNo4CCXGCH1ur5c4FbcPbSVwgPpXLuXNgnQVYcTZQmxngc6X8T3N" ], "script": "base64:AAIFAAAAAAAAABQIAhIFCgMIAQESABIHCgUBCAgICAAAAA8AAAAAE2dhbWVNYXN0ZXJQdWJsaWNLZXkBAAAAIF1t2Oq4Jp6DRGnJV2x+n66xACBB37xnTL7cQnLLqBNvAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGTYmFzZTY0Ok1JSUJJekFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUkFBTUlJQkN3S0NBUUlBK0NwYnpNQktwcSs3VmFyU0RITFcwd1FTb2gyTFRiZ2wxckFoZnJ1WkdDanQ2TU80bzF2MWlMcUt5TkgzRkpzdndsTFVxbXFFN0UyV2w3TGJJUEEyNlB4TzJYQ0RmdmowT1dwN2NFSmtVQkVpeVBZQ24raXVQWFVQd3Vkb0ZnTTRXSGYwSVBiREoyTzZPZ3pRbEJCbU51Nk93cjduYUlUaUpyUEF2YWtQZ0FkbVVQdjRyT3pjdTZCUjBUOEd3c3p3cHJ2d1dabEtGNkFkMDBvbUxGRG14NjZIdkJFNTFzUkJpWElSYkpuakRobG9waXplNExvUjFGSXJRYUF1MXNmczViRU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AABmNhcmRzMgUAAAAGY2FyZHMzCQAAAgAAAAECAAAAEUluaXRHYW1lIFJlcXVpcmVkAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnI2iCP", "height": 1877836, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bx6s2W9sv91RCp19DALgsMeR5t43NJQC1ZZzZ68Ju6aE Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'A7VvRHtZro8bvGa9KAahiP9xovdKJ5hGsTjHLMa6nRPo'
4+let a = base58'7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi'
55
6-let b = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxi5zy1H6T2pQx7qgMph9s7/Wg819sob9AvQsGsc3Dzz5ZjTkhvNLQPf1wtQ+jVCIT8SAjgPVWWP3YI8ozGzKW49SqLiaSqmU5Gn4pjR9NYIqsNDJmX+9GMpF1dermPV5HEYxBMQ2NAkMsWA1XIYc/aIa0f/wVgMe209MUM2oUwyEKA1qAEJmsQkXCjJOAAkUQHi6HTyuoQqjt5OZloS+ix2wNyyftBj3wpNgQ8w+JaI6htg7Nml7/NeoukuIdtUSz9nJi4asGco9jYr7q0tgVDQl6NlBHMN6CNJahpPZN/YNAb+CzAitZGlNcWIawLFec1fZOO8hbaHTuQ843j6jVQIDAQAB")
6+let b = fromBase64String("base64:MIIBIzANBgkqhkiG9w0BAQEFAAOCARAAMIIBCwKCAQIA+CpbzMBKpq+7VarSDHLW0wQSoh2LTbgl1rAhfruZGCjt6MO4o1v1iLqKyNH3FJsvwlLUqmqE7E2Wl7LbIPA26PxO2XCDfvj0OWp7cEJkUBEiyPYCn+iuPXUPwudoFgM4WHf0IPbDJ2O6OgzQlBBmNu6Owr7naITiJrPAvakPgAdmUPv4rOzcu6BR0T8GwszwprvwWZlKF6Ad00omLFDmx66HvBE51sRBiXIRbJnjDhlopize4LoR1FIrQaAu1sfs5bEHLA33jvKybne+IDawCsiINZYdPZV1WWcURC+XAFfBiYCw4PYyguxaBRHotzLc2dOsBV1HDNIjLKVoRknyt50CAwEAAQ==")
77
8-let c = base58'AJRyxpsv9Z4v46eg9b5TpnVXn3DteJYPHRJSbMckYPWw'
8+let c = "G_SETUPGAMESCOUNTER"
99
10-let d = "G_SETUPGAMESCOUNTER"
10+let d = "G_USEDGAMESCOUNTER"
1111
12-let e = "G_USEDGAMESCOUNTER"
12+let e = "G_DEALERQUEUE"
1313
14-let f = "G_DEALERQUEUE"
14+let f = "G_MAXBET"
1515
16-let g = "G_MAXBET"
17-
18-let h = "G_MINBET"
19-
20-func i () = getInteger(this, g)
16+func g () = getInteger(this, c)
2117
2218
23-func j () = getInteger(this, h)
19+func h () = getInteger(this, d)
2420
2521
26-func k () = getInteger(this, d)
22+func i (j) = (j != a)
2723
2824
29-func l () = getInteger(this, e)
25+func k (l,m) = ((("G_" + toString(l)) + "_CARDSIGNATURE_") + toString(m))
3026
3127
32-func m () = getString(this, f)
28+func n (l,m) = getString(this, k(l, m))
3329
3430
35-func n (o) = (o != a)
31+func o (l,m) = ((("G_" + toString(l)) + "_CARD_") + toString(m))
3632
3733
38-func p (q) = (("G_" + toString(q)) + "_BETAMOUNT")
34+func p (l) = (("G_" + toString(l)) + "_STATE")
3935
4036
41-func r (q) = (("G_" + toString(q)) + "_TIEAMOUNT")
37+func q (l) = (("G_" + toString(l)) + "_OFFSET")
4238
4339
44-func s (q) = (("G_" + toString(q)) + "_PLAYER")
40+func r (l,s,t,u,v,w) = [IntegerEntry(c, l), IntegerEntry(p(l), 0), IntegerEntry(q(l), s), StringEntry(k(l, 0), t), StringEntry(k(l, 1), u), StringEntry(k(l, 2), v), StringEntry(k(l, 3), w)]
4541
4642
47-func t (q) = (("G_" + toString(q)) + "_PAYOUT")
48-
49-
50-func u (q) = (("G_" + toString(q)) + "_STATE")
51-
52-
53-func v (q) = (("G_" + toString(q)) + "_OFFSET")
54-
55-
56-func w (q,x) = ((("G_" + toString(q)) + "_CARDSIGNATURE_") + toString(x))
57-
58-
59-func y (z) = (("P_" + z) + "_CURRENTGAME")
60-
61-
62-func A (z) = getInteger(this, y(z))
63-
64-
65-func B (q) = getInteger(this, p(q))
66-
67-
68-func C (q) = getInteger(this, r(q))
69-
70-
71-func D (q) = getInteger(this, u(q))
72-
73-
74-func E (q) = getString(this, s(q))
75-
76-
77-func F (q,x) = getString(this, w(q, x))
78-
79-
80-func G (q,x) = ((("G_" + toString(q)) + "_CARD_") + toString(x))
81-
82-
83-func H (q,I,J,K,L,M) = [IntegerEntry(d, q), IntegerEntry(u(q), 0), IntegerEntry(v(q), I), StringEntry(w(q, 0), J), StringEntry(w(q, 1), K), StringEntry(w(q, 2), L), StringEntry(w(q, 3), M)]
84-
85-
86-func N (z,O,P) = {
87- let Q = (value(l()) + 1)
88- let R = value(m())
89-[IntegerEntry(e, Q), IntegerEntry(y(z), Q), IntegerEntry(u(Q), 1), IntegerEntry(p(Q), O), IntegerEntry(r(Q), P), StringEntry(f, ((value(m()) + ",") + toString(Q))), StringEntry(s(Q), z)]
43+@Callable(x)
44+func verifyCard (m,l,y) = {
45+ let z = rsaVerify_16Kb(SHA256, toBytes(m), fromBase64String(split(value(n(l, y)), " ")[0]), b)
46+ throw(toString(z))
9047 }
9148
9249
93-func S (T) = parseIntValue(take(T, 2))
9450
95-
96-func U (V) = if ((size(V.payments) == 0))
97- then throw("Payment must be attached")
98- else if ((size(V.payments) == 1))
99- then {
100- let W = V.payments[0]
101- W.amount
102- }
103- else throw("There should be only one payment")
104-
105-
106-func X (x,q,Y) = rsaVerify_16Kb(SHA256, toBytes(x), fromBase64String(split(value(F(q, Y)), " ")[0]), b)
107-
108-
109-@Callable(V)
110-func revealRound2 (Z,aa,ab) = if (n(V.callerPublicKey))
111- then throw("revealRound2_FORBBIDEN")
51+@Callable(x)
52+func initGame () = if (i(x.callerPublicKey))
53+ then throw("initGame_FORBBIDEN")
11254 else {
113- let R = value(m())
114- let ac = split(R, ",")[1]
115- if ((ac == toString(Z)))
116- then if (if (if ((value(D(Z)) == 3))
117- then X(aa, Z, 2)
118- else false)
119- then X(ab, Z, 3)
120- else false)
121- then {
122- let ad = S(split(aa, "+")[2])
123- let ae = S(split(ab, "+")[2])
124- if ((ad >= ae))
125- then {
126- let af = value(B(Z))
127- let z = value(addressFromString(value(E(Z))))
128-[StringEntry(G(Z, 2), aa), StringEntry(G(Z, 3), ab), IntegerEntry(u(Z), 6), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z)))))), ScriptTransfer(z, ((af * 2) + (af - V.fee)), unit)]
129- }
130- else [StringEntry(G(Z, 2), aa), StringEntry(G(Z, 3), ab), IntegerEntry(u(Z), 6), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z))))))]
131- }
132- else throw("One of the cards failed to be verified or game is not in state 1.")
133- else throw(("The next game to process is " + ac))
55+ let A = g()
56+ if ($isInstanceOf(A, "Int"))
57+ then {
58+ let B = A
59+ throw("INIT_ALREADY_DONE")
60+ }
61+ else [IntegerEntry(c, 0), IntegerEntry(d, 0), IntegerEntry(f, 100000000), StringEntry(e, "")]
13462 }
13563
13664
13765
138-@Callable(V)
139-func war () = {
140- let z = toBase58String(V.caller.bytes)
141- let Z = value(A(z))
142- if ((value(D(Z)) != 2))
143- then throw("Game is not in correct state.")
144- else {
145- let O = value(B(Z))
146- let ag = U(V)
147- if (((ag + V.fee) != O))
148- then throw((("Payment must me same as the original bet (" + toString(O)) + ")"))
149- else [IntegerEntry(u(Z), 3), StringEntry(f, ((value(m()) + ",") + toString(Z)))]
150- }
151- }
152-
153-
154-
155-@Callable(V)
156-func surrender () = {
157- let z = toBase58String(V.caller.bytes)
158- let Z = value(A(z))
159- if ((value(D(Z)) != 2))
160- then throw("Game is not in correct state.")
161- else {
162- let O = value(B(Z))
163- let R = value(m())
164-[IntegerEntry(u(Z), 5), ScriptTransfer(V.caller, (O / 2), unit)]
165- }
166- }
167-
168-
169-
170-@Callable(V)
171-func revealRound1 (Z,ah,ai) = if (n(V.callerPublicKey))
172- then throw("revealRound1_FORBBIDEN")
66+@Callable(x)
67+func setupGame (l,t,u,v,w) = if (i(x.callerPublicKey))
68+ then throw("setupGame_FORBIDEN")
17369 else {
174- let R = value(m())
175- let ac = split(R, ",")[1]
176- if ((ac == toString(Z)))
177- then if (if (if ((value(D(Z)) == 1))
178- then X(ah, Z, 0)
179- else false)
180- then X(ai, Z, 1)
181- else false)
182- then {
183- let ad = S(split(ah, "+")[2])
184- let ae = S(split(ai, "+")[2])
185- if ((ad == ae))
186- then {
187- let aj = value(C(Z))
188- let z = value(addressFromString(value(E(Z))))
189- if ((aj != 0))
190- then [StringEntry(G(Z, 0), ah), StringEntry(G(Z, 1), ai), IntegerEntry(u(Z), 2), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z)))))), ScriptTransfer(z, ((aj * 10) + aj), unit)]
191- else [StringEntry(G(Z, 0), ah), StringEntry(G(Z, 1), ai), IntegerEntry(u(Z), 2), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z))))))]
192- }
193- else if ((ad > ae))
194- then {
195- let af = value(B(Z))
196- let z = value(addressFromString(value(E(Z))))
197-[StringEntry(G(Z, 0), ah), StringEntry(G(Z, 1), ai), IntegerEntry(u(Z), 4), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z)))))), ScriptTransfer(z, af, unit)]
198- }
199- else [StringEntry(G(Z, 0), ah), StringEntry(G(Z, 1), ai), IntegerEntry(u(Z), 4), StringEntry(f, takeRight(R, (size(R) - (1 + size(toString(Z))))))]
200- }
201- else throw("One of the cards failed to be verified or game is not in state 1.")
202- else throw(("The next game to process is " + ac))
203- }
204-
205-
206-
207-@Callable(V)
208-func bet (af,aj) = {
209- let ak = toBase58String(V.caller.bytes)
210- let ag = U(V)
211- let O = (af + V.fee)
212- let P = aj
213- let z = toBase58String(V.caller.bytes)
214- if ((ag != (af + aj)))
215- then throw("normal bet + tie bet should be equal to the payment")
216- else if (if ((value(j()) > ag))
217- then true
218- else (ag > value(i())))
219- then throw((((("Payment needs to be in the following interval [" + toString(value(j()))) + " ") + toString(value(i()))) + "]"))
220- else if ((value(l()) >= value(k())))
221- then throw("No available set up games to use.")
222- else {
223- let al = A(z)
224- if ($isInstanceOf(al, "Int"))
225- then {
226- let am = al
227- if ((4 > value(D(am))))
228- then throw((("Game " + toString(am)) + " is still in progress."))
229- else N(z, O, P)
230- }
231- else if ($isInstanceOf(al, "Unit"))
232- then N(z, O, P)
233- else throw("Match error")
234- }
235- }
236-
237-
238-
239-@Callable(V)
240-func setupGame (q,ah,ai,aa,ab) = if (n(V.callerPublicKey))
241- then throw("setupGame_FORBBIDEN")
242- else {
243- let al = k()
244- if ($isInstanceOf(al, "Int"))
70+ let A = g()
71+ if ($isInstanceOf(A, "Int"))
24572 then {
246- let an = al
247- let I = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(V.transactionId, 16)))) % 2)
248- let Z = (an + 1)
249- if ((q != Z))
73+ let C = A
74+ let s = (toInt(sha256((take(lastBlock.generationSignature, 16) + take(x.transactionId, 16)))) % 2)
75+ let D = (C + 1)
76+ if ((l != D))
25077 then throw("Wrong game number.")
251- else if (((I % 2) == 1))
252- then H(Z, I, ab, aa, ai, ah)
253- else H(Z, I, ah, ai, aa, ab)
78+ else r(D, s, t, u, v, w)
25479 }
25580 else throw("InitGame Required")
25681 }
25782
25883
259-
260-@Callable(V)
261-func initGame (ao,ap) = if (n(V.callerPublicKey))
262- then throw("initGame_FORBBIDEN")
263- else {
264- let al = k()
265- if ($isInstanceOf(al, "Int"))
266- then {
267- let aq = al
268- throw("INIT_ALREADY_DONE")
269- }
270- else [IntegerEntry(d, 0), IntegerEntry(e, 0), IntegerEntry(g, ao), IntegerEntry(h, ap), StringEntry(f, "")]
271- }
272-
273-
274-@Verifier(ar)
275-func as () = sigVerify(ar.bodyBytes, ar.proofs[0], ar.senderPublicKey)
84+@Verifier(E)
85+func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)
27686

github/deemru/w8io/169f3d6 
57.72 ms