tx · Gq6g9kNamjcx57ZpyYzMm9swP53w7PdkmpudiZeMQVYW

3MuPFyxhwEW9APdW69TSSkmZZgEGZYYQ8K7:  -0.01000000 Waves

2021.11.12 13:39 [1787678] smart account 3MuPFyxhwEW9APdW69TSSkmZZgEGZYYQ8K7 > SELF 0.00000000 Waves

{ "type": 13, "id": "Gq6g9kNamjcx57ZpyYzMm9swP53w7PdkmpudiZeMQVYW", "fee": 1000000, "feeAssetId": null, "timestamp": 1636713766061, "version": 2, "chainId": 84, "sender": "3MuPFyxhwEW9APdW69TSSkmZZgEGZYYQ8K7", "senderPublicKey": "43iGb3SaGqe6VyayZiLjc91eHgtvf9upiUYF9wNsdqPE", "proofs": [ "4NdK9BnjVRpuNse4y3ZcfxEFfCex11D2hy4iUG7g6miTu2gFpuMNkiG1s5TtACDVemMP3ppRo7yeTxBh7sqnVehS" ], "script": "base64:AAIFAAAAAAAAABMIAhIAEgMKAQgSBAoCAQgSABIAAAAAHgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAADGtleUVuZEhlaWdodAIAAAAKZW5kX2hlaWdodAAAAAAPa2V5UHJpemVzUHJpY2VzAgAAAA1wcml6ZXNfcHJpY2VzAAAAAAxrZXlQcml6ZXNJZHMCAAAACnByaXplc19pZHMAAAAAEGtleVByaXplc0Ftb3VudHMCAAAADXByaXplc19hbW91bnQAAAAADmtleUxldmVsUHJpY2VzAgAAAAxsZXZlbF9wcmljZXMAAAAAC2tleUxldmVsSWRzAgAAAAlsZXZlbF9pZHMAAAAACWtleVNXT1BpZAIAAAAHU1dPUF9pZAAAAAAOa2V5VG90YWxCdXJuZWQCAAAADHRvdGFsX2J1cm5lZAAAAAANa2V5VmVyaWZ5SGFzaAIAAAALdmVyaWZ5X2hhc2gAAAAAEWtleUZpbmFsaXplSGVpZ2h0AgAAAA9maW5hbGl6ZV9oZWlnaHQAAAAAEmtleVVzZXJUb3RhbEJ1cm5lZAIAAAANX3RvdGFsX2J1cm5lZAAAAAAGb3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Hpq+M=", "height": 1787678, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "active"
5+
6+let b = "end_height"
7+
8+let c = "prizes_prices"
9+
10+let d = "prizes_ids"
11+
12+let e = "prizes_amount"
13+
14+let f = "level_prices"
15+
16+let g = "level_ids"
17+
18+let h = "SWOP_id"
19+
20+let i = "total_burned"
21+
22+let j = "verify_hash"
23+
24+let k = "finalize_height"
25+
26+let l = "_total_burned"
27+
28+let m = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom')
29+
30+let n = Address(base58'3P73HDkPqG15nLXevjCbmXtazHYTZbpPoPw')
31+
32+let o = Address(base58'3PD88Svu91aKyBX1dnYVhkQyDXc8pg2EHFa')
33+
34+let p = "admin_pub_1"
35+
36+let q = "admin_pub_2"
37+
38+let r = "admin_pub_3"
39+
40+func s (t) = {
41+ let u = getString(m, t)
42+ if ($isInstanceOf(u, "String"))
43+ then {
44+ let v = u
45+ fromBase58String(v)
46+ }
47+ else {
48+ let w = u
49+ throw("Admin public key is empty")
50+ }
51+ }
52+
53+
54+let x = s(p)
55+
56+let y = s(q)
57+
58+let z = s(r)
59+
60+let A = base58'Czn4yoAuUZCVCLJDRfskn8URfkwpknwBTZDbs1wFrY7h'
61+
62+let B = fromBase58String(getStringValue(n, h))
63+
64+let C = valueOrElse(getBoolean(this, a), true)
65+
66+let D = valueOrElse(getInteger(this, i), 0)
67+
68+func E (F,G) = if ((F == ""))
69+ then (F + toString(G))
70+ else ((F + ",") + toString(G))
71+
72+
73+func H (F,G) = (F :+ parseIntValue(G))
74+
75+
76+func I (F,G) = (F :+ (D / G))
77+
78+
79+func J (K) = {
80+ let L = {
81+ let M = split(getStringValue(this, f), ",")
82+ let N = size(M)
83+ let O = nil
84+ func P (Q,R) = if ((R >= N))
85+ then Q
86+ else H(Q, M[R])
87+
88+ func S (Q,R) = if ((R >= N))
89+ then Q
90+ else throw("List size exceeds 5")
91+
92+ S(P(P(P(P(P(O, 0), 1), 2), 3), 4), 5)
93+ }
94+ if ((L[3] >= K))
95+ then 4
96+ else if ((L[2] >= K))
97+ then 3
98+ else if ((L[1] >= K))
99+ then 2
100+ else if ((L[0] >= K))
101+ then 1
102+ else 0
103+ }
104+
105+
106+@Callable(T)
107+func add () = {
108+ let U = $Tuple2(T.payments[0].amount, T.payments[0].assetId)
109+ let V = U._1
110+ let W = U._2
111+[IntegerEntry(i, (D + V))]
112+ }
113+
114+
115+
116+@Callable(T)
117+func hashingRandom (X) = if (!(C))
118+ then throw("DApp is inactive at this moment")
119+ else if (!(containsElement([x, y, z], T.callerPublicKey)))
120+ then throw("Only admin can call this function")
121+ else [StringEntry(j, X)]
122+
123+
124+
125+@Callable(T)
126+func finalize (Y,Z) = {
127+ let aa = getStringValue(this, j)
128+ let ab = toBase58String(sha256((toBytes(Y) + toBytes(Z))))
129+ if (!(C))
130+ then throw("DApp is inactive at this moment")
131+ else if (!(containsElement([x, y, z], T.callerPublicKey)))
132+ then throw("Only admin can call this function")
133+ else if ((ab != aa))
134+ then throw("vrf Height hash not matching")
135+ else {
136+ let ac = getIntegerValue(this, i)
137+[Burn(B, ac), IntegerEntry(k, height)]
138+ }
139+ }
140+
141+
142+
143+@Callable(T)
144+func shutdown () = if (!(C))
145+ then throw("DApp already inactive")
146+ else if (!(containsElement([x, y, z], T.callerPublicKey)))
147+ then throw("Only admin can call this function")
148+ else [BooleanEntry(a, false)]
149+
150+
151+
152+@Callable(T)
153+func activate () = if (C)
154+ then throw("DApp already active")
155+ else if (!(containsElement([x, y, z], T.callerPublicKey)))
156+ then throw("Only admin can call this function")
157+ else [BooleanEntry(a, true)]
158+
159+
160+@Verifier(ad)
161+func ae () = true
162+

github/deemru/w8io/169f3d6 
19.42 ms