tx · 9q1aqEZwcGtKrjvCYgSR24VDMucCCqvG8CRyAPAV4gdi 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves 2021.11.10 09:02 [1784531] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{ "type": 13, "id": "9q1aqEZwcGtKrjvCYgSR24VDMucCCqvG8CRyAPAV4gdi", "fee": 14000000, "feeAssetId": null, "timestamp": 1636524173467, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "2ks8ESLzx3nigLc8XBw6XYvrb3PRfVyNiBMuUd9CjiNUcPQfcRbfawWqAPfCxUXXeD1rNfRHdchhfgxaCKL3j4mD", "2YB9h6C9vTc1euvNXy6vHSaZS7JfVhtV4WFQf6wwnDF5Qmv16CTWs7xtAbcSLUSxm2jyEJGHWjkrjkTFHGaogDNy" ], "script": "base64:AAIFAAAAAAAAACkIAhIAEgQKAggIEgQKAgEBEgMKAQESAwoBARIAEgMKAQESABIAEgASAAAAAB4AAAAADGFkbWluUHViS2V5MQEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAADGFkbWluUHViS2V5MgEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAADGFkbWluUHViS2V5MwEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAACGtleUNhdXNlAgAAAA5zaHV0ZG93bl9jYXVzZQAAAAAMa2V5Vm90ZVN0YXJ0AgAAABF2b3RlX3N0YXJ0X2hlaWdodAAAAAAKa2V5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AAAGcHJvb2ZzAAAAAAAAAAABBQAAAAxhZG1pblB1YktleTIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAEmFkbWluUHViS2V5M1NpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAIT70M/", "height": 1784531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EhJpCDTLCjqP38hYoxDQTegcF1ZzkwQekKcsvp64sVe2 Next: AhG99GKKe4byLuucnHXMsy2aQoyZamU7wZvkbgwqCjto Diff:
Old | New | Differences | |
---|---|---|---|
217 | 217 | else { | |
218 | 218 | let af = y(Q.caller) | |
219 | 219 | let ao = (af - D((toString(Q.caller) + j))) | |
220 | - | if (( | |
220 | + | if ((an > ao)) | |
221 | 221 | then throw("Your Enno is locked") | |
222 | 222 | else if ((0 >= an)) | |
223 | 223 | then throw("withdrawAmount <= 0") |
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 | 218 | let af = y(Q.caller) | |
219 | 219 | let ao = (af - D((toString(Q.caller) + j))) | |
220 | - | if (( | |
220 | + | if ((an > ao)) | |
221 | 221 | then throw("Your Enno is locked") | |
222 | 222 | else if ((0 >= an)) | |
223 | 223 | then throw("withdrawAmount <= 0") | |
224 | 224 | else { | |
225 | 225 | let al = A() | |
226 | 226 | if ((an > al)) | |
227 | 227 | then throw("withdrawAmount is more than available to withdraw") | |
228 | 228 | else if ((an > af)) | |
229 | 229 | then throw("You are trying to unstake more than you have staked.") | |
230 | 230 | else { | |
231 | 231 | let am = (al - an) | |
232 | 232 | let ap = (af - an) | |
233 | 233 | [IntegerEntry((toString(Q.caller) + o), ap), IntegerEntry(p, am), ScriptTransfer(Q.caller, an, v)] | |
234 | 234 | } | |
235 | 235 | } | |
236 | 236 | } | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | ||
240 | 240 | @Callable(Q) | |
241 | 241 | func claimAndWithdrawENNO () = if (!(t)) | |
242 | 242 | then throw("DApp is inactive at this moment") | |
243 | 243 | else { | |
244 | 244 | let aq = E(Q.originCaller) | |
245 | 245 | let ar = K(Q.originCaller) | |
246 | 246 | let as = (aq - ar) | |
247 | 247 | let al = A() | |
248 | 248 | if ((as > al)) | |
249 | 249 | then throw("claimAmount is more than available to withdraw") | |
250 | 250 | else if ((0 >= as)) | |
251 | 251 | then throw("Claim amount must be bigger than 0") | |
252 | 252 | else { | |
253 | 253 | let at = (ar + as) | |
254 | 254 | [IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), ScriptTransfer(Q.originCaller, as, v)] | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(Q) | |
261 | 261 | func claimAndStakeENNO () = if (!(t)) | |
262 | 262 | then throw("DApp is inactive at this moment") | |
263 | 263 | else { | |
264 | 264 | let aq = E(Q.originCaller) | |
265 | 265 | let ar = K(Q.originCaller) | |
266 | 266 | let as = (aq - ar) | |
267 | 267 | if ((0 >= as)) | |
268 | 268 | then throw("Claim amount must be bigger than 0") | |
269 | 269 | else { | |
270 | 270 | let at = (ar + as) | |
271 | 271 | let af = y(Q.originCaller) | |
272 | 272 | let ak = (af + as) | |
273 | 273 | let al = A() | |
274 | 274 | let am = (al + as) | |
275 | 275 | [IntegerEntry((toString(Q.originCaller) + o), ak), IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), IntegerEntry(p, am)] | |
276 | 276 | } | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | ||
281 | 281 | @Callable(Q) | |
282 | 282 | func shutdown () = if (!(t)) | |
283 | 283 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) | |
284 | 284 | else if (!(containsElement([a, b, c, d], Q.callerPublicKey))) | |
285 | 285 | then throw("Only admin can call this function") | |
286 | 286 | else w("Paused by admin") | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(Q) | |
291 | 291 | func activate () = if (t) | |
292 | 292 | then throw("DApp is already active") | |
293 | 293 | else if (!(containsElement([a, b, c, d], Q.callerPublicKey))) | |
294 | 294 | then throw("Only admin can call this function") | |
295 | 295 | else [BooleanEntry(e, true), DeleteEntry(f)] | |
296 | 296 | ||
297 | 297 | ||
298 | 298 | @Verifier(au) | |
299 | 299 | func av () = { | |
300 | 300 | let aw = if (sigVerify(au.bodyBytes, au.proofs[0], a)) | |
301 | 301 | then 1 | |
302 | 302 | else 0 | |
303 | 303 | let ax = if (sigVerify(au.bodyBytes, au.proofs[1], b)) | |
304 | 304 | then 1 | |
305 | 305 | else 0 | |
306 | 306 | let ay = if (sigVerify(au.bodyBytes, au.proofs[2], c)) | |
307 | 307 | then 1 | |
308 | 308 | else 0 | |
309 | 309 | (((aw + ax) + ay) >= 2) | |
310 | 310 | } | |
311 | 311 |
github/deemru/w8io/169f3d6 40.93 ms ◑