tx · 8rvLBMe4H7H1KYnkRLw6wCCTPSGzADDoMX6DVNnx3No4 3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS: -0.01600000 Waves 2023.07.28 09:51 [2685375] smart account 3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS > SELF 0.00000000 Waves
{ "type": 13, "id": "8rvLBMe4H7H1KYnkRLw6wCCTPSGzADDoMX6DVNnx3No4", "fee": 1600000, "feeAssetId": null, "timestamp": 1690527057491, "version": 2, "chainId": 84, "sender": "3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS", "senderPublicKey": "8h7G4haeVwXKNHXNHsWkC1miUp5CQtk3WmpBKazQPxRh", "proofs": [ "4FLntaXcufrodNVb6CR81ERBboqJwTEryUQfDaHcot3k78JEWEUn99zRZRU5iDmroT99XEcjsSuuAdVxXaRkN5UV" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQgSAwoBARIDCgEIEgASAwoBCDIADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZW1pc3Npb25QZXJpb2RJbkJsb2NrcwUDbmlsBQNTRVAADWtleVN0YXJ0QmxvY2sJALkJAgkAzAgCAgIlcwkAzAgCAgpz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lucwkAAAIIBQJ0eAJpZAkA2QQBCQELdmFsdWVPckVsc2UCCQCdCAIFBHRoaXMJAQ5rZXlBbGxvd2VkVHhJZAACAAQHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lctD7tT0=", "height": 2685375, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2aZeoHP3a2z3yLTV4qw1dWXX1Lo8hpWK8xHnNXHpyb4L Next: FnTjmspUZ6jc1TQsupc1ZwrjtZfkxYQXeCNfRkVArTbs Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
40 | 40 | ||
41 | 41 | ||
42 | - | let t = valueOrElse(getInteger(this, n), 0) | |
43 | - | ||
44 | - | let u = valueOrElse(getInteger(this, o), 0) | |
45 | - | ||
46 | - | let v = valueOrElse(getString(this, j), "WAVES") | |
47 | - | ||
48 | - | let w = if ((v == "WAVES")) | |
49 | - | then unit | |
50 | - | else fromBase58String(v) | |
51 | - | ||
52 | - | let x = valueOrElse(getInteger(this, l), g) | |
53 | - | ||
54 | - | let y = (valueOrElse(getInteger(this, k), 0) * x) | |
55 | - | ||
56 | - | let z = 5 | |
57 | - | ||
58 | - | let A = 3 | |
59 | - | ||
60 | - | let B = 32 | |
61 | - | ||
62 | - | func C (D) = makeString(["%s%s%s", "allowTxId", D], b) | |
42 | + | func t (u,q,v) = makeString(["%s%s%s", u, q, toBase58String(v)], b) | |
63 | 43 | ||
64 | 44 | ||
65 | - | func | |
45 | + | func w (x,y) = makeString(["%d%d", toString(x), toString(y)], b) | |
66 | 46 | ||
67 | 47 | ||
68 | - | func H () = makeString(["%s", "adminAddressList"], b) | |
48 | + | let z = valueOrElse(getInteger(this, n), 0) | |
49 | + | ||
50 | + | let A = valueOrElse(getInteger(this, o), 0) | |
51 | + | ||
52 | + | let B = valueOrElse(getString(this, j), "WAVES") | |
53 | + | ||
54 | + | let C = if ((B == "WAVES")) | |
55 | + | then unit | |
56 | + | else fromBase58String(B) | |
57 | + | ||
58 | + | let D = valueOrElse(getInteger(this, l), g) | |
59 | + | ||
60 | + | let E = (valueOrElse(getInteger(this, k), 0) * D) | |
61 | + | ||
62 | + | let F = 5 | |
63 | + | ||
64 | + | let G = 3 | |
65 | + | ||
66 | + | let H = 32 | |
67 | + | ||
68 | + | func I (v) = makeString(["%s%s%s", "allowTxId", v], b) | |
69 | 69 | ||
70 | 70 | ||
71 | - | func | |
71 | + | func J (K,L) = makeString([K, L], b) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func J (F,K) = { | |
75 | - | let L = E(F, K) | |
76 | - | valueOrElse(getInteger(L), 0) | |
74 | + | func M () = makeString(["%s", "adminAddressList"], b) | |
75 | + | ||
76 | + | ||
77 | + | func N () = makeString(["%s", "txId"], b) | |
78 | + | ||
79 | + | ||
80 | + | func O (K,P) = { | |
81 | + | let Q = J(K, P) | |
82 | + | valueOrElse(getInteger(Q), 0) | |
77 | 83 | } | |
78 | 84 | ||
79 | 85 | ||
80 | - | func | |
81 | - | let | |
82 | - | if ($isInstanceOf( | |
86 | + | func R () = { | |
87 | + | let S = getString(this, M()) | |
88 | + | if ($isInstanceOf(S, "String")) | |
83 | 89 | then { | |
84 | - | let | |
85 | - | split( | |
90 | + | let T = S | |
91 | + | split(T, b) | |
86 | 92 | } | |
87 | 93 | else nil | |
88 | 94 | } | |
89 | 95 | ||
90 | 96 | ||
91 | - | func | |
97 | + | func U (V) = containsElement(R(), V) | |
92 | 98 | ||
93 | 99 | ||
94 | - | func | |
95 | - | let | |
96 | - | let | |
97 | - | let | |
98 | - | $Tuple2(( | |
100 | + | func W (X,L) = { | |
101 | + | let Y = X | |
102 | + | let Z = Y._1 | |
103 | + | let K = Y._2 | |
104 | + | $Tuple2((Z :+ J(K, L)), K) | |
99 | 105 | } | |
100 | 106 | ||
101 | 107 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | func | |
109 | - | then | |
110 | - | else | |
108 | + | func aa (ab) = { | |
109 | + | let ac = M() | |
110 | + | let ad = { | |
111 | + | let ae = R() | |
112 | + | let af = size(ae) | |
113 | + | let ag = $Tuple2(nil, ab) | |
114 | + | func ah (ai,aj) = if ((aj >= af)) | |
115 | + | then ai | |
116 | + | else W(ai, ae[aj]) | |
111 | 117 | ||
112 | - | func | |
113 | - | then | |
118 | + | func ak (ai,aj) = if ((aj >= af)) | |
119 | + | then ai | |
114 | 120 | else throw("List size exceeds 5") | |
115 | 121 | ||
116 | - | | |
122 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
117 | 123 | } | |
118 | - | let | |
119 | - | let | |
120 | - | | |
124 | + | let Z = ad._1 | |
125 | + | let K = ad._2 | |
126 | + | Z | |
121 | 127 | } | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func al (Z,Q) = (Z + valueOrElse(getInteger(Q), 0)) | |
125 | 131 | ||
126 | 132 | ||
127 | - | func | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | func | |
133 | - | then | |
134 | - | else | |
133 | + | func am (K) = { | |
134 | + | let an = aa(K) | |
135 | + | let ae = an | |
136 | + | let af = size(ae) | |
137 | + | let ag = 0 | |
138 | + | func ah (ai,aj) = if ((aj >= af)) | |
139 | + | then ai | |
140 | + | else al(ai, ae[aj]) | |
135 | 141 | ||
136 | - | func | |
137 | - | then | |
142 | + | func ak (ai,aj) = if ((aj >= af)) | |
143 | + | then ai | |
138 | 144 | else throw("List size exceeds 5") | |
139 | 145 | ||
140 | - | | |
146 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
141 | 147 | } | |
142 | 148 | ||
143 | 149 | ||
144 | - | func | |
150 | + | func ao (Z,ap) = (Z :+ DeleteEntry(ap)) | |
145 | 151 | ||
146 | 152 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | func | |
153 | - | then | |
154 | - | else | |
153 | + | func aq (K) = { | |
154 | + | let an = aa(K) | |
155 | + | let ae = an | |
156 | + | let af = size(ae) | |
157 | + | let ag = nil | |
158 | + | func ah (ai,aj) = if ((aj >= af)) | |
159 | + | then ai | |
160 | + | else ao(ai, ae[aj]) | |
155 | 161 | ||
156 | - | func | |
157 | - | then | |
162 | + | func ak (ai,aj) = if ((aj >= af)) | |
163 | + | then ai | |
158 | 164 | else throw("List size exceeds 5") | |
159 | 165 | ||
160 | - | | |
166 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
161 | 167 | } | |
162 | 168 | ||
163 | 169 | ||
164 | - | func | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | then h((("Address: " + | |
169 | - | else if (( | |
170 | - | then h(( | |
170 | + | func ar (as,ab,at,au) = { | |
171 | + | let Q = J(ab, as) | |
172 | + | let av = O(ab, as) | |
173 | + | let aw = if (!(U(as))) | |
174 | + | then h((("Address: " + as) + " not in Admin list")) | |
175 | + | else if ((av == 1)) | |
176 | + | then h((Q + " you already voted")) | |
171 | 177 | else unit | |
172 | - | if (( | |
178 | + | if ((aw == aw)) | |
173 | 179 | then { | |
174 | - | let | |
175 | - | if ((( | |
180 | + | let an = am(ab) | |
181 | + | if (((an + 1) >= at)) | |
176 | 182 | then { | |
177 | - | let | |
178 | - | ( | |
183 | + | let ax = aq(ab) | |
184 | + | (ax ++ au) | |
179 | 185 | } | |
180 | - | else [IntegerEntry( | |
186 | + | else [IntegerEntry(Q, 1)] | |
181 | 187 | } | |
182 | 188 | else throw("Strict value is not equal to itself.") | |
183 | 189 | } | |
184 | 190 | ||
185 | 191 | ||
186 | - | func | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | max([0, ( | |
192 | + | func ay (az) = { | |
193 | + | let aA = valueOrElse(getInteger(this, m), 0) | |
194 | + | let aB = fraction(aA, 1, D) | |
195 | + | let aC = ((az / D) - aB) | |
196 | + | max([0, (E * aC)]) | |
191 | 197 | } | |
192 | 198 | ||
193 | 199 | ||
194 | - | func | |
200 | + | func aD () = ay(height) | |
195 | 201 | ||
196 | 202 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | if ($isInstanceOf( | |
203 | + | func aE () = { | |
204 | + | let aF = (A + aD()) | |
205 | + | let aG = { | |
206 | + | let S = C | |
207 | + | if ($isInstanceOf(S, "Unit")) | |
202 | 208 | then { | |
203 | - | let | |
204 | - | min([ | |
209 | + | let aH = S | |
210 | + | min([aF, wavesBalance(this).available]) | |
205 | 211 | } | |
206 | - | else if ($isInstanceOf( | |
212 | + | else if ($isInstanceOf(S, "ByteVector")) | |
207 | 213 | then { | |
208 | - | let | |
209 | - | min([ | |
214 | + | let aI = S | |
215 | + | min([aF, assetBalance(this, aI)]) | |
210 | 216 | } | |
211 | 217 | else throw("Match error") | |
212 | 218 | } | |
213 | - | if (( | |
219 | + | if ((z == 0)) | |
214 | 220 | then 0 | |
215 | - | else | |
221 | + | else aG | |
216 | 222 | } | |
217 | 223 | ||
218 | 224 | ||
219 | - | func | |
220 | - | then fraction(toBigInt( | |
225 | + | func aJ () = if ((z != 0)) | |
226 | + | then fraction(toBigInt(aE()), e, toBigInt(z)) | |
221 | 227 | else e | |
222 | 228 | ||
223 | 229 | ||
224 | - | func | |
230 | + | func aK (q) = valueOrElse(getInteger(this, p(q)), 0) | |
225 | 231 | ||
226 | 232 | ||
227 | - | func | |
228 | - | let | |
229 | - | let | |
230 | - | if ((0 > | |
233 | + | func aL (q) = { | |
234 | + | let aM = aK(q) | |
235 | + | let aN = toInt(fraction(toBigInt(aM), aJ(), e)) | |
236 | + | if ((0 > aN)) | |
231 | 237 | then 0 | |
232 | - | else | |
238 | + | else aN | |
233 | 239 | } | |
234 | 240 | ||
235 | 241 | ||
236 | - | func | |
237 | - | let | |
242 | + | func aO (aP,q) = { | |
243 | + | let aQ = [if ((size(aP.payments) == 1)) | |
238 | 244 | then true | |
239 | - | else h("should include 1 payment"), if (( | |
245 | + | else h("should include 1 payment"), if ((aP.payments[0].assetId == C)) | |
240 | 246 | then true | |
241 | - | else h(("payment should be in " + | |
247 | + | else h(("payment should be in " + B)), if ((aP.payments[0].amount > 0)) | |
242 | 248 | then true | |
243 | 249 | else "payment amount should be greater than 0"] | |
244 | - | if (( | |
250 | + | if ((aQ == aQ)) | |
245 | 251 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
252 | + | let aR = aP.payments[0].amount | |
253 | + | let aS = toInt(fraction(toBigInt(aR), e, aJ())) | |
254 | + | let aM = aK(q) | |
255 | + | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
256 | + | let aU = (z + aS) | |
257 | + | let aV = (A + aR) | |
258 | + | let aW = (aM + aS) | |
259 | + | let aX = (aT + aR) | |
260 | + | let aY = if ((z == 0)) | |
255 | 261 | then [IntegerEntry(m, height)] | |
256 | 262 | else nil | |
257 | - | ([IntegerEntry(n, | |
263 | + | ([StringEntry(t("stake", q, aP.transactionId), w(aD(), aJ())), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(s(q), aX)] ++ aY) | |
258 | 264 | } | |
259 | 265 | else throw("Strict value is not equal to itself.") | |
260 | 266 | } | |
261 | 267 | ||
262 | 268 | ||
263 | - | func | |
264 | - | let q = toString( | |
265 | - | let | |
266 | - | let | |
269 | + | func aZ (aP,ba) = { | |
270 | + | let q = toString(aP.caller) | |
271 | + | let aM = aK(q) | |
272 | + | let bb = [if ((ba > 0)) | |
267 | 273 | then true | |
268 | - | else h("LP amount should be more than 0"), if (( | |
274 | + | else h("LP amount should be more than 0"), if ((aM >= ba)) | |
269 | 275 | then true | |
270 | - | else h((("cannot withdraw more than available LP (" + toString( | |
271 | - | if (( | |
276 | + | else h((("cannot withdraw more than available LP (" + toString(aM)) + ")"))] | |
277 | + | if ((bb == bb)) | |
272 | 278 | then { | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | [IntegerEntry(n, | |
279 | + | let aW = (aM - ba) | |
280 | + | let bc = toInt(fraction(toBigInt(ba), aJ(), e)) | |
281 | + | let aU = (z - ba) | |
282 | + | let aV = toInt(fraction(toBigInt(aU), aJ(), e)) | |
283 | + | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
284 | + | let be = (bd + bc) | |
285 | + | [StringEntry(t("withdraw", q, aP.transactionId), w(aD(), aJ())), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(r(q), be), IntegerEntry(m, height), ScriptTransfer(aP.caller, bc, C)] | |
280 | 286 | } | |
281 | 287 | else throw("Strict value is not equal to itself.") | |
282 | 288 | } | |
283 | 289 | ||
284 | 290 | ||
285 | - | @Callable( | |
286 | - | func setEmissionPerBlock ( | |
287 | - | let | |
291 | + | @Callable(aP) | |
292 | + | func setEmissionPerBlock (bf) = { | |
293 | + | let bb = [if ((aP.caller == this)) | |
288 | 294 | then true | |
289 | 295 | else h("permission denied")] | |
290 | - | if (( | |
291 | - | then [IntegerEntry(o, | |
296 | + | if ((bb == bb)) | |
297 | + | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(k, max([0, bf]))] | |
292 | 298 | else throw("Strict value is not equal to itself.") | |
293 | 299 | } | |
294 | 300 | ||
295 | 301 | ||
296 | 302 | ||
297 | - | @Callable( | |
298 | - | func stake () = | |
303 | + | @Callable(aP) | |
304 | + | func stake () = aO(aP, toString(aP.caller)) | |
299 | 305 | ||
300 | 306 | ||
301 | 307 | ||
302 | - | @Callable( | |
308 | + | @Callable(aP) | |
303 | 309 | func stakeFor (q) = { | |
304 | - | let | |
310 | + | let bb = [if ((size(fromBase58String(q)) == f)) | |
305 | 311 | then true | |
306 | 312 | else h("address is not valid")] | |
307 | - | if (( | |
308 | - | then | |
313 | + | if ((bb == bb)) | |
314 | + | then aO(aP, q) | |
309 | 315 | else throw("Strict value is not equal to itself.") | |
310 | 316 | } | |
311 | 317 | ||
312 | 318 | ||
313 | 319 | ||
314 | - | @Callable( | |
315 | - | func withdraw ( | |
316 | - | let q = toString( | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
320 | + | @Callable(aP) | |
321 | + | func withdraw (bc) = { | |
322 | + | let q = toString(aP.caller) | |
323 | + | let aM = aK(q) | |
324 | + | let bg = toInt(fraction(toBigInt(bc), e, aJ())) | |
325 | + | let aN = aL(q) | |
326 | + | let bh = toInt(fraction(aJ(), toBigInt(1), e, CEILING)) | |
327 | + | let bb = [if ((bc > 0)) | |
322 | 328 | then true | |
323 | - | else h("withdraw amount should be more than 0"), if (( | |
329 | + | else h("withdraw amount should be more than 0"), if ((aN >= bc)) | |
324 | 330 | then true | |
325 | - | else h((("cannot withdraw more than available (" + toString( | |
331 | + | else h((("cannot withdraw more than available (" + toString(aN)) + ")")), if ((bc >= bh)) | |
326 | 332 | then true | |
327 | - | else h((("withdraw amount is too small. Min: (" + toString( | |
328 | - | if (( | |
329 | - | then | |
333 | + | else h((("withdraw amount is too small. Min: (" + toString(bh)) + ")"))] | |
334 | + | if ((bb == bb)) | |
335 | + | then aZ(aP, bg) | |
330 | 336 | else throw("Strict value is not equal to itself.") | |
331 | 337 | } | |
332 | 338 | ||
333 | 339 | ||
334 | 340 | ||
335 | - | @Callable( | |
341 | + | @Callable(aP) | |
336 | 342 | func getUserAssetsREADONLY (q) = { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | $Tuple2(nil, $Tuple5( | |
343 | + | let aM = aK(q) | |
344 | + | let aN = aL(q) | |
345 | + | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
346 | + | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
347 | + | $Tuple2(nil, $Tuple5(aM, aN, aJ(), aT, bd)) | |
342 | 348 | } | |
343 | 349 | ||
344 | 350 | ||
345 | 351 | ||
346 | - | @Callable( | |
347 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3( | |
352 | + | @Callable(aP) | |
353 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(z, aE(), aJ())) | |
348 | 354 | ||
349 | 355 | ||
350 | 356 | ||
351 | - | @Callable( | |
352 | - | func voteForTxId ( | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
357 | + | @Callable(aP) | |
358 | + | func voteForTxId (v) = { | |
359 | + | let as = toBase58String(aP.caller.bytes) | |
360 | + | let ab = I(v) | |
361 | + | let Z = [StringEntry(N(), v)] | |
362 | + | let bi = getString(this, N()) | |
363 | + | let aw = [if ((size(fromBase58String(v)) == H)) | |
358 | 364 | then true | |
359 | - | else h(( | |
365 | + | else h((v + " is not valid txId")), if (if ((bi == unit)) | |
360 | 366 | then true | |
361 | - | else (value( | |
367 | + | else (value(bi) != v)) | |
362 | 368 | then true | |
363 | - | else h(( | |
364 | - | if (( | |
365 | - | then | |
369 | + | else h((v + " is already allowed"))] | |
370 | + | if ((aw == aw)) | |
371 | + | then ar(as, ab, G, Z) | |
366 | 372 | else throw("Strict value is not equal to itself.") | |
367 | 373 | } | |
368 | 374 | ||
369 | 375 | ||
370 | - | @Verifier( | |
371 | - | func | |
372 | - | let | |
373 | - | let | |
376 | + | @Verifier(bj) | |
377 | + | func bk () = { | |
378 | + | let bl = (bj.id == fromBase58String(valueOrElse(getString(this, N()), ""))) | |
379 | + | let bm = if ((size(R()) >= G)) | |
374 | 380 | then false | |
375 | - | else sigVerify( | |
376 | - | if ( | |
381 | + | else sigVerify(bj.bodyBytes, bj.proofs[0], bj.senderPublicKey) | |
382 | + | if (bl) | |
377 | 383 | then true | |
378 | - | else | |
384 | + | else bm | |
379 | 385 | } | |
380 | 386 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "l2mp_staking.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let e = toBigInt(d) | |
13 | 13 | ||
14 | 14 | let f = 26 | |
15 | 15 | ||
16 | 16 | let g = 1440 | |
17 | 17 | ||
18 | 18 | func h (i) = throw(((a + ": ") + i)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let j = makeString(["%s", "assetId"], b) | |
22 | 22 | ||
23 | 23 | let k = makeString(["%s", "emissionPerBlock"], b) | |
24 | 24 | ||
25 | 25 | let l = makeString(["%s", "emissionPeriodInBlocks"], b) | |
26 | 26 | ||
27 | 27 | let m = makeString(["%s", "startBlock"], b) | |
28 | 28 | ||
29 | 29 | let n = makeString(["%s", "totalLpAmount"], b) | |
30 | 30 | ||
31 | 31 | let o = makeString(["%s", "totalAssetAmount"], b) | |
32 | 32 | ||
33 | 33 | func p (q) = makeString(["%s%s", "userLpAmount", q], b) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func r (q) = makeString(["%s%s", "totalAssetWithdrawn", q], b) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func s (q) = makeString(["%s%s", "totalAssetStaked", q], b) | |
40 | 40 | ||
41 | 41 | ||
42 | - | let t = valueOrElse(getInteger(this, n), 0) | |
43 | - | ||
44 | - | let u = valueOrElse(getInteger(this, o), 0) | |
45 | - | ||
46 | - | let v = valueOrElse(getString(this, j), "WAVES") | |
47 | - | ||
48 | - | let w = if ((v == "WAVES")) | |
49 | - | then unit | |
50 | - | else fromBase58String(v) | |
51 | - | ||
52 | - | let x = valueOrElse(getInteger(this, l), g) | |
53 | - | ||
54 | - | let y = (valueOrElse(getInteger(this, k), 0) * x) | |
55 | - | ||
56 | - | let z = 5 | |
57 | - | ||
58 | - | let A = 3 | |
59 | - | ||
60 | - | let B = 32 | |
61 | - | ||
62 | - | func C (D) = makeString(["%s%s%s", "allowTxId", D], b) | |
42 | + | func t (u,q,v) = makeString(["%s%s%s", u, q, toBase58String(v)], b) | |
63 | 43 | ||
64 | 44 | ||
65 | - | func | |
45 | + | func w (x,y) = makeString(["%d%d", toString(x), toString(y)], b) | |
66 | 46 | ||
67 | 47 | ||
68 | - | func H () = makeString(["%s", "adminAddressList"], b) | |
48 | + | let z = valueOrElse(getInteger(this, n), 0) | |
49 | + | ||
50 | + | let A = valueOrElse(getInteger(this, o), 0) | |
51 | + | ||
52 | + | let B = valueOrElse(getString(this, j), "WAVES") | |
53 | + | ||
54 | + | let C = if ((B == "WAVES")) | |
55 | + | then unit | |
56 | + | else fromBase58String(B) | |
57 | + | ||
58 | + | let D = valueOrElse(getInteger(this, l), g) | |
59 | + | ||
60 | + | let E = (valueOrElse(getInteger(this, k), 0) * D) | |
61 | + | ||
62 | + | let F = 5 | |
63 | + | ||
64 | + | let G = 3 | |
65 | + | ||
66 | + | let H = 32 | |
67 | + | ||
68 | + | func I (v) = makeString(["%s%s%s", "allowTxId", v], b) | |
69 | 69 | ||
70 | 70 | ||
71 | - | func | |
71 | + | func J (K,L) = makeString([K, L], b) | |
72 | 72 | ||
73 | 73 | ||
74 | - | func J (F,K) = { | |
75 | - | let L = E(F, K) | |
76 | - | valueOrElse(getInteger(L), 0) | |
74 | + | func M () = makeString(["%s", "adminAddressList"], b) | |
75 | + | ||
76 | + | ||
77 | + | func N () = makeString(["%s", "txId"], b) | |
78 | + | ||
79 | + | ||
80 | + | func O (K,P) = { | |
81 | + | let Q = J(K, P) | |
82 | + | valueOrElse(getInteger(Q), 0) | |
77 | 83 | } | |
78 | 84 | ||
79 | 85 | ||
80 | - | func | |
81 | - | let | |
82 | - | if ($isInstanceOf( | |
86 | + | func R () = { | |
87 | + | let S = getString(this, M()) | |
88 | + | if ($isInstanceOf(S, "String")) | |
83 | 89 | then { | |
84 | - | let | |
85 | - | split( | |
90 | + | let T = S | |
91 | + | split(T, b) | |
86 | 92 | } | |
87 | 93 | else nil | |
88 | 94 | } | |
89 | 95 | ||
90 | 96 | ||
91 | - | func | |
97 | + | func U (V) = containsElement(R(), V) | |
92 | 98 | ||
93 | 99 | ||
94 | - | func | |
95 | - | let | |
96 | - | let | |
97 | - | let | |
98 | - | $Tuple2(( | |
100 | + | func W (X,L) = { | |
101 | + | let Y = X | |
102 | + | let Z = Y._1 | |
103 | + | let K = Y._2 | |
104 | + | $Tuple2((Z :+ J(K, L)), K) | |
99 | 105 | } | |
100 | 106 | ||
101 | 107 | ||
102 | - | func | |
103 | - | let | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | let | |
108 | - | func | |
109 | - | then | |
110 | - | else | |
108 | + | func aa (ab) = { | |
109 | + | let ac = M() | |
110 | + | let ad = { | |
111 | + | let ae = R() | |
112 | + | let af = size(ae) | |
113 | + | let ag = $Tuple2(nil, ab) | |
114 | + | func ah (ai,aj) = if ((aj >= af)) | |
115 | + | then ai | |
116 | + | else W(ai, ae[aj]) | |
111 | 117 | ||
112 | - | func | |
113 | - | then | |
118 | + | func ak (ai,aj) = if ((aj >= af)) | |
119 | + | then ai | |
114 | 120 | else throw("List size exceeds 5") | |
115 | 121 | ||
116 | - | | |
122 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
117 | 123 | } | |
118 | - | let | |
119 | - | let | |
120 | - | | |
124 | + | let Z = ad._1 | |
125 | + | let K = ad._2 | |
126 | + | Z | |
121 | 127 | } | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func al (Z,Q) = (Z + valueOrElse(getInteger(Q), 0)) | |
125 | 131 | ||
126 | 132 | ||
127 | - | func | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | func | |
133 | - | then | |
134 | - | else | |
133 | + | func am (K) = { | |
134 | + | let an = aa(K) | |
135 | + | let ae = an | |
136 | + | let af = size(ae) | |
137 | + | let ag = 0 | |
138 | + | func ah (ai,aj) = if ((aj >= af)) | |
139 | + | then ai | |
140 | + | else al(ai, ae[aj]) | |
135 | 141 | ||
136 | - | func | |
137 | - | then | |
142 | + | func ak (ai,aj) = if ((aj >= af)) | |
143 | + | then ai | |
138 | 144 | else throw("List size exceeds 5") | |
139 | 145 | ||
140 | - | | |
146 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
141 | 147 | } | |
142 | 148 | ||
143 | 149 | ||
144 | - | func | |
150 | + | func ao (Z,ap) = (Z :+ DeleteEntry(ap)) | |
145 | 151 | ||
146 | 152 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | func | |
153 | - | then | |
154 | - | else | |
153 | + | func aq (K) = { | |
154 | + | let an = aa(K) | |
155 | + | let ae = an | |
156 | + | let af = size(ae) | |
157 | + | let ag = nil | |
158 | + | func ah (ai,aj) = if ((aj >= af)) | |
159 | + | then ai | |
160 | + | else ao(ai, ae[aj]) | |
155 | 161 | ||
156 | - | func | |
157 | - | then | |
162 | + | func ak (ai,aj) = if ((aj >= af)) | |
163 | + | then ai | |
158 | 164 | else throw("List size exceeds 5") | |
159 | 165 | ||
160 | - | | |
166 | + | ak(ah(ah(ah(ah(ah(ag, 0), 1), 2), 3), 4), 5) | |
161 | 167 | } | |
162 | 168 | ||
163 | 169 | ||
164 | - | func | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | then h((("Address: " + | |
169 | - | else if (( | |
170 | - | then h(( | |
170 | + | func ar (as,ab,at,au) = { | |
171 | + | let Q = J(ab, as) | |
172 | + | let av = O(ab, as) | |
173 | + | let aw = if (!(U(as))) | |
174 | + | then h((("Address: " + as) + " not in Admin list")) | |
175 | + | else if ((av == 1)) | |
176 | + | then h((Q + " you already voted")) | |
171 | 177 | else unit | |
172 | - | if (( | |
178 | + | if ((aw == aw)) | |
173 | 179 | then { | |
174 | - | let | |
175 | - | if ((( | |
180 | + | let an = am(ab) | |
181 | + | if (((an + 1) >= at)) | |
176 | 182 | then { | |
177 | - | let | |
178 | - | ( | |
183 | + | let ax = aq(ab) | |
184 | + | (ax ++ au) | |
179 | 185 | } | |
180 | - | else [IntegerEntry( | |
186 | + | else [IntegerEntry(Q, 1)] | |
181 | 187 | } | |
182 | 188 | else throw("Strict value is not equal to itself.") | |
183 | 189 | } | |
184 | 190 | ||
185 | 191 | ||
186 | - | func | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | max([0, ( | |
192 | + | func ay (az) = { | |
193 | + | let aA = valueOrElse(getInteger(this, m), 0) | |
194 | + | let aB = fraction(aA, 1, D) | |
195 | + | let aC = ((az / D) - aB) | |
196 | + | max([0, (E * aC)]) | |
191 | 197 | } | |
192 | 198 | ||
193 | 199 | ||
194 | - | func | |
200 | + | func aD () = ay(height) | |
195 | 201 | ||
196 | 202 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | if ($isInstanceOf( | |
203 | + | func aE () = { | |
204 | + | let aF = (A + aD()) | |
205 | + | let aG = { | |
206 | + | let S = C | |
207 | + | if ($isInstanceOf(S, "Unit")) | |
202 | 208 | then { | |
203 | - | let | |
204 | - | min([ | |
209 | + | let aH = S | |
210 | + | min([aF, wavesBalance(this).available]) | |
205 | 211 | } | |
206 | - | else if ($isInstanceOf( | |
212 | + | else if ($isInstanceOf(S, "ByteVector")) | |
207 | 213 | then { | |
208 | - | let | |
209 | - | min([ | |
214 | + | let aI = S | |
215 | + | min([aF, assetBalance(this, aI)]) | |
210 | 216 | } | |
211 | 217 | else throw("Match error") | |
212 | 218 | } | |
213 | - | if (( | |
219 | + | if ((z == 0)) | |
214 | 220 | then 0 | |
215 | - | else | |
221 | + | else aG | |
216 | 222 | } | |
217 | 223 | ||
218 | 224 | ||
219 | - | func | |
220 | - | then fraction(toBigInt( | |
225 | + | func aJ () = if ((z != 0)) | |
226 | + | then fraction(toBigInt(aE()), e, toBigInt(z)) | |
221 | 227 | else e | |
222 | 228 | ||
223 | 229 | ||
224 | - | func | |
230 | + | func aK (q) = valueOrElse(getInteger(this, p(q)), 0) | |
225 | 231 | ||
226 | 232 | ||
227 | - | func | |
228 | - | let | |
229 | - | let | |
230 | - | if ((0 > | |
233 | + | func aL (q) = { | |
234 | + | let aM = aK(q) | |
235 | + | let aN = toInt(fraction(toBigInt(aM), aJ(), e)) | |
236 | + | if ((0 > aN)) | |
231 | 237 | then 0 | |
232 | - | else | |
238 | + | else aN | |
233 | 239 | } | |
234 | 240 | ||
235 | 241 | ||
236 | - | func | |
237 | - | let | |
242 | + | func aO (aP,q) = { | |
243 | + | let aQ = [if ((size(aP.payments) == 1)) | |
238 | 244 | then true | |
239 | - | else h("should include 1 payment"), if (( | |
245 | + | else h("should include 1 payment"), if ((aP.payments[0].assetId == C)) | |
240 | 246 | then true | |
241 | - | else h(("payment should be in " + | |
247 | + | else h(("payment should be in " + B)), if ((aP.payments[0].amount > 0)) | |
242 | 248 | then true | |
243 | 249 | else "payment amount should be greater than 0"] | |
244 | - | if (( | |
250 | + | if ((aQ == aQ)) | |
245 | 251 | then { | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
252 | + | let aR = aP.payments[0].amount | |
253 | + | let aS = toInt(fraction(toBigInt(aR), e, aJ())) | |
254 | + | let aM = aK(q) | |
255 | + | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
256 | + | let aU = (z + aS) | |
257 | + | let aV = (A + aR) | |
258 | + | let aW = (aM + aS) | |
259 | + | let aX = (aT + aR) | |
260 | + | let aY = if ((z == 0)) | |
255 | 261 | then [IntegerEntry(m, height)] | |
256 | 262 | else nil | |
257 | - | ([IntegerEntry(n, | |
263 | + | ([StringEntry(t("stake", q, aP.transactionId), w(aD(), aJ())), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(s(q), aX)] ++ aY) | |
258 | 264 | } | |
259 | 265 | else throw("Strict value is not equal to itself.") | |
260 | 266 | } | |
261 | 267 | ||
262 | 268 | ||
263 | - | func | |
264 | - | let q = toString( | |
265 | - | let | |
266 | - | let | |
269 | + | func aZ (aP,ba) = { | |
270 | + | let q = toString(aP.caller) | |
271 | + | let aM = aK(q) | |
272 | + | let bb = [if ((ba > 0)) | |
267 | 273 | then true | |
268 | - | else h("LP amount should be more than 0"), if (( | |
274 | + | else h("LP amount should be more than 0"), if ((aM >= ba)) | |
269 | 275 | then true | |
270 | - | else h((("cannot withdraw more than available LP (" + toString( | |
271 | - | if (( | |
276 | + | else h((("cannot withdraw more than available LP (" + toString(aM)) + ")"))] | |
277 | + | if ((bb == bb)) | |
272 | 278 | then { | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | [IntegerEntry(n, | |
279 | + | let aW = (aM - ba) | |
280 | + | let bc = toInt(fraction(toBigInt(ba), aJ(), e)) | |
281 | + | let aU = (z - ba) | |
282 | + | let aV = toInt(fraction(toBigInt(aU), aJ(), e)) | |
283 | + | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
284 | + | let be = (bd + bc) | |
285 | + | [StringEntry(t("withdraw", q, aP.transactionId), w(aD(), aJ())), IntegerEntry(n, aU), IntegerEntry(o, aV), IntegerEntry(p(q), aW), IntegerEntry(r(q), be), IntegerEntry(m, height), ScriptTransfer(aP.caller, bc, C)] | |
280 | 286 | } | |
281 | 287 | else throw("Strict value is not equal to itself.") | |
282 | 288 | } | |
283 | 289 | ||
284 | 290 | ||
285 | - | @Callable( | |
286 | - | func setEmissionPerBlock ( | |
287 | - | let | |
291 | + | @Callable(aP) | |
292 | + | func setEmissionPerBlock (bf) = { | |
293 | + | let bb = [if ((aP.caller == this)) | |
288 | 294 | then true | |
289 | 295 | else h("permission denied")] | |
290 | - | if (( | |
291 | - | then [IntegerEntry(o, | |
296 | + | if ((bb == bb)) | |
297 | + | then [IntegerEntry(o, aE()), IntegerEntry(m, height), IntegerEntry(k, max([0, bf]))] | |
292 | 298 | else throw("Strict value is not equal to itself.") | |
293 | 299 | } | |
294 | 300 | ||
295 | 301 | ||
296 | 302 | ||
297 | - | @Callable( | |
298 | - | func stake () = | |
303 | + | @Callable(aP) | |
304 | + | func stake () = aO(aP, toString(aP.caller)) | |
299 | 305 | ||
300 | 306 | ||
301 | 307 | ||
302 | - | @Callable( | |
308 | + | @Callable(aP) | |
303 | 309 | func stakeFor (q) = { | |
304 | - | let | |
310 | + | let bb = [if ((size(fromBase58String(q)) == f)) | |
305 | 311 | then true | |
306 | 312 | else h("address is not valid")] | |
307 | - | if (( | |
308 | - | then | |
313 | + | if ((bb == bb)) | |
314 | + | then aO(aP, q) | |
309 | 315 | else throw("Strict value is not equal to itself.") | |
310 | 316 | } | |
311 | 317 | ||
312 | 318 | ||
313 | 319 | ||
314 | - | @Callable( | |
315 | - | func withdraw ( | |
316 | - | let q = toString( | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
320 | + | @Callable(aP) | |
321 | + | func withdraw (bc) = { | |
322 | + | let q = toString(aP.caller) | |
323 | + | let aM = aK(q) | |
324 | + | let bg = toInt(fraction(toBigInt(bc), e, aJ())) | |
325 | + | let aN = aL(q) | |
326 | + | let bh = toInt(fraction(aJ(), toBigInt(1), e, CEILING)) | |
327 | + | let bb = [if ((bc > 0)) | |
322 | 328 | then true | |
323 | - | else h("withdraw amount should be more than 0"), if (( | |
329 | + | else h("withdraw amount should be more than 0"), if ((aN >= bc)) | |
324 | 330 | then true | |
325 | - | else h((("cannot withdraw more than available (" + toString( | |
331 | + | else h((("cannot withdraw more than available (" + toString(aN)) + ")")), if ((bc >= bh)) | |
326 | 332 | then true | |
327 | - | else h((("withdraw amount is too small. Min: (" + toString( | |
328 | - | if (( | |
329 | - | then | |
333 | + | else h((("withdraw amount is too small. Min: (" + toString(bh)) + ")"))] | |
334 | + | if ((bb == bb)) | |
335 | + | then aZ(aP, bg) | |
330 | 336 | else throw("Strict value is not equal to itself.") | |
331 | 337 | } | |
332 | 338 | ||
333 | 339 | ||
334 | 340 | ||
335 | - | @Callable( | |
341 | + | @Callable(aP) | |
336 | 342 | func getUserAssetsREADONLY (q) = { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | $Tuple2(nil, $Tuple5( | |
343 | + | let aM = aK(q) | |
344 | + | let aN = aL(q) | |
345 | + | let aT = valueOrElse(getInteger(this, s(q)), 0) | |
346 | + | let bd = valueOrElse(getInteger(this, r(q)), 0) | |
347 | + | $Tuple2(nil, $Tuple5(aM, aN, aJ(), aT, bd)) | |
342 | 348 | } | |
343 | 349 | ||
344 | 350 | ||
345 | 351 | ||
346 | - | @Callable( | |
347 | - | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3( | |
352 | + | @Callable(aP) | |
353 | + | func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(z, aE(), aJ())) | |
348 | 354 | ||
349 | 355 | ||
350 | 356 | ||
351 | - | @Callable( | |
352 | - | func voteForTxId ( | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
357 | + | @Callable(aP) | |
358 | + | func voteForTxId (v) = { | |
359 | + | let as = toBase58String(aP.caller.bytes) | |
360 | + | let ab = I(v) | |
361 | + | let Z = [StringEntry(N(), v)] | |
362 | + | let bi = getString(this, N()) | |
363 | + | let aw = [if ((size(fromBase58String(v)) == H)) | |
358 | 364 | then true | |
359 | - | else h(( | |
365 | + | else h((v + " is not valid txId")), if (if ((bi == unit)) | |
360 | 366 | then true | |
361 | - | else (value( | |
367 | + | else (value(bi) != v)) | |
362 | 368 | then true | |
363 | - | else h(( | |
364 | - | if (( | |
365 | - | then | |
369 | + | else h((v + " is already allowed"))] | |
370 | + | if ((aw == aw)) | |
371 | + | then ar(as, ab, G, Z) | |
366 | 372 | else throw("Strict value is not equal to itself.") | |
367 | 373 | } | |
368 | 374 | ||
369 | 375 | ||
370 | - | @Verifier( | |
371 | - | func | |
372 | - | let | |
373 | - | let | |
376 | + | @Verifier(bj) | |
377 | + | func bk () = { | |
378 | + | let bl = (bj.id == fromBase58String(valueOrElse(getString(this, N()), ""))) | |
379 | + | let bm = if ((size(R()) >= G)) | |
374 | 380 | then false | |
375 | - | else sigVerify( | |
376 | - | if ( | |
381 | + | else sigVerify(bj.bodyBytes, bj.proofs[0], bj.senderPublicKey) | |
382 | + | if (bl) | |
377 | 383 | then true | |
378 | - | else | |
384 | + | else bm | |
379 | 385 | } | |
380 | 386 |
github/deemru/w8io/026f985 116.56 ms ◑