tx · E4R8Z8aZ6BHTn1pFVdS4SxmzPuMM14zUS6zPVQGo6DXX

3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd:  -0.10000000 Waves

2021.11.13 03:33 [1788515] smart account 3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd > SELF 0.00000000 Waves

{ "type": 13, "id": "E4R8Z8aZ6BHTn1pFVdS4SxmzPuMM14zUS6zPVQGo6DXX", "fee": 10000000, "feeAssetId": null, "timestamp": 1636763735295, "version": 2, "chainId": 84, "sender": "3N6hQF6HBBQ5JCKB8Xs17Q61wkG3VrLvbGd", "senderPublicKey": "7Hi4o6vBstRs79NMVMjEove52dmP87RAcvNDAXN8C4Wi", "proofs": [ "2rFLn4dqZms6oyKon6bw7vJw5e8r2spA7QAbbkWdFBh7EprRBZ5FFtCbYs4S7BCwuUTxAYZ34XEXbhegmubf7jRa" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAACAAAAAAJc2VwYXJhdG9yAgAAAAEsAAAAAAVXQVZFUwAAAAAAO5rKAAAAAAAGbWF4QmV0CQAAaAAAAAIAAAAAAAAAAGQFAAAABVdBVkVTAQAAAApnZXROZXdEZWNrAAAAAAkABEwAAAACAgAAAAMwMUMJAARMAAAAAgIAAAADMDJDCQAETAAAAAICAAAAAzAzQwkABEwAAAACAgAAAAMwNEMJAARMAAAAAgIAAAADMDVDCQAETAAAAAICAAAAAzA2QwkABEwAAAACAgAAAAMwN0MJAARMAAAAAgIAAAADMDhDCQAETAAAAAICAAAAAzA5QwkABEwAAAACAgAAAAMxMEMJAARMAAAAAgIAAAADMTFDCQAETAAAAAICAAAAAzEyQwkABEwAAAACAgAAAAMxM0MJAARMAAAAAgIAAAADMDFECQAETAAAAAICAAAAAzAyRAkABEwAAAACAgAAAAMwM0QJAARMAAAAAgIAAAADMDRECQAETAAAAAICAAAAAzA1RAkABEwAAAACAgAAAAMwNkQJAARMAAAAAgIAAAADMDdECQAETAAAAAICAAAAAzA4RA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Complexity": 0 } View: original | compacted Prev: 2bymUMbeiD31XfHwj4NbTPgDuJhbKgkhLkAbvbUrnjab Next: 8r6zEhmDQC5HyZvmCqe6vA8AB8WgkWQ54J8s65o4UPHY Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "3MtaCL4v1bjTabUqs7oU4ofS8fbai34WM1i"
4+let a = ","
55
66 let b = 1000000000
77
88 let c = (100 * b)
99
10-let d = ","
11-
12-func e () = ["01C", "02C", "03C", "04C", "05C", "06C", "07C", "08C", "09C", "10C", "11C", "12C", "13C", "01D", "02D", "03D", "04D", "05D", "06D", "07D", "08D", "09D", "10D", "11D", "12D", "13D", "01H", "02H", "03H", "04H", "05H", "06H", "07H", "08H", "09H", "10H", "11H", "12H", "13H", "01S", "02S", "03S", "04S", "05S", "06S", "07S", "08S", "09S", "10S", "11S", "12S", "13S"]
10+func d () = ["01C", "02C", "03C", "04C", "05C", "06C", "07C", "08C", "09C", "10C", "11C", "12C", "13C", "01D", "02D", "03D", "04D", "05D", "06D", "07D", "08D", "09D", "10D", "11D", "12D", "13D", "01H", "02H", "03H", "04H", "05H", "06H", "07H", "08H", "09H", "10H", "11H", "12H", "13H", "01S", "02S", "03S", "04S", "05S", "06S", "07S", "08S", "09S", "10S", "11S", "12S", "13S"]
1311
1412
15-func f (g) = if ((0 >= size(g)))
16- then e()
17- else g
13+func e (f) = if ((0 >= size(f)))
14+ then d()
15+ else f
1816
1917
20-func h (i,j,k) = {
21- let l = sha256(toBytes((i + j)))
22- let m = toInt(l)
23- let n = (m % k)
24- if ((0 > n))
25- then ((-1 * n) + 1)
26- else (n + 1)
27- }
18+func g (h,i) = if (isDefined(getString(h, i)))
19+ then {
20+ let j = getStringValue(h, i)
21+ let f = split(j, a)
22+ if ((size(f) == 0))
23+ then d()
24+ else f
25+ }
26+ else d()
2827
2928
30-func o (p) = {
31- let q = getInteger(this, (p + "_LastRandonNumber"))
32- if ($isInstanceOf(q, "Int"))
29+func k (h,l) = {
30+ let m = getInteger(h, l)
31+ if ($isInstanceOf(m, "Int"))
3332 then {
34- let r = q
35- toString(r)
36- }
37- else p
38- }
39-
40-
41-func s (t,u) = {
42- let q = getInteger(t, u)
43- if ($isInstanceOf(q, "Int"))
44- then {
45- let v = q
46- v
33+ let n = m
34+ n
4735 }
4836 else 0
4937 }
5038
5139
52-func w (x) = if ((size(x.payments) == 0))
40+func o (p) = if ((size(p.payments) == 0))
5341 then throw("Payment must be attached")
5442 else {
55- let y = x.payments[0]
56- if (isDefined(y.assetId))
43+ let q = p.payments[0]
44+ if (isDefined(q.assetId))
5745 then throw("This function accepts WAVES tokens only")
58- else y.amount
46+ else q.amount
5947 }
6048
6149
62-func z (A) = parseIntValue(take(A, 2))
63-
64-
65-func B (C,D,E,a) = {
66- let F = z(C)
67- let G = z(D)
68- if ((F > G))
69- then E
70- else a
71- }
72-
73-
74-func H (t,I) = if (isDefined(getString(t, I)))
75- then {
76- let J = getStringValue(t, I)
77- let g = split(J, d)
78- if ((size(g) == 0))
79- then e()
80- else g
81- }
82- else e()
83-
84-
85-@Callable(x)
86-func bet (K) = {
87- let E = toBase58String(x.caller.bytes)
88- let L = ((K + "_") + E)
89- let F = w(x)
90- let M = (L + "_sumBets")
91- let N = s(this, M)
92- let O = {
93- let q = getInteger(this, (L + "_drawSequence"))
94- if ($isInstanceOf(q, "Int"))
50+@Callable(p)
51+func bet1 (r) = {
52+ let s = toBase58String(p.caller.bytes)
53+ let t = ((r + "_") + s)
54+ let u = o(p)
55+ let v = (t + "_sumBets")
56+ let w = k(this, v)
57+ let x = {
58+ let m = getInteger(this, (t + "_drawSequence"))
59+ if ($isInstanceOf(m, "Int"))
9560 then {
96- let v = q
97- (v + 1)
61+ let n = m
62+ (n + 1)
9863 }
9964 else 0
10065 }
101- let I = (L + "_available")
102- let P = (N + F)
103- if (if (isDefined(getBoolean(this, (K + "_stop"))))
66+ let i = (t + "_available")
67+ let y = (w + u)
68+ if (if (isDefined(getBoolean(this, (r + "_stop"))))
10469 then true
105- else isDefined(getString(this, K)))
70+ else isDefined(getString(this, r)))
10671 then throw("This round is already played")
107- else if ((P > c))
108- then throw(((("Maximum amount of bets for round " + toString(c)) + ". With your bet it's ") + toString(P)))
72+ else if ((y > c))
73+ then throw(((("Maximum amount of bets for round " + toString(c)) + ". With your bet it's ") + toString(y)))
10974 else {
110- let Q = H(this, I)
111- let R = h((L + makeString(Q, d)), o(E), size(Q))
112- let C = Q[(R % size(Q))]
113- let S = removeByIndex(Q, (R % size(Q)))
114- let T = f(S)
115- let U = h((L + makeString(T, d)), o(E), size(T))
116- let D = T[(U % size(T))]
117- let V = removeByIndex(T, (R % size(T)))
118- if ((z(C) == z(D)))
119- then [IntegerEntry((L + "_drawSequence"), (O + 1))]
120- else {
121- let W = B(C, D, E, a)
122-[StringEntry((L + "_winner"), W)]
123- }
75+ let z = g(this, i)
76+[StringEntry(i, makeString(z, a))]
12477 }
12578 }
12679
12780
128-
129-@Callable(x)
130-func withdraw (K) = {
131- let E = toBase58String(x.caller.bytes)
132- let L = ((K + "_") + E)
133- let X = (L + "_withdraw")
134- if (isDefined(getString(this, X)))
135- then throw("You have already got your prize")
136- else if (isDefined(getInteger(this, (L + "_drawSequence"))))
137- then throw("There is no winner, it was a draw")
138- else if (!(isDefined(getString(this, (L + "_winner")))))
139- then throw("There is no winner")
140- else {
141- let W = getStringValue(this, (L + "_winner"))
142- let Y = getIntegerValue(this, (L + "_sumBets"))
143- if ((Y == 0))
144- then throw("You won nothing this round")
145- else if ((W == E))
146- then [StringEntry(X, toString(Y)), ScriptTransfer(x.caller, Y, unit)]
147- else throw("You are not the winner")
148- }
149- }
150-
151-
152-@Verifier(Z)
153-func aa () = sigVerify(Z.bodyBytes, Z.proofs[0], Z.senderPublicKey)
81+@Verifier(A)
82+func B () = sigVerify(A.bodyBytes, A.proofs[0], A.senderPublicKey)
15483

github/deemru/w8io/026f985 
32.72 ms