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