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