tx · GV8k3CX1XcvyhKysWv58Wxgr6vb5Fo9j8CyW4L3BSedL 3MvJGRwAHk6nULAUgXQRzM3eeqEgnWcuQ33: -0.01000000 Waves 2020.06.17 19:30 [1047777] smart account 3MvJGRwAHk6nULAUgXQRzM3eeqEgnWcuQ33 > SELF 0.00000000 Waves
{ "type": 13, "id": "GV8k3CX1XcvyhKysWv58Wxgr6vb5Fo9j8CyW4L3BSedL", "fee": 1000000, "feeAssetId": null, "timestamp": 1592411492672, "version": 1, "sender": "3MvJGRwAHk6nULAUgXQRzM3eeqEgnWcuQ33", "senderPublicKey": "8VLrnJUSn15GVsiwJGB1RV5z7B4J6RowfNie6SpuMFgR", "proofs": [ "2u58qEx3fbmMuYZ2KtUgLj1pxD9FaCastV9RpQAmA8btgJYi6RBfDscZrjovpFZtr2Hs7k8oAeXiT8DsT6aWSYzm" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAABEAAAAAC2FkZHJlc3NCb29rCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUVoHUeTQTO77iaMaO0CyN+LlydsBXbwHeAAAAABN3aGl0ZWxpc3RBZGRyZXNzS2V5AgAAABB3aGl0ZWxpc3RBZGRyZXNzAAAAABdkQXBwV2hpdGVsaXN0QWRkcmVzc0tleQIAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MAAAAADnRvdGFsV2VpZ2h0S2V5AgAAAAt0b3RhbFdlaWdodAAAAAARbWluVG90YWxXZWlnaHRLZXkCAAAADm1pblRvdGFsV2VpZ2h0AAAAAAlzdGFydFRpbWUAAAAAAF7p25AAAAAAB2VuZFRpbWUAAAAAAF77N1AAAAAAA3ZlcgIAAAAFNS4wLjEAAAAACnZhbGlkU3RhdGUAAAAAAAAAA+gAAAAADmdldEN1cnJlbnRUaW1lCQAAaQAAAAIIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAAAAAAAAAAPoAQAAAApoYXNTdGFydGVkAAAAAAkAAGcAAAACBQAAAA5nZXRD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AAAJaXNEZWZpbmVkAAAAAQkABBoAAAACBQAAAAlwQWRkcmVzczMFAAAABHR4SWQAAAAAAAAAAAEAAAAAAAAAAAAEAAAAC3BLZXk0U2lnbmVkAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAJcEFkZHJlc3M0BQAAAAR0eElkAAAAAAAAAAABAAAAAAAAAAAABAAAAAtwS2V5NVNpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIFAAAACXBBZGRyZXNzNQUAAAAEdHhJZAAAAAAAAAAAAQAAAAAAAAAAAAQAAAALcEtleTZTaWduZWQDCQEAAAAJaXNEZWZpbmVkAAAAAQkABBoAAAACBQAAAAlwQWRkcmVzczYFAAAABHR4SWQAAAAAAAAAAAEAAAAAAAAAAAAEAAAAC3BLZXk3U2lnbmVkAwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAAAAJcEFkZHJlc3M3BQAAAAR0eElkAAAAAAAAAAABAAAAAAAAAAAABAAAAAtwS2V5OFNpZ25lZAMJAQAAAAlpc0RlZmluZWQAAAABCQAEGgAAAAIFAAAACXBBZGRyZXNzOAUAAAAEdHhJZAAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAC3BLZXkxU2lnbmVkBQAAAAtwS2V5MlNpZ25lZAUAAAALcEtleTNTaWduZWQFAAAAC3BLZXk0U2lnbmVkBQAAAAtwS2V5NVNpZ25lZAUAAAALcEtleTZTaWduZWQFAAAAC3BLZXk3U2lnbmVkBQAAAAtwS2V5OFNpZ25lZAAAAAAAAAAAAwfLek5X", "chainId": 84, "height": 1047777, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = Address(base58'3MwoVRAPfC2NKuuYJKHVAVtUFhq8MyTEfQh') | |
5 | + | ||
6 | + | let b = "whitelistAddress" | |
7 | + | ||
8 | + | let c = "dAppWhitelistAddress" | |
9 | + | ||
10 | + | let d = "totalWeight" | |
11 | + | ||
12 | + | let e = "minTotalWeight" | |
13 | + | ||
14 | + | let f = 1592384400 | |
15 | + | ||
16 | + | let g = 1593522000 | |
17 | + | ||
18 | + | let h = "5.0.1" | |
19 | + | ||
20 | + | let i = 1000 | |
21 | + | ||
22 | + | let j = (lastBlock.timestamp / 1000) | |
23 | + | ||
24 | + | func k () = (j >= f) | |
25 | + | ||
26 | + | ||
27 | + | func l () = (j > g) | |
28 | + | ||
29 | + | ||
30 | + | func m (n) = { | |
31 | + | let o = getString(a, n) | |
32 | + | if ($isInstanceOf(o, "String")) | |
33 | + | then { | |
34 | + | let p = o | |
35 | + | Address(fromBase58String(p)) | |
36 | + | } | |
37 | + | else throw("no key") | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | func q (r) = { | |
42 | + | let s = { | |
43 | + | let o = getInteger(m(b), r) | |
44 | + | if ($isInstanceOf(o, "Int")) | |
45 | + | then { | |
46 | + | let p = o | |
47 | + | p | |
48 | + | } | |
49 | + | else -255 | |
50 | + | } | |
51 | + | (s == i) | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | func t (n) = { | |
56 | + | let o = getInteger(this, n) | |
57 | + | if ($isInstanceOf(o, "Int")) | |
58 | + | then { | |
59 | + | let p = o | |
60 | + | p | |
61 | + | } | |
62 | + | else 0 | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func u (n) = { | |
67 | + | let o = getBoolean(this, n) | |
68 | + | if ($isInstanceOf(o, "Boolean")) | |
69 | + | then { | |
70 | + | let p = o | |
71 | + | p | |
72 | + | } | |
73 | + | else false | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | func v (w,x) = ((("question_" + w) + "_answer_") + x) | |
78 | + | ||
79 | + | ||
80 | + | @Callable(y) | |
81 | + | func vote (w,x) = { | |
82 | + | let z = { | |
83 | + | let o = getInteger(m(c), toString(this)) | |
84 | + | if ($isInstanceOf(o, "Int")) | |
85 | + | then { | |
86 | + | let p = o | |
87 | + | p | |
88 | + | } | |
89 | + | else 0 | |
90 | + | } | |
91 | + | let A = toString(y.caller) | |
92 | + | let B = q(A) | |
93 | + | let C = ((("address_" + A) + "_question_") + w) | |
94 | + | let D = (("address_" + A) + "_voted") | |
95 | + | let E = (("address_" + A) + "_weight") | |
96 | + | let F = (("question_" + w) + "_totalWeight") | |
97 | + | let G = t(E) | |
98 | + | let H = u(D) | |
99 | + | let I = { | |
100 | + | let o = getString(this, C) | |
101 | + | if ($isInstanceOf(o, "String")) | |
102 | + | then { | |
103 | + | let p = o | |
104 | + | true | |
105 | + | } | |
106 | + | else false | |
107 | + | } | |
108 | + | if ((z != 1)) | |
109 | + | then throw("#001 Dealer dApp is not active") | |
110 | + | else if (!(k())) | |
111 | + | then throw("#002 The Vote not start") | |
112 | + | else if (l()) | |
113 | + | then throw("#003 The Vote already completed") | |
114 | + | else if (!(B)) | |
115 | + | then throw("#004 This account has no right to vote.") | |
116 | + | else if ((G == 0)) | |
117 | + | then throw("#005 This account has no weight to vote.") | |
118 | + | else if ((I == true)) | |
119 | + | then throw("#006 This account has already voted on this question.") | |
120 | + | else { | |
121 | + | let J = split(x, ",") | |
122 | + | func K (L,M) = { | |
123 | + | let n = v(w, M) | |
124 | + | let N = valueOrErrorMessage(getInteger(this, n), "#007 Wrong answer") | |
125 | + | DataEntry(n, (G + N)) :: L | |
126 | + | } | |
127 | + | ||
128 | + | let O = { | |
129 | + | let P = J | |
130 | + | let Q = size(P) | |
131 | + | let R = nil | |
132 | + | if ((Q == 0)) | |
133 | + | then R | |
134 | + | else { | |
135 | + | let S = K(R, P[0]) | |
136 | + | if ((Q == 1)) | |
137 | + | then S | |
138 | + | else { | |
139 | + | let T = K(S, P[1]) | |
140 | + | if ((Q == 2)) | |
141 | + | then T | |
142 | + | else { | |
143 | + | let U = K(T, P[2]) | |
144 | + | if ((Q == 3)) | |
145 | + | then U | |
146 | + | else { | |
147 | + | let V = K(U, P[3]) | |
148 | + | if ((Q == 4)) | |
149 | + | then V | |
150 | + | else { | |
151 | + | let W = K(V, P[4]) | |
152 | + | if ((Q == 5)) | |
153 | + | then W | |
154 | + | else { | |
155 | + | let X = K(W, P[5]) | |
156 | + | if ((Q == 6)) | |
157 | + | then X | |
158 | + | else { | |
159 | + | let Y = K(X, P[6]) | |
160 | + | if ((Q == 7)) | |
161 | + | then Y | |
162 | + | else { | |
163 | + | let Z = K(Y, P[7]) | |
164 | + | if ((Q == 8)) | |
165 | + | then Z | |
166 | + | else { | |
167 | + | let aa = K(Z, P[8]) | |
168 | + | if ((Q == 9)) | |
169 | + | then aa | |
170 | + | else { | |
171 | + | let ab = K(aa, P[9]) | |
172 | + | if ((Q == 10)) | |
173 | + | then ab | |
174 | + | else { | |
175 | + | let ac = K(ab, P[10]) | |
176 | + | throw("List size exceed 10") | |
177 | + | } | |
178 | + | } | |
179 | + | } | |
180 | + | } | |
181 | + | } | |
182 | + | } | |
183 | + | } | |
184 | + | } | |
185 | + | } | |
186 | + | } | |
187 | + | } | |
188 | + | } | |
189 | + | let ad = DataEntry(C, x) :: O | |
190 | + | let ae = DataEntry(F, (t(F) + G)) :: ad | |
191 | + | if ((H == true)) | |
192 | + | then WriteSet(ae) | |
193 | + | else { | |
194 | + | let af = DataEntry(d, (t(d) + G)) :: ae | |
195 | + | WriteSet(DataEntry(D, true) :: af) | |
196 | + | } | |
197 | + | } | |
198 | + | } | |
199 | + | ||
200 | + | ||
201 | + | @Verifier(ag) | |
202 | + | func ah () = { | |
203 | + | let o = ag | |
204 | + | if ($isInstanceOf(o, "SetScriptTransaction")) | |
205 | + | then { | |
206 | + | let ag = o | |
207 | + | let ai = toBase58String(ag.id) | |
208 | + | let aj = m("pAddress1") | |
209 | + | let ak = m("pAddress2") | |
210 | + | let al = m("pAddress3") | |
211 | + | let am = m("pAddress4") | |
212 | + | let an = m("pAddress5") | |
213 | + | let ao = m("pAddress6") | |
214 | + | let ap = m("pAddress7") | |
215 | + | let aq = m("pAddress8") | |
216 | + | let ar = if (isDefined(getInteger(aj, ai))) | |
217 | + | then 1 | |
218 | + | else 0 | |
219 | + | let as = if (isDefined(getInteger(ak, ai))) | |
220 | + | then 1 | |
221 | + | else 0 | |
222 | + | let at = if (isDefined(getInteger(al, ai))) | |
223 | + | then 1 | |
224 | + | else 0 | |
225 | + | let au = if (isDefined(getInteger(am, ai))) | |
226 | + | then 1 | |
227 | + | else 0 | |
228 | + | let av = if (isDefined(getInteger(an, ai))) | |
229 | + | then 1 | |
230 | + | else 0 | |
231 | + | let aw = if (isDefined(getInteger(ao, ai))) | |
232 | + | then 1 | |
233 | + | else 0 | |
234 | + | let ax = if (isDefined(getInteger(ap, ai))) | |
235 | + | then 1 | |
236 | + | else 0 | |
237 | + | let ay = if (isDefined(getInteger(aq, ai))) | |
238 | + | then 1 | |
239 | + | else 0 | |
240 | + | ((((((((ar + as) + at) + au) + av) + aw) + ax) + ay) >= 3) | |
241 | + | } | |
242 | + | else false | |
243 | + | } | |
244 | + |
github/deemru/w8io/026f985 21.14 ms ◑