tx · CHgYFmgf7FyQfZSVTYNKVTAN6q3ey6uUCAUWGipqP3mx 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.01600000 Waves 2024.11.11 01:54 [3365978] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "CHgYFmgf7FyQfZSVTYNKVTAN6q3ey6uUCAUWGipqP3mx", "fee": 1600000, "feeAssetId": null, "timestamp": 1731279306145, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "4QLKWZGr55XT2GmsTWmJMdwhr4gqhaKc6eSnFX8BtytPY672wErBPJ1qJF63xZ3J2TAj4R9cpRCvHRLnyS6eMWEk" ], "script": "base64:BgI3CAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIATgAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAWZGVmYXVsdFJlc3QyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BGd1l0YThiaUV6MzF6cGVGZTVESks4d0U1dHJTcFFWRjgDCQAAAgEBVAU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lckJ5VXNlcgEFB2FkZHJlc3MEBW9sZEZwCQELdmFsdWVPckVsc2UCCQCfCAEFCXVzZXJGcEtleQAABAVuZXdGcAkBFmdldEZhcm1pbmdQb3dlckJ5QWNyZXMBBQ5uZXdBY3Jlc0Ftb3VudAQKb2xkVG90YWxGcAkBC3ZhbHVlT3JFbHNlAgkAnwgBBRR0b3RhbEZhcm1pbmdQb3dlcktleQAABApuZXdUb3RhbEZwCQBkAgkAZQIFCm9sZFRvdGFsRnAFBW9sZEZwBQVuZXdGcAkAlAoCBQNuaWwJAMwIAgUFb2xkRnAJAMwIAgUFbmV3RnAJAMwIAgUKb2xkVG90YWxGcAkAzAgCBQpuZXdUb3RhbEZwBQNuaWwAemZCHQ==", "height": 3365978, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HB2x49k7A9oWjG78FcVY4GPQte9cVqLnqDcVYPZ1Xu58 Next: 2xcrEprGkH6o3eoKGURZMJMmLxiW8yKd3rG3CRWyvBe8 Diff:
Old | New | Differences | |
---|---|---|---|
404 | 404 | ||
405 | 405 | ||
406 | 406 | @Callable(i) | |
407 | - | func convertOldStakes () = { | |
408 | - | let address = toString(i.caller) | |
409 | - | if ((size(i.payments) != 0)) | |
410 | - | then throw("No payments required") | |
411 | - | else { | |
412 | - | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
413 | - | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
414 | - | let gotAcres0 = if ((amount > 0)) | |
415 | - | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
416 | - | else $Tuple2(0, 0) | |
417 | - | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
418 | - | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
419 | - | let landsResult = if (isDefined(landsStr)) | |
420 | - | then { | |
421 | - | let lands = split_51C(value(landsStr), "_") | |
422 | - | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
423 | - | then throw("landAssetId is required") | |
424 | - | else { | |
425 | - | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
426 | - | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
407 | + | func convertOldStakes () = if ((i.caller != this)) | |
408 | + | then throw("Temporarily disabled") | |
409 | + | else { | |
410 | + | let address = toString(i.caller) | |
411 | + | if ((size(i.payments) != 0)) | |
412 | + | then throw("No payments required") | |
413 | + | else { | |
414 | + | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
415 | + | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
416 | + | let gotAcres0 = if ((amount > 0)) | |
417 | + | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
418 | + | else $Tuple2(0, 0) | |
419 | + | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
420 | + | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
421 | + | let landsResult = if (isDefined(landsStr)) | |
422 | + | then { | |
423 | + | let lands = split_51C(value(landsStr), "_") | |
424 | + | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
425 | + | then throw("landAssetId is required") | |
426 | + | else { | |
427 | + | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
428 | + | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
429 | + | } | |
430 | + | ||
431 | + | let rr = { | |
432 | + | let $l = lands | |
433 | + | let $s = size($l) | |
434 | + | let $acc0 = $Tuple4(0, 0, 0, 0) | |
435 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
436 | + | then $a | |
437 | + | else oneLand($a, $l[$i]) | |
438 | + | ||
439 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
440 | + | then $a | |
441 | + | else throw("List size exceeds 100") | |
442 | + | ||
443 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
427 | 444 | } | |
428 | - | ||
429 | - | let rr = { | |
430 | - | let $l = lands | |
431 | - | let $s = size($l) | |
432 | - | let $acc0 = $Tuple4(0, 0, 0, 0) | |
433 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
434 | - | then $a | |
435 | - | else oneLand($a, $l[$i]) | |
436 | - | ||
437 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
438 | - | then $a | |
439 | - | else throw("List size exceeds 100") | |
440 | - | ||
441 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
445 | + | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
446 | + | if ((finalize == finalize)) | |
447 | + | then { | |
448 | + | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
449 | + | if ((req == req)) | |
450 | + | then { | |
451 | + | let issue = Issue("FPOWER10", "FarmingPower +10% NFT for WavesLands game", 1, 0, false) | |
452 | + | $Tuple5(rr._1, rr._2, rr._3, rr._4, [issue, ScriptTransfer(i.caller, 1, calculateAssetId(issue))]) | |
453 | + | } | |
454 | + | else throw("Strict value is not equal to itself.") | |
455 | + | } | |
456 | + | else throw("Strict value is not equal to itself.") | |
442 | 457 | } | |
443 | - | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
444 | - | if ((finalize == finalize)) | |
445 | - | then { | |
446 | - | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
447 | - | if ((req == req)) | |
448 | - | then { | |
449 | - | let issue = Issue("FPOWER10", "FarmingPower +10% NFT for WavesLands game", 1, 0, false) | |
450 | - | $Tuple5(rr._1, rr._2, rr._3, rr._4, [issue, ScriptTransfer(i.caller, 1, calculateAssetId(issue))]) | |
451 | - | } | |
452 | - | else throw("Strict value is not equal to itself.") | |
453 | - | } | |
454 | - | else throw("Strict value is not equal to itself.") | |
455 | - | } | |
456 | - | else $Tuple5(0, 0, 0, 0, nil) | |
457 | - | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
458 | - | let duckResult = if ((duckAssetId != "")) | |
459 | - | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
460 | - | else $Tuple3(0, 0, 0) | |
461 | - | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
462 | - | $Tuple2((landsResult._5 ++ x._1), x._2) | |
463 | - | } | |
464 | - | } | |
458 | + | else $Tuple5(0, 0, 0, 0, nil) | |
459 | + | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
460 | + | let duckResult = if ((duckAssetId != "")) | |
461 | + | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
462 | + | else $Tuple3(0, 0, 0) | |
463 | + | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
464 | + | $Tuple2((landsResult._5 ++ x._1), x._2) | |
465 | + | } | |
466 | + | } | |
465 | 467 | ||
466 | 468 | ||
467 | 469 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT7 = 10000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let USDT2ACRES_MULTIPLIER = 10 | |
15 | 15 | ||
16 | 16 | let ONE_PERCENT_DIVISOR = 100 | |
17 | 17 | ||
18 | 18 | let chain = take(drop(this.bytes, 1), 1) | |
19 | 19 | ||
20 | 20 | let usdtAssetId = match chain { | |
21 | 21 | case _ => | |
22 | 22 | if ((base58'2W' == $match0)) | |
23 | 23 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
24 | 24 | else if ((base58'2T' == $match0)) | |
25 | 25 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
26 | 26 | else throw("Unknown chain") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let defaultRest2AddressStr = match chain { | |
30 | 30 | case _ => | |
31 | 31 | if ((base58'2W' == $match0)) | |
32 | 32 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
33 | 33 | else if ((base58'2T' == $match0)) | |
34 | 34 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
35 | 35 | else throw("Unknown chain") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | let oldStakingContractStr = match chain { | |
39 | 39 | case _ => | |
40 | 40 | if ((base58'2W' == $match0)) | |
41 | 41 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
42 | 42 | else if ((base58'2T' == $match0)) | |
43 | 43 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
44 | 44 | else throw("Unknown chain") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | let IdxCfgAcres2Dapp = 1 | |
51 | 51 | ||
52 | 52 | let IdxCfgWlgDapp = 2 | |
53 | 53 | ||
54 | 54 | let IdxCfgInvestFundDapp = 5 | |
55 | 55 | ||
56 | 56 | func keyRestCfg () = "%s__restConfig" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyRest2Address () = "%s__rest2Addr" | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
69 | 69 | ||
70 | 70 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
71 | 71 | ||
72 | 72 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
73 | 73 | ||
74 | 74 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
75 | 75 | ||
76 | 76 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
77 | 77 | ||
78 | 78 | let oldAcresContractKey = "oldAcresContract" | |
79 | 79 | ||
80 | 80 | func keyBlocked () = "contractsBlocked" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | let acresIssuedAmountKey = "acresIssuedAmount" | |
87 | 87 | ||
88 | 88 | let acresAssetIdKey = "acresAssetId" | |
89 | 89 | ||
90 | 90 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
91 | 91 | ||
92 | 92 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func asInt (v) = match v { | |
102 | 102 | case n: Int => | |
103 | 103 | n | |
104 | 104 | case _ => | |
105 | 105 | throw("fail to cast into Int") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func asTuple5Ints (val) = match val { | |
110 | 110 | case t: (Int, Int, Int, Int, Int) => | |
111 | 111 | t | |
112 | 112 | case _ => | |
113 | 113 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func asTuple4Ints (val) = match val { | |
118 | 118 | case t: (Int, Int, Int, Int) => | |
119 | 119 | t | |
120 | 120 | case _ => | |
121 | 121 | throw("fail to cast into (Int, Int, Int, Int)") | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func asTuple3Ints (val) = match val { | |
126 | 126 | case t: (Int, Int, Int) => | |
127 | 127 | t | |
128 | 128 | case _ => | |
129 | 129 | throw("fail to cast into (Int, Int, Int)") | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func asTuple2Ints (val) = match val { | |
134 | 134 | case t: (Int, Int) => | |
135 | 135 | t | |
136 | 136 | case _ => | |
137 | 137 | throw("fail to cast into (Int, Int)") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func fixedPoint (val,decimals) = { | |
142 | 142 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
143 | 143 | let lowPart = toString((val % tenPow)) | |
144 | 144 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
145 | 145 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | let M8_ = 100000000 | |
150 | 150 | ||
151 | 151 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
152 | 152 | ||
153 | 153 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
154 | 154 | ||
155 | 155 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
162 | 162 | ||
163 | 163 | let totalFarmingPowerKey = "totalFarmingPower" | |
164 | 164 | ||
165 | 165 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
166 | 166 | ||
167 | 167 | func getLevelByAcres (acres) = { | |
168 | 168 | let acr = ((acres + 99999999) / M8_) | |
169 | 169 | func checker (acc,item) = if ((item >= acr)) | |
170 | 170 | then acc | |
171 | 171 | else (acc + 1) | |
172 | 172 | ||
173 | 173 | let $l = levelAcres | |
174 | 174 | let $s = size($l) | |
175 | 175 | let $acc0 = 0 | |
176 | 176 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
177 | 177 | then $a | |
178 | 178 | else checker($a, $l[$i]) | |
179 | 179 | ||
180 | 180 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
181 | 181 | then $a | |
182 | 182 | else throw("List size exceeds 10") | |
183 | 183 | ||
184 | 184 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
192 | 192 | then valueOrElse(getBoolean(keyBlocked()), false) | |
193 | 193 | else false) | |
194 | 194 | then throw("Contracts are under maintenance") | |
195 | 195 | else [StringEntry(keyLastTxIdByUser(toString(i.originCaller)), toBase58String(i.transactionId))] | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func stakeUnstakeAcresInternal (amt,address) = { | |
199 | 199 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
200 | 200 | if ((wlgResult == wlgResult)) | |
201 | 201 | then { | |
202 | 202 | let now = lastBlock.timestamp | |
203 | 203 | let timeKey = keyAcresStakedTimeByUser(address) | |
204 | 204 | let amountKey = keyAcresStakedAmtByUser(address) | |
205 | 205 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
206 | 206 | if (if ((0 > amt)) | |
207 | 207 | then (0 > (oldAcresAmount + amt)) | |
208 | 208 | else false) | |
209 | 209 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
210 | 210 | else { | |
211 | 211 | let newAcresAmount = (oldAcresAmount + amt) | |
212 | 212 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
213 | 213 | let userFpKey = keyFarmingPowerByUser(address) | |
214 | 214 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
215 | 215 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
216 | 216 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
217 | 217 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt)), IntegerEntry(userFpKey, newFp), IntegerEntry(totalFarmingPowerKey, ((oldTotalFp - oldFp) + newFp))], wlgResult) | |
218 | 218 | } | |
219 | 219 | } | |
220 | 220 | else throw("Strict value is not equal to itself.") | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func getWlgPrice (usdtBalanceCorrection) = { | |
225 | 225 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
226 | 226 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
227 | 227 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
228 | 228 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
229 | 229 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
230 | 230 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | let keyLastAcresSellTime = "lastAcresSellTime" | |
235 | 235 | ||
236 | 236 | let keyLastLimitLeft = "lastLimitLeft" | |
237 | 237 | ||
238 | 238 | let keyLastSavedTVL = "lastSavedTVL" | |
239 | 239 | ||
240 | 240 | func getSwapLimitAcres () = { | |
241 | 241 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
242 | 242 | let acres2Usd = assetBalance(this, usdtAssetId) | |
243 | 243 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
244 | 244 | let newTVL = ((acres2Usd + wlgUsd) + investFundTotal) | |
245 | 245 | let defaultLimit = (newTVL / ONE_PERCENT_DIVISOR) | |
246 | 246 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
247 | 247 | let lastTVL = valueOrElse(getInteger(keyLastSavedTVL), newTVL) | |
248 | 248 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
249 | 249 | let now = lastBlock.timestamp | |
250 | 250 | let currentLimit = (lastLimitLeft + fraction(lastTVL, (now - lastTime), (DAY_MILLIS * ONE_PERCENT_DIVISOR))) | |
251 | 251 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
252 | 252 | $Tuple2([IntegerEntry(keyLastLimitLeft, limitLeftUsdt), IntegerEntry(keyLastSavedTVL, lastTVL), IntegerEntry(keyLastAcresSellTime, now)], (limitLeftUsdt * USDT2ACRES_MULTIPLIER)) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
258 | 258 | then throw("Access denied") | |
259 | 259 | else $Tuple2(prolog(i), 42) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | ||
263 | 263 | @Callable(i) | |
264 | 264 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
265 | 265 | then throw("Permission denied") | |
266 | 266 | else { | |
267 | 267 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
268 | 268 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | ||
273 | 273 | @Callable(i) | |
274 | 274 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
275 | 275 | then throw("permission denied") | |
276 | 276 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(i) | |
281 | 281 | func unstakeAcres (amount) = { | |
282 | 282 | let prologActions = prolog(i) | |
283 | 283 | if ((0 >= amount)) | |
284 | 284 | then throw("Amount should be positive") | |
285 | 285 | else { | |
286 | 286 | let address = toString(i.caller) | |
287 | 287 | if ((size(i.payments) != 0)) | |
288 | 288 | then throw("No payments required") | |
289 | 289 | else { | |
290 | 290 | let $t047524829 = stakeUnstakeAcresInternal(-(amount), address) | |
291 | 291 | let actions = $t047524829._1 | |
292 | 292 | let wlgClaimedAmount = $t047524829._2 | |
293 | 293 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
294 | 294 | } | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func stakeAcres () = { | |
302 | 302 | let prologActions = prolog(i) | |
303 | 303 | let address = toString(i.caller) | |
304 | 304 | if ((size(i.payments) != 1)) | |
305 | 305 | then throw("exactly 1 payment must be attached") | |
306 | 306 | else { | |
307 | 307 | let pmt = i.payments[0] | |
308 | 308 | let amt = pmt.amount | |
309 | 309 | if (if (!(isDefined(pmt.assetId))) | |
310 | 310 | then true | |
311 | 311 | else (value(pmt.assetId) != acresAssetId)) | |
312 | 312 | then throw("ACRES payments only!") | |
313 | 313 | else { | |
314 | 314 | let $t052805353 = stakeUnstakeAcresInternal(amt, address) | |
315 | 315 | let actions = $t052805353._1 | |
316 | 316 | let wlgClaimedAmount = $t052805353._2 | |
317 | 317 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
318 | 318 | } | |
319 | 319 | } | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | ||
324 | 324 | @Callable(i) | |
325 | 325 | func buyAcres () = { | |
326 | 326 | let prologActions = prolog(i) | |
327 | 327 | if ((size(i.payments) != 1)) | |
328 | 328 | then throw("exactly 1 payment must be attached") | |
329 | 329 | else { | |
330 | 330 | let pmt = i.payments[0] | |
331 | 331 | let usdtAmount = pmt.amount | |
332 | 332 | if (if (!(isDefined(pmt.assetId))) | |
333 | 333 | then true | |
334 | 334 | else (value(pmt.assetId) != usdtAssetId)) | |
335 | 335 | then throw("USDT payments only!") | |
336 | 336 | else if ((MULT6 > usdtAmount)) | |
337 | 337 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
338 | 338 | else { | |
339 | 339 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
340 | 340 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
341 | 341 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
342 | 342 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
343 | 343 | if ((req == req)) | |
344 | 344 | then { | |
345 | 345 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
346 | 346 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
347 | 347 | } | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | } | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | ||
355 | 355 | @Callable(i) | |
356 | 356 | func buyAcresREADONLY (usdtAmount) = { | |
357 | 357 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
358 | 358 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
359 | 359 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | ||
364 | 364 | @Callable(i) | |
365 | 365 | func sellAcres () = { | |
366 | 366 | let prologActions = prolog(i) | |
367 | 367 | if ((size(i.payments) != 1)) | |
368 | 368 | then throw("exactly 1 payment must be attached") | |
369 | 369 | else { | |
370 | 370 | let pmt = i.payments[0] | |
371 | 371 | let acresAmount = pmt.amount | |
372 | 372 | if (if (!(isDefined(pmt.assetId))) | |
373 | 373 | then true | |
374 | 374 | else (value(pmt.assetId) != acresAssetId)) | |
375 | 375 | then throw("ACRES payments only!") | |
376 | 376 | else if ((MULT7 > acresAmount)) | |
377 | 377 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
378 | 378 | else { | |
379 | 379 | let addr = toString(i.caller) | |
380 | 380 | let $t072107260 = getSwapLimitAcres() | |
381 | 381 | let limitActions = $t072107260._1 | |
382 | 382 | let maxAcres = $t072107260._2 | |
383 | 383 | if ((acresAmount > maxAcres)) | |
384 | 384 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
385 | 385 | else { | |
386 | 386 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
387 | 387 | $Tuple2(((limitActions :+ ScriptTransfer(i.caller, usdtAmount, usdtAssetId)) ++ prologActions), usdtAmount) | |
388 | 388 | } | |
389 | 389 | } | |
390 | 390 | } | |
391 | 391 | } | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | ||
395 | 395 | @Callable(i) | |
396 | 396 | func sellAcresREADONLY (address,acresAmount) = { | |
397 | 397 | let $t076467696 = getSwapLimitAcres() | |
398 | 398 | let limitActions = $t076467696._1 | |
399 | 399 | let maxAcres = $t076467696._2 | |
400 | 400 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
401 | 401 | $Tuple2(nil, [usdtAmount, MULT7, maxAcres, 0]) | |
402 | 402 | } | |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | 406 | @Callable(i) | |
407 | - | func convertOldStakes () = { | |
408 | - | let address = toString(i.caller) | |
409 | - | if ((size(i.payments) != 0)) | |
410 | - | then throw("No payments required") | |
411 | - | else { | |
412 | - | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
413 | - | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
414 | - | let gotAcres0 = if ((amount > 0)) | |
415 | - | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
416 | - | else $Tuple2(0, 0) | |
417 | - | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
418 | - | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
419 | - | let landsResult = if (isDefined(landsStr)) | |
420 | - | then { | |
421 | - | let lands = split_51C(value(landsStr), "_") | |
422 | - | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
423 | - | then throw("landAssetId is required") | |
424 | - | else { | |
425 | - | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
426 | - | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
407 | + | func convertOldStakes () = if ((i.caller != this)) | |
408 | + | then throw("Temporarily disabled") | |
409 | + | else { | |
410 | + | let address = toString(i.caller) | |
411 | + | if ((size(i.payments) != 0)) | |
412 | + | then throw("No payments required") | |
413 | + | else { | |
414 | + | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
415 | + | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
416 | + | let gotAcres0 = if ((amount > 0)) | |
417 | + | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
418 | + | else $Tuple2(0, 0) | |
419 | + | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
420 | + | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
421 | + | let landsResult = if (isDefined(landsStr)) | |
422 | + | then { | |
423 | + | let lands = split_51C(value(landsStr), "_") | |
424 | + | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
425 | + | then throw("landAssetId is required") | |
426 | + | else { | |
427 | + | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
428 | + | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
429 | + | } | |
430 | + | ||
431 | + | let rr = { | |
432 | + | let $l = lands | |
433 | + | let $s = size($l) | |
434 | + | let $acc0 = $Tuple4(0, 0, 0, 0) | |
435 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
436 | + | then $a | |
437 | + | else oneLand($a, $l[$i]) | |
438 | + | ||
439 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
440 | + | then $a | |
441 | + | else throw("List size exceeds 100") | |
442 | + | ||
443 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
427 | 444 | } | |
428 | - | ||
429 | - | let rr = { | |
430 | - | let $l = lands | |
431 | - | let $s = size($l) | |
432 | - | let $acc0 = $Tuple4(0, 0, 0, 0) | |
433 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
434 | - | then $a | |
435 | - | else oneLand($a, $l[$i]) | |
436 | - | ||
437 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
438 | - | then $a | |
439 | - | else throw("List size exceeds 100") | |
440 | - | ||
441 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
445 | + | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
446 | + | if ((finalize == finalize)) | |
447 | + | then { | |
448 | + | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
449 | + | if ((req == req)) | |
450 | + | then { | |
451 | + | let issue = Issue("FPOWER10", "FarmingPower +10% NFT for WavesLands game", 1, 0, false) | |
452 | + | $Tuple5(rr._1, rr._2, rr._3, rr._4, [issue, ScriptTransfer(i.caller, 1, calculateAssetId(issue))]) | |
453 | + | } | |
454 | + | else throw("Strict value is not equal to itself.") | |
455 | + | } | |
456 | + | else throw("Strict value is not equal to itself.") | |
442 | 457 | } | |
443 | - | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
444 | - | if ((finalize == finalize)) | |
445 | - | then { | |
446 | - | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
447 | - | if ((req == req)) | |
448 | - | then { | |
449 | - | let issue = Issue("FPOWER10", "FarmingPower +10% NFT for WavesLands game", 1, 0, false) | |
450 | - | $Tuple5(rr._1, rr._2, rr._3, rr._4, [issue, ScriptTransfer(i.caller, 1, calculateAssetId(issue))]) | |
451 | - | } | |
452 | - | else throw("Strict value is not equal to itself.") | |
453 | - | } | |
454 | - | else throw("Strict value is not equal to itself.") | |
455 | - | } | |
456 | - | else $Tuple5(0, 0, 0, 0, nil) | |
457 | - | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
458 | - | let duckResult = if ((duckAssetId != "")) | |
459 | - | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
460 | - | else $Tuple3(0, 0, 0) | |
461 | - | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
462 | - | $Tuple2((landsResult._5 ++ x._1), x._2) | |
463 | - | } | |
464 | - | } | |
458 | + | else $Tuple5(0, 0, 0, 0, nil) | |
459 | + | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
460 | + | let duckResult = if ((duckAssetId != "")) | |
461 | + | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
462 | + | else $Tuple3(0, 0, 0) | |
463 | + | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
464 | + | $Tuple2((landsResult._5 ++ x._1), x._2) | |
465 | + | } | |
466 | + | } | |
465 | 467 | ||
466 | 468 | ||
467 | 469 | ||
468 | 470 | @Callable(i) | |
469 | 471 | func unstakeLandsREADONLY (address) = { | |
470 | 472 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
471 | 473 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
472 | 474 | let landsResult = if (isDefined(landsStr)) | |
473 | 475 | then { | |
474 | 476 | let lands = split_51C(value(landsStr), "_") | |
475 | 477 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
476 | 478 | then throw("landAssetId is required") | |
477 | 479 | else { | |
478 | 480 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
479 | 481 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
480 | 482 | } | |
481 | 483 | ||
482 | 484 | let $l = lands | |
483 | 485 | let $s = size($l) | |
484 | 486 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
485 | 487 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
486 | 488 | then $a | |
487 | 489 | else oneLand($a, $l[$i]) | |
488 | 490 | ||
489 | 491 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
490 | 492 | then $a | |
491 | 493 | else throw("List size exceeds 100") | |
492 | 494 | ||
493 | 495 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100) | |
494 | 496 | } | |
495 | 497 | else $Tuple4(0, 0, 0, 0) | |
496 | 498 | $Tuple2(nil, landsResult) | |
497 | 499 | } | |
498 | 500 | ||
499 | 501 | ||
500 | 502 | ||
501 | 503 | @Callable(i) | |
502 | 504 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
503 | 505 | then throw("Permission denied") | |
504 | 506 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr) | |
505 | 507 | ||
506 | 508 | ||
507 | 509 | ||
508 | 510 | @Callable(i) | |
509 | 511 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
510 | 512 | let amountKey = keyAcresStakedAmtByUser(address) | |
511 | 513 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
512 | 514 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
513 | 515 | let userFpKey = keyFarmingPowerByUser(address) | |
514 | 516 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
515 | 517 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
516 | 518 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
517 | 519 | let newTotalFp = ((oldTotalFp - oldFp) + newFp) | |
518 | 520 | $Tuple2(nil, [oldFp, newFp, oldTotalFp, newTotalFp]) | |
519 | 521 | } | |
520 | 522 | ||
521 | 523 |
github/deemru/w8io/026f985 52.70 ms ◑