tx · 3y3CEUoeVREv9VSB8tKRJmMphn3YAkQpznckVTxtyRp2 3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb: -0.01400000 Waves 2021.05.24 18:12 [1539920] smart account 3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb > SELF 0.00000000 Waves
{ "type": 13, "id": "3y3CEUoeVREv9VSB8tKRJmMphn3YAkQpznckVTxtyRp2", "fee": 1400000, "feeAssetId": null, "timestamp": 1621869133640, "version": 2, "chainId": 84, "sender": "3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb", "senderPublicKey": "61fhePmC5L8iWserAMXoPAZbv24cAo6eyvnyYpoLpZJy", "proofs": [ "3Vw41jU67dT9XvLtyJPBLThgurUxTQrUB8iwiB4FpVr5z7QAe2ed3eRsr7i7H7TGK5B7M5dh5yzMZvKTKZMAfhNk" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAA5AAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAABR2b3RpbmdfYWN0aXZlX251bWJlcgAAAAAPa2V5SGVpZ2h0T2ZQb29sAgAAAA5fZmluaXNoX2hlaWdodAAAAAAFa2V5Tm8CAAAAD190b3RhbF92b3Rlc19ubwAAAAAGa2V5WWVzAgAAABBfdG90YWxfdm90ZXNfeWVzAAAAAAlrZXlOb1VzZXICAAAACF92b3RlX25vAAAAAAprZXlZZXNVc2VyAgAAAAlfdm90ZV95ZXMAAAAAEWtleVN0YXR1c09mVm90aW5nAgAAAAdfc3RhdHVzAAAAABFrZXlBbW91bnRPZlZvdGluZwIAAAAOdm90aW5nX2lkX2xhc3QAAAAAFGtleU1heEFtb3VudE9mVm90aW5nAgAAABFtYXhfYW1vdW50X3ZvdGluZwAAAAARa2V5TWF4RGF5T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AAAAAWkBAAAACGFjdGl2YXRlAAAAAAMFAAAACGlzQWN0aXZlCQAAAgAAAAECAAAAFkRBcHAgaXMgYWxyZWFkeSBhY3RpdmUDCQEAAAABIQAAAAEJAQAAAA9jb250YWluc0VsZW1lbnQAAAACCQAETAAAAAIFAAAADGFkbWluUHViS2V5MQkABEwAAAACBQAAAAxhZG1pblB1YktleTIJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkzCQAETAAAAAIFAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wBQAAAANuaWwIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAACFPbmx5IGFkbWluIGNhbiBjYWxsIHRoaXMgZnVuY3Rpb24JAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACWtleUFjdGl2ZQYJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAIa2V5Q2F1c2UFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Onnslw==", "height": 1539920, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7mmFgx9qsxpRSiiHy3wKQKQ9J1g7PeWUUd4inRyUCHwh Next: EavwTQcPSpborJQbbASYFuo7cGisKUh5MPuU69aCJxqm Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | let x = "voting_active_cell_3" | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let A = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let B = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 59 | ||
60 | - | let C = base58' | |
60 | + | let C = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 61 | ||
62 | - | let D = base58' | |
62 | + | let D = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = getBooleanValue(this, c) | |
69 | 69 | ||
70 | - | let H = | |
70 | + | let H = getIntegerValue(this, d) | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = getIntegerValue(this, k) | |
73 | 73 | ||
74 | - | let J = | |
74 | + | let J = valueOrElse(getString(this, v), "") | |
75 | 75 | ||
76 | - | let K = | |
76 | + | let K = valueOrElse(getString(this, w), "") | |
77 | 77 | ||
78 | - | let L = valueOrElse(getString(this, | |
78 | + | let L = valueOrElse(getString(this, x), "") | |
79 | 79 | ||
80 | - | let M = | |
80 | + | let M = 1000000000 | |
81 | 81 | ||
82 | - | let N = | |
82 | + | let N = 1000 | |
83 | 83 | ||
84 | - | let O = | |
84 | + | let O = 100000000 | |
85 | 85 | ||
86 | - | let P = | |
86 | + | let P = 1000 | |
87 | 87 | ||
88 | - | let Q = | |
88 | + | let Q = 8 | |
89 | 89 | ||
90 | - | let R = | |
90 | + | let R = 3 | |
91 | 91 | ||
92 | - | let S = | |
92 | + | let S = 7 | |
93 | 93 | ||
94 | - | let T = | |
94 | + | let T = 15 | |
95 | 95 | ||
96 | - | let U = 8 | |
97 | - | ||
98 | - | let V = 5 | |
99 | - | ||
100 | - | let W = 5 | |
101 | - | ||
102 | - | let X = 15 | |
103 | - | ||
104 | - | func Y (Z) = { | |
105 | - | let aa = Z | |
106 | - | if ($isInstanceOf(aa, "ByteVector")) | |
96 | + | func U (V) = { | |
97 | + | let W = V | |
98 | + | if ($isInstanceOf(W, "ByteVector")) | |
107 | 99 | then { | |
108 | - | let | |
109 | - | if (isDefined(assetInfo( | |
100 | + | let X = W | |
101 | + | if (isDefined(assetInfo(X))) | |
110 | 102 | then { | |
111 | - | let | |
112 | - | let | |
113 | - | $Tuple3( | |
103 | + | let Y = toBase58String(X) | |
104 | + | let Z = valueOrErrorMessage(assetInfo(X), (("Asset " + Y) + " doesn't exist")) | |
105 | + | $Tuple3(Y, Z.name, Z.decimals) | |
114 | 106 | } | |
115 | - | else throw("Asset is not | |
107 | + | else throw("Asset is not defined") | |
116 | 108 | } | |
117 | - | else if ($isInstanceOf( | |
109 | + | else if ($isInstanceOf(W, "Unit")) | |
118 | 110 | then { | |
119 | - | let | |
111 | + | let aa = W | |
120 | 112 | $Tuple3("WAVES", "WAVES", 8) | |
121 | 113 | } | |
122 | 114 | else throw("Match error") | |
123 | 115 | } | |
124 | 116 | ||
125 | 117 | ||
126 | - | func | |
127 | - | let | |
128 | - | let | |
129 | - | if (if ( | |
130 | - | then ( | |
118 | + | func ab (ac,ad,ae) = { | |
119 | + | let af = split(ac, "_") | |
120 | + | let ag = isDefined(getInteger(this, ac)) | |
121 | + | if (if (ag) | |
122 | + | then (ac != "") | |
131 | 123 | else false) | |
132 | 124 | then { | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | let | |
138 | - | if ( | |
139 | - | then if (( | |
140 | - | then if ( | |
125 | + | let ah = af[2] | |
126 | + | let ai = (((((ad + "_") + ae) + "_") + ah) + t) | |
127 | + | let aj = isDefined(getInteger(this, ai)) | |
128 | + | let ak = valueOrElse(getInteger(this, (ah + e)), 0) | |
129 | + | let al = valueOrElse(getBoolean(this, (ah + j)), true) | |
130 | + | if (aj) | |
131 | + | then if ((ak > height)) | |
132 | + | then if (al) | |
141 | 133 | then true | |
142 | 134 | else false | |
143 | 135 | else false | |
147 | 139 | } | |
148 | 140 | ||
149 | 141 | ||
150 | - | func | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | if (if ( | |
155 | - | then ( | |
142 | + | func am (an) = { | |
143 | + | let ac = valueOrElse(getString(this, an), "") | |
144 | + | let af = split(ac, "_") | |
145 | + | let ag = isDefined(getInteger(this, ac)) | |
146 | + | if (if (ag) | |
147 | + | then (ac != "") | |
156 | 148 | else false) | |
157 | 149 | then { | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | if (( | |
162 | - | then if ( | |
150 | + | let ah = af[2] | |
151 | + | let ak = valueOrElse(getInteger(this, (ah + e)), 0) | |
152 | + | let al = valueOrElse(getBoolean(this, (ah + j)), true) | |
153 | + | if ((ak > height)) | |
154 | + | then if (al) | |
163 | 155 | then "" | |
164 | - | else | |
165 | - | else | |
156 | + | else an | |
157 | + | else an | |
166 | 158 | } | |
167 | - | else | |
159 | + | else an | |
168 | 160 | } | |
169 | 161 | ||
170 | 162 | ||
171 | - | func | |
163 | + | func ao (ad,ae) = if (if (ab(J, ad, ae)) | |
172 | 164 | then true | |
173 | - | else | |
165 | + | else ab(K, ad, ae)) | |
174 | 166 | then true | |
175 | - | else af(N, ah, ai)) | |
176 | - | then true | |
177 | - | else af(O, ah, ai)) | |
178 | - | then true | |
179 | - | else af(P, ah, ai) | |
167 | + | else ab(L, ad, ae) | |
180 | 168 | ||
181 | 169 | ||
182 | - | func | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | if ((0 > | |
170 | + | func ap (ah) = { | |
171 | + | let ak = valueOrElse(getInteger(this, (toString(ah) + e)), 0) | |
172 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
173 | + | let aq = height | |
174 | + | if ((0 > ah)) | |
187 | 175 | then 0 | |
188 | - | else if (!( | |
176 | + | else if (!(al)) | |
189 | 177 | then 0 | |
190 | - | else if (( | |
178 | + | else if ((ak > aq)) | |
191 | 179 | then 1 | |
192 | 180 | else 0 | |
193 | 181 | } | |
194 | 182 | ||
195 | 183 | ||
196 | - | func | |
184 | + | func ar () = ((ap(valueOrElse(getInteger(this, J), -1)) + ap(valueOrElse(getInteger(this, K), -1))) + ap(valueOrElse(getInteger(this, L), -1))) | |
197 | 185 | ||
198 | 186 | ||
199 | - | func | |
187 | + | func as () = if ((am(v) != "")) | |
200 | 188 | then v | |
201 | - | else if (( | |
189 | + | else if ((am(w) != "")) | |
202 | 190 | then w | |
203 | - | else if (( | |
191 | + | else if ((am(x) != "")) | |
204 | 192 | then x | |
205 | - | else if ((aq(y) != "")) | |
206 | - | then y | |
207 | - | else if ((aq(z) != "")) | |
208 | - | then z | |
209 | - | else "" | |
193 | + | else "" | |
210 | 194 | ||
211 | 195 | ||
212 | - | func | |
196 | + | func at (au) = if ((au == "WAVES")) | |
213 | 197 | then unit | |
214 | - | else fromBase58String( | |
198 | + | else fromBase58String(au) | |
215 | 199 | ||
216 | 200 | ||
217 | - | func | |
201 | + | func av (aw) = if ((valueOrElse(getInteger(D, (toString(aw) + r)), 0) > 0)) | |
218 | 202 | then true | |
219 | 203 | else false | |
220 | 204 | ||
221 | 205 | ||
222 | - | func | |
206 | + | func ax (ay) = [BooleanEntry(c, false), StringEntry(p, ay)] | |
223 | 207 | ||
224 | 208 | ||
225 | - | func | |
209 | + | func az (aA,aB) = throw(((((("Insufficient DApp balance to pay " + toString(aA)) + " ") + aB) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
226 | 210 | ||
227 | 211 | ||
228 | - | @Callable( | |
229 | - | func init () = if (( | |
212 | + | @Callable(aC) | |
213 | + | func init () = if ((aC.caller != this)) | |
230 | 214 | then throw("Only the DApp itself can call this function") | |
231 | 215 | else if (isDefined(getBoolean(this, c))) | |
232 | 216 | then throw("DApp is already active") | |
233 | 217 | else { | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | [StringEntry(b, a), BooleanEntry(c, | |
218 | + | let aD = 0 | |
219 | + | let aE = 0 | |
220 | + | let aF = true | |
221 | + | let aG = "" | |
222 | + | [StringEntry(b, a), BooleanEntry(c, aF), IntegerEntry(d, aD), IntegerEntry(k, aE), IntegerEntry(l, R), IntegerEntry(m, S), StringEntry(v, aG), StringEntry(w, aG), StringEntry(x, aG)] | |
239 | 223 | } | |
240 | 224 | ||
241 | 225 | ||
242 | 226 | ||
243 | - | @Callable(aG) | |
244 | - | func initVotingForNewPool (ah,ai) = { | |
245 | - | let aL = $Tuple2(aG.payments[0].amount, aG.payments[0].assetId) | |
246 | - | let aM = aL._1 | |
247 | - | let aN = aL._2 | |
248 | - | let aO = $Tuple2(ax(ah), ax(ai)) | |
249 | - | let aP = aO._1 | |
250 | - | let aQ = aO._2 | |
251 | - | let aR = aw() | |
252 | - | let aS = av() | |
253 | - | let aT = as(ah, ai) | |
254 | - | let aU = Y(aP) | |
227 | + | @Callable(aC) | |
228 | + | func initVotingForNewPool (ad,ae) = { | |
229 | + | let aH = $Tuple2(aC.payments[0].amount, aC.payments[0].assetId) | |
230 | + | let aI = aH._1 | |
231 | + | let aJ = aH._2 | |
232 | + | let aK = $Tuple2(at(ad), at(ae)) | |
233 | + | let aL = aK._1 | |
234 | + | let aM = aK._2 | |
235 | + | let aN = as() | |
236 | + | let aO = ar() | |
237 | + | let aP = ao(ad, ae) | |
238 | + | let aQ = U(aL) | |
239 | + | let aR = aQ._1 | |
240 | + | let aS = aQ._2 | |
241 | + | let aT = aQ._3 | |
242 | + | let aU = U(aM) | |
255 | 243 | let aV = aU._1 | |
256 | 244 | let aW = aU._2 | |
257 | 245 | let aX = aU._3 | |
258 | - | let aY = Y(aQ) | |
259 | - | let aZ = aY._1 | |
260 | - | let ba = aY._2 | |
261 | - | let bb = aY._3 | |
262 | - | if (!(I)) | |
246 | + | if (!(G)) | |
263 | 247 | then throw("DApp is inactive at this moment") | |
264 | - | else if (( | |
248 | + | else if ((aL == aM)) | |
265 | 249 | then throw("Assets must be different") | |
266 | - | else if ( | |
250 | + | else if (aP) | |
267 | 251 | then throw("This pool already exists") | |
268 | - | else if (if ((( | |
252 | + | else if (if (((aO + 1) > R)) | |
269 | 253 | then true | |
270 | - | else ( | |
271 | - | then throw(("Too many | |
272 | - | else if ((size( | |
273 | - | then throw("One attached | |
274 | - | else if (( | |
254 | + | else (aN == "")) | |
255 | + | then throw(("Too many votings. Maximum quantity: " + toString(R))) | |
256 | + | else if ((size(aC.payments) != 1)) | |
257 | + | then throw("One attached asset expected") | |
258 | + | else if ((aJ != F)) | |
275 | 259 | then throw("You must use a SWOP token") | |
276 | - | else if (if (( | |
260 | + | else if (if ((ad == "")) | |
277 | 261 | then true | |
278 | - | else ( | |
262 | + | else (ae == "")) | |
279 | 263 | then throw("Assets can't be empty") | |
280 | - | else if (( | |
264 | + | else if ((aI != M)) | |
281 | 265 | then throw("You need to attach 10 SWOP tokens") | |
282 | - | else if (!(if (if (( | |
266 | + | else if (!(if (if ((aM == E)) | |
283 | 267 | then true | |
284 | - | else ( | |
268 | + | else (aM == unit)) | |
285 | 269 | then true | |
286 | - | else ( | |
270 | + | else (aM == F))) | |
287 | 271 | then throw("assetB must be USDN, WAVES or SWOP") | |
288 | - | else [IntegerEntry(((((( | |
272 | + | else [IntegerEntry((((((ad + "_") + ae) + "_") + toString(I)) + t), I), IntegerEntry((toString(I) + e), (height + T)), BooleanEntry((toString(I) + j), true), IntegerEntry(k, (I + 1)), IntegerEntry(d, (aO + 1)), StringEntry((ad + s), aS), StringEntry((ae + s), aW), StringEntry(aN, (((((ad + "_") + ae) + "_") + toString(I)) + t)), ScriptTransfer(C, aI, aJ)] | |
289 | 273 | } | |
290 | 274 | ||
291 | 275 | ||
292 | 276 | ||
293 | - | @Callable( | |
294 | - | func voteForPool ( | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | then (valueOrElse(getInteger(this, (((toString( | |
301 | - | else (valueOrElse(getInteger(this, (((toString( | |
302 | - | if (!( | |
277 | + | @Callable(aC) | |
278 | + | func voteForPool (ah,aY,aZ) = { | |
279 | + | let aq = height | |
280 | + | let ba = valueOrErrorMessage(getIntegerValue(this, (toString(ah) + e)), "Empty pool height") | |
281 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
282 | + | let bb = valueOrElse(getInteger(D, (toString(aC.caller) + r)), 0) | |
283 | + | let bc = if (aY) | |
284 | + | then (valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + h)), 0) + aZ) | |
285 | + | else (valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + i)), 0) + aZ) | |
286 | + | if (!(av(aC.caller))) | |
303 | 287 | then throw("This address has 0 SWOP in Governance dApp") | |
304 | - | else if (!( | |
288 | + | else if (!(al)) | |
305 | 289 | then throw("This voting was canceled") | |
306 | - | else if (( | |
290 | + | else if ((aq > ba)) | |
307 | 291 | then throw("This voting was expired") | |
308 | - | else if ((0 > | |
292 | + | else if ((0 > aZ)) | |
309 | 293 | then throw("The number of votes must be positive") | |
310 | - | else if (( | |
311 | - | then throw((((toString(this) + " has ") + toString( | |
312 | - | else if ( | |
294 | + | else if ((bc > bb)) | |
295 | + | then throw((((toString(this) + " has ") + toString(bb)) + " SWOP in governance.")) | |
296 | + | else if (aY) | |
313 | 297 | then { | |
314 | - | let | |
315 | - | let | |
316 | - | [IntegerEntry((toString( | |
298 | + | let bd = valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + i)), 0) | |
299 | + | let be = ((valueOrElse(getInteger(this, (toString(ah) + g)), 0) - bd) + aZ) | |
300 | + | [IntegerEntry((toString(ah) + g), be), IntegerEntry((((toString(aC.caller) + "_") + toString(ah)) + i), aZ)] | |
317 | 301 | } | |
318 | 302 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | [IntegerEntry((toString( | |
303 | + | let bd = valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + h)), 0) | |
304 | + | let be = ((valueOrElse(getInteger(this, (toString(ah) + f)), 0) - bd) + aZ) | |
305 | + | [IntegerEntry((toString(ah) + f), be), IntegerEntry((((toString(aC.caller) + "_") + toString(ah)) + h), aZ)] | |
322 | 306 | } | |
323 | 307 | } | |
324 | 308 | ||
325 | 309 | ||
326 | 310 | ||
327 | - | @Callable( | |
328 | - | func cancelVoting ( | |
329 | - | let | |
330 | - | if (!( | |
311 | + | @Callable(aC) | |
312 | + | func cancelVoting (ah,ay) = { | |
313 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
314 | + | if (!(G)) | |
331 | 315 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified"))) | |
332 | - | else if (!(containsElement([A, B | |
316 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
333 | 317 | then throw("Only admin can call this function") | |
334 | - | else if (!( | |
335 | - | then throw((("Voting " + toString( | |
336 | - | else [IntegerEntry(d, ( | |
318 | + | else if (!(al)) | |
319 | + | then throw((("Voting " + toString(ah)) + " has already been stopped")) | |
320 | + | else [IntegerEntry(d, (H - 1)), BooleanEntry((toString(ah) + j), false), StringEntry((toString(ah) + q), ay)] | |
337 | 321 | } | |
338 | 322 | ||
339 | 323 | ||
340 | 324 | ||
341 | - | @Callable( | |
342 | - | func shutdown () = if (!( | |
325 | + | @Callable(aC) | |
326 | + | func shutdown () = if (!(G)) | |
343 | 327 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified"))) | |
344 | - | else if (!(containsElement([A, B | |
328 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
345 | 329 | then throw("Only admin can call this function") | |
346 | - | else | |
330 | + | else ax("Paused by admin") | |
347 | 331 | ||
348 | 332 | ||
349 | 333 | ||
350 | - | @Callable( | |
351 | - | func activate () = if ( | |
334 | + | @Callable(aC) | |
335 | + | func activate () = if (G) | |
352 | 336 | then throw("DApp is already active") | |
353 | - | else if (!(containsElement([A, B | |
337 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
354 | 338 | then throw("Only admin can call this function") | |
355 | 339 | else [BooleanEntry(c, true), DeleteEntry(p)] | |
356 | 340 | ||
357 | 341 | ||
358 | - | @Verifier( | |
359 | - | func | |
342 | + | @Verifier(bf) | |
343 | + | func bg () = sigVerify(bf.bodyBytes, bf.proofs[0], bf.senderPublicKey) | |
360 | 344 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.0.0" | |
5 | 5 | ||
6 | 6 | let b = "version" | |
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | 10 | let d = "voting_active_number" | |
11 | 11 | ||
12 | 12 | let e = "_finish_height" | |
13 | 13 | ||
14 | 14 | let f = "_total_votes_no" | |
15 | 15 | ||
16 | 16 | let g = "_total_votes_yes" | |
17 | 17 | ||
18 | 18 | let h = "_vote_no" | |
19 | 19 | ||
20 | 20 | let i = "_vote_yes" | |
21 | 21 | ||
22 | 22 | let j = "_status" | |
23 | 23 | ||
24 | 24 | let k = "voting_id_last" | |
25 | 25 | ||
26 | 26 | let l = "max_amount_voting" | |
27 | 27 | ||
28 | 28 | let m = "max_day_voting" | |
29 | 29 | ||
30 | 30 | let n = "commission" | |
31 | 31 | ||
32 | 32 | let o = "commission_scale_delimiter" | |
33 | 33 | ||
34 | 34 | let p = "shutdown_cause" | |
35 | 35 | ||
36 | 36 | let q = "_cancel_cause" | |
37 | 37 | ||
38 | 38 | let r = "_SWOP_amount" | |
39 | 39 | ||
40 | 40 | let s = "_asset_name" | |
41 | 41 | ||
42 | 42 | let t = "_voting" | |
43 | 43 | ||
44 | 44 | let u = "period_voting" | |
45 | 45 | ||
46 | 46 | let v = "voting_active_cell_1" | |
47 | 47 | ||
48 | 48 | let w = "voting_active_cell_2" | |
49 | 49 | ||
50 | 50 | let x = "voting_active_cell_3" | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let A = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let B = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 59 | ||
60 | - | let C = base58' | |
60 | + | let C = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 61 | ||
62 | - | let D = base58' | |
62 | + | let D = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = getBooleanValue(this, c) | |
69 | 69 | ||
70 | - | let H = | |
70 | + | let H = getIntegerValue(this, d) | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = getIntegerValue(this, k) | |
73 | 73 | ||
74 | - | let J = | |
74 | + | let J = valueOrElse(getString(this, v), "") | |
75 | 75 | ||
76 | - | let K = | |
76 | + | let K = valueOrElse(getString(this, w), "") | |
77 | 77 | ||
78 | - | let L = valueOrElse(getString(this, | |
78 | + | let L = valueOrElse(getString(this, x), "") | |
79 | 79 | ||
80 | - | let M = | |
80 | + | let M = 1000000000 | |
81 | 81 | ||
82 | - | let N = | |
82 | + | let N = 1000 | |
83 | 83 | ||
84 | - | let O = | |
84 | + | let O = 100000000 | |
85 | 85 | ||
86 | - | let P = | |
86 | + | let P = 1000 | |
87 | 87 | ||
88 | - | let Q = | |
88 | + | let Q = 8 | |
89 | 89 | ||
90 | - | let R = | |
90 | + | let R = 3 | |
91 | 91 | ||
92 | - | let S = | |
92 | + | let S = 7 | |
93 | 93 | ||
94 | - | let T = | |
94 | + | let T = 15 | |
95 | 95 | ||
96 | - | let U = 8 | |
97 | - | ||
98 | - | let V = 5 | |
99 | - | ||
100 | - | let W = 5 | |
101 | - | ||
102 | - | let X = 15 | |
103 | - | ||
104 | - | func Y (Z) = { | |
105 | - | let aa = Z | |
106 | - | if ($isInstanceOf(aa, "ByteVector")) | |
96 | + | func U (V) = { | |
97 | + | let W = V | |
98 | + | if ($isInstanceOf(W, "ByteVector")) | |
107 | 99 | then { | |
108 | - | let | |
109 | - | if (isDefined(assetInfo( | |
100 | + | let X = W | |
101 | + | if (isDefined(assetInfo(X))) | |
110 | 102 | then { | |
111 | - | let | |
112 | - | let | |
113 | - | $Tuple3( | |
103 | + | let Y = toBase58String(X) | |
104 | + | let Z = valueOrErrorMessage(assetInfo(X), (("Asset " + Y) + " doesn't exist")) | |
105 | + | $Tuple3(Y, Z.name, Z.decimals) | |
114 | 106 | } | |
115 | - | else throw("Asset is not | |
107 | + | else throw("Asset is not defined") | |
116 | 108 | } | |
117 | - | else if ($isInstanceOf( | |
109 | + | else if ($isInstanceOf(W, "Unit")) | |
118 | 110 | then { | |
119 | - | let | |
111 | + | let aa = W | |
120 | 112 | $Tuple3("WAVES", "WAVES", 8) | |
121 | 113 | } | |
122 | 114 | else throw("Match error") | |
123 | 115 | } | |
124 | 116 | ||
125 | 117 | ||
126 | - | func | |
127 | - | let | |
128 | - | let | |
129 | - | if (if ( | |
130 | - | then ( | |
118 | + | func ab (ac,ad,ae) = { | |
119 | + | let af = split(ac, "_") | |
120 | + | let ag = isDefined(getInteger(this, ac)) | |
121 | + | if (if (ag) | |
122 | + | then (ac != "") | |
131 | 123 | else false) | |
132 | 124 | then { | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | let | |
138 | - | if ( | |
139 | - | then if (( | |
140 | - | then if ( | |
125 | + | let ah = af[2] | |
126 | + | let ai = (((((ad + "_") + ae) + "_") + ah) + t) | |
127 | + | let aj = isDefined(getInteger(this, ai)) | |
128 | + | let ak = valueOrElse(getInteger(this, (ah + e)), 0) | |
129 | + | let al = valueOrElse(getBoolean(this, (ah + j)), true) | |
130 | + | if (aj) | |
131 | + | then if ((ak > height)) | |
132 | + | then if (al) | |
141 | 133 | then true | |
142 | 134 | else false | |
143 | 135 | else false | |
144 | 136 | else false | |
145 | 137 | } | |
146 | 138 | else false | |
147 | 139 | } | |
148 | 140 | ||
149 | 141 | ||
150 | - | func | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | if (if ( | |
155 | - | then ( | |
142 | + | func am (an) = { | |
143 | + | let ac = valueOrElse(getString(this, an), "") | |
144 | + | let af = split(ac, "_") | |
145 | + | let ag = isDefined(getInteger(this, ac)) | |
146 | + | if (if (ag) | |
147 | + | then (ac != "") | |
156 | 148 | else false) | |
157 | 149 | then { | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | if (( | |
162 | - | then if ( | |
150 | + | let ah = af[2] | |
151 | + | let ak = valueOrElse(getInteger(this, (ah + e)), 0) | |
152 | + | let al = valueOrElse(getBoolean(this, (ah + j)), true) | |
153 | + | if ((ak > height)) | |
154 | + | then if (al) | |
163 | 155 | then "" | |
164 | - | else | |
165 | - | else | |
156 | + | else an | |
157 | + | else an | |
166 | 158 | } | |
167 | - | else | |
159 | + | else an | |
168 | 160 | } | |
169 | 161 | ||
170 | 162 | ||
171 | - | func | |
163 | + | func ao (ad,ae) = if (if (ab(J, ad, ae)) | |
172 | 164 | then true | |
173 | - | else | |
165 | + | else ab(K, ad, ae)) | |
174 | 166 | then true | |
175 | - | else af(N, ah, ai)) | |
176 | - | then true | |
177 | - | else af(O, ah, ai)) | |
178 | - | then true | |
179 | - | else af(P, ah, ai) | |
167 | + | else ab(L, ad, ae) | |
180 | 168 | ||
181 | 169 | ||
182 | - | func | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | if ((0 > | |
170 | + | func ap (ah) = { | |
171 | + | let ak = valueOrElse(getInteger(this, (toString(ah) + e)), 0) | |
172 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
173 | + | let aq = height | |
174 | + | if ((0 > ah)) | |
187 | 175 | then 0 | |
188 | - | else if (!( | |
176 | + | else if (!(al)) | |
189 | 177 | then 0 | |
190 | - | else if (( | |
178 | + | else if ((ak > aq)) | |
191 | 179 | then 1 | |
192 | 180 | else 0 | |
193 | 181 | } | |
194 | 182 | ||
195 | 183 | ||
196 | - | func | |
184 | + | func ar () = ((ap(valueOrElse(getInteger(this, J), -1)) + ap(valueOrElse(getInteger(this, K), -1))) + ap(valueOrElse(getInteger(this, L), -1))) | |
197 | 185 | ||
198 | 186 | ||
199 | - | func | |
187 | + | func as () = if ((am(v) != "")) | |
200 | 188 | then v | |
201 | - | else if (( | |
189 | + | else if ((am(w) != "")) | |
202 | 190 | then w | |
203 | - | else if (( | |
191 | + | else if ((am(x) != "")) | |
204 | 192 | then x | |
205 | - | else if ((aq(y) != "")) | |
206 | - | then y | |
207 | - | else if ((aq(z) != "")) | |
208 | - | then z | |
209 | - | else "" | |
193 | + | else "" | |
210 | 194 | ||
211 | 195 | ||
212 | - | func | |
196 | + | func at (au) = if ((au == "WAVES")) | |
213 | 197 | then unit | |
214 | - | else fromBase58String( | |
198 | + | else fromBase58String(au) | |
215 | 199 | ||
216 | 200 | ||
217 | - | func | |
201 | + | func av (aw) = if ((valueOrElse(getInteger(D, (toString(aw) + r)), 0) > 0)) | |
218 | 202 | then true | |
219 | 203 | else false | |
220 | 204 | ||
221 | 205 | ||
222 | - | func | |
206 | + | func ax (ay) = [BooleanEntry(c, false), StringEntry(p, ay)] | |
223 | 207 | ||
224 | 208 | ||
225 | - | func | |
209 | + | func az (aA,aB) = throw(((((("Insufficient DApp balance to pay " + toString(aA)) + " ") + aB) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
226 | 210 | ||
227 | 211 | ||
228 | - | @Callable( | |
229 | - | func init () = if (( | |
212 | + | @Callable(aC) | |
213 | + | func init () = if ((aC.caller != this)) | |
230 | 214 | then throw("Only the DApp itself can call this function") | |
231 | 215 | else if (isDefined(getBoolean(this, c))) | |
232 | 216 | then throw("DApp is already active") | |
233 | 217 | else { | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | [StringEntry(b, a), BooleanEntry(c, | |
218 | + | let aD = 0 | |
219 | + | let aE = 0 | |
220 | + | let aF = true | |
221 | + | let aG = "" | |
222 | + | [StringEntry(b, a), BooleanEntry(c, aF), IntegerEntry(d, aD), IntegerEntry(k, aE), IntegerEntry(l, R), IntegerEntry(m, S), StringEntry(v, aG), StringEntry(w, aG), StringEntry(x, aG)] | |
239 | 223 | } | |
240 | 224 | ||
241 | 225 | ||
242 | 226 | ||
243 | - | @Callable(aG) | |
244 | - | func initVotingForNewPool (ah,ai) = { | |
245 | - | let aL = $Tuple2(aG.payments[0].amount, aG.payments[0].assetId) | |
246 | - | let aM = aL._1 | |
247 | - | let aN = aL._2 | |
248 | - | let aO = $Tuple2(ax(ah), ax(ai)) | |
249 | - | let aP = aO._1 | |
250 | - | let aQ = aO._2 | |
251 | - | let aR = aw() | |
252 | - | let aS = av() | |
253 | - | let aT = as(ah, ai) | |
254 | - | let aU = Y(aP) | |
227 | + | @Callable(aC) | |
228 | + | func initVotingForNewPool (ad,ae) = { | |
229 | + | let aH = $Tuple2(aC.payments[0].amount, aC.payments[0].assetId) | |
230 | + | let aI = aH._1 | |
231 | + | let aJ = aH._2 | |
232 | + | let aK = $Tuple2(at(ad), at(ae)) | |
233 | + | let aL = aK._1 | |
234 | + | let aM = aK._2 | |
235 | + | let aN = as() | |
236 | + | let aO = ar() | |
237 | + | let aP = ao(ad, ae) | |
238 | + | let aQ = U(aL) | |
239 | + | let aR = aQ._1 | |
240 | + | let aS = aQ._2 | |
241 | + | let aT = aQ._3 | |
242 | + | let aU = U(aM) | |
255 | 243 | let aV = aU._1 | |
256 | 244 | let aW = aU._2 | |
257 | 245 | let aX = aU._3 | |
258 | - | let aY = Y(aQ) | |
259 | - | let aZ = aY._1 | |
260 | - | let ba = aY._2 | |
261 | - | let bb = aY._3 | |
262 | - | if (!(I)) | |
246 | + | if (!(G)) | |
263 | 247 | then throw("DApp is inactive at this moment") | |
264 | - | else if (( | |
248 | + | else if ((aL == aM)) | |
265 | 249 | then throw("Assets must be different") | |
266 | - | else if ( | |
250 | + | else if (aP) | |
267 | 251 | then throw("This pool already exists") | |
268 | - | else if (if ((( | |
252 | + | else if (if (((aO + 1) > R)) | |
269 | 253 | then true | |
270 | - | else ( | |
271 | - | then throw(("Too many | |
272 | - | else if ((size( | |
273 | - | then throw("One attached | |
274 | - | else if (( | |
254 | + | else (aN == "")) | |
255 | + | then throw(("Too many votings. Maximum quantity: " + toString(R))) | |
256 | + | else if ((size(aC.payments) != 1)) | |
257 | + | then throw("One attached asset expected") | |
258 | + | else if ((aJ != F)) | |
275 | 259 | then throw("You must use a SWOP token") | |
276 | - | else if (if (( | |
260 | + | else if (if ((ad == "")) | |
277 | 261 | then true | |
278 | - | else ( | |
262 | + | else (ae == "")) | |
279 | 263 | then throw("Assets can't be empty") | |
280 | - | else if (( | |
264 | + | else if ((aI != M)) | |
281 | 265 | then throw("You need to attach 10 SWOP tokens") | |
282 | - | else if (!(if (if (( | |
266 | + | else if (!(if (if ((aM == E)) | |
283 | 267 | then true | |
284 | - | else ( | |
268 | + | else (aM == unit)) | |
285 | 269 | then true | |
286 | - | else ( | |
270 | + | else (aM == F))) | |
287 | 271 | then throw("assetB must be USDN, WAVES or SWOP") | |
288 | - | else [IntegerEntry(((((( | |
272 | + | else [IntegerEntry((((((ad + "_") + ae) + "_") + toString(I)) + t), I), IntegerEntry((toString(I) + e), (height + T)), BooleanEntry((toString(I) + j), true), IntegerEntry(k, (I + 1)), IntegerEntry(d, (aO + 1)), StringEntry((ad + s), aS), StringEntry((ae + s), aW), StringEntry(aN, (((((ad + "_") + ae) + "_") + toString(I)) + t)), ScriptTransfer(C, aI, aJ)] | |
289 | 273 | } | |
290 | 274 | ||
291 | 275 | ||
292 | 276 | ||
293 | - | @Callable( | |
294 | - | func voteForPool ( | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | then (valueOrElse(getInteger(this, (((toString( | |
301 | - | else (valueOrElse(getInteger(this, (((toString( | |
302 | - | if (!( | |
277 | + | @Callable(aC) | |
278 | + | func voteForPool (ah,aY,aZ) = { | |
279 | + | let aq = height | |
280 | + | let ba = valueOrErrorMessage(getIntegerValue(this, (toString(ah) + e)), "Empty pool height") | |
281 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
282 | + | let bb = valueOrElse(getInteger(D, (toString(aC.caller) + r)), 0) | |
283 | + | let bc = if (aY) | |
284 | + | then (valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + h)), 0) + aZ) | |
285 | + | else (valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + i)), 0) + aZ) | |
286 | + | if (!(av(aC.caller))) | |
303 | 287 | then throw("This address has 0 SWOP in Governance dApp") | |
304 | - | else if (!( | |
288 | + | else if (!(al)) | |
305 | 289 | then throw("This voting was canceled") | |
306 | - | else if (( | |
290 | + | else if ((aq > ba)) | |
307 | 291 | then throw("This voting was expired") | |
308 | - | else if ((0 > | |
292 | + | else if ((0 > aZ)) | |
309 | 293 | then throw("The number of votes must be positive") | |
310 | - | else if (( | |
311 | - | then throw((((toString(this) + " has ") + toString( | |
312 | - | else if ( | |
294 | + | else if ((bc > bb)) | |
295 | + | then throw((((toString(this) + " has ") + toString(bb)) + " SWOP in governance.")) | |
296 | + | else if (aY) | |
313 | 297 | then { | |
314 | - | let | |
315 | - | let | |
316 | - | [IntegerEntry((toString( | |
298 | + | let bd = valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + i)), 0) | |
299 | + | let be = ((valueOrElse(getInteger(this, (toString(ah) + g)), 0) - bd) + aZ) | |
300 | + | [IntegerEntry((toString(ah) + g), be), IntegerEntry((((toString(aC.caller) + "_") + toString(ah)) + i), aZ)] | |
317 | 301 | } | |
318 | 302 | else { | |
319 | - | let | |
320 | - | let | |
321 | - | [IntegerEntry((toString( | |
303 | + | let bd = valueOrElse(getInteger(this, (((toString(aC.caller) + "_") + toString(ah)) + h)), 0) | |
304 | + | let be = ((valueOrElse(getInteger(this, (toString(ah) + f)), 0) - bd) + aZ) | |
305 | + | [IntegerEntry((toString(ah) + f), be), IntegerEntry((((toString(aC.caller) + "_") + toString(ah)) + h), aZ)] | |
322 | 306 | } | |
323 | 307 | } | |
324 | 308 | ||
325 | 309 | ||
326 | 310 | ||
327 | - | @Callable( | |
328 | - | func cancelVoting ( | |
329 | - | let | |
330 | - | if (!( | |
311 | + | @Callable(aC) | |
312 | + | func cancelVoting (ah,ay) = { | |
313 | + | let al = valueOrElse(getBoolean(this, (toString(ah) + j)), true) | |
314 | + | if (!(G)) | |
331 | 315 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified"))) | |
332 | - | else if (!(containsElement([A, B | |
316 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
333 | 317 | then throw("Only admin can call this function") | |
334 | - | else if (!( | |
335 | - | then throw((("Voting " + toString( | |
336 | - | else [IntegerEntry(d, ( | |
318 | + | else if (!(al)) | |
319 | + | then throw((("Voting " + toString(ah)) + " has already been stopped")) | |
320 | + | else [IntegerEntry(d, (H - 1)), BooleanEntry((toString(ah) + j), false), StringEntry((toString(ah) + q), ay)] | |
337 | 321 | } | |
338 | 322 | ||
339 | 323 | ||
340 | 324 | ||
341 | - | @Callable( | |
342 | - | func shutdown () = if (!( | |
325 | + | @Callable(aC) | |
326 | + | func shutdown () = if (!(G)) | |
343 | 327 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, p), "the cause wasn't specified"))) | |
344 | - | else if (!(containsElement([A, B | |
328 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
345 | 329 | then throw("Only admin can call this function") | |
346 | - | else | |
330 | + | else ax("Paused by admin") | |
347 | 331 | ||
348 | 332 | ||
349 | 333 | ||
350 | - | @Callable( | |
351 | - | func activate () = if ( | |
334 | + | @Callable(aC) | |
335 | + | func activate () = if (G) | |
352 | 336 | then throw("DApp is already active") | |
353 | - | else if (!(containsElement([A, B | |
337 | + | else if (!(containsElement([y, z, A, B], aC.callerPublicKey))) | |
354 | 338 | then throw("Only admin can call this function") | |
355 | 339 | else [BooleanEntry(c, true), DeleteEntry(p)] | |
356 | 340 | ||
357 | 341 | ||
358 | - | @Verifier( | |
359 | - | func | |
342 | + | @Verifier(bf) | |
343 | + | func bg () = sigVerify(bf.bodyBytes, bf.proofs[0], bf.senderPublicKey) | |
360 | 344 |
github/deemru/w8io/169f3d6 111.65 ms ◑