tx · 28DAJQDGWMLhKmHRTCR72v11NDteh36ZBGJh2syKuDFX 3MsC1Cit1aGB6qPW1hvkyGP2Gx79K1mtUAk: -0.01600000 Waves 2023.01.13 12:52 [2403024] smart account 3MsC1Cit1aGB6qPW1hvkyGP2Gx79K1mtUAk > SELF 0.00000000 Waves
{ "type": 13, "id": "28DAJQDGWMLhKmHRTCR72v11NDteh36ZBGJh2syKuDFX", "fee": 1600000, "feeAssetId": null, "timestamp": 1673603572199, "version": 1, "sender": "3MsC1Cit1aGB6qPW1hvkyGP2Gx79K1mtUAk", "senderPublicKey": "2rdeGwVMkuRfRdUgrYaekNmjnegHokhyDx1z6TJq525F", "proofs": [ "2Q41vxf6QMZh22TeKQByR7j7qj1gWNmPzamSJyHYrku1FCgaA4k3p8uV9hRR1ctH9TFBAzw32NGoeDRNDWHcFmrV" ], "script": "base64:BgLgEggCEgcKBQgICAEIEgMKAQESABIAEgUKAwgICBIDCgEIEgQKAgIBEgQKAgIBEgMKAQgSAwoBCBIAIgNTRVAiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiD2dldFN0cmluZ09yRmFpbCIDa2V5IhBnZXRCb29sZWFuT3JGYWlsIg5mYWlsRXhlY3V0ZUdldCIMYmFzZUFzc2V0U3RyIg51c2VyQWRkcmVzc1N0ciIKZ2V0VHhJZFN0ciILa2V5QXNzZXRDZmciFmtleU5leHRJbnRlcm5hbEFzc2V0SWQiDGtleVByaWNlTGFzdCIVaW50ZXJuYWxCYXNldEFzc2V0U3RyIhJrZXlUb3BVcExhc3RIZWlnaHQiBnNlbmRlciIPa2V5UHJpY2VIaXN0b3J5IgFoIgl0aW1lc3RhbXAiDmtleVRvdGFsTG9ja2VkIhRrZXlUb3RhbExvY2tlZEJ5VXNlciIUaW50ZXJuYWxCYXNlQXNzZXRTdHIiH2tleU1hcHBpbmdzSW50ZXJuYWwyYmFzZUFzc2V0SWQiEWludGVybmFsQmFzZUFzc2V0Ih9rZXlNYXBwaW5nc0Jhc2VBc3N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EAmJKAwkAAAIIBQFUD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCYkgGCQEBZAECG3lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQJiSgUCYkoJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAUwACQDYBAEJAQV2YWx1ZQEFAmJICQDMCAIJAQtEZWxldGVFbnRyeQEJAQFNAAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJiSwECYkwABAJiTQQBTwkBAU4AAwkAAQIFAU8CCkJ5dGVWZWN0b3IEAVYFAU8FAVYDCQABAgUBTwIEVW5pdAgFAmJLD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJiSwlib2R5Qnl0ZXMJAJEDAggFAmJLBnByb29mcwAABQJiTR+MzJc=", "chainId": 84, "height": 2403024, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F6qPjohVAwGiuyRayjuXD82KbqjuvVdmwMt87ZWHzvma Next: 8FurQAffAdR21eerYn7eGTv7kMunvoJhooZecsmtyTs4 Diff:
Old | New | Differences | |
---|---|---|---|
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | - | func W (B,w,X,Y,Z) = makeString(["%s%d%d%d%d", B, w, toString(X), toString(Y), toString(Z)], a) | |
127 | + | let W = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), b("lp_staking_pools contract address is undefined"))), b("invalid lp_staking_pools contract address")) | |
128 | + | ||
129 | + | func X (B,w,Y,Z,aa) = makeString(["%s%d%d%d%d", B, w, toString(Y), toString(Z), toString(aa)], a) | |
128 | 130 | ||
129 | 131 | ||
130 | - | let | |
132 | + | let ab = 1 | |
131 | 133 | ||
132 | - | let | |
134 | + | let ac = 2 | |
133 | 135 | ||
134 | - | func | |
136 | + | func ad (ae,af) = makeString(["%d%d", toString(ae), toString(af)], a) | |
135 | 137 | ||
136 | 138 | ||
137 | - | func | |
138 | - | let | |
139 | - | [-1, parseIntValue( | |
139 | + | func ag (f) = { | |
140 | + | let ah = split(valueOrElse(getString(this, f), ad(0, 0)), a) | |
141 | + | [-1, parseIntValue(ah[ab]), parseIntValue(ah[ac])] | |
140 | 142 | } | |
141 | 143 | ||
142 | 144 | ||
143 | - | func | |
145 | + | func ai (aj,w,ak,al) = makeString(["%s%d%s%s", aj, w, ak, al], a) | |
144 | 146 | ||
145 | 147 | ||
146 | - | let | |
148 | + | let am = 1 | |
147 | 149 | ||
148 | - | let | |
150 | + | let an = 2 | |
149 | 151 | ||
150 | - | let | |
152 | + | let ao = 3 | |
151 | 153 | ||
152 | - | let | |
154 | + | let ap = 4 | |
153 | 155 | ||
154 | - | let | |
156 | + | let aq = 5 | |
155 | 157 | ||
156 | - | let | |
158 | + | let ar = 6 | |
157 | 159 | ||
158 | - | let | |
160 | + | let as = 7 | |
159 | 161 | ||
160 | - | let | |
162 | + | let at = 8 | |
161 | 163 | ||
162 | - | func | |
164 | + | func au (av,aw,ax,ay,az,aA,aB,aC) = makeString(["%s%d%d%d%d%d%d%d", av, aw, ax, ay, az, aA, aB, aC], a) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func aD (av,aw,ax,ay,az,aA,aB,aC) = au(av, toString(aw), toString(ax), toString(ay), toString(az), toString(aA), toString(aB), toString(aC)) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func | |
170 | + | func aE (aF,aG,aH) = au(aG, aF[an], aF[ao], aF[ap], aF[aq], aF[ar], aF[as], toString(aH)) | |
169 | 171 | ||
170 | 172 | ||
171 | - | func | |
173 | + | func aI (i) = { | |
172 | 174 | let f = l(i) | |
173 | 175 | split(e(f), a) | |
174 | 176 | } | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
178 | - | let | |
179 | - | StringEntry(f, | |
179 | + | func aJ (f,ae,af) = { | |
180 | + | let aK = ag(f) | |
181 | + | StringEntry(f, ad((aK[ab] + ae), (aK[ac] + af))) | |
180 | 182 | } | |
181 | 183 | ||
182 | 184 | ||
183 | - | func | |
184 | - | let | |
185 | - | StringEntry(f, | |
185 | + | func aL (f,ae,af) = { | |
186 | + | let aK = ag(f) | |
187 | + | StringEntry(f, ad((aK[ab] - ae), (aK[ac] - af))) | |
186 | 188 | } | |
187 | 189 | ||
188 | 190 | ||
189 | - | func | |
190 | - | let | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | if ((0 > | |
195 | - | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString( | |
191 | + | func aM (w,aN,aO,aP,Y,Z) = { | |
192 | + | let ah = ag(u(w)) | |
193 | + | let aQ = ah[ac] | |
194 | + | let aR = assetBalance(this, aN) | |
195 | + | let aS = ((aR - aQ) + aO) | |
196 | + | if ((0 > aS)) | |
197 | + | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(aR)) + " baseAssetBalanceConsideringLock=") + toString(aS))) | |
196 | 198 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | then (1 * | |
200 | - | else fraction( | |
201 | - | $Tuple5( | |
199 | + | let aT = value(assetInfo(aP)).quantity | |
200 | + | let ax = if ((aT == 0)) | |
201 | + | then (1 * Z) | |
202 | + | else fraction(aS, Z, aT) | |
203 | + | $Tuple5(ax, aR, aQ, aS, aT) | |
202 | 204 | } | |
203 | 205 | } | |
204 | 206 | ||
205 | 207 | ||
206 | - | func | |
208 | + | func aU (w,aN,aP,Y,Z) = aM(w, aN, 0, aP, Y, Z) | |
207 | 209 | ||
208 | 210 | ||
209 | - | func | |
210 | - | let | |
211 | - | let | |
212 | - | let B = | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let w = | |
217 | - | let | |
218 | - | $Tuple6(IntegerEntry("price", | |
211 | + | func aV (i) = { | |
212 | + | let aN = fromBase58String(i) | |
213 | + | let aW = aI(i) | |
214 | + | let B = aW[G] | |
215 | + | let aP = fromBase58String(B) | |
216 | + | let Y = parseIntValue(aW[I]) | |
217 | + | let Z = parseIntValue(aW[J]) | |
218 | + | let w = aW[H] | |
219 | + | let aX = aU(w, aN, aP, Y, Z) | |
220 | + | $Tuple6(IntegerEntry("price", aX._1), IntegerEntry("decimalsMultPrice", Z), IntegerEntry("baseAssetBalance", aX._2), IntegerEntry("totalLockedBaseAmount", aX._3), IntegerEntry("baseAssetBalanceConsideringLock", aX._4), IntegerEntry("shareEmission", aX._5)) | |
219 | 221 | } | |
220 | 222 | ||
221 | 223 | ||
222 | 224 | @Callable(T) | |
223 | - | func adminRegisterAsset (i, | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | if (( | |
228 | - | then if ((toString(addressFromStringValue( | |
225 | + | func adminRegisterAsset (i,aY,aZ,ba,bb) = { | |
226 | + | let aN = fromBase58String(i) | |
227 | + | let bc = value(assetInfo(aN)).decimals | |
228 | + | let bd = U(T) | |
229 | + | if ((bd == bd)) | |
230 | + | then if ((toString(addressFromStringValue(bb)) != bb)) | |
229 | 231 | then throw("invalid shutdownManagerAddress") | |
230 | - | else if ((0 > | |
231 | - | then throw(("invalid getDelayinBlocks=" + toString( | |
232 | + | else if ((0 > ba)) | |
233 | + | then throw(("invalid getDelayinBlocks=" + toString(ba))) | |
232 | 234 | else { | |
233 | - | let | |
234 | - | let | |
235 | - | let B = toBase58String( | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let w = toString( | |
241 | - | [StringEntry(l(i), | |
235 | + | let be = Issue(aY, aZ, 1, bc, true) | |
236 | + | let aP = calculateAssetId(be) | |
237 | + | let B = toBase58String(aP) | |
238 | + | let Z = ((100 * 1000) * 1000) | |
239 | + | let Y = pow(10, 0, bc, 0, 0, DOWN) | |
240 | + | let bf = (1 * Z) | |
241 | + | let bg = valueOrElse(getInteger(this, m()), 0) | |
242 | + | let w = toString(bg) | |
243 | + | [StringEntry(l(i), X(B, w, Y, Z, ba)), StringEntry(x(bg), i), StringEntry(z(i), w), StringEntry(A(B), i), StringEntry(C(i), B), BooleanEntry(D(w), false), StringEntry(F(w), bb), IntegerEntry(m(), (bg + 1)), IntegerEntry(n(w), bf), IntegerEntry(r(w, height, lastBlock.timestamp), bf), be, Burn(aP, 1)] | |
242 | 244 | } | |
243 | 245 | else throw("Strict value is not equal to itself.") | |
244 | 246 | } | |
246 | 248 | ||
247 | 249 | ||
248 | 250 | @Callable(T) | |
249 | - | func shutdownPut ( | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | if ((1 > size( | |
251 | + | func shutdownPut (bh) = { | |
252 | + | let bi = toString(bh) | |
253 | + | let bj = e(x(bh)) | |
254 | + | let bb = e(F(bi)) | |
255 | + | if ((1 > size(bj))) | |
254 | 256 | then throw("invalid internalBaseAssetId") | |
255 | - | else if ((toString(T.caller) != | |
257 | + | else if ((toString(T.caller) != bb)) | |
256 | 258 | then throw("access denied") | |
257 | - | else [BooleanEntry(D(toString( | |
259 | + | else [BooleanEntry(D(toString(bh)), true)] | |
258 | 260 | } | |
259 | 261 | ||
260 | 262 | ||
261 | 263 | ||
262 | 264 | @Callable(T) | |
263 | 265 | func put () = { | |
264 | - | let | |
265 | - | let | |
266 | - | let i = toBase58String( | |
266 | + | let bk = value(T.payments[0]) | |
267 | + | let aN = value(bk.assetId) | |
268 | + | let i = toBase58String(aN) | |
267 | 269 | let j = toString(T.caller) | |
268 | - | let | |
269 | - | let B = | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let w = | |
274 | - | let | |
275 | - | let | |
276 | - | if (if ( | |
270 | + | let aW = aI(i) | |
271 | + | let B = aW[G] | |
272 | + | let aP = fromBase58String(B) | |
273 | + | let Y = parseIntValue(aW[I]) | |
274 | + | let Z = parseIntValue(aW[J]) | |
275 | + | let w = aW[H] | |
276 | + | let bl = g(D(w)) | |
277 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
278 | + | if (if (bl) | |
277 | 279 | then true | |
278 | - | else | |
280 | + | else bm) | |
279 | 281 | then throw("put operation is blocked") | |
280 | 282 | else { | |
281 | - | let | |
282 | - | let | |
283 | - | [Reissue( | |
283 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
284 | + | let ae = fraction(bk.amount, Z, ax) | |
285 | + | [Reissue(aP, ae, true), ScriptTransfer(T.caller, ae, aP), StringEntry(ai("P", w, j, toBase58String(T.transactionId)), aD("FINISHED", bk.amount, ax, ae, height, lastBlock.timestamp, height, lastBlock.timestamp))] | |
284 | 286 | } | |
285 | 287 | } | |
286 | 288 | ||
288 | 290 | ||
289 | 291 | @Callable(T) | |
290 | 292 | func submitGetRequest () = { | |
291 | - | let | |
292 | - | let | |
293 | - | let B = toBase58String( | |
294 | - | let | |
295 | - | let | |
296 | - | let j = toString( | |
297 | - | let | |
293 | + | let bk = value(T.payments[0]) | |
294 | + | let aP = value(bk.assetId) | |
295 | + | let B = toBase58String(aP) | |
296 | + | let bn = toBase58String(T.callerPublicKey) | |
297 | + | let ak = T.caller | |
298 | + | let j = toString(ak) | |
299 | + | let ae = bk.amount | |
298 | 300 | let i = e(A(B)) | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let w = | |
305 | - | let | |
306 | - | if ( | |
301 | + | let aN = fromBase58String(i) | |
302 | + | let aW = aI(i) | |
303 | + | let Y = parseIntValue(aW[I]) | |
304 | + | let Z = parseIntValue(aW[J]) | |
305 | + | let bo = parseIntValue(aW[K]) | |
306 | + | let w = aW[H] | |
307 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
308 | + | if (bm) | |
307 | 309 | then throw("operation is blocked") | |
308 | 310 | else { | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | [Burn( | |
311 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
312 | + | let af = fraction(ae, ax, Z) | |
313 | + | let bp = ai("G", w, j, toBase58String(T.transactionId)) | |
314 | + | let bq = aD("PENDING", ae, ax, af, height, lastBlock.timestamp, (height + bo), 0) | |
315 | + | [Burn(aP, ae), StringEntry(bp, bq), aJ(u(w), ae, af), aJ(v(w, j), ae, af)] | |
314 | 316 | } | |
315 | 317 | } | |
316 | 318 | ||
318 | 320 | ||
319 | 321 | @Callable(T) | |
320 | 322 | func executeGetRequest (i,j,k) = { | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | let w = | |
326 | - | let | |
327 | - | if ( | |
323 | + | let ak = addressFromStringValue(j) | |
324 | + | let br = aI(i) | |
325 | + | let aP = fromBase58String(br[G]) | |
326 | + | let aN = fromBase58String(i) | |
327 | + | let w = br[H] | |
328 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
329 | + | if (bm) | |
328 | 330 | then throw("operation is blocked") | |
329 | 331 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | if (( | |
332 | + | let bp = ai("G", w, j, k) | |
333 | + | let bs = split(e(bp), a) | |
334 | + | let av = bs[am] | |
335 | + | let aB = parseIntValue(bs[as]) | |
336 | + | let bt = parseIntValue(bs[an]) | |
337 | + | let bu = parseIntValue(bs[ap]) | |
338 | + | if ((av != "PENDING")) | |
337 | 339 | then h("Status is not PENDING", i, j, k) | |
338 | - | else if (( | |
339 | - | then h(((("EndHeight[" + toString( | |
340 | - | else [ScriptTransfer( | |
340 | + | else if ((aB > height)) | |
341 | + | then h(((("EndHeight[" + toString(aB)) + "] > ") + toString(height)), i, j, k) | |
342 | + | else [ScriptTransfer(ak, bu, aN), StringEntry(bp, aE(bs, "FINISHED", lastBlock.timestamp)), aL(u(w), bt, bu), aL(v(w, j), bt, bu)] | |
341 | 343 | } | |
342 | 344 | } | |
343 | 345 | ||
345 | 347 | ||
346 | 348 | @Callable(T) | |
347 | 349 | func topUpBalance (i) = { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let w = | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | if ( | |
350 | + | let br = aI(i) | |
351 | + | let bk = value(T.payments[0]) | |
352 | + | let bv = value(bk.assetId) | |
353 | + | let bw = toBase58String(bv) | |
354 | + | let aP = fromBase58String(br[G]) | |
355 | + | let Y = parseIntValue(br[I]) | |
356 | + | let Z = parseIntValue(br[J]) | |
357 | + | let w = br[H] | |
358 | + | let bx = p(w, toString(T.caller)) | |
359 | + | let by = valueOrElse(getInteger(this, bx), 0) | |
360 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
361 | + | if (bm) | |
360 | 362 | then throw("operation is blocked") | |
361 | - | else if ((i != | |
363 | + | else if ((i != bw)) | |
362 | 364 | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
363 | 365 | else if ((size(T.payments) > 1)) | |
364 | 366 | then throw("only one payment can be attached") | |
365 | - | else if ((100 > (height - | |
367 | + | else if ((100 > (height - by))) | |
366 | 368 | then throw("1 topUp per 100 blocks from the same address is allowed") | |
367 | 369 | else { | |
368 | - | let | |
369 | - | [IntegerEntry(n(w), | |
370 | + | let ax = aM(w, bv, bk.amount, aP, Y, Z)._1 | |
371 | + | [IntegerEntry(n(w), ax), IntegerEntry(r(w, height, lastBlock.timestamp), ax), IntegerEntry(bx, height)] | |
370 | 372 | } | |
371 | 373 | } | |
372 | 374 | ||
373 | 375 | ||
374 | 376 | ||
375 | 377 | @Callable(T) | |
376 | - | func emit (by,bz) = { | |
377 | - | let bA = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), b("lp_staking_pools contract address is undefined"))), b("invalid lp_staking_pools contract address")) | |
378 | - | let bB = [if ((T.caller == bA)) | |
378 | + | func emit (bz,bA) = { | |
379 | + | let bB = [if ((T.caller == W)) | |
379 | 380 | then true | |
380 | - | else d("permission denied"), if (( | |
381 | + | else d("permission denied"), if ((bA > 0)) | |
381 | 382 | then true | |
382 | - | else d("invalid amount to emit"), if ((getString(A(toBase58String( | |
383 | + | else d("invalid amount to emit"), if ((getString(A(toBase58String(bz))) != unit)) | |
383 | 384 | then true | |
384 | 385 | else d("invalid assetId")] | |
385 | 386 | if ((bB == bB)) | |
386 | 387 | then { | |
387 | 388 | let bC = true | |
388 | - | $Tuple2([Reissue( | |
389 | + | $Tuple2([Reissue(bz, bA, bC), ScriptTransfer(W, bA, bz)], bA) | |
389 | 390 | } | |
390 | 391 | else throw("Strict value is not equal to itself.") | |
391 | 392 | } | |
393 | 394 | ||
394 | 395 | ||
395 | 396 | @Callable(T) | |
397 | + | func burn (bz,bA) = { | |
398 | + | let bB = [if ((T.caller == W)) | |
399 | + | then true | |
400 | + | else d("permission denied"), if ((bA > 0)) | |
401 | + | then true | |
402 | + | else d("invalid amount to burn"), if ((getString(A(toBase58String(bz))) != unit)) | |
403 | + | then true | |
404 | + | else d("invalid assetId")] | |
405 | + | if ((bB == bB)) | |
406 | + | then $Tuple2([Burn(bz, bA)], bA) | |
407 | + | else throw("Strict value is not equal to itself.") | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(T) | |
396 | 413 | func currentSysParamsREST (i) = { | |
397 | - | let bD = | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let bE = makeString(["startCurrentSysParamsREST", toString( | |
414 | + | let bD = aV(i) | |
415 | + | let ax = bD._1.value | |
416 | + | let Z = bD._2.value | |
417 | + | let aR = bD._3.value | |
418 | + | let aQ = bD._4.value | |
419 | + | let aS = bD._5.value | |
420 | + | let aT = bD._6.value | |
421 | + | let bE = makeString(["startCurrentSysParamsREST", toString(ax), toString(Z), toString(aR), toString(aQ), toString(aS), toString(aT), "endCurrentSysParamsREST"], a) | |
405 | 422 | throw(bE) | |
406 | 423 | } | |
407 | 424 | ||
409 | 426 | ||
410 | 427 | @Callable(T) | |
411 | 428 | func setManager (bF) = { | |
412 | - | let | |
413 | - | if (( | |
429 | + | let bd = U(T) | |
430 | + | if ((bd == bd)) | |
414 | 431 | then { | |
415 | 432 | let bG = fromBase58String(bF) | |
416 | 433 | if ((bG == bG)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | func b (c) = makeString(["lp_staking.ride:", c], " ") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (c) = throw(b(c)) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func e (f) = valueOrErrorMessage(getString(this, f), ("No data for this.key=" + f)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func g (f) = valueOrErrorMessage(getBoolean(this, f), ("No data for this.key=" + f)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func h (c,i,j,k) = throw(((((((c + ": baseAssetStr=") + i) + " userAddressStr=") + j) + " getTxIdStr=") + k)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func l (i) = ("%s%s%s__config__asset__" + i) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func m () = "%s__nextInternalAssetId" | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func n (o) = ("%s%s%d__price__last__" + o) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func p (o,q) = makeString(["%s%s%s%d%s__topup__last__height", o, q], a) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func r (o,s,t) = makeString(["%s%s%d%d%d__price__history", o, toString(s), toString(t)], a) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func u (o) = ("%s%s%d__total__locked__" + o) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func v (w,j) = makeString(["%s%s%d%s__total__locked", w, j], a) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func x (y) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(y)) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func z (i) = ("%s%s%s__mappings__baseAsset2internalId__" + i) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func A (B) = ("%s%s%s__mappings__share2baseAssetId__" + B) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func C (i) = ("%s%s%s__mappings__baseAsset2shareId__" + i) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func D (w) = ("%s%s%d__shutdown__put__" + w) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func E (w) = ("%s%d__shutdown__" + w) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func F (w) = ("%s%s%d__shutdown__manager__" + w) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | let G = 1 | |
64 | 64 | ||
65 | 65 | let H = 2 | |
66 | 66 | ||
67 | 67 | let I = 3 | |
68 | 68 | ||
69 | 69 | let J = 4 | |
70 | 70 | ||
71 | 71 | let K = 5 | |
72 | 72 | ||
73 | 73 | func L () = "%s__managerPublicKey" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func M () = "%s__pendingManagerPublicKey" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func N () = { | |
80 | 80 | let O = getString(L()) | |
81 | 81 | if ($isInstanceOf(O, "String")) | |
82 | 82 | then { | |
83 | 83 | let P = O | |
84 | 84 | fromBase58String(P) | |
85 | 85 | } | |
86 | 86 | else if ($isInstanceOf(O, "Unit")) | |
87 | 87 | then unit | |
88 | 88 | else throw("Match error") | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func Q () = { | |
93 | 93 | let O = getString(M()) | |
94 | 94 | if ($isInstanceOf(O, "String")) | |
95 | 95 | then { | |
96 | 96 | let P = O | |
97 | 97 | fromBase58String(P) | |
98 | 98 | } | |
99 | 99 | else if ($isInstanceOf(O, "Unit")) | |
100 | 100 | then unit | |
101 | 101 | else throw("Match error") | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | let R = throw("Permission denied") | |
106 | 106 | ||
107 | 107 | func S (T) = if ((T.caller == this)) | |
108 | 108 | then true | |
109 | 109 | else R | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func U (T) = { | |
113 | 113 | let O = N() | |
114 | 114 | if ($isInstanceOf(O, "ByteVector")) | |
115 | 115 | then { | |
116 | 116 | let V = O | |
117 | 117 | if ((T.callerPublicKey == V)) | |
118 | 118 | then true | |
119 | 119 | else R | |
120 | 120 | } | |
121 | 121 | else if ($isInstanceOf(O, "Unit")) | |
122 | 122 | then S(T) | |
123 | 123 | else throw("Match error") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | - | func W (B,w,X,Y,Z) = makeString(["%s%d%d%d%d", B, w, toString(X), toString(Y), toString(Z)], a) | |
127 | + | let W = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), b("lp_staking_pools contract address is undefined"))), b("invalid lp_staking_pools contract address")) | |
128 | + | ||
129 | + | func X (B,w,Y,Z,aa) = makeString(["%s%d%d%d%d", B, w, toString(Y), toString(Z), toString(aa)], a) | |
128 | 130 | ||
129 | 131 | ||
130 | - | let | |
132 | + | let ab = 1 | |
131 | 133 | ||
132 | - | let | |
134 | + | let ac = 2 | |
133 | 135 | ||
134 | - | func | |
136 | + | func ad (ae,af) = makeString(["%d%d", toString(ae), toString(af)], a) | |
135 | 137 | ||
136 | 138 | ||
137 | - | func | |
138 | - | let | |
139 | - | [-1, parseIntValue( | |
139 | + | func ag (f) = { | |
140 | + | let ah = split(valueOrElse(getString(this, f), ad(0, 0)), a) | |
141 | + | [-1, parseIntValue(ah[ab]), parseIntValue(ah[ac])] | |
140 | 142 | } | |
141 | 143 | ||
142 | 144 | ||
143 | - | func | |
145 | + | func ai (aj,w,ak,al) = makeString(["%s%d%s%s", aj, w, ak, al], a) | |
144 | 146 | ||
145 | 147 | ||
146 | - | let | |
148 | + | let am = 1 | |
147 | 149 | ||
148 | - | let | |
150 | + | let an = 2 | |
149 | 151 | ||
150 | - | let | |
152 | + | let ao = 3 | |
151 | 153 | ||
152 | - | let | |
154 | + | let ap = 4 | |
153 | 155 | ||
154 | - | let | |
156 | + | let aq = 5 | |
155 | 157 | ||
156 | - | let | |
158 | + | let ar = 6 | |
157 | 159 | ||
158 | - | let | |
160 | + | let as = 7 | |
159 | 161 | ||
160 | - | let | |
162 | + | let at = 8 | |
161 | 163 | ||
162 | - | func | |
164 | + | func au (av,aw,ax,ay,az,aA,aB,aC) = makeString(["%s%d%d%d%d%d%d%d", av, aw, ax, ay, az, aA, aB, aC], a) | |
163 | 165 | ||
164 | 166 | ||
165 | - | func | |
167 | + | func aD (av,aw,ax,ay,az,aA,aB,aC) = au(av, toString(aw), toString(ax), toString(ay), toString(az), toString(aA), toString(aB), toString(aC)) | |
166 | 168 | ||
167 | 169 | ||
168 | - | func | |
170 | + | func aE (aF,aG,aH) = au(aG, aF[an], aF[ao], aF[ap], aF[aq], aF[ar], aF[as], toString(aH)) | |
169 | 171 | ||
170 | 172 | ||
171 | - | func | |
173 | + | func aI (i) = { | |
172 | 174 | let f = l(i) | |
173 | 175 | split(e(f), a) | |
174 | 176 | } | |
175 | 177 | ||
176 | 178 | ||
177 | - | func | |
178 | - | let | |
179 | - | StringEntry(f, | |
179 | + | func aJ (f,ae,af) = { | |
180 | + | let aK = ag(f) | |
181 | + | StringEntry(f, ad((aK[ab] + ae), (aK[ac] + af))) | |
180 | 182 | } | |
181 | 183 | ||
182 | 184 | ||
183 | - | func | |
184 | - | let | |
185 | - | StringEntry(f, | |
185 | + | func aL (f,ae,af) = { | |
186 | + | let aK = ag(f) | |
187 | + | StringEntry(f, ad((aK[ab] - ae), (aK[ac] - af))) | |
186 | 188 | } | |
187 | 189 | ||
188 | 190 | ||
189 | - | func | |
190 | - | let | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | if ((0 > | |
195 | - | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString( | |
191 | + | func aM (w,aN,aO,aP,Y,Z) = { | |
192 | + | let ah = ag(u(w)) | |
193 | + | let aQ = ah[ac] | |
194 | + | let aR = assetBalance(this, aN) | |
195 | + | let aS = ((aR - aQ) + aO) | |
196 | + | if ((0 > aS)) | |
197 | + | then throw(((("baseAssetBalanceConsideringLock < 0: baseAssetBalance=" + toString(aR)) + " baseAssetBalanceConsideringLock=") + toString(aS))) | |
196 | 198 | else { | |
197 | - | let | |
198 | - | let | |
199 | - | then (1 * | |
200 | - | else fraction( | |
201 | - | $Tuple5( | |
199 | + | let aT = value(assetInfo(aP)).quantity | |
200 | + | let ax = if ((aT == 0)) | |
201 | + | then (1 * Z) | |
202 | + | else fraction(aS, Z, aT) | |
203 | + | $Tuple5(ax, aR, aQ, aS, aT) | |
202 | 204 | } | |
203 | 205 | } | |
204 | 206 | ||
205 | 207 | ||
206 | - | func | |
208 | + | func aU (w,aN,aP,Y,Z) = aM(w, aN, 0, aP, Y, Z) | |
207 | 209 | ||
208 | 210 | ||
209 | - | func | |
210 | - | let | |
211 | - | let | |
212 | - | let B = | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let w = | |
217 | - | let | |
218 | - | $Tuple6(IntegerEntry("price", | |
211 | + | func aV (i) = { | |
212 | + | let aN = fromBase58String(i) | |
213 | + | let aW = aI(i) | |
214 | + | let B = aW[G] | |
215 | + | let aP = fromBase58String(B) | |
216 | + | let Y = parseIntValue(aW[I]) | |
217 | + | let Z = parseIntValue(aW[J]) | |
218 | + | let w = aW[H] | |
219 | + | let aX = aU(w, aN, aP, Y, Z) | |
220 | + | $Tuple6(IntegerEntry("price", aX._1), IntegerEntry("decimalsMultPrice", Z), IntegerEntry("baseAssetBalance", aX._2), IntegerEntry("totalLockedBaseAmount", aX._3), IntegerEntry("baseAssetBalanceConsideringLock", aX._4), IntegerEntry("shareEmission", aX._5)) | |
219 | 221 | } | |
220 | 222 | ||
221 | 223 | ||
222 | 224 | @Callable(T) | |
223 | - | func adminRegisterAsset (i, | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | if (( | |
228 | - | then if ((toString(addressFromStringValue( | |
225 | + | func adminRegisterAsset (i,aY,aZ,ba,bb) = { | |
226 | + | let aN = fromBase58String(i) | |
227 | + | let bc = value(assetInfo(aN)).decimals | |
228 | + | let bd = U(T) | |
229 | + | if ((bd == bd)) | |
230 | + | then if ((toString(addressFromStringValue(bb)) != bb)) | |
229 | 231 | then throw("invalid shutdownManagerAddress") | |
230 | - | else if ((0 > | |
231 | - | then throw(("invalid getDelayinBlocks=" + toString( | |
232 | + | else if ((0 > ba)) | |
233 | + | then throw(("invalid getDelayinBlocks=" + toString(ba))) | |
232 | 234 | else { | |
233 | - | let | |
234 | - | let | |
235 | - | let B = toBase58String( | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let w = toString( | |
241 | - | [StringEntry(l(i), | |
235 | + | let be = Issue(aY, aZ, 1, bc, true) | |
236 | + | let aP = calculateAssetId(be) | |
237 | + | let B = toBase58String(aP) | |
238 | + | let Z = ((100 * 1000) * 1000) | |
239 | + | let Y = pow(10, 0, bc, 0, 0, DOWN) | |
240 | + | let bf = (1 * Z) | |
241 | + | let bg = valueOrElse(getInteger(this, m()), 0) | |
242 | + | let w = toString(bg) | |
243 | + | [StringEntry(l(i), X(B, w, Y, Z, ba)), StringEntry(x(bg), i), StringEntry(z(i), w), StringEntry(A(B), i), StringEntry(C(i), B), BooleanEntry(D(w), false), StringEntry(F(w), bb), IntegerEntry(m(), (bg + 1)), IntegerEntry(n(w), bf), IntegerEntry(r(w, height, lastBlock.timestamp), bf), be, Burn(aP, 1)] | |
242 | 244 | } | |
243 | 245 | else throw("Strict value is not equal to itself.") | |
244 | 246 | } | |
245 | 247 | ||
246 | 248 | ||
247 | 249 | ||
248 | 250 | @Callable(T) | |
249 | - | func shutdownPut ( | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | if ((1 > size( | |
251 | + | func shutdownPut (bh) = { | |
252 | + | let bi = toString(bh) | |
253 | + | let bj = e(x(bh)) | |
254 | + | let bb = e(F(bi)) | |
255 | + | if ((1 > size(bj))) | |
254 | 256 | then throw("invalid internalBaseAssetId") | |
255 | - | else if ((toString(T.caller) != | |
257 | + | else if ((toString(T.caller) != bb)) | |
256 | 258 | then throw("access denied") | |
257 | - | else [BooleanEntry(D(toString( | |
259 | + | else [BooleanEntry(D(toString(bh)), true)] | |
258 | 260 | } | |
259 | 261 | ||
260 | 262 | ||
261 | 263 | ||
262 | 264 | @Callable(T) | |
263 | 265 | func put () = { | |
264 | - | let | |
265 | - | let | |
266 | - | let i = toBase58String( | |
266 | + | let bk = value(T.payments[0]) | |
267 | + | let aN = value(bk.assetId) | |
268 | + | let i = toBase58String(aN) | |
267 | 269 | let j = toString(T.caller) | |
268 | - | let | |
269 | - | let B = | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let w = | |
274 | - | let | |
275 | - | let | |
276 | - | if (if ( | |
270 | + | let aW = aI(i) | |
271 | + | let B = aW[G] | |
272 | + | let aP = fromBase58String(B) | |
273 | + | let Y = parseIntValue(aW[I]) | |
274 | + | let Z = parseIntValue(aW[J]) | |
275 | + | let w = aW[H] | |
276 | + | let bl = g(D(w)) | |
277 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
278 | + | if (if (bl) | |
277 | 279 | then true | |
278 | - | else | |
280 | + | else bm) | |
279 | 281 | then throw("put operation is blocked") | |
280 | 282 | else { | |
281 | - | let | |
282 | - | let | |
283 | - | [Reissue( | |
283 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
284 | + | let ae = fraction(bk.amount, Z, ax) | |
285 | + | [Reissue(aP, ae, true), ScriptTransfer(T.caller, ae, aP), StringEntry(ai("P", w, j, toBase58String(T.transactionId)), aD("FINISHED", bk.amount, ax, ae, height, lastBlock.timestamp, height, lastBlock.timestamp))] | |
284 | 286 | } | |
285 | 287 | } | |
286 | 288 | ||
287 | 289 | ||
288 | 290 | ||
289 | 291 | @Callable(T) | |
290 | 292 | func submitGetRequest () = { | |
291 | - | let | |
292 | - | let | |
293 | - | let B = toBase58String( | |
294 | - | let | |
295 | - | let | |
296 | - | let j = toString( | |
297 | - | let | |
293 | + | let bk = value(T.payments[0]) | |
294 | + | let aP = value(bk.assetId) | |
295 | + | let B = toBase58String(aP) | |
296 | + | let bn = toBase58String(T.callerPublicKey) | |
297 | + | let ak = T.caller | |
298 | + | let j = toString(ak) | |
299 | + | let ae = bk.amount | |
298 | 300 | let i = e(A(B)) | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let w = | |
305 | - | let | |
306 | - | if ( | |
301 | + | let aN = fromBase58String(i) | |
302 | + | let aW = aI(i) | |
303 | + | let Y = parseIntValue(aW[I]) | |
304 | + | let Z = parseIntValue(aW[J]) | |
305 | + | let bo = parseIntValue(aW[K]) | |
306 | + | let w = aW[H] | |
307 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
308 | + | if (bm) | |
307 | 309 | then throw("operation is blocked") | |
308 | 310 | else { | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | [Burn( | |
311 | + | let ax = aU(w, aN, aP, Y, Z)._1 | |
312 | + | let af = fraction(ae, ax, Z) | |
313 | + | let bp = ai("G", w, j, toBase58String(T.transactionId)) | |
314 | + | let bq = aD("PENDING", ae, ax, af, height, lastBlock.timestamp, (height + bo), 0) | |
315 | + | [Burn(aP, ae), StringEntry(bp, bq), aJ(u(w), ae, af), aJ(v(w, j), ae, af)] | |
314 | 316 | } | |
315 | 317 | } | |
316 | 318 | ||
317 | 319 | ||
318 | 320 | ||
319 | 321 | @Callable(T) | |
320 | 322 | func executeGetRequest (i,j,k) = { | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | let w = | |
326 | - | let | |
327 | - | if ( | |
323 | + | let ak = addressFromStringValue(j) | |
324 | + | let br = aI(i) | |
325 | + | let aP = fromBase58String(br[G]) | |
326 | + | let aN = fromBase58String(i) | |
327 | + | let w = br[H] | |
328 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
329 | + | if (bm) | |
328 | 330 | then throw("operation is blocked") | |
329 | 331 | else { | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | if (( | |
332 | + | let bp = ai("G", w, j, k) | |
333 | + | let bs = split(e(bp), a) | |
334 | + | let av = bs[am] | |
335 | + | let aB = parseIntValue(bs[as]) | |
336 | + | let bt = parseIntValue(bs[an]) | |
337 | + | let bu = parseIntValue(bs[ap]) | |
338 | + | if ((av != "PENDING")) | |
337 | 339 | then h("Status is not PENDING", i, j, k) | |
338 | - | else if (( | |
339 | - | then h(((("EndHeight[" + toString( | |
340 | - | else [ScriptTransfer( | |
340 | + | else if ((aB > height)) | |
341 | + | then h(((("EndHeight[" + toString(aB)) + "] > ") + toString(height)), i, j, k) | |
342 | + | else [ScriptTransfer(ak, bu, aN), StringEntry(bp, aE(bs, "FINISHED", lastBlock.timestamp)), aL(u(w), bt, bu), aL(v(w, j), bt, bu)] | |
341 | 343 | } | |
342 | 344 | } | |
343 | 345 | ||
344 | 346 | ||
345 | 347 | ||
346 | 348 | @Callable(T) | |
347 | 349 | func topUpBalance (i) = { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let w = | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | if ( | |
350 | + | let br = aI(i) | |
351 | + | let bk = value(T.payments[0]) | |
352 | + | let bv = value(bk.assetId) | |
353 | + | let bw = toBase58String(bv) | |
354 | + | let aP = fromBase58String(br[G]) | |
355 | + | let Y = parseIntValue(br[I]) | |
356 | + | let Z = parseIntValue(br[J]) | |
357 | + | let w = br[H] | |
358 | + | let bx = p(w, toString(T.caller)) | |
359 | + | let by = valueOrElse(getInteger(this, bx), 0) | |
360 | + | let bm = valueOrElse(getBoolean(E(w)), false) | |
361 | + | if (bm) | |
360 | 362 | then throw("operation is blocked") | |
361 | - | else if ((i != | |
363 | + | else if ((i != bw)) | |
362 | 364 | then throw("attached payment's asset id is NOT matched passed baseAssetStr") | |
363 | 365 | else if ((size(T.payments) > 1)) | |
364 | 366 | then throw("only one payment can be attached") | |
365 | - | else if ((100 > (height - | |
367 | + | else if ((100 > (height - by))) | |
366 | 368 | then throw("1 topUp per 100 blocks from the same address is allowed") | |
367 | 369 | else { | |
368 | - | let | |
369 | - | [IntegerEntry(n(w), | |
370 | + | let ax = aM(w, bv, bk.amount, aP, Y, Z)._1 | |
371 | + | [IntegerEntry(n(w), ax), IntegerEntry(r(w, height, lastBlock.timestamp), ax), IntegerEntry(bx, height)] | |
370 | 372 | } | |
371 | 373 | } | |
372 | 374 | ||
373 | 375 | ||
374 | 376 | ||
375 | 377 | @Callable(T) | |
376 | - | func emit (by,bz) = { | |
377 | - | let bA = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), b("lp_staking_pools contract address is undefined"))), b("invalid lp_staking_pools contract address")) | |
378 | - | let bB = [if ((T.caller == bA)) | |
378 | + | func emit (bz,bA) = { | |
379 | + | let bB = [if ((T.caller == W)) | |
379 | 380 | then true | |
380 | - | else d("permission denied"), if (( | |
381 | + | else d("permission denied"), if ((bA > 0)) | |
381 | 382 | then true | |
382 | - | else d("invalid amount to emit"), if ((getString(A(toBase58String( | |
383 | + | else d("invalid amount to emit"), if ((getString(A(toBase58String(bz))) != unit)) | |
383 | 384 | then true | |
384 | 385 | else d("invalid assetId")] | |
385 | 386 | if ((bB == bB)) | |
386 | 387 | then { | |
387 | 388 | let bC = true | |
388 | - | $Tuple2([Reissue( | |
389 | + | $Tuple2([Reissue(bz, bA, bC), ScriptTransfer(W, bA, bz)], bA) | |
389 | 390 | } | |
390 | 391 | else throw("Strict value is not equal to itself.") | |
391 | 392 | } | |
392 | 393 | ||
393 | 394 | ||
394 | 395 | ||
395 | 396 | @Callable(T) | |
397 | + | func burn (bz,bA) = { | |
398 | + | let bB = [if ((T.caller == W)) | |
399 | + | then true | |
400 | + | else d("permission denied"), if ((bA > 0)) | |
401 | + | then true | |
402 | + | else d("invalid amount to burn"), if ((getString(A(toBase58String(bz))) != unit)) | |
403 | + | then true | |
404 | + | else d("invalid assetId")] | |
405 | + | if ((bB == bB)) | |
406 | + | then $Tuple2([Burn(bz, bA)], bA) | |
407 | + | else throw("Strict value is not equal to itself.") | |
408 | + | } | |
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | @Callable(T) | |
396 | 413 | func currentSysParamsREST (i) = { | |
397 | - | let bD = | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let bE = makeString(["startCurrentSysParamsREST", toString( | |
414 | + | let bD = aV(i) | |
415 | + | let ax = bD._1.value | |
416 | + | let Z = bD._2.value | |
417 | + | let aR = bD._3.value | |
418 | + | let aQ = bD._4.value | |
419 | + | let aS = bD._5.value | |
420 | + | let aT = bD._6.value | |
421 | + | let bE = makeString(["startCurrentSysParamsREST", toString(ax), toString(Z), toString(aR), toString(aQ), toString(aS), toString(aT), "endCurrentSysParamsREST"], a) | |
405 | 422 | throw(bE) | |
406 | 423 | } | |
407 | 424 | ||
408 | 425 | ||
409 | 426 | ||
410 | 427 | @Callable(T) | |
411 | 428 | func setManager (bF) = { | |
412 | - | let | |
413 | - | if (( | |
429 | + | let bd = U(T) | |
430 | + | if ((bd == bd)) | |
414 | 431 | then { | |
415 | 432 | let bG = fromBase58String(bF) | |
416 | 433 | if ((bG == bG)) | |
417 | 434 | then [StringEntry(M(), bF)] | |
418 | 435 | else throw("Strict value is not equal to itself.") | |
419 | 436 | } | |
420 | 437 | else throw("Strict value is not equal to itself.") | |
421 | 438 | } | |
422 | 439 | ||
423 | 440 | ||
424 | 441 | ||
425 | 442 | @Callable(T) | |
426 | 443 | func confirmManager () = { | |
427 | 444 | let bH = Q() | |
428 | 445 | let bI = if (isDefined(bH)) | |
429 | 446 | then true | |
430 | 447 | else d("no pending manager") | |
431 | 448 | if ((bI == bI)) | |
432 | 449 | then { | |
433 | 450 | let bJ = if ((T.callerPublicKey == value(bH))) | |
434 | 451 | then true | |
435 | 452 | else d("you are not pending manager") | |
436 | 453 | if ((bJ == bJ)) | |
437 | 454 | then [StringEntry(L(), toBase58String(value(bH))), DeleteEntry(M())] | |
438 | 455 | else throw("Strict value is not equal to itself.") | |
439 | 456 | } | |
440 | 457 | else throw("Strict value is not equal to itself.") | |
441 | 458 | } | |
442 | 459 | ||
443 | 460 | ||
444 | 461 | @Verifier(bK) | |
445 | 462 | func bL () = { | |
446 | 463 | let bM = { | |
447 | 464 | let O = N() | |
448 | 465 | if ($isInstanceOf(O, "ByteVector")) | |
449 | 466 | then { | |
450 | 467 | let V = O | |
451 | 468 | V | |
452 | 469 | } | |
453 | 470 | else if ($isInstanceOf(O, "Unit")) | |
454 | 471 | then bK.senderPublicKey | |
455 | 472 | else throw("Match error") | |
456 | 473 | } | |
457 | 474 | sigVerify(bK.bodyBytes, bK.proofs[0], bM) | |
458 | 475 | } | |
459 | 476 |
github/deemru/w8io/026f985 110.88 ms ◑