tx · FgEHQC1TkXNuxcVn68sMh5V1of9pKRoi5zA711RjDNsi

3MsdfK4j8fgA65zhEyr7yMqYFZaZaDHQ1Q7:  -0.00500000 Waves

2022.08.01 15:22 [2165428] smart account 3MsdfK4j8fgA65zhEyr7yMqYFZaZaDHQ1Q7 > SELF 0.00000000 Waves

{ "type": 13, "id": "FgEHQC1TkXNuxcVn68sMh5V1of9pKRoi5zA711RjDNsi", "fee": 500000, "feeAssetId": null, "timestamp": 1659356575271, "version": 2, "chainId": 84, "sender": "3MsdfK4j8fgA65zhEyr7yMqYFZaZaDHQ1Q7", "senderPublicKey": "WHz6KMz8NXiDY3SdJVcJnL6oFNzbL3sivL4dhb3E4em", "proofs": [ "5NYQSw6yx26h4WXHgwc6PfKNyUYLyfGDDkYAd9eLp2pdoe9PZEm25wwSkQrpBYLD96W7y6GK5YP2jCwnV1E5maCc" ], "script": "base64:AAIFAAAAAAAAABcIAhIDCgEIEgMKAQgSAwoBCBIECgIIBAAAABUAAAAADERZWl9BU1NFVF9JRAEAAAAg3zps0tw/jE/1UGNUg8jPjkHKkKTlI05ittGCsjg0jKYAAAAAFFZFUklGSUNBVElPTl9TVE9SQUdFAQAAABoBV0LwPIS9tu4jlC9qgesdlrDqqabpgJIR2gAAAAAOTUlOX0RZWl9BTU9VTlQAAAAAAAX14QAAAAAADVZPVElOR19CTE9DS1MAAAAAAAAAAGQAAAAAC1ZPVEVfQ0xPU0VEAgAAAAZDTE9TRUQAAAAAC1ZPVEVfT1BFTkVEAgAAAARPUEVOAAAAAA9zdGF0dXNLZXlQcmVmaXgCAAAAB3N0YXR1c18AAAAADW9wZW5LZXlQcmVmaXgCAAAABW9wZW5fAAAAAA50b3RhbFllc1N1ZmZpeAIAAAAKX3RvdGFsX3llcwAAAAANdG90YWxOb1N1ZmZpeAIAAAAJX3RvdGFsX25vAAAAAA9yZXBheW1lbnRQcmVmaXgCAAAACnJlcGF5bWVudF8AAAAAEGFsbG93ZWRLZXlTdWZmaXgCAAAACF9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AAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAJbm9Wb3RlS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACm5ld05vVm90ZXMJAABkAAAAAgUAAAAMbm9Wb3Rlc1NvRmFyAAAAAAAAAAABCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAlub1ZvdGVLZXkFAAAACm5ld05vVm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAADHJlcGF5bWVudEtleQUAAAAGYW1vdW50BQAAAANuaWwFAAAAA25pbAUAAAAIbmV3RW50cnkAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUTyN8k=", "height": 2165428, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 5divqDQeqFc7iw6u73i8qH4AEBw7DML5czvWYUeqokgD Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'G2Pb7CMztps7XEVGCiUuJkLiS3ZCo69APQNbJs2nz21j'
5+
6+let b = base58'3P82q7po2rw6A4wuK4TRyA9GKTH1LwL7FnH'
7+
8+let c = 100000000
9+
10+let d = 100
11+
12+let e = "CLOSED"
13+
14+let f = "OPEN"
15+
16+let g = "status_"
17+
18+let h = "open_"
19+
20+let i = "_total_yes"
21+
22+let j = "_total_no"
23+
24+let k = "repayment_"
25+
26+let l = "_allowed"
27+
28+func m (n) = (g + n)
29+
30+
31+func o (n) = (h + n)
32+
33+
34+func p (n) = (n + i)
35+
36+
37+func q (n) = (n + j)
38+
39+
40+func r (n) = getString(this, m(n))
41+
42+
43+func s (n,t) = (((k + n) + "_") + toString(t))
44+
45+
46+func u (n) = {
47+ let v = getInteger(this, o(n))
48+ if ($isInstanceOf(v, "Int"))
49+ then {
50+ let w = v
51+ w
52+ }
53+ else -1
54+ }
55+
56+
57+func x (y) = {
58+ let v = getInteger(this, y)
59+ if ($isInstanceOf(v, "Int"))
60+ then {
61+ let w = v
62+ w
63+ }
64+ else -1
65+ }
66+
67+
68+func z (t) = {
69+ let v = getBoolean(Address(b), (toString(t) + l))
70+ if ($isInstanceOf(v, "Boolean"))
71+ then {
72+ let A = v
73+ A
74+ }
75+ else false
76+ }
77+
78+
79+@Callable(B)
80+func openVote (n) = {
81+ let C = o(n)
82+ let D = u(n)
83+ if ((D != -1))
84+ then throw("Vote already ongoing for id!")
85+ else {
86+ let E = m(n)
87+[StringEntry(E, f), IntegerEntry(C, height)]
88+ }
89+ }
90+
91+
92+
93+@Callable(B)
94+func closeVote (n) = {
95+ let F = u(n)
96+ if ((F == -1))
97+ then throw("No vote found for id!")
98+ else if (((F + d) > height))
99+ then throw("Vote can not be closed yet!")
100+ else {
101+ let E = m(n)
102+[StringEntry(E, e)]
103+ }
104+ }
105+
106+
107+
108+@Callable(B)
109+func claim (n) = {
110+ let G = u(n)
111+ if ((G == -1))
112+ then throw("No vote started for this id!")
113+ else if (((G + d) >= height))
114+ then throw("You can only claim after vote ends!")
115+ else {
116+ let H = B.caller
117+ let y = s(n, H)
118+ let I = x(y)
119+ let E = m(n)
120+ if ((I > 0))
121+ then [ScriptTransfer(H, I, a), StringEntry(E, e), IntegerEntry(y, 0)]
122+ else throw("Nothing to claim!")
123+ }
124+ }
125+
126+
127+
128+@Callable(B)
129+func vote (n,J) = if ((size(B.payments) != 1))
130+ then throw("One payment in DZY needs to be attached")
131+ else {
132+ let K = value(B.payments[0])
133+ let H = B.caller
134+ if (!(z(H)))
135+ then throw("Address not allowed to vote!")
136+ else {
137+ let L = K.amount
138+ if (!(isDefined(K.assetId)))
139+ then throw("Payment in Waves not allowed!")
140+ else {
141+ let M = toBase58String(value(K.assetId))
142+ let y = s(n, H)
143+ let N = x(y)
144+ if ((N != -1))
145+ then throw("Only one vote per id per address!")
146+ else if ((M != toBase58String(a)))
147+ then throw("payment in DZY necessary!")
148+ else if ((L != c))
149+ then throw("payment amount wrong!")
150+ else {
151+ let O = r(n)
152+ if ((O == e))
153+ then throw("vote closed!")
154+ else {
155+ let P = {
156+ let v = getInteger(this, o(n))
157+ if ($isInstanceOf(v, "Int"))
158+ then {
159+ let Q = v
160+ Q
161+ }
162+ else 0
163+ }
164+ if ((height > (P + d)))
165+ then throw("voting ended!")
166+ else {
167+ let R = if ((J == true))
168+ then {
169+ let S = p(n)
170+ let T = {
171+ let v = getInteger(this, S)
172+ if ($isInstanceOf(v, "Int"))
173+ then {
174+ let Q = v
175+ Q
176+ }
177+ else 0
178+ }
179+ let U = (T + 1)
180+[IntegerEntry(S, U), IntegerEntry(y, L)]
181+ }
182+ else if ((J == false))
183+ then {
184+ let V = q(n)
185+ let W = {
186+ let v = getInteger(this, V)
187+ if ($isInstanceOf(v, "Int"))
188+ then {
189+ let Q = v
190+ Q
191+ }
192+ else 0
193+ }
194+ let X = (W + 1)
195+[IntegerEntry(V, X), IntegerEntry(y, L)]
196+ }
197+ else nil
198+ R
199+ }
200+ }
201+ }
202+ }
203+ }
204+ }
205+
206+
207+@Verifier(Y)
208+func Z () = sigVerify(Y.bodyBytes, Y.proofs[0], Y.senderPublicKey)
209+

github/deemru/w8io/169f3d6 
70.39 ms