tx · 4b6PdzzyQ68eM2GtTohqKqv138JWnKEVbYAXJHyztpbf 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves 2021.11.09 15:21 [1783457] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{ "type": 13, "id": "4b6PdzzyQ68eM2GtTohqKqv138JWnKEVbYAXJHyztpbf", "fee": 14000000, "feeAssetId": null, "timestamp": 1636460493226, "version": 2, "chainId": 84, "sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy", "senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq", "proofs": [ "43sNmY9AmHYX8JmmRcdQJEz8SA4vpNAr5VmpFPZvCN1wqZPwvGDQ7SBKK7DrAPXLXuHAMkzMrttYMLEHuLgyChqk", "3EptaPAvjH5L5rsbP4pNgeG2QfRGdkhDw5gfk4zjYzBmXS5kpUPker5CDD5qVG2gqunrQCiQexuRox6VzMyJ6udz" ], "script": "base64:AAIFAAAAAAAAACQIAhIAEgQKAggIEgQKAgEBEgMKAQESABIDCgEBEgASABIAEgAAAAAeAAAAAAxhZG1pblB1YktleTEBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTIBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAxhZG1pblB1YktleTMBAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgfFhre1LFpY1nHGv0qWq0IqeZxOUsuXuODcQ0QWjNUHgAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAADGtleVZvdGVTdGFydAIAAAARdm90ZV9zdGFydF9oZWlnaHQAAAAACmtleVZvdGVFbmQCAAAAD3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AAACBQAAAAxhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkyCQAETAAAAAIFAAAADGFkbWluUHViS2V5MwkABEwAAAACBQAAABRhZG1pblB1YktleVN0YXJ0U3RvcAUAAAADbmlsCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAAhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACBQAAAAlrZXlBY3RpdmUGCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAACGtleUNhdXNlBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAABJhZG1pblB1YktleTFTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkxAAAAAAAAAAABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTJTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAMYWRtaW5QdWJLZXkyAAAAAAAAAAABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTNTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAAC0g948Q==", "height": 1783457, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C55Fe8rZmV4TsdFMzUaZJntH3oy7a47PFpK5EUMzAE7V Next: 7bQjiBrxkQt8q58Pha2jDK8cZUtDAZdPqhKeTZXJLaVr Diff:
Old | New | Differences | |
---|---|---|---|
186 | 186 | @Callable(Q) | |
187 | 187 | func withdrawENNO (an) = if (!(t)) | |
188 | 188 | then throw("DApp is inactive at this moment") | |
189 | - | else if ((0 >= an)) | |
190 | - | then throw("withdrawAmount <= 0") | |
191 | - | else { | |
192 | - | let al = A() | |
193 | - | let ab = y(Q.caller) | |
194 | - | if ((an > al)) | |
195 | - | then throw("withdrawAmount is more than available to withdraw") | |
196 | - | else if ((an > ab)) | |
197 | - | then throw("You are trying to unstake more than you have staked.") | |
198 | - | else { | |
199 | - | let am = (al - an) | |
200 | - | let ao = (ab - an) | |
201 | - | [IntegerEntry((toString(Q.caller) + o), ao), IntegerEntry(p, am), ScriptTransfer(Q.caller, an, v)] | |
202 | - | } | |
203 | - | } | |
189 | + | else { | |
190 | + | let ao = (D((toString(Q.caller) + j)) - an) | |
191 | + | if ((0 >= ao)) | |
192 | + | then throw("DApp is inactive at this moment") | |
193 | + | else if ((0 >= ao)) | |
194 | + | then throw("withdrawAmount <= 0") | |
195 | + | else { | |
196 | + | let al = A() | |
197 | + | let ab = y(Q.caller) | |
198 | + | if ((ao > al)) | |
199 | + | then throw("withdrawAmount is more than available to withdraw") | |
200 | + | else if ((ao > ab)) | |
201 | + | then throw("You are trying to unstake more than you have staked.") | |
202 | + | else { | |
203 | + | let am = (al - ao) | |
204 | + | let ap = (ab - ao) | |
205 | + | [IntegerEntry((toString(Q.caller) + o), ap), IntegerEntry(p, am), ScriptTransfer(Q.caller, ao, v)] | |
206 | + | } | |
207 | + | } | |
208 | + | } | |
204 | 209 | ||
205 | 210 | ||
206 | 211 | ||
208 | 213 | func claimAndWithdrawENNO () = if (!(t)) | |
209 | 214 | then throw("DApp is inactive at this moment") | |
210 | 215 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
216 | + | let aq = E(Q.originCaller) | |
217 | + | let ar = K(Q.originCaller) | |
218 | + | let as = (aq - ar) | |
214 | 219 | let al = A() | |
215 | - | if (( | |
220 | + | if ((as > al)) | |
216 | 221 | then throw("claimAmount is more than available to withdraw") | |
217 | - | else if ((0 >= | |
222 | + | else if ((0 >= as)) | |
218 | 223 | then throw("Claim amount must be bigger than 0") | |
219 | 224 | else { | |
220 | - | let | |
221 | - | [IntegerEntry((toString(Q.originCaller) + q), | |
225 | + | let at = (ar + as) | |
226 | + | [IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), ScriptTransfer(Q.originCaller, as, v)] | |
222 | 227 | } | |
223 | 228 | } | |
224 | 229 | ||
228 | 233 | func claimAndStakeENNO () = if (!(t)) | |
229 | 234 | then throw("DApp is inactive at this moment") | |
230 | 235 | else { | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | if ((0 >= | |
236 | + | let aq = E(Q.originCaller) | |
237 | + | let ar = K(Q.originCaller) | |
238 | + | let as = (aq - ar) | |
239 | + | if ((0 >= as)) | |
235 | 240 | then throw("Claim amount must be bigger than 0") | |
236 | 241 | else { | |
237 | - | let | |
242 | + | let at = (ar + as) | |
238 | 243 | let ab = y(Q.originCaller) | |
239 | - | let ak = (ab + | |
244 | + | let ak = (ab + as) | |
240 | 245 | let al = A() | |
241 | - | let am = (al + | |
242 | - | [IntegerEntry((toString(Q.originCaller) + o), ak), IntegerEntry((toString(Q.originCaller) + q), | |
246 | + | let am = (al + as) | |
247 | + | [IntegerEntry((toString(Q.originCaller) + o), ak), IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), IntegerEntry(p, am)] | |
243 | 248 | } | |
244 | 249 | } | |
245 | 250 | ||
262 | 267 | else [BooleanEntry(e, true), DeleteEntry(f)] | |
263 | 268 | ||
264 | 269 | ||
265 | - | @Verifier( | |
266 | - | func | |
267 | - | let | |
270 | + | @Verifier(au) | |
271 | + | func av () = { | |
272 | + | let aw = if (sigVerify(au.bodyBytes, au.proofs[0], a)) | |
268 | 273 | then 1 | |
269 | 274 | else 0 | |
270 | - | let | |
275 | + | let ax = if (sigVerify(au.bodyBytes, au.proofs[1], b)) | |
271 | 276 | then 1 | |
272 | 277 | else 0 | |
273 | - | let | |
278 | + | let ay = if (sigVerify(au.bodyBytes, au.proofs[2], c)) | |
274 | 279 | then 1 | |
275 | 280 | else 0 | |
276 | - | ((( | |
281 | + | (((aw + ax) + ay) >= 2) | |
277 | 282 | } | |
278 | 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 = "_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 | let R = D(n) | |
116 | 116 | let S = fraction(J, 100000000, R) | |
117 | 117 | [IntegerEntry((toString(Q.caller) + "_airdrop"), S), DeleteEntry((toString(Q.caller) + m)), DeleteEntry((toString(Q.caller) + j))] | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | 122 | @Callable(Q) | |
123 | 123 | func deleteEntry (T,U) = if (!(t)) | |
124 | 124 | then throw("DApp is inactive at this moment") | |
125 | 125 | else [DeleteEntry((T + "airdrop")), DeleteEntry((T + "_airdrop")), DeleteEntry((T + m)), DeleteEntry((T + j)), DeleteEntry((U + "airdrop")), DeleteEntry((U + "_airdrop")), DeleteEntry((U + m)), DeleteEntry((U + j))] | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | ||
129 | 129 | @Callable(Q) | |
130 | 130 | func initVote (V,W) = if (!(t)) | |
131 | 131 | then throw("DApp is inactive at this moment") | |
132 | 132 | else [IntegerEntry(g, V), IntegerEntry(h, W), IntegerEntry(n, 0)] | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(Q) | |
137 | 137 | func vote (X) = if (!(t)) | |
138 | 138 | then throw("DApp is inactive at this moment") | |
139 | 139 | else if ((D(g) > height)) | |
140 | 140 | then throw("Voting has not started yet.") | |
141 | 141 | else if ((height > D(h))) | |
142 | 142 | then throw("Voting has already ended.") | |
143 | 143 | else { | |
144 | 144 | let Y = D(n) | |
145 | 145 | let Z = B(Q.caller, m) | |
146 | 146 | let aa = B(Q.caller, j) | |
147 | 147 | let ab = B(Q.caller, o) | |
148 | 148 | let ac = (aa + X) | |
149 | 149 | if ((0 > ac)) | |
150 | 150 | then throw("Vote amount is more than available.") | |
151 | 151 | else { | |
152 | 152 | let ad = (ab - aa) | |
153 | 153 | let ae = N(X) | |
154 | 154 | if ((X > ad)) | |
155 | 155 | then throw("Vote amount is more than available.") | |
156 | 156 | else { | |
157 | 157 | let af = (Z + ae) | |
158 | 158 | let ag = (Y + af) | |
159 | 159 | [IntegerEntry((toString(Q.caller) + m), af), IntegerEntry((toString(Q.caller) + j), ac), IntegerEntry(n, ag)] | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | ||
166 | 166 | @Callable(Q) | |
167 | 167 | func lockENNO () = if (!(t)) | |
168 | 168 | then throw("DApp is inactive at this moment") | |
169 | 169 | else { | |
170 | 170 | let ah = $Tuple2(Q.payments[0].amount, Q.payments[0].assetId) | |
171 | 171 | let ai = ah._1 | |
172 | 172 | let aj = ah._2 | |
173 | 173 | if ((aj != v)) | |
174 | 174 | then throw("Incorrect payment assetId only Enno Cash is allowed.") | |
175 | 175 | else { | |
176 | 176 | let ab = y(Q.caller) | |
177 | 177 | let ak = (ab + ai) | |
178 | 178 | let al = A() | |
179 | 179 | let am = (al + ai) | |
180 | 180 | [IntegerEntry((toString(Q.caller) + o), ak), IntegerEntry(p, am)] | |
181 | 181 | } | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(Q) | |
187 | 187 | func withdrawENNO (an) = if (!(t)) | |
188 | 188 | then throw("DApp is inactive at this moment") | |
189 | - | else if ((0 >= an)) | |
190 | - | then throw("withdrawAmount <= 0") | |
191 | - | else { | |
192 | - | let al = A() | |
193 | - | let ab = y(Q.caller) | |
194 | - | if ((an > al)) | |
195 | - | then throw("withdrawAmount is more than available to withdraw") | |
196 | - | else if ((an > ab)) | |
197 | - | then throw("You are trying to unstake more than you have staked.") | |
198 | - | else { | |
199 | - | let am = (al - an) | |
200 | - | let ao = (ab - an) | |
201 | - | [IntegerEntry((toString(Q.caller) + o), ao), IntegerEntry(p, am), ScriptTransfer(Q.caller, an, v)] | |
202 | - | } | |
203 | - | } | |
189 | + | else { | |
190 | + | let ao = (D((toString(Q.caller) + j)) - an) | |
191 | + | if ((0 >= ao)) | |
192 | + | then throw("DApp is inactive at this moment") | |
193 | + | else if ((0 >= ao)) | |
194 | + | then throw("withdrawAmount <= 0") | |
195 | + | else { | |
196 | + | let al = A() | |
197 | + | let ab = y(Q.caller) | |
198 | + | if ((ao > al)) | |
199 | + | then throw("withdrawAmount is more than available to withdraw") | |
200 | + | else if ((ao > ab)) | |
201 | + | then throw("You are trying to unstake more than you have staked.") | |
202 | + | else { | |
203 | + | let am = (al - ao) | |
204 | + | let ap = (ab - ao) | |
205 | + | [IntegerEntry((toString(Q.caller) + o), ap), IntegerEntry(p, am), ScriptTransfer(Q.caller, ao, v)] | |
206 | + | } | |
207 | + | } | |
208 | + | } | |
204 | 209 | ||
205 | 210 | ||
206 | 211 | ||
207 | 212 | @Callable(Q) | |
208 | 213 | func claimAndWithdrawENNO () = if (!(t)) | |
209 | 214 | then throw("DApp is inactive at this moment") | |
210 | 215 | else { | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
216 | + | let aq = E(Q.originCaller) | |
217 | + | let ar = K(Q.originCaller) | |
218 | + | let as = (aq - ar) | |
214 | 219 | let al = A() | |
215 | - | if (( | |
220 | + | if ((as > al)) | |
216 | 221 | then throw("claimAmount is more than available to withdraw") | |
217 | - | else if ((0 >= | |
222 | + | else if ((0 >= as)) | |
218 | 223 | then throw("Claim amount must be bigger than 0") | |
219 | 224 | else { | |
220 | - | let | |
221 | - | [IntegerEntry((toString(Q.originCaller) + q), | |
225 | + | let at = (ar + as) | |
226 | + | [IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), ScriptTransfer(Q.originCaller, as, v)] | |
222 | 227 | } | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | 231 | ||
227 | 232 | @Callable(Q) | |
228 | 233 | func claimAndStakeENNO () = if (!(t)) | |
229 | 234 | then throw("DApp is inactive at this moment") | |
230 | 235 | else { | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | if ((0 >= | |
236 | + | let aq = E(Q.originCaller) | |
237 | + | let ar = K(Q.originCaller) | |
238 | + | let as = (aq - ar) | |
239 | + | if ((0 >= as)) | |
235 | 240 | then throw("Claim amount must be bigger than 0") | |
236 | 241 | else { | |
237 | - | let | |
242 | + | let at = (ar + as) | |
238 | 243 | let ab = y(Q.originCaller) | |
239 | - | let ak = (ab + | |
244 | + | let ak = (ab + as) | |
240 | 245 | let al = A() | |
241 | - | let am = (al + | |
242 | - | [IntegerEntry((toString(Q.originCaller) + o), ak), IntegerEntry((toString(Q.originCaller) + q), | |
246 | + | let am = (al + as) | |
247 | + | [IntegerEntry((toString(Q.originCaller) + o), ak), IntegerEntry((toString(Q.originCaller) + q), at), IntegerEntry((toString(Q.originCaller) + r), as), IntegerEntry(p, am)] | |
243 | 248 | } | |
244 | 249 | } | |
245 | 250 | ||
246 | 251 | ||
247 | 252 | ||
248 | 253 | @Callable(Q) | |
249 | 254 | func shutdown () = if (!(t)) | |
250 | 255 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) | |
251 | 256 | else if (!(containsElement([a, b, c, d], Q.callerPublicKey))) | |
252 | 257 | then throw("Only admin can call this function") | |
253 | 258 | else w("Paused by admin") | |
254 | 259 | ||
255 | 260 | ||
256 | 261 | ||
257 | 262 | @Callable(Q) | |
258 | 263 | func activate () = if (t) | |
259 | 264 | then throw("DApp is already active") | |
260 | 265 | else if (!(containsElement([a, b, c, d], Q.callerPublicKey))) | |
261 | 266 | then throw("Only admin can call this function") | |
262 | 267 | else [BooleanEntry(e, true), DeleteEntry(f)] | |
263 | 268 | ||
264 | 269 | ||
265 | - | @Verifier( | |
266 | - | func | |
267 | - | let | |
270 | + | @Verifier(au) | |
271 | + | func av () = { | |
272 | + | let aw = if (sigVerify(au.bodyBytes, au.proofs[0], a)) | |
268 | 273 | then 1 | |
269 | 274 | else 0 | |
270 | - | let | |
275 | + | let ax = if (sigVerify(au.bodyBytes, au.proofs[1], b)) | |
271 | 276 | then 1 | |
272 | 277 | else 0 | |
273 | - | let | |
278 | + | let ay = if (sigVerify(au.bodyBytes, au.proofs[2], c)) | |
274 | 279 | then 1 | |
275 | 280 | else 0 | |
276 | - | ((( | |
281 | + | (((aw + ax) + ay) >= 2) | |
277 | 282 | } | |
278 | 283 |
github/deemru/w8io/169f3d6 51.27 ms ◑