tx · AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves 2021.11.10 10:18 [1784607] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{ "type": 13, "id": "AfMYsPDgnRkUeUJ4U2uAYfATXixsHYUbwxwHRt6YtgqP", "fee": 14000000, "feeAssetId": null, "timestamp": 1636528740224, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "4ucq1vkXjBiV5cwwCWYVDqntqYsAWMhoMH4xnpo12zBBG4UpLBNFzoE33ikNARyAz6UyGzExXvmTtPiVKJJJ9hKh", "VWgXuKYr3GnsfmN6v8gavSJmjPdv7dHZKDooDmM58vNiCqiebfKtkStZqXA2C16q7DeDbUgDHKQfDFaRZWXXLxv" ], "script": "base64:AAIFAAAAAAAAACoIAhIAEgQKAggIEgUKAwEBCBIDCgEBEgMKAQESABIDCgEBEgASABIAEgAAAAAfAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVFb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JLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAvuFGXU=", "height": 1784607, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 63xFiLHjZujppAcyCaREnPX97ADZco2DRjK76k54d3jn Next: 85fSibY9c192EGPZ46QxwvaWkiyFhRXRHMP3LaVYe8fP Diff:
Old | New | Differences | |
---|---|---|---|
113 | 113 | func claimAirdrop () = if (!(u)) | |
114 | 114 | then throw("DApp is inactive at this moment") | |
115 | 115 | else { | |
116 | - | let S = | |
117 | - | let T = | |
116 | + | let S = getStringValue(this, q) | |
117 | + | let T = fromBase58String(S) | |
118 | 118 | let U = ("_" + S) | |
119 | 119 | let K = E(((toString(R.caller) + U) + m)) | |
120 | 120 | if ((0 >= K)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
5 | 5 | ||
6 | 6 | let b = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
7 | 7 | ||
8 | 8 | let c = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
9 | 9 | ||
10 | 10 | let d = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
11 | 11 | ||
12 | 12 | let e = "active" | |
13 | 13 | ||
14 | 14 | let f = "shutdown_cause" | |
15 | 15 | ||
16 | 16 | let g = "vote_start_height" | |
17 | 17 | ||
18 | 18 | let h = "vote_end_height" | |
19 | 19 | ||
20 | 20 | let i = "yes_amount" | |
21 | 21 | ||
22 | 22 | let j = "_ENNO_vote" | |
23 | 23 | ||
24 | 24 | let k = "_ENNO_vote_height" | |
25 | 25 | ||
26 | 26 | let l = "_ENNO_vote_value" | |
27 | 27 | ||
28 | 28 | let m = "_ENNO_vote_yes_share" | |
29 | 29 | ||
30 | 30 | let n = "total_ENNO_vote_yes" | |
31 | 31 | ||
32 | 32 | let o = "_ENNO_amount" | |
33 | 33 | ||
34 | 34 | let p = "total_ENNO_amount" | |
35 | 35 | ||
36 | 36 | let q = "active_airdrop_token" | |
37 | 37 | ||
38 | 38 | let r = "_ENNO_claimed_amount" | |
39 | 39 | ||
40 | 40 | let s = "_ENNO_last_claimed_amount" | |
41 | 41 | ||
42 | 42 | let t = "share_" | |
43 | 43 | ||
44 | 44 | let u = valueOrElse(getBoolean(this, e), true) | |
45 | 45 | ||
46 | 46 | let v = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' | |
47 | 47 | ||
48 | 48 | let w = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' | |
49 | 49 | ||
50 | 50 | func x (y) = [BooleanEntry(e, false), StringEntry(f, y)] | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func z (A) = valueOrElse(getInteger(this, (toString(A) + o)), 0) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func B () = valueOrElse(getInteger(this, p), 0) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func C (A,D) = valueOrElse(getInteger(this, (toString(A) + D)), 0) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func E (D) = valueOrElse(getInteger(this, D), 0) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func F (G) = { | |
66 | 66 | let H = getInteger(addressFromPublicKey(v), (t + toString(G))) | |
67 | 67 | let I = { | |
68 | 68 | let J = H | |
69 | 69 | if ($isInstanceOf(J, "Int")) | |
70 | 70 | then { | |
71 | 71 | let K = J | |
72 | 72 | K | |
73 | 73 | } | |
74 | 74 | else if ($isInstanceOf(J, "Unit")) | |
75 | 75 | then { | |
76 | 76 | let K = J | |
77 | 77 | throw("Only governance qualifiers can call this function.") | |
78 | 78 | } | |
79 | 79 | else throw("Match error") | |
80 | 80 | } | |
81 | 81 | I | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func L (G) = { | |
86 | 86 | let M = getInteger(this, (toString(G) + r)) | |
87 | 87 | let N = { | |
88 | 88 | let J = M | |
89 | 89 | if ($isInstanceOf(J, "Int")) | |
90 | 90 | then { | |
91 | 91 | let K = J | |
92 | 92 | K | |
93 | 93 | } | |
94 | 94 | else if ($isInstanceOf(J, "Unit")) | |
95 | 95 | then { | |
96 | 96 | let K = J | |
97 | 97 | 0 | |
98 | 98 | } | |
99 | 99 | else throw("Match error") | |
100 | 100 | } | |
101 | 101 | N | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func O (P) = { | |
106 | 106 | let Q = (E(h) - height) | |
107 | 107 | let K = fraction(P, Q, 100000000) | |
108 | 108 | K | |
109 | 109 | } | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(R) | |
113 | 113 | func claimAirdrop () = if (!(u)) | |
114 | 114 | then throw("DApp is inactive at this moment") | |
115 | 115 | else { | |
116 | - | let S = | |
117 | - | let T = | |
116 | + | let S = getStringValue(this, q) | |
117 | + | let T = fromBase58String(S) | |
118 | 118 | let U = ("_" + S) | |
119 | 119 | let K = E(((toString(R.caller) + U) + m)) | |
120 | 120 | if ((0 >= K)) | |
121 | 121 | then throw("You already claimed or you have not participated.") | |
122 | 122 | else { | |
123 | 123 | let V = E(n) | |
124 | 124 | let W = fraction(K, 100000000, V) | |
125 | 125 | [DeleteEntry(((toString(R.caller) + U) + m)), DeleteEntry((toString(R.caller) + j)), ScriptTransfer(R.caller, W, T)] | |
126 | 126 | } | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | 131 | @Callable(R) | |
132 | 132 | func deleteEntry (X,Y) = if (!(u)) | |
133 | 133 | then throw("DApp is inactive at this moment") | |
134 | 134 | else { | |
135 | 135 | let U = ("_" + valueOrElse(getString(this, q), "N/A")) | |
136 | 136 | [DeleteEntry((X + "_airdrop")), DeleteEntry(((X + U) + m)), DeleteEntry((X + j)), DeleteEntry((Y + "_airdrop")), DeleteEntry(((Y + U) + m)), DeleteEntry((Y + j))] | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(R) | |
142 | 142 | func initVote (Z,aa,S) = if (!(u)) | |
143 | 143 | then throw("DApp is inactive at this moment") | |
144 | 144 | else [StringEntry(q, S), IntegerEntry(g, Z), IntegerEntry(h, aa), IntegerEntry(n, 0)] | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | ||
148 | 148 | @Callable(R) | |
149 | 149 | func unvote (ab) = if (!(u)) | |
150 | 150 | then throw("DApp is inactive at this moment") | |
151 | 151 | else if ((E(g) > height)) | |
152 | 152 | then throw("Voting has not started yet.") | |
153 | 153 | else if ((height > E(h))) | |
154 | 154 | then throw("Voting has already ended.") | |
155 | 155 | else { | |
156 | 156 | let U = ("_" + valueOrElse(getString(this, q), "N/A")) | |
157 | 157 | let ac = E(n) | |
158 | 158 | let ad = C(R.caller, (U + m)) | |
159 | 159 | let ae = C(R.caller, j) | |
160 | 160 | let af = (ae - ab) | |
161 | 161 | if ((0 > af)) | |
162 | 162 | then throw("Vote amount is less than available.") | |
163 | 163 | else { | |
164 | 164 | let ag = O(ab) | |
165 | 165 | let ah = (ad - ag) | |
166 | 166 | let ai = (ac - ag) | |
167 | 167 | [IntegerEntry(((toString(R.caller) + U) + m), ah), IntegerEntry((toString(R.caller) + j), af), IntegerEntry(n, ai)] | |
168 | 168 | } | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(R) | |
174 | 174 | func vote (ab) = if (!(u)) | |
175 | 175 | then throw("DApp is inactive at this moment") | |
176 | 176 | else if ((E(g) > height)) | |
177 | 177 | then throw("Voting has not started yet.") | |
178 | 178 | else if ((height > E(h))) | |
179 | 179 | then throw("Voting has already ended.") | |
180 | 180 | else { | |
181 | 181 | let ac = E(n) | |
182 | 182 | let U = ("_" + valueOrElse(getString(this, q), "N/A")) | |
183 | 183 | let ad = C(R.caller, (U + m)) | |
184 | 184 | let ae = C(R.caller, j) | |
185 | 185 | let aj = C(R.caller, o) | |
186 | 186 | let af = (ae + ab) | |
187 | 187 | if ((0 > af)) | |
188 | 188 | then throw("Vote amount is more than available.") | |
189 | 189 | else { | |
190 | 190 | let ak = (aj - ae) | |
191 | 191 | let ag = O(ab) | |
192 | 192 | if ((ab > ak)) | |
193 | 193 | then throw("Vote amount is more than available.") | |
194 | 194 | else { | |
195 | 195 | let ah = (ad + ag) | |
196 | 196 | let ai = (ac + ag) | |
197 | 197 | [IntegerEntry(((toString(R.caller) + U) + m), ah), IntegerEntry((toString(R.caller) + j), af), IntegerEntry(n, ai)] | |
198 | 198 | } | |
199 | 199 | } | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | 204 | @Callable(R) | |
205 | 205 | func lockENNO () = if (!(u)) | |
206 | 206 | then throw("DApp is inactive at this moment") | |
207 | 207 | else { | |
208 | 208 | let al = $Tuple2(R.payments[0].amount, R.payments[0].assetId) | |
209 | 209 | let am = al._1 | |
210 | 210 | let an = al._2 | |
211 | 211 | if ((an != w)) | |
212 | 212 | then throw("Incorrect payment assetId only Enno Cash is allowed.") | |
213 | 213 | else { | |
214 | 214 | let aj = z(R.caller) | |
215 | 215 | let ao = (aj + am) | |
216 | 216 | let ap = B() | |
217 | 217 | let aq = (ap + am) | |
218 | 218 | [IntegerEntry((toString(R.caller) + o), ao), IntegerEntry(p, aq)] | |
219 | 219 | } | |
220 | 220 | } | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(R) | |
225 | 225 | func withdrawENNO (ar) = if (!(u)) | |
226 | 226 | then throw("DApp is inactive at this moment") | |
227 | 227 | else { | |
228 | 228 | let aj = z(R.caller) | |
229 | 229 | let as = (aj - E((toString(R.caller) + j))) | |
230 | 230 | if ((ar > as)) | |
231 | 231 | then throw("Your Enno is locked") | |
232 | 232 | else if ((0 >= ar)) | |
233 | 233 | then throw("withdrawAmount <= 0") | |
234 | 234 | else { | |
235 | 235 | let ap = B() | |
236 | 236 | if ((ar > ap)) | |
237 | 237 | then throw("withdrawAmount is more than available to withdraw") | |
238 | 238 | else if ((ar > aj)) | |
239 | 239 | then throw("You are trying to unstake more than you have staked.") | |
240 | 240 | else { | |
241 | 241 | let aq = (ap - ar) | |
242 | 242 | let at = (aj - ar) | |
243 | 243 | [IntegerEntry((toString(R.caller) + o), at), IntegerEntry(p, aq), ScriptTransfer(R.caller, ar, w)] | |
244 | 244 | } | |
245 | 245 | } | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(R) | |
251 | 251 | func claimAndWithdrawENNO () = if (!(u)) | |
252 | 252 | then throw("DApp is inactive at this moment") | |
253 | 253 | else { | |
254 | 254 | let au = F(R.originCaller) | |
255 | 255 | let av = L(R.originCaller) | |
256 | 256 | let aw = (au - av) | |
257 | 257 | let ap = B() | |
258 | 258 | if ((aw > ap)) | |
259 | 259 | then throw("claimAmount is more than available to withdraw") | |
260 | 260 | else if ((0 >= aw)) | |
261 | 261 | then throw("Claim amount must be bigger than 0") | |
262 | 262 | else { | |
263 | 263 | let ax = (av + aw) | |
264 | 264 | [IntegerEntry((toString(R.originCaller) + r), ax), IntegerEntry((toString(R.originCaller) + s), aw), ScriptTransfer(R.originCaller, aw, w)] | |
265 | 265 | } | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | ||
270 | 270 | @Callable(R) | |
271 | 271 | func claimAndStakeENNO () = if (!(u)) | |
272 | 272 | then throw("DApp is inactive at this moment") | |
273 | 273 | else { | |
274 | 274 | let au = F(R.originCaller) | |
275 | 275 | let av = L(R.originCaller) | |
276 | 276 | let aw = (au - av) | |
277 | 277 | if ((0 >= aw)) | |
278 | 278 | then throw("Claim amount must be bigger than 0") | |
279 | 279 | else { | |
280 | 280 | let ax = (av + aw) | |
281 | 281 | let aj = z(R.originCaller) | |
282 | 282 | let ao = (aj + aw) | |
283 | 283 | let ap = B() | |
284 | 284 | let aq = (ap + aw) | |
285 | 285 | [IntegerEntry((toString(R.originCaller) + o), ao), IntegerEntry((toString(R.originCaller) + r), ax), IntegerEntry((toString(R.originCaller) + s), aw), IntegerEntry(p, aq)] | |
286 | 286 | } | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(R) | |
292 | 292 | func shutdown () = if (!(u)) | |
293 | 293 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) | |
294 | 294 | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) | |
295 | 295 | then throw("Only admin can call this function") | |
296 | 296 | else x("Paused by admin") | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(R) | |
301 | 301 | func activate () = if (u) | |
302 | 302 | then throw("DApp is already active") | |
303 | 303 | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) | |
304 | 304 | then throw("Only admin can call this function") | |
305 | 305 | else [BooleanEntry(e, true), DeleteEntry(f)] | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | @Verifier(ay) | |
309 | 309 | func az () = { | |
310 | 310 | let aA = if (sigVerify(ay.bodyBytes, ay.proofs[0], a)) | |
311 | 311 | then 1 | |
312 | 312 | else 0 | |
313 | 313 | let aB = if (sigVerify(ay.bodyBytes, ay.proofs[1], b)) | |
314 | 314 | then 1 | |
315 | 315 | else 0 | |
316 | 316 | let aC = if (sigVerify(ay.bodyBytes, ay.proofs[2], c)) | |
317 | 317 | then 1 | |
318 | 318 | else 0 | |
319 | 319 | (((aA + aB) + aC) >= 2) | |
320 | 320 | } | |
321 | 321 |
github/deemru/w8io/026f985 41.68 ms ◑