tx · 5po1PzAcHZGebBw3TTXdtKurAt3J1yzWMvvG9jVZwAV7

3MzQfUaV6dYkgsBV6bdtukRUyR418x8y6or:  -0.00600000 Waves

2024.06.03 23:42 [3134996] smart account 3MzQfUaV6dYkgsBV6bdtukRUyR418x8y6or > SELF 0.00000000 Waves

{ "type": 13, "id": "5po1PzAcHZGebBw3TTXdtKurAt3J1yzWMvvG9jVZwAV7", "fee": 600000, "feeAssetId": null, "timestamp": 1717447362055, "version": 2, "chainId": 84, "sender": "3MzQfUaV6dYkgsBV6bdtukRUyR418x8y6or", "senderPublicKey": "Cf5WP3mRd2vUzzZY2MPgygsQeja6YhRCyWzs3oWi56Rt", "proofs": [ "21VtRCceHbTPr4pgSDrXDRQCFPx3t627eVZs3wRY79gNfXVd8RHJABCQnwi4zc1H3QWw4o4fB6AJmNGvfWRNqf87" ], "script": "base64:BgIVCAISBgoEAQECAhIECgIBAhIDCgEBEAADU0VQAgJfXwEEam9pbgEFYXJyYXkJALkJAgUFYXJyYXkFA1NFUAEIc2VwYXJhdGUBBnN0cmluZwkAtQkCBQZzdHJpbmcFA1NFUAEPbG90dGVyeUNvdW50S2V5AAkBBGpvaW4BCQDMCAICAiVzCQDMCAICDGxvdHRlcnlDb3VudAUDbmlsARhsb3R0ZXJ5RW5kQmxvY2tIZWlnaHRLZXkBCWxvdHRlcnlJZAkBBGpvaW4BCQDMCAICAiVzCQDMCAICFWxvdHRlcnlFbmRCbG9ja0hlaWdodAkAzAgCCQCkAwEFCWxvdHRlcnlJZAUDbmlsARJsb3R0ZXJ5QmV0UHJpY2VLZXkBCWxvdHRlcnlJZAkBBGpvaW4BCQDMCAICAiVzCQDMCAICD2xvdHRlcnlCZXRQcmljZQkAzAgCCQCkAwEFCWxvdHRlcnlJZAUDbmlsARJsb3R0ZXJ5QmV0QXNzZXRLZXkBCWxvdHRlcnlJZAkBBGpvaW4BCQDMCAICAiVzCQDMCAICD2xvdHRlcnlCZXRUb2tlbgkAzAgCCQCkAwEFCWxv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EHQWRkcmVzcwEFCHJlZmZlcmVyCQBrAwUDY2FwAAoAAQUIYmV0VG9rZW4FA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkkIWSf", "height": 3134996, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "__"
5+
6+func b (c) = makeString(c, a)
7+
8+
9+func d (e) = split(e, a)
10+
11+
12+func f () = b(["%s", "lotteryCount"])
13+
14+
15+func g (h) = b(["%s", "lotteryEndBlockHeight", toString(h)])
16+
17+
18+func i (h) = b(["%s", "lotteryBetPrice", toString(h)])
19+
20+
21+func j (h) = b(["%s", "lotteryBetToken", toString(h)])
22+
23+
24+func k (h) = b(["%s", "lotteryIsFinished", toString(h)])
25+
26+
27+func l (h) = b(["%s", "lotteryWinnerTicketId", toString(h)])
28+
29+
30+func m (h) = b(["%s", "lotteryCountTicketsKey", toString(h)])
31+
32+
33+func n (h) = b(["%s", "lotteryReffererKey", toString(h)])
34+
35+
36+func o (h,p) = b(["%s", "lotteryTicketOwner", toString(h), toString(p)])
37+
38+
39+let q = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89]
40+
41+func r (s,t) = if ((size(s.payments) == 1))
42+ then if ((value(s.payments[0].assetId) == t))
43+ then s.payments[0].amount
44+ else throw("wrong asset")
45+ else throw("only 1 payment")
46+
47+
48+func u (v) = {
49+ let w = blockInfoByHeight(v)
50+ if ((w == unit))
51+ then throw("block not mined")
52+ else {
53+ let x = ((lastBlock.generationSignature + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
54+ sha256(x)
55+ }
56+ }
57+
58+
59+func y (h) = {
60+ let v = getIntegerValue(g(h))
61+ let z = getIntegerValue(m(h))
62+ let x = u(v)
63+ let A = (toInt(x) % z)
64+ getBinaryValue(o(h, A))
65+ }
66+
67+
68+@Callable(s)
69+func create (B,C,D,E) = if ((lastBlock.height >= B))
70+ then throw("incorrect endBlockHeight")
71+ else {
72+ let F = {
73+ let G = getInteger(f())
74+ if ($isInstanceOf(G, "Int"))
75+ then {
76+ let H = G
77+ H
78+ }
79+ else 0
80+ }
81+[IntegerEntry(f(), (F + 1)), IntegerEntry(g(F), B), IntegerEntry(i(F), C), BinaryEntry(j(F), D), BooleanEntry(k(F), false), IntegerEntry(m(F), 0), BinaryEntry(n(F), E)]
82+ }
83+
84+
85+
86+@Callable(s)
87+func buy (h,I) = {
88+ let J = getBooleanValue(k(h))
89+ let K = getBinaryValue(j(h))
90+ let C = getIntegerValue(i(h))
91+ let L = getIntegerValue(m(h))
92+ if (J)
93+ then throw("lottery alredy finished")
94+ else {
95+ let M = r(s, K)
96+ let N = (M / C)
97+ func O (P,Q) = if ((N > Q))
98+ then (P :+ BinaryEntry(o(h, (L + Q)), s.callerPublicKey))
99+ else P
100+
101+ ({
102+ let R = q
103+ let S = size(R)
104+ let T = nil
105+ func U (V,W) = if ((W >= S))
106+ then V
107+ else O(V, R[W])
108+
109+ func X (V,W) = if ((W >= S))
110+ then V
111+ else throw("List size exceeds 90")
112+
113+ X(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(U(T, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
114+ } ++ [IntegerEntry(m(h), (L + N))])
115+ }
116+ }
117+
118+
119+
120+@Callable(s)
121+func claim (h) = {
122+ let Y = y(h)
123+ if ((Y != s.callerPublicKey))
124+ then throw("not win")
125+ else {
126+ let C = getIntegerValue(i(h))
127+ let L = getIntegerValue(m(h))
128+ let D = getBinaryValue(j(h))
129+ let E = getBinaryValue(n(h))
130+ let Z = (C * L)
131+[ScriptTransfer(s.caller, fraction(Z, 10, 7), D), ScriptTransfer(Address(E), fraction(Z, 10, 1), D)]
132+ }
133+ }
134+
135+
136+@Verifier(aa)
137+func ab () = sigVerify(aa.bodyBytes, aa.proofs[0], aa.senderPublicKey)
138+

github/deemru/w8io/026f985 
36.30 ms