tx · 8YVQTvj68zepSUv9UznKyuNaQGYJYwQPRxwvoDivMJA

3MpjwMAGCaNqNFRa34foE5sTfV6zb76bYja:  -0.01000010 Waves

2021.07.07 16:42 [1603249] smart account 3MpjwMAGCaNqNFRa34foE5sTfV6zb76bYja > SELF 0.00000000 Waves

{ "type": 13, "id": "8YVQTvj68zepSUv9UznKyuNaQGYJYwQPRxwvoDivMJA", "fee": 1000010, "feeAssetId": null, "timestamp": 1625665410990, "version": 2, "chainId": 84, "sender": "3MpjwMAGCaNqNFRa34foE5sTfV6zb76bYja", "senderPublicKey": "7Cy4wXHvgCRHP6MMhu9tTdayLHr9P9Dc342DVcCoCPzm", "proofs": [ "4538zkyXPMkzFYuKkeRazdoMqLT9k48dVyY1YCThT31hxQDVNbbvqvkAJPAwMJEQqkthD5kXBUTL1oCkzQFgwEg3" ], "script": "base64:AAIFAAAAAAAAAlEIAhIECgIICBIFCgMICAgaDAoCYTESBlZPVEVSUxoMCgJhMhIGUVVPUlVNGgwKAmEzEgZWT1RJTkcaDAoCYTQSBlJFVkVBTBoOCgJhNRIIRkVBVFVSRUQaDgoCYTYSCERFTElTVEVEGgoKAmE3EgROT05FGhQKAmE4Eg5nZXROdW1iZXJCeUtleRoJCgJhORIDa2V5GgkKAmIxEgNudW0aDQoCYjISByRtYXRjaDAaBwoCYjMSAWEaEQoCYjQSC2dldFN0ckJ5S2V5GgkKAmI1EgNzdHIaGAoCYjYSEmdldEtleUl0ZW1TdXBwbGllchoKCgJiNxIEaXRlbRoSCgJiOBIMZ2V0S2V5Q29tbWl0GgoKAmI5EgR1c2VyGhQKAmMxEg5nZXRWYWx1ZUNvbW1pdBoYCgJjMhISZ2V0S2V5Q29tbWl0c0NvdW50GhoKAmMzEhRnZXRWYWx1ZUNvbW1pdHNDb3VudBoSCgJjNBIMZ2V0S2V5UmV2ZWFsGhQKAmM1Eg5nZXRWYWx1ZVJldmVhbBoWCgJjNhIQZ2V0S2V5SXRlbVN0YXR1cxoYCgJjNxISZ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QkBAAAAAiE9AAAAAgUAAAACYzkFAAAAAmE2BwkAAAIAAAABAgAAABF2b3RlIGhhcyBmaW5pc2hlZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAACYzQAAAACBQAAAAJiNwUAAAACYjkFAAAAAmM5CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAACYzgAAAACBQAAAAJiNwUAAAACYzkFAAAAAmQ3CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAJjNgAAAAEFAAAAAmI3AwkAAGcAAAACBQAAAAJkNwUAAAACYTIFAAAAAmM5BQAAAAJhNAUAAAADbmlsAAAAABsO9M0=", "height": 1603249, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DwFK241mEgQAXuVhGhBdwJkQdwmeZ1X8F3iTQ4RvM2uu Next: GHW7a3uPTqoVsjsSsVqXxaUB1F5sMfeFbaFrqL61PVZA Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 3
55
6-let b = "voting"
6+let b = 2
77
8-let c = "reveal"
8+let c = "voting"
99
10-let d = "none"
10+let d = "reveal"
1111
12-func e (f) = {
13- let g = {
14- let h = getInteger(this, f)
15- if ($isInstanceOf(h, "Int"))
12+let e = "featured"
13+
14+let f = "delisted"
15+
16+let g = "none"
17+
18+func h (i) = {
19+ let j = {
20+ let k = getInteger(this, i)
21+ if ($isInstanceOf(k, "Int"))
1622 then {
17- let i = h
18- i
23+ let l = k
24+ l
1925 }
2026 else 0
2127 }
22- g
28+ j
2329 }
2430
2531
26-func j (f) = {
27- let k = {
28- let h = getString(this, f)
29- if ($isInstanceOf(h, "String"))
32+func m (i) = {
33+ let n = {
34+ let k = getString(this, i)
35+ if ($isInstanceOf(k, "String"))
3036 then {
31- let i = h
32- i
37+ let l = k
38+ l
3339 }
34- else d
40+ else g
3541 }
36- k
42+ n
3743 }
3844
3945
40-func l (m) = (m + "_data")
46+func o (p) = (p + "_data")
4147
4248
43-func n (m,o) = (((m + "_") + o) + "_commit")
49+func q (p,r) = (((p + "_") + r) + "_commit")
4450
4551
46-func p (m,o) = j(n(m, o))
52+func s (p,r) = m(q(p, r))
4753
4854
49-func q (m) = (m + "_comcnt")
55+func t (p) = (p + "_comcnt")
5056
5157
52-func r (m) = e(q(m))
58+func u (p) = h(t(p))
5359
5460
55-func s (m) = (m + "_status")
61+func v (p,r) = (((p + "_") + r) + "_reveal")
5662
5763
58-func t (m) = j(s(m))
64+func w (p,r) = m(v(p, r))
5965
6066
61-@Callable(u)
62-func voteCommit (m,v) = {
63- let o = toBase58String(u.caller.bytes)
64- let w = r(m)
65- let x = t(m)
66- if ((w >= a))
67+func x (p) = (p + "_status")
68+
69+
70+func y (p) = m(x(p))
71+
72+
73+func z (p,A) = ((p + "_res:") + A)
74+
75+
76+func B (p,A) = h(z(p, A))
77+
78+
79+@Callable(C)
80+func voteCommit (p,D) = {
81+ let r = toBase58String(C.caller.bytes)
82+ let E = u(p)
83+ let F = y(p)
84+ if ((E >= a))
6785 then throw("osiągnięto maksymaną liczbę głosujących")
68- else if ((p(m, o) != d))
86+ else if ((s(p, r) != g))
6987 then throw("użtykownik już głosuje")
70- else if ((l(m) == d))
88+ else if ((o(p) == g))
7189 then throw("nie istnieje taki przedmiot")
72- else if (if ((x != d))
73- then (x != b)
90+ else if (if ((F != g))
91+ then (F != c)
7492 else false)
7593 then throw("głosowanie nie jest możliwe")
76- else [StringEntry(n(m, o), v), IntegerEntry(q(m), (w + 1)), StringEntry(s(m), if ((w == a))
77- then c
78- else b)]
94+ else [StringEntry(q(p, r), D), IntegerEntry(t(p), (E + 1)), StringEntry(x(p), if ((E == a))
95+ then d
96+ else c)]
97+ }
98+
99+
100+
101+@Callable(C)
102+func voteReveal (p,A,G) = {
103+ let r = toBase58String(C.caller.bytes)
104+ let F = y(p)
105+ let H = (B(p, A) + 1)
106+ if ((toBase58String(sha256(toBytes((A + G)))) != s(p, r)))
107+ then throw("reveal data is not valid")
108+ else if ((a > u(p)))
109+ then throw("max number of voters hasn't reached yet")
110+ else if ((w(p, r) != g))
111+ then throw("user has already participated")
112+ else if (if ((F != c))
113+ then (F != d)
114+ else false)
115+ then throw("wrong status")
116+ else if (if ((A != e))
117+ then (A != f)
118+ else false)
119+ then throw("vote has finished")
120+ else [StringEntry(v(p, r), A), IntegerEntry(z(p, A), H), StringEntry(x(p), if ((H >= b))
121+ then A
122+ else d)]
79123 }
80124
81125
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 3
55
6-let b = "voting"
6+let b = 2
77
8-let c = "reveal"
8+let c = "voting"
99
10-let d = "none"
10+let d = "reveal"
1111
12-func e (f) = {
13- let g = {
14- let h = getInteger(this, f)
15- if ($isInstanceOf(h, "Int"))
12+let e = "featured"
13+
14+let f = "delisted"
15+
16+let g = "none"
17+
18+func h (i) = {
19+ let j = {
20+ let k = getInteger(this, i)
21+ if ($isInstanceOf(k, "Int"))
1622 then {
17- let i = h
18- i
23+ let l = k
24+ l
1925 }
2026 else 0
2127 }
22- g
28+ j
2329 }
2430
2531
26-func j (f) = {
27- let k = {
28- let h = getString(this, f)
29- if ($isInstanceOf(h, "String"))
32+func m (i) = {
33+ let n = {
34+ let k = getString(this, i)
35+ if ($isInstanceOf(k, "String"))
3036 then {
31- let i = h
32- i
37+ let l = k
38+ l
3339 }
34- else d
40+ else g
3541 }
36- k
42+ n
3743 }
3844
3945
40-func l (m) = (m + "_data")
46+func o (p) = (p + "_data")
4147
4248
43-func n (m,o) = (((m + "_") + o) + "_commit")
49+func q (p,r) = (((p + "_") + r) + "_commit")
4450
4551
46-func p (m,o) = j(n(m, o))
52+func s (p,r) = m(q(p, r))
4753
4854
49-func q (m) = (m + "_comcnt")
55+func t (p) = (p + "_comcnt")
5056
5157
52-func r (m) = e(q(m))
58+func u (p) = h(t(p))
5359
5460
55-func s (m) = (m + "_status")
61+func v (p,r) = (((p + "_") + r) + "_reveal")
5662
5763
58-func t (m) = j(s(m))
64+func w (p,r) = m(v(p, r))
5965
6066
61-@Callable(u)
62-func voteCommit (m,v) = {
63- let o = toBase58String(u.caller.bytes)
64- let w = r(m)
65- let x = t(m)
66- if ((w >= a))
67+func x (p) = (p + "_status")
68+
69+
70+func y (p) = m(x(p))
71+
72+
73+func z (p,A) = ((p + "_res:") + A)
74+
75+
76+func B (p,A) = h(z(p, A))
77+
78+
79+@Callable(C)
80+func voteCommit (p,D) = {
81+ let r = toBase58String(C.caller.bytes)
82+ let E = u(p)
83+ let F = y(p)
84+ if ((E >= a))
6785 then throw("osiągnięto maksymaną liczbę głosujących")
68- else if ((p(m, o) != d))
86+ else if ((s(p, r) != g))
6987 then throw("użtykownik już głosuje")
70- else if ((l(m) == d))
88+ else if ((o(p) == g))
7189 then throw("nie istnieje taki przedmiot")
72- else if (if ((x != d))
73- then (x != b)
90+ else if (if ((F != g))
91+ then (F != c)
7492 else false)
7593 then throw("głosowanie nie jest możliwe")
76- else [StringEntry(n(m, o), v), IntegerEntry(q(m), (w + 1)), StringEntry(s(m), if ((w == a))
77- then c
78- else b)]
94+ else [StringEntry(q(p, r), D), IntegerEntry(t(p), (E + 1)), StringEntry(x(p), if ((E == a))
95+ then d
96+ else c)]
97+ }
98+
99+
100+
101+@Callable(C)
102+func voteReveal (p,A,G) = {
103+ let r = toBase58String(C.caller.bytes)
104+ let F = y(p)
105+ let H = (B(p, A) + 1)
106+ if ((toBase58String(sha256(toBytes((A + G)))) != s(p, r)))
107+ then throw("reveal data is not valid")
108+ else if ((a > u(p)))
109+ then throw("max number of voters hasn't reached yet")
110+ else if ((w(p, r) != g))
111+ then throw("user has already participated")
112+ else if (if ((F != c))
113+ then (F != d)
114+ else false)
115+ then throw("wrong status")
116+ else if (if ((A != e))
117+ then (A != f)
118+ else false)
119+ then throw("vote has finished")
120+ else [StringEntry(v(p, r), A), IntegerEntry(z(p, A), H), StringEntry(x(p), if ((H >= b))
121+ then A
122+ else d)]
79123 }
80124
81125

github/deemru/w8io/169f3d6 
63.94 ms