tx · 2YBijj4qkwwQCU2CJo8u76RT4A68vJ8HxSrh6opMspCr 3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85: -0.01900000 Waves 2022.06.16 23:53 [2099429] smart account 3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85 > SELF 0.00000000 Waves
{ "type": 13, "id": "2YBijj4qkwwQCU2CJo8u76RT4A68vJ8HxSrh6opMspCr", "fee": 1900000, "feeAssetId": null, "timestamp": 1655412765729, "version": 2, "chainId": 84, "sender": "3Mz3zcbv3p8Vjx6566CjJxMynZFn2KJvc85", "senderPublicKey": "FzsBKmVJC76fKJH1jmXYtwvX3kDyWF97DYPHRo3D5gG4", "proofs": [ "4WvL5AaE6bgVmfNKx6ReNdmbdVs2Ks6jPSwci156MiTdv1EUBz6ZK6dHDZDEzZVG2MG7hzzLDsENz5EqiNz6MKtY" ], "script": "base64:AAIFAAAAAAAAAD4IAhIDCgEIEgMKAQESCAoGCAEEAQEBEgMKAQQSABIAEgASAwoBCBIGCgQICAEBEgMKAQgSAwoBCBIECgIICAAAACEAAAAAC2tleU1BY2NQS2V5AgAAAAltYXN0ZXJfcGsAAAAACHdhcnNQS2V5AgAAAAd3YXJzX3BrAQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAAAAAA5tQWNjUEtleVN0cmluZwkBAAAABmdldFN0cgAAAAEFAAAAC2tleU1BY2NQS2V5AAAAAAhtQWNjUEtleQkAAlkAAAABBQAAAA5tQWNjUEtleVN0cmluZwAAAAAIbUFjY0FkZHIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAACG1BY2NQS2V5AAAAAApmZWVQZXJjZW50CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAhtQWNjQWRkcg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250cmFjdHMEAAAAFGFsbG93ZWRDb250cmFjdHNMaXN0CQAEtQAAAAIFAAAAEGFsbG93ZWRDb250cmFjdHMCAAAAATsEAAAACmRhcHBUb0NhbGwJAAQlAAAAAQkABCQAAAABCAUAAAADaW52AAAABGRBcHAJAQAAAAIhPQAAAAIJAARPAAAAAgUAAAAUYWxsb3dlZENvbnRyYWN0c0xpc3QFAAAACmRhcHBUb0NhbGwFAAAABHVuaXQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAJzcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAACG1BY2NQS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACbXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAhtQWNjUEtleQeNUpO3", "height": 2099429, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BoYaRZtVhUvqBXPbiGpCmhcpTN7cxsiBujqTWYwsMk53 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
252 | 252 | let au = split(ao, ";") | |
253 | 253 | let av = { | |
254 | 254 | let aw = au | |
255 | - | let | |
256 | - | let | |
257 | - | func | |
258 | - | then | |
259 | - | else aq( | |
255 | + | let ax = size(aw) | |
256 | + | let ay = 0 | |
257 | + | func az (aA,aB) = if ((aB >= ax)) | |
258 | + | then aA | |
259 | + | else aq(aA, aw[aB]) | |
260 | 260 | ||
261 | - | func | |
262 | - | then | |
261 | + | func aC (aA,aB) = if ((aB >= ax)) | |
262 | + | then aA | |
263 | 263 | else throw("List size exceeds 10") | |
264 | 264 | ||
265 | - | az(ay | |
265 | + | aC(az(az(az(az(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
266 | 266 | } | |
267 | - | let | |
267 | + | let aD = { | |
268 | 268 | let e = av | |
269 | 269 | if ($isInstanceOf(e, "Int")) | |
270 | 270 | then { | |
274 | 274 | else throw("_6") | |
275 | 275 | } | |
276 | 276 | let aa = C(p) | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | if (( | |
277 | + | let aE = fraction(aD, j, 100) | |
278 | + | let aF = C(x) | |
279 | + | let aG = C(y) | |
280 | + | let aH = (aD - aE) | |
281 | + | let aI = M(invoke(this, "calculateCompoundShareAndIssue", [aH], nil)) | |
282 | + | if ((aI == aI)) | |
283 | 283 | then { | |
284 | - | let | |
285 | - | if (( | |
286 | - | then [IntegerEntry(p, (aa + | |
284 | + | let aJ = invoke(k, "topUpReward", nil, [AttachedPayment(ai, (aH - aI)), AttachedPayment(S, aI)]) | |
285 | + | if ((aJ == aJ)) | |
286 | + | then [IntegerEntry(p, (aa + aH)), IntegerEntry(x, (aF + aE)), IntegerEntry(y, (aG + aE))] | |
287 | 287 | else throw("Strict value is not equal to itself.") | |
288 | 288 | } | |
289 | 289 | else throw("Strict value is not equal to itself.") | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | @Callable(P) | |
295 | - | func claimCeoFee ( | |
295 | + | func claimCeoFee (aK,aL,aM,aN) = if ((0 > aM)) | |
296 | 296 | then throw("Share 1 can't be negative") | |
297 | - | else if ((0 > | |
297 | + | else if ((0 > aN)) | |
298 | 298 | then throw("Share 2 can't be negative") | |
299 | - | else if ((( | |
299 | + | else if (((aM + aN) != 100)) | |
300 | 300 | then throw("Sum of shares should be 100") | |
301 | 301 | else if ((D(w) == true)) | |
302 | 302 | then throw("_22") | |
303 | 303 | else if ((P.caller == this)) | |
304 | 304 | then { | |
305 | - | let | |
306 | - | let | |
307 | - | then | |
308 | - | else fraction( | |
309 | - | let | |
305 | + | let aO = C(x) | |
306 | + | let aP = if ((aL == "")) | |
307 | + | then aO | |
308 | + | else fraction(aO, aM, 100) | |
309 | + | let aQ = if ((aL == "")) | |
310 | 310 | then 0 | |
311 | - | else fraction( | |
312 | - | let | |
311 | + | else fraction(aO, aN, 100) | |
312 | + | let aR = if ((aL == "")) | |
313 | 313 | then nil | |
314 | - | else [ScriptTransfer(addressFromStringValue( | |
315 | - | ( | |
314 | + | else [ScriptTransfer(addressFromStringValue(aL), aQ, K())] | |
315 | + | (aR ++ [ScriptTransfer(addressFromStringValue(aK), aP, K()), IntegerEntry(x, 0)]) | |
316 | 316 | } | |
317 | 317 | else throw("Only manager can call the contract") | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(P) | |
322 | - | func startLiquidation ( | |
322 | + | func startLiquidation (aS) = throw("_7") | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | ||
326 | 326 | @Callable(P) | |
327 | - | func voteForLiquidation ( | |
327 | + | func voteForLiquidation (aS) = throw("_7") | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | ||
331 | 331 | @Callable(P) | |
332 | - | func callUnstakeProxy ( | |
332 | + | func callUnstakeProxy (aT,aU) = if ((D(w) == true)) | |
333 | 333 | then throw("Contract is locked now") | |
334 | - | else if (if (( | |
335 | - | then ( | |
334 | + | else if (if ((aT != "unstakeNFT")) | |
335 | + | then (aT != "unstakeJackpot") | |
336 | 336 | else false) | |
337 | 337 | then throw("Bad function name") | |
338 | 338 | else if ((P.caller != this)) | |
340 | 340 | else { | |
341 | 341 | let ai = K() | |
342 | 342 | let S = L() | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
343 | + | let aV = addressFromStringValue(E(i, "FARMING_DAPP")) | |
344 | + | let aW = invoke(aV, aT, [aU], nil) | |
345 | + | if ((aW == aW)) | |
346 | 346 | then { | |
347 | - | let | |
348 | - | let e = | |
347 | + | let aX = { | |
348 | + | let e = aW | |
349 | 349 | if ($isInstanceOf(e, "Int")) | |
350 | 350 | then { | |
351 | 351 | let O = e | |
353 | 353 | } | |
354 | 354 | else throw("Error during unstaking") | |
355 | 355 | } | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
356 | + | let aF = C(x) | |
357 | + | let aG = C(y) | |
358 | + | let aE = fraction(aX, j, 100) | |
359 | + | let aH = (aX - aE) | |
360 | + | let aY = invoke(this, "calculateCompoundShareAndIssue", [aH], nil) | |
361 | + | if ((aY == aY)) | |
362 | 362 | then { | |
363 | - | let | |
364 | - | if (( | |
363 | + | let aI = M(invoke(this, "calculateCompoundShareAndIssue", [aH], nil)) | |
364 | + | if ((aI == aI)) | |
365 | 365 | then { | |
366 | - | let | |
367 | - | if (( | |
368 | - | then [IntegerEntry(x, ( | |
366 | + | let aJ = invoke(k, "topUpReward", nil, [AttachedPayment(ai, (aH - aI)), AttachedPayment(S, aI)]) | |
367 | + | if ((aJ == aJ)) | |
368 | + | then [IntegerEntry(x, (aF + aE)), IntegerEntry(y, (aG + aE))] | |
369 | 369 | else throw("Strict value is not equal to itself.") | |
370 | 370 | } | |
371 | 371 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | - | @Verifier( | |
380 | - | func | |
381 | - | let | |
382 | - | let e = | |
379 | + | @Verifier(aZ) | |
380 | + | func ba () = { | |
381 | + | let bb = (C(m) >= C(o)) | |
382 | + | let e = aZ | |
383 | 383 | if ($isInstanceOf(e, "InvokeScriptTransaction")) | |
384 | 384 | then { | |
385 | - | let | |
386 | - | let | |
387 | - | let | |
388 | - | if (if (( | |
385 | + | let bc = e | |
386 | + | let bd = ["stakeFarmTokens", "claimReward", "withdrawFarmTokens"] | |
387 | + | let be = ["callUnstakeProxy", "claimCeoFee", "lockInvestments", "unlockInvestments"] | |
388 | + | if (if ((bc.function == "unstakeNFT")) | |
389 | 389 | then true | |
390 | - | else ( | |
390 | + | else (bc.function == "unstakeJackpot")) | |
391 | 391 | then throw("You cannot call these functions directly") | |
392 | - | else if (if (if ((addressFromRecipient( | |
393 | - | then ( | |
392 | + | else if (if (if ((addressFromRecipient(bc.dApp) == this)) | |
393 | + | then (bc.function == "initMasterKey") | |
394 | 394 | else false) | |
395 | 395 | then (g == "") | |
396 | 396 | else false) | |
397 | - | then sigVerify( | |
398 | - | else if ((sigVerify( | |
397 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
398 | + | else if ((sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) == false)) | |
399 | 399 | then throw("_100") | |
400 | - | else if (( | |
400 | + | else if ((bb == false)) | |
401 | 401 | then throw("_14") | |
402 | 402 | else if ((D(w) == true)) | |
403 | 403 | then throw("_22") | |
404 | - | else if (if (( | |
404 | + | else if (if ((bc.fee > 900000)) | |
405 | 405 | then true | |
406 | - | else ( | |
406 | + | else (bc.feeAssetId != unit)) | |
407 | 407 | then throw("_15") | |
408 | - | else if ((size( | |
408 | + | else if ((size(bc.payments) > 2)) | |
409 | 409 | then throw("_17") | |
410 | - | else if (if ((addressFromRecipient( | |
411 | - | then containsElement( | |
410 | + | else if (if ((addressFromRecipient(bc.dApp) == this)) | |
411 | + | then containsElement(be, bc.function) | |
412 | 412 | else false) | |
413 | - | then sigVerify( | |
414 | - | else if (if ((addressFromRecipient( | |
415 | - | then ( | |
413 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
414 | + | else if (if ((addressFromRecipient(bc.dApp) == addressFromStringValue(J()))) | |
415 | + | then (bc.function == "callMarketplaceProxy") | |
416 | 416 | else false) | |
417 | - | then sigVerify( | |
418 | - | else if (if ((addressFromRecipient( | |
419 | - | then containsElement( | |
417 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
418 | + | else if (if ((addressFromRecipient(bc.dApp) == k)) | |
419 | + | then containsElement(bd, bc.function) | |
420 | 420 | else false) | |
421 | - | then sigVerify( | |
421 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
422 | 422 | else { | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | (indexOf( | |
423 | + | let bf = E(i, "allowed_contracts") | |
424 | + | let bg = split(bf, ";") | |
425 | + | let bh = toString(addressFromRecipient(bc.dApp)) | |
426 | + | (indexOf(bg, bh) != unit) | |
427 | 427 | } | |
428 | 428 | } | |
429 | 429 | else if ($isInstanceOf(e, "SetScriptTransaction")) | |
430 | 430 | then { | |
431 | - | let | |
432 | - | sigVerify( | |
431 | + | let bi = e | |
432 | + | sigVerify(aZ.bodyBytes, aZ.proofs[0], h) | |
433 | 433 | } | |
434 | 434 | else if ($isInstanceOf(e, "MassTransferTransaction")) | |
435 | 435 | then { | |
436 | - | let | |
437 | - | sigVerify( | |
436 | + | let bj = e | |
437 | + | sigVerify(aZ.bodyBytes, aZ.proofs[0], h) | |
438 | 438 | } | |
439 | 439 | else false | |
440 | 440 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "master_pk" | |
5 | 5 | ||
6 | 6 | let b = "wars_pk" | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = getString(this, d) | |
10 | 10 | if ($isInstanceOf(e, "String")) | |
11 | 11 | then { | |
12 | 12 | let f = e | |
13 | 13 | f | |
14 | 14 | } | |
15 | 15 | else "" | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | let g = c(a) | |
20 | 20 | ||
21 | 21 | let h = fromBase58String(g) | |
22 | 22 | ||
23 | 23 | let i = addressFromPublicKey(h) | |
24 | 24 | ||
25 | 25 | let j = getIntegerValue(i, (("f_" + toString(this)) + "_fee")) | |
26 | 26 | ||
27 | 27 | let k = addressFromStringValue(valueOrErrorMessage(getString(i, (("f_" + toString(this)) + "_stake_address")), (("f_" + toString(this)) + "_stake_address not defined"))) | |
28 | 28 | ||
29 | 29 | let l = fromBase58String(valueOrErrorMessage(getString(i, b), (b + " not defined"))) | |
30 | 30 | ||
31 | 31 | let m = "total_liquidity" | |
32 | 32 | ||
33 | 33 | let n = "INITIALIZED" | |
34 | 34 | ||
35 | 35 | let o = "LIQUIDITY_THRESHOLD" | |
36 | 36 | ||
37 | 37 | let p = "total_farming_reward" | |
38 | 38 | ||
39 | 39 | let q = "SHARE_ASSET_ID" | |
40 | 40 | ||
41 | 41 | let r = "INCUBATOR_DAPP" | |
42 | 42 | ||
43 | 43 | let s = "BREEDER_DAPP" | |
44 | 44 | ||
45 | 45 | let t = "FARMING_DAPP" | |
46 | 46 | ||
47 | 47 | let u = "MARKETPLACE_PROXY_DAPP" | |
48 | 48 | ||
49 | 49 | let v = "AUCTION_DAPP" | |
50 | 50 | ||
51 | 51 | let w = "LOCKED" | |
52 | 52 | ||
53 | 53 | let x = "ceo_collected_fee" | |
54 | 54 | ||
55 | 55 | let y = "ceo_fee_overall" | |
56 | 56 | ||
57 | 57 | let z = "locked_investments" | |
58 | 58 | ||
59 | 59 | let A = "total_compound" | |
60 | 60 | ||
61 | 61 | let B = "global_staked" | |
62 | 62 | ||
63 | 63 | func C (d) = { | |
64 | 64 | let e = getInteger(this, d) | |
65 | 65 | if ($isInstanceOf(e, "Int")) | |
66 | 66 | then { | |
67 | 67 | let f = e | |
68 | 68 | f | |
69 | 69 | } | |
70 | 70 | else 0 | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func D (d) = { | |
75 | 75 | let e = getBoolean(this, d) | |
76 | 76 | if ($isInstanceOf(e, "Boolean")) | |
77 | 77 | then { | |
78 | 78 | let f = e | |
79 | 79 | f | |
80 | 80 | } | |
81 | 81 | else unit | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func E (F,G) = { | |
86 | 86 | let e = getString(F, G) | |
87 | 87 | if ($isInstanceOf(e, "String")) | |
88 | 88 | then { | |
89 | 89 | let f = e | |
90 | 90 | f | |
91 | 91 | } | |
92 | 92 | else "" | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func H (I,d) = { | |
97 | 97 | let e = getInteger(I, d) | |
98 | 98 | if ($isInstanceOf(e, "Int")) | |
99 | 99 | then { | |
100 | 100 | let f = e | |
101 | 101 | f | |
102 | 102 | } | |
103 | 103 | else 0 | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func J () = E(i, u) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func K () = fromBase58String(getStringValue(i, "EGG_ASSET_ID")) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func L () = fromBase58String(c(q)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func M (N) = { | |
117 | 117 | let e = N | |
118 | 118 | if ($isInstanceOf(e, "Int")) | |
119 | 119 | then { | |
120 | 120 | let O = e | |
121 | 121 | O | |
122 | 122 | } | |
123 | 123 | else throw("wrong type, expected: Int") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | @Callable(P) | |
128 | 128 | func initMasterKey (Q) = if ((P.caller != this)) | |
129 | 129 | then throw("You cannot do this action") | |
130 | 130 | else if ((g != "")) | |
131 | 131 | then throw("Master public key already set, you can't override!") | |
132 | 132 | else [StringEntry(a, Q)] | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(P) | |
137 | 137 | func calculateCompoundShareAndIssue (R) = if ((P.caller != this)) | |
138 | 138 | then throw("You cannot do this action") | |
139 | 139 | else if ((D(z) == true)) | |
140 | 140 | then $Tuple2(nil, 0) | |
141 | 141 | else { | |
142 | 142 | let S = L() | |
143 | 143 | let T = H(k, A) | |
144 | 144 | let U = H(k, B) | |
145 | 145 | let V = (U + T) | |
146 | 146 | let W = fraction(R, T, V) | |
147 | 147 | $Tuple2([Reissue(S, W, true)], W) | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(P) | |
153 | 153 | func initCollectiveFarm (X,Y,Z,aa,ab,ac) = if ((g == "")) | |
154 | 154 | then throw("First initiatie a master public key!") | |
155 | 155 | else if ((P.callerPublicKey != h)) | |
156 | 156 | then throw("_1") | |
157 | 157 | else if ((D(n) != unit)) | |
158 | 158 | then throw("_2") | |
159 | 159 | else if (if ((Z == false)) | |
160 | 160 | then if ((P.payments[0].amount != 10000000)) | |
161 | 161 | then true | |
162 | 162 | else (P.payments[0].assetId != K()) | |
163 | 163 | else false) | |
164 | 164 | then throw("_20") | |
165 | 165 | else { | |
166 | 166 | let ad = if (Z) | |
167 | 167 | then ac | |
168 | 168 | else 10000000 | |
169 | 169 | let ae = Issue(X, (("Team token for the " + X) + " collective farm"), ad, 8, true) | |
170 | 170 | let af = if (Z) | |
171 | 171 | then ab | |
172 | 172 | else 10000000 | |
173 | 173 | let ag = if (Z) | |
174 | 174 | then [IntegerEntry(p, aa)] | |
175 | 175 | else nil | |
176 | 176 | ([StringEntry(q, toBase58String(calculateAssetId(ae))), BooleanEntry(n, true), IntegerEntry(m, af), ae, ScriptTransfer(P.caller, ad, calculateAssetId(ae)), BooleanEntry(w, false), IntegerEntry(o, Y)] ++ ag) | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | @Callable(P) | |
182 | 182 | func setLock (ah) = if ((P.callerPublicKey != h)) | |
183 | 183 | then throw("_21") | |
184 | 184 | else [BooleanEntry(w, ah)] | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | ||
188 | 188 | @Callable(P) | |
189 | 189 | func lockInvestments () = if ((P.caller != this)) | |
190 | 190 | then throw("You cannot lock this contract") | |
191 | 191 | else [BooleanEntry(z, true)] | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(P) | |
196 | 196 | func unlockInvestments () = if ((P.caller != this)) | |
197 | 197 | then throw("You cannot lock this contract") | |
198 | 198 | else [BooleanEntry(z, false)] | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | ||
202 | 202 | @Callable(P) | |
203 | 203 | func provideLiquidity () = { | |
204 | 204 | let ai = K() | |
205 | 205 | if (if (if ((P.callerPublicKey != l)) | |
206 | 206 | then (P.callerPublicKey != h) | |
207 | 207 | else false) | |
208 | 208 | then (D(z) == true) | |
209 | 209 | else false) | |
210 | 210 | then throw("Contract is locked for investments by it's CEO. Please invest in another collective farm.") | |
211 | 211 | else if ((D(w) == true)) | |
212 | 212 | then throw("_22") | |
213 | 213 | else if ((P.payments[0].assetId != ai)) | |
214 | 214 | then throw("_4") | |
215 | 215 | else if ((1000000 > P.payments[0].amount)) | |
216 | 216 | then throw("Min amount to invest is 0.01 EGG") | |
217 | 217 | else { | |
218 | 218 | let ab = C(m) | |
219 | 219 | let aj = P.payments[0].amount | |
220 | 220 | let ak = fromBase58String(c(q)) | |
221 | 221 | let al = Reissue(L(), aj, true) | |
222 | 222 | let am = (("account_" + toString(P.caller)) + "_participated") | |
223 | 223 | let an = D(am) | |
224 | 224 | $Tuple2([al, ScriptTransfer(P.caller, aj, ak), IntegerEntry(m, (ab + value(P.payments[0].amount))), BooleanEntry(am, true)], aj) | |
225 | 225 | } | |
226 | 226 | } | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | ||
230 | 230 | @Callable(P) | |
231 | 231 | func claimFarmingRewardProxy (ao) = if ((P.callerPublicKey != h)) | |
232 | 232 | then throw("_23") | |
233 | 233 | else { | |
234 | 234 | let ai = K() | |
235 | 235 | let S = L() | |
236 | 236 | let ap = addressFromStringValue(E(i, t)) | |
237 | 237 | func aq (ar,as) = { | |
238 | 238 | let at = invoke(ap, "claimReward", [as], nil) | |
239 | 239 | if ((at == at)) | |
240 | 240 | then { | |
241 | 241 | let e = at | |
242 | 242 | if ($isInstanceOf(e, "Int")) | |
243 | 243 | then { | |
244 | 244 | let O = e | |
245 | 245 | (ar + O) | |
246 | 246 | } | |
247 | 247 | else throw("_5") | |
248 | 248 | } | |
249 | 249 | else throw("Strict value is not equal to itself.") | |
250 | 250 | } | |
251 | 251 | ||
252 | 252 | let au = split(ao, ";") | |
253 | 253 | let av = { | |
254 | 254 | let aw = au | |
255 | - | let | |
256 | - | let | |
257 | - | func | |
258 | - | then | |
259 | - | else aq( | |
255 | + | let ax = size(aw) | |
256 | + | let ay = 0 | |
257 | + | func az (aA,aB) = if ((aB >= ax)) | |
258 | + | then aA | |
259 | + | else aq(aA, aw[aB]) | |
260 | 260 | ||
261 | - | func | |
262 | - | then | |
261 | + | func aC (aA,aB) = if ((aB >= ax)) | |
262 | + | then aA | |
263 | 263 | else throw("List size exceeds 10") | |
264 | 264 | ||
265 | - | az(ay | |
265 | + | aC(az(az(az(az(az(az(az(az(az(az(ay, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
266 | 266 | } | |
267 | - | let | |
267 | + | let aD = { | |
268 | 268 | let e = av | |
269 | 269 | if ($isInstanceOf(e, "Int")) | |
270 | 270 | then { | |
271 | 271 | let O = e | |
272 | 272 | O | |
273 | 273 | } | |
274 | 274 | else throw("_6") | |
275 | 275 | } | |
276 | 276 | let aa = C(p) | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | if (( | |
277 | + | let aE = fraction(aD, j, 100) | |
278 | + | let aF = C(x) | |
279 | + | let aG = C(y) | |
280 | + | let aH = (aD - aE) | |
281 | + | let aI = M(invoke(this, "calculateCompoundShareAndIssue", [aH], nil)) | |
282 | + | if ((aI == aI)) | |
283 | 283 | then { | |
284 | - | let | |
285 | - | if (( | |
286 | - | then [IntegerEntry(p, (aa + | |
284 | + | let aJ = invoke(k, "topUpReward", nil, [AttachedPayment(ai, (aH - aI)), AttachedPayment(S, aI)]) | |
285 | + | if ((aJ == aJ)) | |
286 | + | then [IntegerEntry(p, (aa + aH)), IntegerEntry(x, (aF + aE)), IntegerEntry(y, (aG + aE))] | |
287 | 287 | else throw("Strict value is not equal to itself.") | |
288 | 288 | } | |
289 | 289 | else throw("Strict value is not equal to itself.") | |
290 | 290 | } | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | ||
294 | 294 | @Callable(P) | |
295 | - | func claimCeoFee ( | |
295 | + | func claimCeoFee (aK,aL,aM,aN) = if ((0 > aM)) | |
296 | 296 | then throw("Share 1 can't be negative") | |
297 | - | else if ((0 > | |
297 | + | else if ((0 > aN)) | |
298 | 298 | then throw("Share 2 can't be negative") | |
299 | - | else if ((( | |
299 | + | else if (((aM + aN) != 100)) | |
300 | 300 | then throw("Sum of shares should be 100") | |
301 | 301 | else if ((D(w) == true)) | |
302 | 302 | then throw("_22") | |
303 | 303 | else if ((P.caller == this)) | |
304 | 304 | then { | |
305 | - | let | |
306 | - | let | |
307 | - | then | |
308 | - | else fraction( | |
309 | - | let | |
305 | + | let aO = C(x) | |
306 | + | let aP = if ((aL == "")) | |
307 | + | then aO | |
308 | + | else fraction(aO, aM, 100) | |
309 | + | let aQ = if ((aL == "")) | |
310 | 310 | then 0 | |
311 | - | else fraction( | |
312 | - | let | |
311 | + | else fraction(aO, aN, 100) | |
312 | + | let aR = if ((aL == "")) | |
313 | 313 | then nil | |
314 | - | else [ScriptTransfer(addressFromStringValue( | |
315 | - | ( | |
314 | + | else [ScriptTransfer(addressFromStringValue(aL), aQ, K())] | |
315 | + | (aR ++ [ScriptTransfer(addressFromStringValue(aK), aP, K()), IntegerEntry(x, 0)]) | |
316 | 316 | } | |
317 | 317 | else throw("Only manager can call the contract") | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(P) | |
322 | - | func startLiquidation ( | |
322 | + | func startLiquidation (aS) = throw("_7") | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | ||
326 | 326 | @Callable(P) | |
327 | - | func voteForLiquidation ( | |
327 | + | func voteForLiquidation (aS) = throw("_7") | |
328 | 328 | ||
329 | 329 | ||
330 | 330 | ||
331 | 331 | @Callable(P) | |
332 | - | func callUnstakeProxy ( | |
332 | + | func callUnstakeProxy (aT,aU) = if ((D(w) == true)) | |
333 | 333 | then throw("Contract is locked now") | |
334 | - | else if (if (( | |
335 | - | then ( | |
334 | + | else if (if ((aT != "unstakeNFT")) | |
335 | + | then (aT != "unstakeJackpot") | |
336 | 336 | else false) | |
337 | 337 | then throw("Bad function name") | |
338 | 338 | else if ((P.caller != this)) | |
339 | 339 | then throw("Can be called only by the account") | |
340 | 340 | else { | |
341 | 341 | let ai = K() | |
342 | 342 | let S = L() | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
343 | + | let aV = addressFromStringValue(E(i, "FARMING_DAPP")) | |
344 | + | let aW = invoke(aV, aT, [aU], nil) | |
345 | + | if ((aW == aW)) | |
346 | 346 | then { | |
347 | - | let | |
348 | - | let e = | |
347 | + | let aX = { | |
348 | + | let e = aW | |
349 | 349 | if ($isInstanceOf(e, "Int")) | |
350 | 350 | then { | |
351 | 351 | let O = e | |
352 | 352 | O | |
353 | 353 | } | |
354 | 354 | else throw("Error during unstaking") | |
355 | 355 | } | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
356 | + | let aF = C(x) | |
357 | + | let aG = C(y) | |
358 | + | let aE = fraction(aX, j, 100) | |
359 | + | let aH = (aX - aE) | |
360 | + | let aY = invoke(this, "calculateCompoundShareAndIssue", [aH], nil) | |
361 | + | if ((aY == aY)) | |
362 | 362 | then { | |
363 | - | let | |
364 | - | if (( | |
363 | + | let aI = M(invoke(this, "calculateCompoundShareAndIssue", [aH], nil)) | |
364 | + | if ((aI == aI)) | |
365 | 365 | then { | |
366 | - | let | |
367 | - | if (( | |
368 | - | then [IntegerEntry(x, ( | |
366 | + | let aJ = invoke(k, "topUpReward", nil, [AttachedPayment(ai, (aH - aI)), AttachedPayment(S, aI)]) | |
367 | + | if ((aJ == aJ)) | |
368 | + | then [IntegerEntry(x, (aF + aE)), IntegerEntry(y, (aG + aE))] | |
369 | 369 | else throw("Strict value is not equal to itself.") | |
370 | 370 | } | |
371 | 371 | else throw("Strict value is not equal to itself.") | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | - | @Verifier( | |
380 | - | func | |
381 | - | let | |
382 | - | let e = | |
379 | + | @Verifier(aZ) | |
380 | + | func ba () = { | |
381 | + | let bb = (C(m) >= C(o)) | |
382 | + | let e = aZ | |
383 | 383 | if ($isInstanceOf(e, "InvokeScriptTransaction")) | |
384 | 384 | then { | |
385 | - | let | |
386 | - | let | |
387 | - | let | |
388 | - | if (if (( | |
385 | + | let bc = e | |
386 | + | let bd = ["stakeFarmTokens", "claimReward", "withdrawFarmTokens"] | |
387 | + | let be = ["callUnstakeProxy", "claimCeoFee", "lockInvestments", "unlockInvestments"] | |
388 | + | if (if ((bc.function == "unstakeNFT")) | |
389 | 389 | then true | |
390 | - | else ( | |
390 | + | else (bc.function == "unstakeJackpot")) | |
391 | 391 | then throw("You cannot call these functions directly") | |
392 | - | else if (if (if ((addressFromRecipient( | |
393 | - | then ( | |
392 | + | else if (if (if ((addressFromRecipient(bc.dApp) == this)) | |
393 | + | then (bc.function == "initMasterKey") | |
394 | 394 | else false) | |
395 | 395 | then (g == "") | |
396 | 396 | else false) | |
397 | - | then sigVerify( | |
398 | - | else if ((sigVerify( | |
397 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
398 | + | else if ((sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) == false)) | |
399 | 399 | then throw("_100") | |
400 | - | else if (( | |
400 | + | else if ((bb == false)) | |
401 | 401 | then throw("_14") | |
402 | 402 | else if ((D(w) == true)) | |
403 | 403 | then throw("_22") | |
404 | - | else if (if (( | |
404 | + | else if (if ((bc.fee > 900000)) | |
405 | 405 | then true | |
406 | - | else ( | |
406 | + | else (bc.feeAssetId != unit)) | |
407 | 407 | then throw("_15") | |
408 | - | else if ((size( | |
408 | + | else if ((size(bc.payments) > 2)) | |
409 | 409 | then throw("_17") | |
410 | - | else if (if ((addressFromRecipient( | |
411 | - | then containsElement( | |
410 | + | else if (if ((addressFromRecipient(bc.dApp) == this)) | |
411 | + | then containsElement(be, bc.function) | |
412 | 412 | else false) | |
413 | - | then sigVerify( | |
414 | - | else if (if ((addressFromRecipient( | |
415 | - | then ( | |
413 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
414 | + | else if (if ((addressFromRecipient(bc.dApp) == addressFromStringValue(J()))) | |
415 | + | then (bc.function == "callMarketplaceProxy") | |
416 | 416 | else false) | |
417 | - | then sigVerify( | |
418 | - | else if (if ((addressFromRecipient( | |
419 | - | then containsElement( | |
417 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
418 | + | else if (if ((addressFromRecipient(bc.dApp) == k)) | |
419 | + | then containsElement(bd, bc.function) | |
420 | 420 | else false) | |
421 | - | then sigVerify( | |
421 | + | then sigVerify(aZ.bodyBytes, aZ.proofs[0], aZ.senderPublicKey) | |
422 | 422 | else { | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | (indexOf( | |
423 | + | let bf = E(i, "allowed_contracts") | |
424 | + | let bg = split(bf, ";") | |
425 | + | let bh = toString(addressFromRecipient(bc.dApp)) | |
426 | + | (indexOf(bg, bh) != unit) | |
427 | 427 | } | |
428 | 428 | } | |
429 | 429 | else if ($isInstanceOf(e, "SetScriptTransaction")) | |
430 | 430 | then { | |
431 | - | let | |
432 | - | sigVerify( | |
431 | + | let bi = e | |
432 | + | sigVerify(aZ.bodyBytes, aZ.proofs[0], h) | |
433 | 433 | } | |
434 | 434 | else if ($isInstanceOf(e, "MassTransferTransaction")) | |
435 | 435 | then { | |
436 | - | let | |
437 | - | sigVerify( | |
436 | + | let bj = e | |
437 | + | sigVerify(aZ.bodyBytes, aZ.proofs[0], h) | |
438 | 438 | } | |
439 | 439 | else false | |
440 | 440 | } | |
441 | 441 |
github/deemru/w8io/169f3d6 136.61 ms ◑