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