tx · FQmE36qNwo3eacM5XEnJRiL3NK8U3FRYCrnBo23SdLbD

3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg:  -0.01400000 Waves

2023.11.19 21:55 [2850660] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves

{ "type": 13, "id": "FQmE36qNwo3eacM5XEnJRiL3NK8U3FRYCrnBo23SdLbD", "fee": 1400000, "feeAssetId": null, "timestamp": 1700420183450, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "3G7LENruAbswpH9UvZYoHD7eYgHnbarwLd4jxZDEfrAa7xtbjPNkFGGXTcAniWbJ9KawXz594z7jk2uMfXDbk8fJ" ], "script": "base64:BgIsCAISBAoCCAESABIDCgEBEgASABIECgIIARIFCgMIAQESAwoBARIAEgMKAQg1AAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyARprZXlBY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcgEEYWRkcgkArAICAhhhY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcl8FBGFkZHIBF2tleUFjcmVzTG9ja2VkRXRhQnlVc2VyAQRhZGRyCQCsAgICFWFjcmVzTG9ja2VkRXRhQnlVc2VyXwUEYWRkcgATYWNyZXNTdGFrZWRUb3RhbEtleQIWYWNyZXNTdGFrZWRBbW91bnRUb3RhbAAKeHBOZXdTTGFuZADAlrECAA9EQUlMWVJFU0JZUElFQ0UAgPjSAQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNz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ZFRpbWVCeVVzZXIBBQdhZGRyZXNzBAlhbW91bnRLZXkJARprZXlBY3Jlc1N0YWtlZEFtb3VudEJ5VXNlcgEFB2FkZHJlc3MEC2FjcmVzQW1vdW50CQELdmFsdWVPckVsc2UCCQCfCAEFCWFtb3VudEtleQAABAhsYXN0VGltZQkBC3ZhbHVlT3JFbHNlAgkAnwgBBQd0aW1lS2V5AAAEDGNsYWltZWRBY3JlcwkBEmNsYWltQWNyZXNJbnRlcm5hbAMFB2FkZHJlc3MFC2FjcmVzQW1vdW50BQhsYXN0VGltZQkAlAoCBQNuaWwJAMwIAgUMY2xhaW1lZEFjcmVzCQDMCAIFCGxhc3RUaW1lBQNuaWwA4i0E3g==", "height": 2850660, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E2JN3F1oqYzoP5pTv4TtpwMPbvRbYFbCHmniF6ijiSig Next: 2gMXPUhHd9EYANm6KQ5hd9dVFQniBYQFjfNBWHurPhUq Diff:
OldNewDifferences
147147 }
148148
149149
150+func padL (val,len) = {
151+ let valS = toString(val)
152+ let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
153+ (zeroes + valS)
154+ }
155+
156+
150157 let MIN_ACRES_AMOUNT_DURING_PROMO = 10000000
158+
159+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"
160+
161+let PROMO1_AMOUNT = 4970178
162+
163+let PROMO_2_START_TIMESTAMP = match chain {
164+ case _ =>
165+ if ((base58'2W' == $match0))
166+ then 1700524800000
167+ else if ((base58'2T' == $match0))
168+ then 1700420400000
169+ else throw("Unknown chain")
170+}
171+
172+let PROMO_2_END_TIMESTAMP = match chain {
173+ case _ =>
174+ if ((base58'2W' == $match0))
175+ then 1701043199999
176+ else if ((base58'2T' == $match0))
177+ then 1700496000000
178+ else throw("Unknown chain")
179+}
180+
181+let promo2MapKey = "promo2Map"
182+
183+func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr)
184+
151185
152186 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
153187
258292 let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0)
259293 let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0)
260294 let now = lastBlock.timestamp
261- let unstakableAmount = (oldAcresAmount - lockedAmount)
295+ let unstakableAmount = if (isBlacklistedPromo1(address))
296+ then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT)
297+ else (oldAcresAmount - lockedAmount)
262298 if (if ((lockedETA > now))
263299 then (amount > unstakableAmount)
264300 else false)
295331 else if ((MIN_ACRES_AMOUNT_DURING_PROMO > amt))
296332 then throw((("Min staked amount during promo action should be at least " + fixedPoint(MIN_ACRES_AMOUNT_DURING_PROMO, 8)) + " ACRES"))
297333 else {
298- let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
299- if ((wlgResult == wlgResult))
300- then {
301- let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
302- $Tuple2(nil, $Tuple3(prologResult, wlgResult, stakeResult))
303- }
304- else throw("Strict value is not equal to itself.")
334+ let now = lastBlock.timestamp
335+ if ((PROMO_2_START_TIMESTAMP > now))
336+ then throw("Promo2 is not started yet")
337+ else if ((now > PROMO_2_END_TIMESTAMP))
338+ then throw("Promo2 is already finished")
339+ else {
340+ let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
341+ if ((wlgResult == wlgResult))
342+ then {
343+ let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
344+ let promo2Map = valueOrElse(getString(promo2MapKey), "")
345+ let newMap2 = if (contains(promo2Map, address))
346+ then {
347+ let parts = split_51C(promo2Map, address)
348+ let oldAmount = parseIntValue(take(drop(parts[1], 1), 14))
349+ ((((parts[0] + address) + ":") + padL((oldAmount + amt), 14)) + drop(parts[1], 15))
350+ }
351+ else {
352+ let finalPart = ((address + ":") + padL(amt, 14))
353+ if ((promo2Map == ""))
354+ then finalPart
355+ else ((promo2Map + "_") + finalPart)
356+ }
357+ $Tuple2([StringEntry(promo2MapKey, newMap2)], $Tuple3(prologResult, wlgResult, stakeResult))
358+ }
359+ else throw("Strict value is not equal to itself.")
360+ }
305361 }
306362 }
307363 }
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
2424
2525 let chain = take(drop(this.bytes, 1), 1)
2626
2727 let usdtAssetId = match chain {
2828 case _ =>
2929 if ((base58'2W' == $match0))
3030 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
3131 else if ((base58'2T' == $match0))
3232 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
3333 else throw("Unknown chain")
3434 }
3535
3636 let defaultRestAddressStr = match chain {
3737 case _ =>
3838 if ((base58'2W' == $match0))
3939 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
4040 else if ((base58'2T' == $match0))
4141 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
4242 else throw("Unknown chain")
4343 }
4444
4545 let SEP = "__"
4646
4747 let MULT6 = 1000000
4848
4949 let MULT8 = 100000000
5050
5151 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
5252
5353
5454 let IdxCfgStakingDapp = 1
5555
5656 let IdxCfgEconomyDapp = 2
5757
5858 let IdxCfgWlgDapp = 4
5959
6060 let IdxCfgAcresDapp = 8
6161
6262 func keyRestCfg () = "%s__restConfig"
6363
6464
6565 func keyRestAddress () = "%s__restAddr"
6666
6767
6868 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
6969
7070
7171 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
7272
7373
7474 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
7575
7676 let restCfg = readRestCfgOrFail(restContract)
7777
7878 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
7979
8080 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
8181
8282 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
8383
8484 let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
8585
8686 let acresIssuedAmountKey = "acresIssuedAmount"
8787
8888 let acresAssetIdKey = "acresAssetId"
8989
9090 let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet")
9191
9292 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
9393
9494
9595 let IdxEffTotal = 0
9696
9797 func keyResProportions () = "resTypesProportions"
9898
9999
100100 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
101101
102102
103103 func asInt (v) = match v {
104104 case n: Int =>
105105 n
106106 case _ =>
107107 throw("fail to cast into Int")
108108 }
109109
110110
111111 func asTwoIntsTuple (val) = match val {
112112 case t2: (Int, Int) =>
113113 t2
114114 case _ =>
115115 throw("fail to cast into (Int, Int)")
116116 }
117117
118118
119119 func getVotingPower (userAddrStrOrEmpty) = {
120120 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
121121 func adder (acc,item) = (acc + parseIntValue(item))
122122
123123 let totalPower = {
124124 let $l = props
125125 let $s = size($l)
126126 let $acc0 = 0
127127 func $f0_1 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else adder($a, $l[$i])
130130
131131 func $f0_2 ($a,$i) = if (($i >= $s))
132132 then $a
133133 else throw("List size exceeds 6")
134134
135135 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
136136 }
137137 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
138138 [totalPower, usersPower]
139139 }
140140
141141
142142 func fixedPoint (val,decimals) = {
143143 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
144144 let lowPart = toString((val % tenPow))
145145 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
146146 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
147147 }
148148
149149
150+func padL (val,len) = {
151+ let valS = toString(val)
152+ let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
153+ (zeroes + valS)
154+ }
155+
156+
150157 let MIN_ACRES_AMOUNT_DURING_PROMO = 10000000
158+
159+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"
160+
161+let PROMO1_AMOUNT = 4970178
162+
163+let PROMO_2_START_TIMESTAMP = match chain {
164+ case _ =>
165+ if ((base58'2W' == $match0))
166+ then 1700524800000
167+ else if ((base58'2T' == $match0))
168+ then 1700420400000
169+ else throw("Unknown chain")
170+}
171+
172+let PROMO_2_END_TIMESTAMP = match chain {
173+ case _ =>
174+ if ((base58'2W' == $match0))
175+ then 1701043199999
176+ else if ((base58'2T' == $match0))
177+ then 1700496000000
178+ else throw("Unknown chain")
179+}
180+
181+let promo2MapKey = "promo2Map"
182+
183+func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr)
184+
151185
152186 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
153187
154188
155189 func claimAcresInternal (addr,acresAmount,lastClaimTime) = {
156190 let deltaTime = (lastBlock.timestamp - lastClaimTime)
157191 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
158192 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
159193 let gotUsdt = max([0, canGetUsdt])
160194 (gotUsdt * USDT2ACRES_MULTIPLIER)
161195 }
162196
163197
164198 func claimInternal (addr,acresAmount,lastClaimTime) = {
165199 let deltaTime = (lastBlock.timestamp - lastClaimTime)
166200 if ((0 > deltaTime))
167201 then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", current = ") + toString(lastBlock.timestamp)))
168202 else {
169203 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
170204 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
171205 let gotUsdt = if ((0 >= canGetUsdt))
172206 then 0
173207 else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1
174208 (gotUsdt * USDT2ACRES_MULTIPLIER)
175209 }
176210 }
177211
178212
179213 func mergeLocked (oldAmount,oldETA,newAmount,newETA) = {
180214 let now = lastBlock.timestamp
181215 let dt1 = max([0, (oldETA - now)])
182216 let dt2 = max([0, (newETA - now)])
183217 let sum = (oldAmount + newAmount)
184218 let dt = if ((sum == 0))
185219 then 0
186220 else (fraction(dt1, oldAmount, sum) + fraction(dt2, newAmount, sum))
187221 (now + dt)
188222 }
189223
190224
191225 @Callable(i)
192226 func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this))
193227 then throw("Permission denied")
194228 else if (isDefined(getBinary(acresAssetIdKey)))
195229 then throw("Already initialized")
196230 else {
197231 let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces)
198232 let issuedAmount = (MILLION6 - (nftAcres * MULT8))
199233 let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0)
200234 let assetId = calculateAssetId(issue)
201235 [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)]
202236 }
203237
204238
205239
206240 @Callable(i)
207241 func stakeAcres () = if ((i.caller != this))
208242 then throw("Temporarily disabled during promo action")
209243 else {
210244 let prologResult = prolog()
211245 if ((prologResult == prologResult))
212246 then {
213247 let address = toString(i.caller)
214248 if ((size(i.payments) != 1))
215249 then throw("exactly 1 payment must be attached")
216250 else {
217251 let pmt = i.payments[0]
218252 let amt = pmt.amount
219253 if (if (!(isDefined(pmt.assetId)))
220254 then true
221255 else (value(pmt.assetId) != acresAssetId))
222256 then throw("ACRES payments only!")
223257 else {
224258 let timeKey = keyAcresStakedTimeByUser(address)
225259 let amountKey = keyAcresStakedAmountByUser(address)
226260 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
227261 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
228262 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
229263 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
230264 $Tuple2(((((if ((claimedAcres == 0))
231265 then nil
232266 else [ScriptTransfer(i.caller, claimedAcres, acresAssetId)]) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(amountKey, (oldAcresAmount + amt))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amt))), $Tuple2(prologResult, wlgResult))
233267 }
234268 }
235269 }
236270 else throw("Strict value is not equal to itself.")
237271 }
238272
239273
240274
241275 @Callable(i)
242276 func unstakeAcres (amount) = {
243277 let prologResult = prolog()
244278 if ((prologResult == prologResult))
245279 then if ((0 >= amount))
246280 then throw("Amount should be positive")
247281 else {
248282 let address = toString(i.caller)
249283 if ((size(i.payments) != 0))
250284 then throw("No payments required")
251285 else {
252286 let timeKey = keyAcresStakedTimeByUser(address)
253287 let amountKey = keyAcresStakedAmountByUser(address)
254288 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
255289 if ((amount > oldAcresAmount))
256290 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8)))
257291 else {
258292 let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0)
259293 let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0)
260294 let now = lastBlock.timestamp
261- let unstakableAmount = (oldAcresAmount - lockedAmount)
295+ let unstakableAmount = if (isBlacklistedPromo1(address))
296+ then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT)
297+ else (oldAcresAmount - lockedAmount)
262298 if (if ((lockedETA > now))
263299 then (amount > unstakableAmount)
264300 else false)
265301 then throw(((("Only " + fixedPoint(unstakableAmount, 8)) + " ACRES can be unstaked now, wait until ") + toString(lockedETA)))
266302 else {
267303 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
268304 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
269305 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
270306 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2(prologResult, wlgResult))
271307 }
272308 }
273309 }
274310 }
275311 else throw("Strict value is not equal to itself.")
276312 }
277313
278314
279315
280316 @Callable(i)
281317 func stakeAcresLocked () = {
282318 let prologResult = prolog()
283319 if ((prologResult == prologResult))
284320 then {
285321 let address = toString(i.caller)
286322 if ((size(i.payments) != 1))
287323 then throw("exactly 1 payment must be attached")
288324 else {
289325 let pmt = i.payments[0]
290326 let amt = pmt.amount
291327 if (if (!(isDefined(pmt.assetId)))
292328 then true
293329 else (value(pmt.assetId) != acresAssetId))
294330 then throw("ACRES payments only!")
295331 else if ((MIN_ACRES_AMOUNT_DURING_PROMO > amt))
296332 then throw((("Min staked amount during promo action should be at least " + fixedPoint(MIN_ACRES_AMOUNT_DURING_PROMO, 8)) + " ACRES"))
297333 else {
298- let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
299- if ((wlgResult == wlgResult))
300- then {
301- let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
302- $Tuple2(nil, $Tuple3(prologResult, wlgResult, stakeResult))
303- }
304- else throw("Strict value is not equal to itself.")
334+ let now = lastBlock.timestamp
335+ if ((PROMO_2_START_TIMESTAMP > now))
336+ then throw("Promo2 is not started yet")
337+ else if ((now > PROMO_2_END_TIMESTAMP))
338+ then throw("Promo2 is already finished")
339+ else {
340+ let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
341+ if ((wlgResult == wlgResult))
342+ then {
343+ let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
344+ let promo2Map = valueOrElse(getString(promo2MapKey), "")
345+ let newMap2 = if (contains(promo2Map, address))
346+ then {
347+ let parts = split_51C(promo2Map, address)
348+ let oldAmount = parseIntValue(take(drop(parts[1], 1), 14))
349+ ((((parts[0] + address) + ":") + padL((oldAmount + amt), 14)) + drop(parts[1], 15))
350+ }
351+ else {
352+ let finalPart = ((address + ":") + padL(amt, 14))
353+ if ((promo2Map == ""))
354+ then finalPart
355+ else ((promo2Map + "_") + finalPart)
356+ }
357+ $Tuple2([StringEntry(promo2MapKey, newMap2)], $Tuple3(prologResult, wlgResult, stakeResult))
358+ }
359+ else throw("Strict value is not equal to itself.")
360+ }
305361 }
306362 }
307363 }
308364 else throw("Strict value is not equal to itself.")
309365 }
310366
311367
312368
313369 @Callable(i)
314370 func buyAcres () = {
315371 let prologResult = prolog()
316372 if ((prologResult == prologResult))
317373 then {
318374 let address = toString(i.caller)
319375 if ((size(i.payments) != 1))
320376 then throw("exactly 1 payment must be attached")
321377 else {
322378 let pmt = i.payments[0]
323379 let amt = pmt.amount
324380 if (if (!(isDefined(pmt.assetId)))
325381 then true
326382 else (value(pmt.assetId) != usdtAssetId))
327383 then throw("USDT payments only!")
328384 else if ((MULT6 > amt))
329385 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
330386 else {
331387 let acresAmount = (amt * USDT2ACRES_MULTIPLIER)
332388 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [address, fraction(xpNewSLand, acresAmount, (25 * MULT8))], nil))
333389 $Tuple2([ScriptTransfer(economyContract, amt, usdtAssetId), ScriptTransfer(i.caller, acresAmount, acresAssetId)], $Tuple2(prologResult, accStatsResult))
334390 }
335391 }
336392 }
337393 else throw("Strict value is not equal to itself.")
338394 }
339395
340396
341397
342398 @Callable(i)
343399 func sendAcres (addr,amount) = if ((i.caller != economyContract))
344400 then throw("Permission denied")
345401 else $Tuple2([ScriptTransfer(addressFromStringValue(addr), amount, acresAssetId)], amount)
346402
347403
348404
349405 @Callable(i)
350406 func sendLockedAcres (addr,amount,lockDays) = if (if ((i.caller != this))
351407 then (i.caller != restContract)
352408 else false)
353409 then throw("Permission denied")
354410 else {
355411 let now = lastBlock.timestamp
356412 let timeKey = keyAcresStakedTimeByUser(addr)
357413 let amountKey = keyAcresStakedAmountByUser(addr)
358414 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
359415 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
360416 let oldTime = valueOrElse(getInteger(timeKey), now)
361417 let etaKey = keyAcresLockedEtaByUser(addr)
362418 let lockedAmountKey = keyAcresLockedAmountByUser(addr)
363419 let oldLockedAmount = valueOrElse(getInteger(lockedAmountKey), 0)
364420 let oldLockedETA = valueOrElse(getInteger(etaKey), 0)
365421 let mergedETA = mergeLocked(oldLockedAmount, oldLockedETA, amount, (now + (lockDays * DAYMILLIS)))
366422 $Tuple2([IntegerEntry(timeKey, oldTime), IntegerEntry(amountKey, (oldAcresAmount + amount)), IntegerEntry(acresStakedTotalKey, (oldTotal + amount)), IntegerEntry(etaKey, mergedETA), IntegerEntry(lockedAmountKey, (oldLockedAmount + amount))], amount)
367423 }
368424
369425
370426
371427 @Callable(i)
372428 func burnAcres (amount) = if ((i.caller != stakingContract))
373429 then throw("Permission denied")
374430 else {
375431 let amountLeft = (valueOrElse(getInteger(acresIssuedAmountKey), 0) - amount)
376432 if ((0 > amountLeft))
377433 then throw("Attempt to burn more ACRES, than exists")
378434 else $Tuple2([Burn(acresAssetId, amount), IntegerEntry(acresIssuedAmountKey, amountLeft)], amount)
379435 }
380436
381437
382438
383439 @Callable(i)
384440 func claimAcres () = {
385441 let prologResult = prolog()
386442 if ((prologResult == prologResult))
387443 then {
388444 let address = toString(i.caller)
389445 if ((size(i.payments) != 0))
390446 then throw("No payments required")
391447 else {
392448 let timeKey = keyAcresStakedTimeByUser(address)
393449 let amountKey = keyAcresStakedAmountByUser(address)
394450 let acresAmount = valueOrElse(getInteger(amountKey), 0)
395451 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
396452 let claimedAcres = claimInternal(address, acresAmount, valueOrElse(getInteger(timeKey), 0))
397453 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), ScriptTransfer(i.caller, claimedAcres, acresAssetId)], $Tuple2(prologResult, wlgResult))
398454 }
399455 }
400456 else throw("Strict value is not equal to itself.")
401457 }
402458
403459
404460
405461 @Callable(i)
406462 func claimAcresREADONLY (address) = {
407463 let timeKey = keyAcresStakedTimeByUser(address)
408464 let amountKey = keyAcresStakedAmountByUser(address)
409465 let acresAmount = valueOrElse(getInteger(amountKey), 0)
410466 let lastTime = valueOrElse(getInteger(timeKey), 0)
411467 let claimedAcres = claimAcresInternal(address, acresAmount, lastTime)
412468 $Tuple2(nil, [claimedAcres, lastTime])
413469 }
414470
415471

github/deemru/w8io/026f985 
65.28 ms