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:BgIsCAISBAoCCAESAwoBARIAEgASBAoCCAESBQoDCAEBEgMKAQESABIDCgEIEgA3AAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyARprZXlBY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcgEEYWRkcgkArAICAhhhY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcl8FBGFkZHIBF2tleUFjcmVzTG9ja2VkRXRhQnlVc2VyAQRhZGRyCQCsAgICFWFjcmVzTG9ja2VkRXRhQnlVc2VyXwUEYWRkcgATYWNyZXNTdGFrZWRUb3RhbEtleQIWYWNyZXNTdGFrZWRBbW91bnRUb3RhbAAKeHBOZXdTTGFuZADAlrECAA9EQUlMWVJFU0JZUElFQ0UAgPjSAQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoBGmtleUlzQXdhcmRlZEJ5UHJvbW9BbmRVc2VyAgdwcm9tb0lkBGFkZH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wAoACkAKgArACwALQAuAC8AMAAxADIJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgkBFmtleVRpY2tldHNUb3RhbEJ5UHJvbW8BAAIFDHRpY2tldHNDb3VudAUDbmlsBQx0aWNrZXRzQ291bnQJAJQKAgUDbmlsBQt0b3RhbFRpa2V0cwQOdGlja2V0c0FjdGlvbnMIBQ0kdDAxMjA3NzEyNDE3Al8xBAp0b3RhbENvdW50CAUNJHQwMTIwNzcxMjQxNwJfMgQFYXdhcmQJAGsDBQd0aWNrZXRzBR1NSU5fQUNSRVNfQU1PVU5UX0RVUklOR19QUk9NTwUKdG90YWxDb3VudAQLc3Rha2VSZXN1bHQJAPwHBAUEdGhpcwIPc2VuZExvY2tlZEFjcmVzCQDMCAIFB2FkZHJlc3MJAMwIAgUFYXdhcmQJAMwIAgAeBQNuaWwFA25pbAkAlAoCCQDNCAIFDnRpY2tldHNBY3Rpb25zCQEMQm9vbGVhbkVudHJ5AgUKYXdhcmRlZEtleQYFC3N0YWtlUmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuADZB9cQ=", "height": 2859427, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9gmf5RJcQbewMGKxx6K7fcnDpRESXNZcodpFrVUQbcSm Next: 6HkRXcagHDDX8LcCyv2sVnNKLp41GRsgMUEUU8K7XeKE Diff:
OldNewDifferences
2121 let DAILYRESBYPIECE = 3456000
2222
2323 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+
2430
2531 let chain = take(drop(this.bytes, 1), 1)
2632
449455 }
450456
451457
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+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let MILLION6 = 100000000000000
55
66 let DAYMILLIS = 86400000
77
88 func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr)
99
1010
1111 func keyAcresLockedAmountByUser (addr) = ("acresLockedAmountByUser_" + addr)
1212
1313
1414 func keyAcresLockedEtaByUser (addr) = ("acresLockedEtaByUser_" + addr)
1515
1616
1717 let acresStakedTotalKey = "acresStakedAmountTotal"
1818
1919 let xpNewSLand = 5000000
2020
2121 let DAILYRESBYPIECE = 3456000
2222
2323 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+
2430
2531 let chain = take(drop(this.bytes, 1), 1)
2632
2733 let usdtAssetId = match chain {
2834 case _ =>
2935 if ((base58'2W' == $match0))
3036 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
3137 else if ((base58'2T' == $match0))
3238 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
3339 else throw("Unknown chain")
3440 }
3541
3642 let defaultRestAddressStr = match chain {
3743 case _ =>
3844 if ((base58'2W' == $match0))
3945 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
4046 else if ((base58'2T' == $match0))
4147 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
4248 else throw("Unknown chain")
4349 }
4450
4551 let promo2MapKey = "promo2Map"
4652
4753 let SEP = "__"
4854
4955 let MULT6 = 1000000
5056
5157 let MULT8 = 100000000
5258
5359 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
5460
5561
5662 let IdxCfgStakingDapp = 1
5763
5864 let IdxCfgEconomyDapp = 2
5965
6066 let IdxCfgWlgDapp = 4
6167
6268 let IdxCfgAcresDapp = 8
6369
6470 func keyRestCfg () = "%s__restConfig"
6571
6672
6773 func keyRestAddress () = "%s__restAddr"
6874
6975
7076 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
7177
7278
7379 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
7480
7581
7682 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
7783
7884 let restCfg = readRestCfgOrFail(restContract)
7985
8086 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
8187
8288 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
8389
8490 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
8591
8692 let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
8793
8894 let acresIssuedAmountKey = "acresIssuedAmount"
8995
9096 let acresAssetIdKey = "acresAssetId"
9197
9298 let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet")
9399
94100 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
95101
96102
97103 let IdxEffTotal = 0
98104
99105 func keyResProportions () = "resTypesProportions"
100106
101107
102108 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
103109
104110
105111 func asInt (v) = match v {
106112 case n: Int =>
107113 n
108114 case _ =>
109115 throw("fail to cast into Int")
110116 }
111117
112118
113119 func asTwoIntsTuple (val) = match val {
114120 case t2: (Int, Int) =>
115121 t2
116122 case _ =>
117123 throw("fail to cast into (Int, Int)")
118124 }
119125
120126
121127 func getVotingPower (userAddrStrOrEmpty) = {
122128 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
123129 func adder (acc,item) = (acc + parseIntValue(item))
124130
125131 let totalPower = {
126132 let $l = props
127133 let $s = size($l)
128134 let $acc0 = 0
129135 func $f0_1 ($a,$i) = if (($i >= $s))
130136 then $a
131137 else adder($a, $l[$i])
132138
133139 func $f0_2 ($a,$i) = if (($i >= $s))
134140 then $a
135141 else throw("List size exceeds 6")
136142
137143 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
138144 }
139145 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
140146 [totalPower, usersPower]
141147 }
142148
143149
144150 func fixedPoint (val,decimals) = {
145151 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
146152 let lowPart = toString((val % tenPow))
147153 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
148154 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
149155 }
150156
151157
152158 func padL (val,len) = {
153159 let valS = toString(val)
154160 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
155161 (zeroes + valS)
156162 }
157163
158164
159165 let MIN_ACRES_AMOUNT_DURING_PROMO = 10000000
160166
161167 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"
162168
163169 let PROMO1_AMOUNT = 4970178
164170
165171 let PROMO_2_START_TIMESTAMP = match chain {
166172 case _ =>
167173 if ((base58'2W' == $match0))
168174 then 1700524800000
169175 else if ((base58'2T' == $match0))
170176 then 1700420400000
171177 else throw("Unknown chain")
172178 }
173179
174180 let PROMO_2_END_TIMESTAMP = match chain {
175181 case _ =>
176182 if ((base58'2W' == $match0))
177183 then 1701043199999
178184 else if ((base58'2T' == $match0))
179185 then 1700496000000
180186 else throw("Unknown chain")
181187 }
182188
183189 func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr)
184190
185191
186192 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
187193
188194
189195 func claimAcresInternal (addr,acresAmount,lastClaimTime) = {
190196 let deltaTime = (lastBlock.timestamp - lastClaimTime)
191197 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
192198 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
193199 let gotUsdt = max([0, canGetUsdt])
194200 (gotUsdt * USDT2ACRES_MULTIPLIER)
195201 }
196202
197203
198204 func claimInternal (addr,acresAmount,lastClaimTime) = {
199205 let deltaTime = (lastBlock.timestamp - lastClaimTime)
200206 if ((0 > deltaTime))
201207 then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", current = ") + toString(lastBlock.timestamp)))
202208 else {
203209 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
204210 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
205211 let gotUsdt = if ((0 >= canGetUsdt))
206212 then 0
207213 else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1
208214 (gotUsdt * USDT2ACRES_MULTIPLIER)
209215 }
210216 }
211217
212218
213219 func mergeLocked (oldAmount,oldETA,newAmount,newETA) = {
214220 let now = lastBlock.timestamp
215221 let dt1 = max([0, (oldETA - now)])
216222 let dt2 = max([0, (newETA - now)])
217223 let sum = (oldAmount + newAmount)
218224 let dt = if ((sum == 0))
219225 then 0
220226 else (fraction(dt1, oldAmount, sum) + fraction(dt2, newAmount, sum))
221227 (now + dt)
222228 }
223229
224230
225231 @Callable(i)
226232 func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this))
227233 then throw("Permission denied")
228234 else if (isDefined(getBinary(acresAssetIdKey)))
229235 then throw("Already initialized")
230236 else {
231237 let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces)
232238 let issuedAmount = (MILLION6 - (nftAcres * MULT8))
233239 let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0)
234240 let assetId = calculateAssetId(issue)
235241 [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)]
236242 }
237243
238244
239245
240246 @Callable(i)
241247 func unstakeAcres (amount) = {
242248 let prologResult = prolog()
243249 if ((prologResult == prologResult))
244250 then if ((0 >= amount))
245251 then throw("Amount should be positive")
246252 else {
247253 let address = toString(i.caller)
248254 if ((size(i.payments) != 0))
249255 then throw("No payments required")
250256 else {
251257 let timeKey = keyAcresStakedTimeByUser(address)
252258 let amountKey = keyAcresStakedAmountByUser(address)
253259 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
254260 if ((amount > oldAcresAmount))
255261 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8)))
256262 else {
257263 let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0)
258264 let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0)
259265 let now = lastBlock.timestamp
260266 if (if ((now >= PROMO_2_START_TIMESTAMP))
261267 then (PROMO_2_END_TIMESTAMP >= now)
262268 else false)
263269 then throw("You cannot unstake ACRES during Promo2")
264270 else {
265271 let unstakableAmount = if (isBlacklistedPromo1(address))
266272 then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT)
267273 else (oldAcresAmount - lockedAmount)
268274 if (if ((lockedETA > now))
269275 then (amount > unstakableAmount)
270276 else false)
271277 then throw(((("Only " + fixedPoint(unstakableAmount, 8)) + " ACRES can be unstaked now, wait until ") + toString(lockedETA)))
272278 else {
273279 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
274280 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
275281 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
276282 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2(prologResult, wlgResult))
277283 }
278284 }
279285 }
280286 }
281287 }
282288 else throw("Strict value is not equal to itself.")
283289 }
284290
285291
286292
287293 @Callable(i)
288294 func stakeAcres () = {
289295 let prologResult = prolog()
290296 if ((prologResult == prologResult))
291297 then {
292298 let address = toString(i.caller)
293299 if ((size(i.payments) != 1))
294300 then throw("exactly 1 payment must be attached")
295301 else {
296302 let pmt = i.payments[0]
297303 let amt = pmt.amount
298304 if (if (!(isDefined(pmt.assetId)))
299305 then true
300306 else (value(pmt.assetId) != acresAssetId))
301307 then throw("ACRES payments only!")
302308 else {
303309 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
304310 if ((wlgResult == wlgResult))
305311 then {
306312 let now = lastBlock.timestamp
307313 if (if ((PROMO_2_START_TIMESTAMP > now))
308314 then true
309315 else (now > PROMO_2_END_TIMESTAMP))
310316 then {
311317 let timeKey = keyAcresStakedTimeByUser(address)
312318 let amountKey = keyAcresStakedAmountByUser(address)
313319 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
314320 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
315321 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
316322 $Tuple2(((((if ((claimedAcres == 0))
317323 then nil
318324 else [ScriptTransfer(i.caller, claimedAcres, acresAssetId)]) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(amountKey, (oldAcresAmount + amt))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amt))), $Tuple2(prologResult, wlgResult))
319325 }
320326 else if ((MIN_ACRES_AMOUNT_DURING_PROMO > amt))
321327 then throw((("Min staked amount during promo action should be at least " + fixedPoint(MIN_ACRES_AMOUNT_DURING_PROMO, 8)) + " ACRES"))
322328 else {
323329 let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
324330 let promo2Map = valueOrElse(getString(promo2MapKey), "")
325331 let newMap2 = if (contains(promo2Map, address))
326332 then {
327333 let parts = split_51C(promo2Map, address)
328334 let oldAmount = parseIntValue(take(drop(parts[1], 1), 14))
329335 ((((parts[0] + address) + ":") + padL((oldAmount + amt), 14)) + drop(parts[1], 15))
330336 }
331337 else {
332338 let finalPart = ((address + ":") + padL(amt, 14))
333339 if ((promo2Map == ""))
334340 then finalPart
335341 else ((promo2Map + "_") + finalPart)
336342 }
337343 $Tuple2([StringEntry(promo2MapKey, newMap2)], $Tuple3(prologResult, wlgResult, stakeResult))
338344 }
339345 }
340346 else throw("Strict value is not equal to itself.")
341347 }
342348 }
343349 }
344350 else throw("Strict value is not equal to itself.")
345351 }
346352
347353
348354
349355 @Callable(i)
350356 func buyAcres () = {
351357 let prologResult = prolog()
352358 if ((prologResult == prologResult))
353359 then {
354360 let address = toString(i.caller)
355361 if ((size(i.payments) != 1))
356362 then throw("exactly 1 payment must be attached")
357363 else {
358364 let pmt = i.payments[0]
359365 let amt = pmt.amount
360366 if (if (!(isDefined(pmt.assetId)))
361367 then true
362368 else (value(pmt.assetId) != usdtAssetId))
363369 then throw("USDT payments only!")
364370 else if ((MULT6 > amt))
365371 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
366372 else {
367373 let acresAmount = (amt * USDT2ACRES_MULTIPLIER)
368374 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [address, fraction(xpNewSLand, acresAmount, (25 * MULT8))], nil))
369375 $Tuple2([ScriptTransfer(economyContract, amt, usdtAssetId), ScriptTransfer(i.caller, acresAmount, acresAssetId)], $Tuple2(prologResult, accStatsResult))
370376 }
371377 }
372378 }
373379 else throw("Strict value is not equal to itself.")
374380 }
375381
376382
377383
378384 @Callable(i)
379385 func sendAcres (addr,amount) = if ((i.caller != economyContract))
380386 then throw("Permission denied")
381387 else $Tuple2([ScriptTransfer(addressFromStringValue(addr), amount, acresAssetId)], amount)
382388
383389
384390
385391 @Callable(i)
386392 func sendLockedAcres (addr,amount,lockDays) = if (if ((i.caller != this))
387393 then (i.caller != restContract)
388394 else false)
389395 then throw("Permission denied")
390396 else {
391397 let now = lastBlock.timestamp
392398 let timeKey = keyAcresStakedTimeByUser(addr)
393399 let amountKey = keyAcresStakedAmountByUser(addr)
394400 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
395401 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
396402 let oldTime = valueOrElse(getInteger(timeKey), now)
397403 let etaKey = keyAcresLockedEtaByUser(addr)
398404 let lockedAmountKey = keyAcresLockedAmountByUser(addr)
399405 let oldLockedAmount = valueOrElse(getInteger(lockedAmountKey), 0)
400406 let oldLockedETA = valueOrElse(getInteger(etaKey), 0)
401407 let mergedETA = mergeLocked(oldLockedAmount, oldLockedETA, amount, (now + (lockDays * DAYMILLIS)))
402408 $Tuple2([IntegerEntry(timeKey, oldTime), IntegerEntry(amountKey, (oldAcresAmount + amount)), IntegerEntry(acresStakedTotalKey, (oldTotal + amount)), IntegerEntry(etaKey, mergedETA), IntegerEntry(lockedAmountKey, (oldLockedAmount + amount))], amount)
403409 }
404410
405411
406412
407413 @Callable(i)
408414 func burnAcres (amount) = if ((i.caller != stakingContract))
409415 then throw("Permission denied")
410416 else {
411417 let amountLeft = (valueOrElse(getInteger(acresIssuedAmountKey), 0) - amount)
412418 if ((0 > amountLeft))
413419 then throw("Attempt to burn more ACRES, than exists")
414420 else $Tuple2([Burn(acresAssetId, amount), IntegerEntry(acresIssuedAmountKey, amountLeft)], amount)
415421 }
416422
417423
418424
419425 @Callable(i)
420426 func claimAcres () = {
421427 let prologResult = prolog()
422428 if ((prologResult == prologResult))
423429 then {
424430 let address = toString(i.caller)
425431 if ((size(i.payments) != 0))
426432 then throw("No payments required")
427433 else {
428434 let timeKey = keyAcresStakedTimeByUser(address)
429435 let amountKey = keyAcresStakedAmountByUser(address)
430436 let acresAmount = valueOrElse(getInteger(amountKey), 0)
431437 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
432438 let claimedAcres = claimInternal(address, acresAmount, valueOrElse(getInteger(timeKey), 0))
433439 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), ScriptTransfer(i.caller, claimedAcres, acresAssetId)], $Tuple2(prologResult, wlgResult))
434440 }
435441 }
436442 else throw("Strict value is not equal to itself.")
437443 }
438444
439445
440446
441447 @Callable(i)
442448 func claimAcresREADONLY (address) = {
443449 let timeKey = keyAcresStakedTimeByUser(address)
444450 let amountKey = keyAcresStakedAmountByUser(address)
445451 let acresAmount = valueOrElse(getInteger(amountKey), 0)
446452 let lastTime = valueOrElse(getInteger(timeKey), 0)
447453 let claimedAcres = claimAcresInternal(address, acresAmount, lastTime)
448454 $Tuple2(nil, [claimedAcres, lastTime])
449455 }
450456
451457
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