tx · Amj5RL6rhLAdkb3chBndRjcga93XYgq4KYd4mNSSQF2D 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg: -0.01500000 Waves 2023.11.25 23:48 [2859427] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves
{ "type": 13, "id": "Amj5RL6rhLAdkb3chBndRjcga93XYgq4KYd4mNSSQF2D", "fee": 1500000, "feeAssetId": null, "timestamp": 1700945276530, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "3WDgNHfZzhvmqXY34HZkzewh9tZHhaDJc4wapADEEdj2ZnHcajUPkYjP331xjPJ34o4FxZ9ftCEVfJEnob2YstLk" ], "script": "base64:BgIsCAISBAoCCAESAwoBARIAEgASBAoCCAESBQoDCAEBEgMKAQESABIDCgEIEgA3AAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyARprZXlBY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcgEEYWRkcgkArAICAhhhY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcl8FBGFkZHIBF2tleUFjcmVzTG9ja2VkRXRhQnlVc2VyAQRhZGRyCQCsAgICFWFjcmVzTG9ja2VkRXRhQnlVc2VyXwUEYWRkcgATYWNyZXNTdGFrZWRUb3RhbEtleQIWYWNyZXNTdGFrZWRBbW91bnRUb3RhbAAKeHBOZXdTTGFuZADAlrECAA9EQUlMWVJFU0JZUElFQ0UAgPjSAQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoBGmtleUlzQXdhcmRlZEJ5UHJvbW9BbmRVc2VyAgdwcm9tb0lkBGFkZHI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AoACkAKgArACwALQAuAC8AMAAxADIJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkBFmtleVRpY2tldHNUb3RhbEJ5UHJvbW8BAAIFDHRpY2tldHNDb3VudAUDbmlsBQx0aWNrZXRzQ291bnQJAJQKAgUDbmlsBQt0b3RhbFRpa2V0cwQOdGlja2V0c0FjdGlvbnMIBQ0kdDAxMjA3NzEyNDE3Al8xBAp0b3RhbENvdW50CAUNJHQwMTIwNzcxMjQxNwJfMgQFYXdhcmQJAGsDBQd0aWNrZXRzBR1NSU5fQUNSRVNfQU1PVU5UX0RVUklOR19QUk9NTwUKdG90YWxDb3VudAQLc3Rha2VSZXN1bHQJAPwHBAUEdGhpcwIPc2VuZExvY2tlZEFjcmVzCQDMCAIFB2FkZHJlc3MJAMwIAgUFYXdhcmQJAMwIAgAeBQNuaWwFA25pbAkAlAoCCQDNCAIFDnRpY2tldHNBY3Rpb25zCQEMQm9vbGVhbkVudHJ5AgUKYXdhcmRlZEtleQYFC3N0YWtlUmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuADZB9cQ=", "height": 2859427, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9gmf5RJcQbewMGKxx6K7fcnDpRESXNZcodpFrVUQbcSm Next: 6HkRXcagHDDX8LcCyv2sVnNKLp41GRsgMUEUU8K7XeKE Diff:
Old | New | Differences | |
---|---|---|---|
21 | 21 | let DAILYRESBYPIECE = 3456000 | |
22 | 22 | ||
23 | 23 | let USDT2ACRES_MULTIPLIER = 10 | |
24 | + | ||
25 | + | func keyIsAwardedByPromoAndUser (promoId,addr) = makeString(["%s%d%s__isAwardedByPromoAndUser", toString(promoId), addr], "__") | |
26 | + | ||
27 | + | ||
28 | + | func keyTicketsTotalByPromo (promoId) = ("%s%d__ticketsTotalByPromo__" + toString(promoId)) | |
29 | + | ||
24 | 30 | ||
25 | 31 | let chain = take(drop(this.bytes, 1), 1) | |
26 | 32 | ||
449 | 455 | } | |
450 | 456 | ||
451 | 457 | ||
458 | + | ||
459 | + | @Callable(i) | |
460 | + | func claimPromo2 () = { | |
461 | + | let prologResult = prolog() | |
462 | + | if ((prologResult == prologResult)) | |
463 | + | then { | |
464 | + | let address = toString(i.caller) | |
465 | + | if ((size(i.payments) != 0)) | |
466 | + | then throw("No payments required") | |
467 | + | else { | |
468 | + | let now = lastBlock.timestamp | |
469 | + | if ((PROMO_2_END_TIMESTAMP > now)) | |
470 | + | then throw("Promo 2 is not over yet") | |
471 | + | else { | |
472 | + | let awardedKey = keyIsAwardedByPromoAndUser(2, address) | |
473 | + | if (valueOrElse(getBoolean(awardedKey), false)) | |
474 | + | then throw((("Your wallet " + address) + " is already awarded in promo 2")) | |
475 | + | else { | |
476 | + | let promo2Map = valueOrElse(getString(promo2MapKey), "") | |
477 | + | if (!(contains(promo2Map, address))) | |
478 | + | then throw("You are not participant of promo 2") | |
479 | + | else { | |
480 | + | let parts = split_51C(promo2Map, address) | |
481 | + | let acresAmount = parseIntValue(take(drop(parts[1], 1), 14)) | |
482 | + | let tickets = (acresAmount / MIN_ACRES_AMOUNT_DURING_PROMO) | |
483 | + | let totalTikets = valueOrElse(getInteger(keyTicketsTotalByPromo(2)), 0) | |
484 | + | let $t01207712417 = if ((totalTikets == 0)) | |
485 | + | then { | |
486 | + | func countTickets (acc,el) = (acc + parseIntValue(split(el, ":")[1])) | |
487 | + | ||
488 | + | let ticketsCount = { | |
489 | + | let $l = split_51C(promo2Map, "_") | |
490 | + | let $s = size($l) | |
491 | + | let $acc0 = 0 | |
492 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
493 | + | then $a | |
494 | + | else countTickets($a, $l[$i]) | |
495 | + | ||
496 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
497 | + | then $a | |
498 | + | else throw("List size exceeds 50") | |
499 | + | ||
500 | + | $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($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) | |
501 | + | } | |
502 | + | $Tuple2([IntegerEntry(keyTicketsTotalByPromo(2), ticketsCount)], ticketsCount) | |
503 | + | } | |
504 | + | else $Tuple2(nil, totalTikets) | |
505 | + | let ticketsActions = $t01207712417._1 | |
506 | + | let totalCount = $t01207712417._2 | |
507 | + | let award = fraction(tickets, MIN_ACRES_AMOUNT_DURING_PROMO, totalCount) | |
508 | + | let stakeResult = invoke(this, "sendLockedAcres", [address, award, 30], nil) | |
509 | + | $Tuple2((ticketsActions :+ BooleanEntry(awardedKey, true)), stakeResult) | |
510 | + | } | |
511 | + | } | |
512 | + | } | |
513 | + | } | |
514 | + | } | |
515 | + | else throw("Strict value is not equal to itself.") | |
516 | + | } | |
517 | + | ||
518 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let MILLION6 = 100000000000000 | |
5 | 5 | ||
6 | 6 | let DAYMILLIS = 86400000 | |
7 | 7 | ||
8 | 8 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func keyAcresLockedAmountByUser (addr) = ("acresLockedAmountByUser_" + addr) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func keyAcresLockedEtaByUser (addr) = ("acresLockedEtaByUser_" + addr) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | let acresStakedTotalKey = "acresStakedAmountTotal" | |
18 | 18 | ||
19 | 19 | let xpNewSLand = 5000000 | |
20 | 20 | ||
21 | 21 | let DAILYRESBYPIECE = 3456000 | |
22 | 22 | ||
23 | 23 | let USDT2ACRES_MULTIPLIER = 10 | |
24 | + | ||
25 | + | func keyIsAwardedByPromoAndUser (promoId,addr) = makeString(["%s%d%s__isAwardedByPromoAndUser", toString(promoId), addr], "__") | |
26 | + | ||
27 | + | ||
28 | + | func keyTicketsTotalByPromo (promoId) = ("%s%d__ticketsTotalByPromo__" + toString(promoId)) | |
29 | + | ||
24 | 30 | ||
25 | 31 | let chain = take(drop(this.bytes, 1), 1) | |
26 | 32 | ||
27 | 33 | let usdtAssetId = match chain { | |
28 | 34 | case _ => | |
29 | 35 | if ((base58'2W' == $match0)) | |
30 | 36 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
31 | 37 | else if ((base58'2T' == $match0)) | |
32 | 38 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
33 | 39 | else throw("Unknown chain") | |
34 | 40 | } | |
35 | 41 | ||
36 | 42 | let defaultRestAddressStr = match chain { | |
37 | 43 | case _ => | |
38 | 44 | if ((base58'2W' == $match0)) | |
39 | 45 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
40 | 46 | else if ((base58'2T' == $match0)) | |
41 | 47 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
42 | 48 | else throw("Unknown chain") | |
43 | 49 | } | |
44 | 50 | ||
45 | 51 | let promo2MapKey = "promo2Map" | |
46 | 52 | ||
47 | 53 | let SEP = "__" | |
48 | 54 | ||
49 | 55 | let MULT6 = 1000000 | |
50 | 56 | ||
51 | 57 | let MULT8 = 100000000 | |
52 | 58 | ||
53 | 59 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
54 | 60 | ||
55 | 61 | ||
56 | 62 | let IdxCfgStakingDapp = 1 | |
57 | 63 | ||
58 | 64 | let IdxCfgEconomyDapp = 2 | |
59 | 65 | ||
60 | 66 | let IdxCfgWlgDapp = 4 | |
61 | 67 | ||
62 | 68 | let IdxCfgAcresDapp = 8 | |
63 | 69 | ||
64 | 70 | func keyRestCfg () = "%s__restConfig" | |
65 | 71 | ||
66 | 72 | ||
67 | 73 | func keyRestAddress () = "%s__restAddr" | |
68 | 74 | ||
69 | 75 | ||
70 | 76 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
71 | 77 | ||
72 | 78 | ||
73 | 79 | func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
74 | 80 | ||
75 | 81 | ||
76 | 82 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
77 | 83 | ||
78 | 84 | let restCfg = readRestCfgOrFail(restContract) | |
79 | 85 | ||
80 | 86 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
81 | 87 | ||
82 | 88 | let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp) | |
83 | 89 | ||
84 | 90 | let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp) | |
85 | 91 | ||
86 | 92 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
87 | 93 | ||
88 | 94 | let acresIssuedAmountKey = "acresIssuedAmount" | |
89 | 95 | ||
90 | 96 | let acresAssetIdKey = "acresAssetId" | |
91 | 97 | ||
92 | 98 | let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet") | |
93 | 99 | ||
94 | 100 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
95 | 101 | ||
96 | 102 | ||
97 | 103 | let IdxEffTotal = 0 | |
98 | 104 | ||
99 | 105 | func keyResProportions () = "resTypesProportions" | |
100 | 106 | ||
101 | 107 | ||
102 | 108 | func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr) | |
103 | 109 | ||
104 | 110 | ||
105 | 111 | func asInt (v) = match v { | |
106 | 112 | case n: Int => | |
107 | 113 | n | |
108 | 114 | case _ => | |
109 | 115 | throw("fail to cast into Int") | |
110 | 116 | } | |
111 | 117 | ||
112 | 118 | ||
113 | 119 | func asTwoIntsTuple (val) = match val { | |
114 | 120 | case t2: (Int, Int) => | |
115 | 121 | t2 | |
116 | 122 | case _ => | |
117 | 123 | throw("fail to cast into (Int, Int)") | |
118 | 124 | } | |
119 | 125 | ||
120 | 126 | ||
121 | 127 | func getVotingPower (userAddrStrOrEmpty) = { | |
122 | 128 | let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_") | |
123 | 129 | func adder (acc,item) = (acc + parseIntValue(item)) | |
124 | 130 | ||
125 | 131 | let totalPower = { | |
126 | 132 | let $l = props | |
127 | 133 | let $s = size($l) | |
128 | 134 | let $acc0 = 0 | |
129 | 135 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
130 | 136 | then $a | |
131 | 137 | else adder($a, $l[$i]) | |
132 | 138 | ||
133 | 139 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
134 | 140 | then $a | |
135 | 141 | else throw("List size exceeds 6") | |
136 | 142 | ||
137 | 143 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
138 | 144 | } | |
139 | 145 | let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0) | |
140 | 146 | [totalPower, usersPower] | |
141 | 147 | } | |
142 | 148 | ||
143 | 149 | ||
144 | 150 | func fixedPoint (val,decimals) = { | |
145 | 151 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
146 | 152 | let lowPart = toString((val % tenPow)) | |
147 | 153 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
148 | 154 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
149 | 155 | } | |
150 | 156 | ||
151 | 157 | ||
152 | 158 | func padL (val,len) = { | |
153 | 159 | let valS = toString(val) | |
154 | 160 | let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1) | |
155 | 161 | (zeroes + valS) | |
156 | 162 | } | |
157 | 163 | ||
158 | 164 | ||
159 | 165 | let MIN_ACRES_AMOUNT_DURING_PROMO = 10000000 | |
160 | 166 | ||
161 | 167 | let BLACKLISTED1 = "3P2NGX4Q5nge1MCauwQW5aqYLdkccSGj1Ep_3P2xFAHW9yhyNohYozWd4HFhEXZu3bsNSoR_3P2yKaZ2gvn9Xe5tti81a7P9LZhHgjvToV9_3P37zQ3cf2ecu55RmJqEiGSivdzN9avt3m9_3P4az6dtzsvGCWFAxa94UdevKzXyEwxEiFG_3P4kZU6X3TTLFcSUe55JSy8BySqitcPgMBz_3P5hCxBEh3NgNizZhNBreyBSqtbhJYLkKPD_3P7HLvucy11yxyMJUwjzXFHHKMEDwi1EwfC_3P8JuaqH9PTQAv8D5HBGgQfKauLTYt2NQft_3P9gTDB4rtDEVbpX3asU63H4Zinh2EnTmZE_3P9iN3qrtfJicUVy7amZeVsetVD3vUMk8be_3PCa2BsAa6JBLirszQfV5r9fJrujfhwtwfP_3PD3i4XN8KtygcFx4ry5M7UGqdfH8VYvtRT_3PDEMnnJNc2kx9cPEmvVvhXUr8SvhANKhsa_3PDGE9tKQizaeZFeDDq5aYSv89nwYbfirpZ_3PDMKQTCrUPZECVXEJJ8m1sHtutSu1naSf1_3PGh2Qu6Yvx8GTCRRVNvBUVZLdaidYSaxo5_3PKkmAtbSK5D2hQdo1RfEg8eXyMbDcRUc92_3PLMnbxzssP8W8E8XjJ1RLBBg8UZL8Cz3P2_3PMuxo4PCAox9s4a7R1eszh4iqqu8gS7jHv_3PNrMtEQChw87WZU1JAJ7aGHykCa8TjnDNK_3PPuBXfWoBy3EEory7c7vgi9Usjka7o5tBj_3PQwyeyEhT4Y6aGAL6tg73aQWJtV1zRt3nR_3PRGDShuMGb84MJtTJvtTg8qDfswkYWcm3e" | |
162 | 168 | ||
163 | 169 | let PROMO1_AMOUNT = 4970178 | |
164 | 170 | ||
165 | 171 | let PROMO_2_START_TIMESTAMP = match chain { | |
166 | 172 | case _ => | |
167 | 173 | if ((base58'2W' == $match0)) | |
168 | 174 | then 1700524800000 | |
169 | 175 | else if ((base58'2T' == $match0)) | |
170 | 176 | then 1700420400000 | |
171 | 177 | else throw("Unknown chain") | |
172 | 178 | } | |
173 | 179 | ||
174 | 180 | let PROMO_2_END_TIMESTAMP = match chain { | |
175 | 181 | case _ => | |
176 | 182 | if ((base58'2W' == $match0)) | |
177 | 183 | then 1701043199999 | |
178 | 184 | else if ((base58'2T' == $match0)) | |
179 | 185 | then 1700496000000 | |
180 | 186 | else throw("Unknown chain") | |
181 | 187 | } | |
182 | 188 | ||
183 | 189 | func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr) | |
184 | 190 | ||
185 | 191 | ||
186 | 192 | func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil)) | |
187 | 193 | ||
188 | 194 | ||
189 | 195 | func claimAcresInternal (addr,acresAmount,lastClaimTime) = { | |
190 | 196 | let deltaTime = (lastBlock.timestamp - lastClaimTime) | |
191 | 197 | let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8)) | |
192 | 198 | let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil)) | |
193 | 199 | let gotUsdt = max([0, canGetUsdt]) | |
194 | 200 | (gotUsdt * USDT2ACRES_MULTIPLIER) | |
195 | 201 | } | |
196 | 202 | ||
197 | 203 | ||
198 | 204 | func claimInternal (addr,acresAmount,lastClaimTime) = { | |
199 | 205 | let deltaTime = (lastBlock.timestamp - lastClaimTime) | |
200 | 206 | if ((0 > deltaTime)) | |
201 | 207 | then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
202 | 208 | else { | |
203 | 209 | let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8)) | |
204 | 210 | let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil)) | |
205 | 211 | let gotUsdt = if ((0 >= canGetUsdt)) | |
206 | 212 | then 0 | |
207 | 213 | else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1 | |
208 | 214 | (gotUsdt * USDT2ACRES_MULTIPLIER) | |
209 | 215 | } | |
210 | 216 | } | |
211 | 217 | ||
212 | 218 | ||
213 | 219 | func mergeLocked (oldAmount,oldETA,newAmount,newETA) = { | |
214 | 220 | let now = lastBlock.timestamp | |
215 | 221 | let dt1 = max([0, (oldETA - now)]) | |
216 | 222 | let dt2 = max([0, (newETA - now)]) | |
217 | 223 | let sum = (oldAmount + newAmount) | |
218 | 224 | let dt = if ((sum == 0)) | |
219 | 225 | then 0 | |
220 | 226 | else (fraction(dt1, oldAmount, sum) + fraction(dt2, newAmount, sum)) | |
221 | 227 | (now + dt) | |
222 | 228 | } | |
223 | 229 | ||
224 | 230 | ||
225 | 231 | @Callable(i) | |
226 | 232 | func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this)) | |
227 | 233 | then throw("Permission denied") | |
228 | 234 | else if (isDefined(getBinary(acresAssetIdKey))) | |
229 | 235 | then throw("Already initialized") | |
230 | 236 | else { | |
231 | 237 | let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces) | |
232 | 238 | let issuedAmount = (MILLION6 - (nftAcres * MULT8)) | |
233 | 239 | let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0) | |
234 | 240 | let assetId = calculateAssetId(issue) | |
235 | 241 | [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)] | |
236 | 242 | } | |
237 | 243 | ||
238 | 244 | ||
239 | 245 | ||
240 | 246 | @Callable(i) | |
241 | 247 | func unstakeAcres (amount) = { | |
242 | 248 | let prologResult = prolog() | |
243 | 249 | if ((prologResult == prologResult)) | |
244 | 250 | then if ((0 >= amount)) | |
245 | 251 | then throw("Amount should be positive") | |
246 | 252 | else { | |
247 | 253 | let address = toString(i.caller) | |
248 | 254 | if ((size(i.payments) != 0)) | |
249 | 255 | then throw("No payments required") | |
250 | 256 | else { | |
251 | 257 | let timeKey = keyAcresStakedTimeByUser(address) | |
252 | 258 | let amountKey = keyAcresStakedAmountByUser(address) | |
253 | 259 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
254 | 260 | if ((amount > oldAcresAmount)) | |
255 | 261 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8))) | |
256 | 262 | else { | |
257 | 263 | let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0) | |
258 | 264 | let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0) | |
259 | 265 | let now = lastBlock.timestamp | |
260 | 266 | if (if ((now >= PROMO_2_START_TIMESTAMP)) | |
261 | 267 | then (PROMO_2_END_TIMESTAMP >= now) | |
262 | 268 | else false) | |
263 | 269 | then throw("You cannot unstake ACRES during Promo2") | |
264 | 270 | else { | |
265 | 271 | let unstakableAmount = if (isBlacklistedPromo1(address)) | |
266 | 272 | then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT) | |
267 | 273 | else (oldAcresAmount - lockedAmount) | |
268 | 274 | if (if ((lockedETA > now)) | |
269 | 275 | then (amount > unstakableAmount) | |
270 | 276 | else false) | |
271 | 277 | then throw(((("Only " + fixedPoint(unstakableAmount, 8)) + " ACRES can be unstaked now, wait until ") + toString(lockedETA))) | |
272 | 278 | else { | |
273 | 279 | let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0) | |
274 | 280 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
275 | 281 | let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0)) | |
276 | 282 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2(prologResult, wlgResult)) | |
277 | 283 | } | |
278 | 284 | } | |
279 | 285 | } | |
280 | 286 | } | |
281 | 287 | } | |
282 | 288 | else throw("Strict value is not equal to itself.") | |
283 | 289 | } | |
284 | 290 | ||
285 | 291 | ||
286 | 292 | ||
287 | 293 | @Callable(i) | |
288 | 294 | func stakeAcres () = { | |
289 | 295 | let prologResult = prolog() | |
290 | 296 | if ((prologResult == prologResult)) | |
291 | 297 | then { | |
292 | 298 | let address = toString(i.caller) | |
293 | 299 | if ((size(i.payments) != 1)) | |
294 | 300 | then throw("exactly 1 payment must be attached") | |
295 | 301 | else { | |
296 | 302 | let pmt = i.payments[0] | |
297 | 303 | let amt = pmt.amount | |
298 | 304 | if (if (!(isDefined(pmt.assetId))) | |
299 | 305 | then true | |
300 | 306 | else (value(pmt.assetId) != acresAssetId)) | |
301 | 307 | then throw("ACRES payments only!") | |
302 | 308 | else { | |
303 | 309 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
304 | 310 | if ((wlgResult == wlgResult)) | |
305 | 311 | then { | |
306 | 312 | let now = lastBlock.timestamp | |
307 | 313 | if (if ((PROMO_2_START_TIMESTAMP > now)) | |
308 | 314 | then true | |
309 | 315 | else (now > PROMO_2_END_TIMESTAMP)) | |
310 | 316 | then { | |
311 | 317 | let timeKey = keyAcresStakedTimeByUser(address) | |
312 | 318 | let amountKey = keyAcresStakedAmountByUser(address) | |
313 | 319 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
314 | 320 | let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0) | |
315 | 321 | let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0)) | |
316 | 322 | $Tuple2(((((if ((claimedAcres == 0)) | |
317 | 323 | then nil | |
318 | 324 | else [ScriptTransfer(i.caller, claimedAcres, acresAssetId)]) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(amountKey, (oldAcresAmount + amt))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amt))), $Tuple2(prologResult, wlgResult)) | |
319 | 325 | } | |
320 | 326 | else if ((MIN_ACRES_AMOUNT_DURING_PROMO > amt)) | |
321 | 327 | then throw((("Min staked amount during promo action should be at least " + fixedPoint(MIN_ACRES_AMOUNT_DURING_PROMO, 8)) + " ACRES")) | |
322 | 328 | else { | |
323 | 329 | let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil) | |
324 | 330 | let promo2Map = valueOrElse(getString(promo2MapKey), "") | |
325 | 331 | let newMap2 = if (contains(promo2Map, address)) | |
326 | 332 | then { | |
327 | 333 | let parts = split_51C(promo2Map, address) | |
328 | 334 | let oldAmount = parseIntValue(take(drop(parts[1], 1), 14)) | |
329 | 335 | ((((parts[0] + address) + ":") + padL((oldAmount + amt), 14)) + drop(parts[1], 15)) | |
330 | 336 | } | |
331 | 337 | else { | |
332 | 338 | let finalPart = ((address + ":") + padL(amt, 14)) | |
333 | 339 | if ((promo2Map == "")) | |
334 | 340 | then finalPart | |
335 | 341 | else ((promo2Map + "_") + finalPart) | |
336 | 342 | } | |
337 | 343 | $Tuple2([StringEntry(promo2MapKey, newMap2)], $Tuple3(prologResult, wlgResult, stakeResult)) | |
338 | 344 | } | |
339 | 345 | } | |
340 | 346 | else throw("Strict value is not equal to itself.") | |
341 | 347 | } | |
342 | 348 | } | |
343 | 349 | } | |
344 | 350 | else throw("Strict value is not equal to itself.") | |
345 | 351 | } | |
346 | 352 | ||
347 | 353 | ||
348 | 354 | ||
349 | 355 | @Callable(i) | |
350 | 356 | func buyAcres () = { | |
351 | 357 | let prologResult = prolog() | |
352 | 358 | if ((prologResult == prologResult)) | |
353 | 359 | then { | |
354 | 360 | let address = toString(i.caller) | |
355 | 361 | if ((size(i.payments) != 1)) | |
356 | 362 | then throw("exactly 1 payment must be attached") | |
357 | 363 | else { | |
358 | 364 | let pmt = i.payments[0] | |
359 | 365 | let amt = pmt.amount | |
360 | 366 | if (if (!(isDefined(pmt.assetId))) | |
361 | 367 | then true | |
362 | 368 | else (value(pmt.assetId) != usdtAssetId)) | |
363 | 369 | then throw("USDT payments only!") | |
364 | 370 | else if ((MULT6 > amt)) | |
365 | 371 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
366 | 372 | else { | |
367 | 373 | let acresAmount = (amt * USDT2ACRES_MULTIPLIER) | |
368 | 374 | let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [address, fraction(xpNewSLand, acresAmount, (25 * MULT8))], nil)) | |
369 | 375 | $Tuple2([ScriptTransfer(economyContract, amt, usdtAssetId), ScriptTransfer(i.caller, acresAmount, acresAssetId)], $Tuple2(prologResult, accStatsResult)) | |
370 | 376 | } | |
371 | 377 | } | |
372 | 378 | } | |
373 | 379 | else throw("Strict value is not equal to itself.") | |
374 | 380 | } | |
375 | 381 | ||
376 | 382 | ||
377 | 383 | ||
378 | 384 | @Callable(i) | |
379 | 385 | func sendAcres (addr,amount) = if ((i.caller != economyContract)) | |
380 | 386 | then throw("Permission denied") | |
381 | 387 | else $Tuple2([ScriptTransfer(addressFromStringValue(addr), amount, acresAssetId)], amount) | |
382 | 388 | ||
383 | 389 | ||
384 | 390 | ||
385 | 391 | @Callable(i) | |
386 | 392 | func sendLockedAcres (addr,amount,lockDays) = if (if ((i.caller != this)) | |
387 | 393 | then (i.caller != restContract) | |
388 | 394 | else false) | |
389 | 395 | then throw("Permission denied") | |
390 | 396 | else { | |
391 | 397 | let now = lastBlock.timestamp | |
392 | 398 | let timeKey = keyAcresStakedTimeByUser(addr) | |
393 | 399 | let amountKey = keyAcresStakedAmountByUser(addr) | |
394 | 400 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
395 | 401 | let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0) | |
396 | 402 | let oldTime = valueOrElse(getInteger(timeKey), now) | |
397 | 403 | let etaKey = keyAcresLockedEtaByUser(addr) | |
398 | 404 | let lockedAmountKey = keyAcresLockedAmountByUser(addr) | |
399 | 405 | let oldLockedAmount = valueOrElse(getInteger(lockedAmountKey), 0) | |
400 | 406 | let oldLockedETA = valueOrElse(getInteger(etaKey), 0) | |
401 | 407 | let mergedETA = mergeLocked(oldLockedAmount, oldLockedETA, amount, (now + (lockDays * DAYMILLIS))) | |
402 | 408 | $Tuple2([IntegerEntry(timeKey, oldTime), IntegerEntry(amountKey, (oldAcresAmount + amount)), IntegerEntry(acresStakedTotalKey, (oldTotal + amount)), IntegerEntry(etaKey, mergedETA), IntegerEntry(lockedAmountKey, (oldLockedAmount + amount))], amount) | |
403 | 409 | } | |
404 | 410 | ||
405 | 411 | ||
406 | 412 | ||
407 | 413 | @Callable(i) | |
408 | 414 | func burnAcres (amount) = if ((i.caller != stakingContract)) | |
409 | 415 | then throw("Permission denied") | |
410 | 416 | else { | |
411 | 417 | let amountLeft = (valueOrElse(getInteger(acresIssuedAmountKey), 0) - amount) | |
412 | 418 | if ((0 > amountLeft)) | |
413 | 419 | then throw("Attempt to burn more ACRES, than exists") | |
414 | 420 | else $Tuple2([Burn(acresAssetId, amount), IntegerEntry(acresIssuedAmountKey, amountLeft)], amount) | |
415 | 421 | } | |
416 | 422 | ||
417 | 423 | ||
418 | 424 | ||
419 | 425 | @Callable(i) | |
420 | 426 | func claimAcres () = { | |
421 | 427 | let prologResult = prolog() | |
422 | 428 | if ((prologResult == prologResult)) | |
423 | 429 | then { | |
424 | 430 | let address = toString(i.caller) | |
425 | 431 | if ((size(i.payments) != 0)) | |
426 | 432 | then throw("No payments required") | |
427 | 433 | else { | |
428 | 434 | let timeKey = keyAcresStakedTimeByUser(address) | |
429 | 435 | let amountKey = keyAcresStakedAmountByUser(address) | |
430 | 436 | let acresAmount = valueOrElse(getInteger(amountKey), 0) | |
431 | 437 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
432 | 438 | let claimedAcres = claimInternal(address, acresAmount, valueOrElse(getInteger(timeKey), 0)) | |
433 | 439 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), ScriptTransfer(i.caller, claimedAcres, acresAssetId)], $Tuple2(prologResult, wlgResult)) | |
434 | 440 | } | |
435 | 441 | } | |
436 | 442 | else throw("Strict value is not equal to itself.") | |
437 | 443 | } | |
438 | 444 | ||
439 | 445 | ||
440 | 446 | ||
441 | 447 | @Callable(i) | |
442 | 448 | func claimAcresREADONLY (address) = { | |
443 | 449 | let timeKey = keyAcresStakedTimeByUser(address) | |
444 | 450 | let amountKey = keyAcresStakedAmountByUser(address) | |
445 | 451 | let acresAmount = valueOrElse(getInteger(amountKey), 0) | |
446 | 452 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
447 | 453 | let claimedAcres = claimAcresInternal(address, acresAmount, lastTime) | |
448 | 454 | $Tuple2(nil, [claimedAcres, lastTime]) | |
449 | 455 | } | |
450 | 456 | ||
451 | 457 | ||
458 | + | ||
459 | + | @Callable(i) | |
460 | + | func claimPromo2 () = { | |
461 | + | let prologResult = prolog() | |
462 | + | if ((prologResult == prologResult)) | |
463 | + | then { | |
464 | + | let address = toString(i.caller) | |
465 | + | if ((size(i.payments) != 0)) | |
466 | + | then throw("No payments required") | |
467 | + | else { | |
468 | + | let now = lastBlock.timestamp | |
469 | + | if ((PROMO_2_END_TIMESTAMP > now)) | |
470 | + | then throw("Promo 2 is not over yet") | |
471 | + | else { | |
472 | + | let awardedKey = keyIsAwardedByPromoAndUser(2, address) | |
473 | + | if (valueOrElse(getBoolean(awardedKey), false)) | |
474 | + | then throw((("Your wallet " + address) + " is already awarded in promo 2")) | |
475 | + | else { | |
476 | + | let promo2Map = valueOrElse(getString(promo2MapKey), "") | |
477 | + | if (!(contains(promo2Map, address))) | |
478 | + | then throw("You are not participant of promo 2") | |
479 | + | else { | |
480 | + | let parts = split_51C(promo2Map, address) | |
481 | + | let acresAmount = parseIntValue(take(drop(parts[1], 1), 14)) | |
482 | + | let tickets = (acresAmount / MIN_ACRES_AMOUNT_DURING_PROMO) | |
483 | + | let totalTikets = valueOrElse(getInteger(keyTicketsTotalByPromo(2)), 0) | |
484 | + | let $t01207712417 = if ((totalTikets == 0)) | |
485 | + | then { | |
486 | + | func countTickets (acc,el) = (acc + parseIntValue(split(el, ":")[1])) | |
487 | + | ||
488 | + | let ticketsCount = { | |
489 | + | let $l = split_51C(promo2Map, "_") | |
490 | + | let $s = size($l) | |
491 | + | let $acc0 = 0 | |
492 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
493 | + | then $a | |
494 | + | else countTickets($a, $l[$i]) | |
495 | + | ||
496 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
497 | + | then $a | |
498 | + | else throw("List size exceeds 50") | |
499 | + | ||
500 | + | $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($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) | |
501 | + | } | |
502 | + | $Tuple2([IntegerEntry(keyTicketsTotalByPromo(2), ticketsCount)], ticketsCount) | |
503 | + | } | |
504 | + | else $Tuple2(nil, totalTikets) | |
505 | + | let ticketsActions = $t01207712417._1 | |
506 | + | let totalCount = $t01207712417._2 | |
507 | + | let award = fraction(tickets, MIN_ACRES_AMOUNT_DURING_PROMO, totalCount) | |
508 | + | let stakeResult = invoke(this, "sendLockedAcres", [address, award, 30], nil) | |
509 | + | $Tuple2((ticketsActions :+ BooleanEntry(awardedKey, true)), stakeResult) | |
510 | + | } | |
511 | + | } | |
512 | + | } | |
513 | + | } | |
514 | + | } | |
515 | + | else throw("Strict value is not equal to itself.") | |
516 | + | } | |
517 | + | ||
518 | + |
github/deemru/w8io/026f985 52.43 ms ◑