tx · 5xymvw3vMy4b4m88chQRYRMMTs3NDFw5365ta7q3YGqm

3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh:  -0.03600000 Waves

2024.12.13 02:41 [3412049] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves

{ "type": 13, "id": "5xymvw3vMy4b4m88chQRYRMMTs3NDFw5365ta7q3YGqm", "fee": 3600000, "feeAssetId": null, "timestamp": 1734046934375, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "4ShdNCvYLybbHGzbo7Wr7iyfsToU8wkw7TedNJmKT75UzDiawSWV4Rz97dSoQ3gPcixme4XBFvUDrHepwsNqSuUG" ], "script": "base64:BgJLCAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIARIDCgEIEgASAwoBCBIAEgASABIAkQEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDE0AICA6YOx3hYACkRBWV9NSUxMSVMAgLiZKQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoAE09ORV9QRVJDRU5UX0RJVklTT1IAZAAMUkFORE9NX0RFTEFZAAIAFE5GVF9DSEVTVF9QUklDRV9VU0RUAMCWsQIABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABABdEQUlMWV9QUk9NT19TVEFSVF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACA75ECAwkAAAIBAVQFByRtYXRjaDAAwKbQAQkAAgECDVVua25vd24gY2hhaW4AFURBSUxZX1BST01PX0VORF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACg25MCAwkAAAIBAVQFByRtY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RyYXdzAl80AAAAwFtU2w==", "height": 3412049, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AqoH5B9A5TnViM8xwAc94XBfkNzzg56WzQP7NuABDaA5 Next: GF9ZrVqtxwtdcPSkGuZrsZqMwPgyMXE3CcAW8SQHdkx2 Diff:
OldNewDifferences
2323
2424 let chain = take(drop(this.bytes, 1), 1)
2525
26+let DAILY_PROMO_START_BLOCK = match chain {
27+ case _ =>
28+ if ((base58'2W' == $match0))
29+ then 4487040
30+ else if ((base58'2T' == $match0))
31+ then 3412800
32+ else throw("Unknown chain")
33+}
34+
35+let DAILY_PROMO_END_BLOCK = match chain {
36+ case _ =>
37+ if ((base58'2W' == $match0))
38+ then 4517280
39+ else if ((base58'2T' == $match0))
40+ then 3443040
41+ else throw("Unknown chain")
42+}
43+
44+let DAY_BLOCKS = match chain {
45+ case _ =>
46+ if ((base58'2W' == $match0))
47+ then 1440
48+ else if ((base58'2T' == $match0))
49+ then 60
50+ else throw("Unknown chain")
51+}
52+
2653 let WEEK_BLOCKS = match chain {
2754 case _ =>
2855 if ((base58'2W' == $match0))
2956 then 10080
3057 else if ((base58'2T' == $match0))
3158 then 180
59+ else throw("Unknown chain")
60+}
61+
62+let VRF_OFFSET = match chain {
63+ case _ =>
64+ if ((base58'2W' == $match0))
65+ then 0
66+ else if ((base58'2T' == $match0))
67+ then 1146000
3268 else throw("Unknown chain")
3369 }
3470
4783 then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
4884 else if ((base58'2T' == $match0))
4985 then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
86+ else throw("Unknown chain")
87+}
88+
89+let defaultRestAddressStr = match chain {
90+ case _ =>
91+ if ((base58'2W' == $match0))
92+ then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
93+ else if ((base58'2T' == $match0))
94+ then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
5095 else throw("Unknown chain")
5196 }
5297
85130 func keyRest2Address () = "%s__rest2Addr"
86131
87132
133+func keyRestAddress () = "%s__restAddr"
134+
135+
136+let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
137+
88138 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
89139
90140
91141 func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
92142
143+
144+let IdxCfgStakingDapp = 1
145+
146+let restCfg = readRestCfgOrFail(restContract)
147+
148+let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
93149
94150 let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
95151
141197
142198 func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr)
143199
200+
201+func keyUserPromoAcres (address) = ("promoAcres_" + address)
202+
203+
204+func keyUserPromoTickets (address) = ("promoTickets_" + address)
205+
206+
207+let keyTotalPromoTickets = "totalPromoTickets"
208+
209+let keyPromoMap = "promoMap"
144210
145211 func asInt (v) = match v {
146212 case n: Int =>
196262 let randomHash = sha256_16Kb((salt + entropy))
197263 (toInt(randomHash) % maxValue)
198264 }
265+
266+
267+func padL (val,len) = {
268+ let valS = toString(val)
269+ let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
270+ (zeroes + valS)
271+ }
199272
200273
201274 let M6_ = 1000000
528601 }
529602
530603
604+let promoNumPrizes = 3
605+
606+let promoAwardPerRound = [50000000, 25000000, 25000000]
607+
608+func stakeAcresFor (address,amt,shouldCleanPromo) = {
609+ let $t01122511301 = stakeUnstakeAcresInternal(amt, address, 0)
610+ let actions = $t01122511301._1
611+ let wlgClaimedAmount = $t01122511301._2
612+ let promoActions = if (if ((height >= DAILY_PROMO_START_BLOCK))
613+ then (DAILY_PROMO_END_BLOCK > height)
614+ else false)
615+ then {
616+ let promoAcresKey = keyUserPromoAcres(address)
617+ let promoAcres = ((if (shouldCleanPromo)
618+ then 0
619+ else valueOrElse(getInteger(promoAcresKey), 0)) + amt)
620+ let tickets = (promoAcres / MULT8)
621+ let ticketsKey = keyUserPromoTickets(address)
622+ let deltaTickets = (tickets - valueOrElse(getInteger(ticketsKey), 0))
623+ let totalTickets = (valueOrElse(getInteger(keyTotalPromoTickets), 0) + deltaTickets)
624+ if (if (shouldCleanPromo)
625+ then true
626+ else (deltaTickets > 0))
627+ then {
628+ let promoMap = valueOrElse(getString(keyPromoMap), "")
629+ let userRecord = ((address + ":") + padL(tickets, 3))
630+ let newMap = if (contains(promoMap, address))
631+ then {
632+ let mapParts = split_51C(promoMap, address)
633+ if ((mapParts[0] == ""))
634+ then {
635+ let r = drop(mapParts[1], 4)
636+ if ((r == ""))
637+ then if ((tickets == 0))
638+ then ""
639+ else userRecord
640+ else if ((tickets == 0))
641+ then drop(r, 1)
642+ else (userRecord + r)
643+ }
644+ else {
645+ let r = drop(mapParts[1], 4)
646+ if ((r == ""))
647+ then if ((tickets == 0))
648+ then dropRight(mapParts[0], 1)
649+ else (mapParts[0] + userRecord)
650+ else if ((tickets == 0))
651+ then (mapParts[0] + drop(r, 1))
652+ else ((mapParts[0] + userRecord) + r)
653+ }
654+ }
655+ else if ((tickets == 0))
656+ then promoMap
657+ else if ((promoMap == ""))
658+ then userRecord
659+ else ((promoMap + "_") + userRecord)
660+[IntegerEntry(promoAcresKey, promoAcres), IntegerEntry(ticketsKey, tickets), IntegerEntry(keyTotalPromoTickets, totalTickets), StringEntry(keyPromoMap, newMap)]
661+ }
662+ else [IntegerEntry(promoAcresKey, promoAcres)]
663+ }
664+ else nil
665+ $Tuple2((actions ++ promoActions), wlgClaimedAmount)
666+ }
667+
668+
531669 @Callable(i)
532670 func saveLastTx () = if (!(containsElement([wlgContract, marketContract], i.caller)))
533671 then throw("Access denied")
555693 @Callable(i)
556694 func unstakeAcres (amount) = {
557695 let prologActions = prolog(i)
558- if ((0 >= amount))
559- then throw("Amount should be positive")
560- else {
561- let address = toString(i.caller)
562- if ((size(i.payments) != 0))
563- then throw("No payments required")
564- else {
565- let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay)
566- if ((arbReleaseTime > lastBlock.timestamp))
567- then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime)))
568- else {
569- let $t01234312423 = stakeUnstakeAcresInternal(-(amount), address, 0)
570- let actions = $t01234312423._1
571- let wlgClaimedAmount = $t01234312423._2
572- $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount)
573- }
574- }
575- }
696+ if (if ((height >= DAILY_PROMO_START_BLOCK))
697+ then (DAILY_PROMO_END_BLOCK > height)
698+ else false)
699+ then throw("You can't unstake during Xmas promo period")
700+ else if ((0 >= amount))
701+ then throw("Amount should be positive")
702+ else {
703+ let address = toString(i.caller)
704+ if ((size(i.payments) != 0))
705+ then throw("No payments required")
706+ else {
707+ let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay)
708+ if ((arbReleaseTime > lastBlock.timestamp))
709+ then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime)))
710+ else {
711+ let $t01530415384 = stakeUnstakeAcresInternal(-(amount), address, 0)
712+ let actions = $t01530415384._1
713+ let wlgClaimedAmount = $t01530415384._2
714+ $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount)
715+ }
716+ }
717+ }
576718 }
577719
578720
591733 else (value(pmt.assetId) != acresAssetId))
592734 then throw("ACRES payments only!")
593735 else {
594- let $t01287412950 = stakeUnstakeAcresInternal(amt, address, 0)
595- let actions = $t01287412950._1
596- let wlgClaimedAmount = $t01287412950._2
597- $Tuple2((actions ++ prologActions), wlgClaimedAmount)
736+ let $t01583515908 = stakeAcresFor(address, amt, false)
737+ let stakeActions = $t01583515908._1
738+ let wlgClaimedAmount = $t01583515908._2
739+ $Tuple2((stakeActions ++ prologActions), wlgClaimedAmount)
598740 }
599741 }
600742 }
657799 then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES"))
658800 else {
659801 let addr = toString(i.caller)
660- let $t01480714855 = getSwapLimitAcres()
661- let limitAction = $t01480714855._1
662- let maxUsdt = $t01480714855._2
802+ let $t01777017818 = getSwapLimitAcres()
803+ let limitAction = $t01777017818._1
804+ let maxUsdt = $t01777017818._2
663805 let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER)
664806 if ((acresAmount > maxAcres))
665807 then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES"))
675817
676818 @Callable(i)
677819 func sellAcresREADONLY (address,acresAmount) = {
678- let $t01535115399 = getSwapLimitAcres()
679- let limitAction = $t01535115399._1
680- let maxUsdt = $t01535115399._2
820+ let $t01831418362 = getSwapLimitAcres()
821+ let limitAction = $t01831418362._1
822+ let maxUsdt = $t01831418362._2
681823 let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2)
682824 $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0])
683825 }
738880 let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil)
739881 if ((req == req))
740882 then {
741- let $t01791318051 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller)
742- let nftActions = $t01791318051._1
743- let nftAssetId = $t01791318051._2
883+ let $t02087621014 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller)
884+ let nftActions = $t02087621014._1
885+ let nftAssetId = $t02087621014._2
744886 $Tuple6(rr._1, rr._2, rr._3, rr._4, rr._5, nftActions)
745887 }
746888 else throw("Strict value is not equal to itself.")
811953 let userFpKey = keyFarmingPowerByUser(address)
812954 let oldFp = valueOrElse(getInteger(userFpKey), 0)
813955 let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0)
814- let $t02032220409 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus)
815- let newBonusedFp = $t02032220409._1
816- let ignored = $t02032220409._2
956+ let $t02328523372 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus)
957+ let newBonusedFp = $t02328523372._1
958+ let ignored = $t02328523372._2
817959 let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0)
818960 let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp)
819961 $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp])
855997 let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_"))
856998 if ((asset.issuer == this))
857999 then {
858- let $t02181822008 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS)
859- let actions = $t02181822008._1
860- let wlgClaimedAmount = $t02181822008._2
1000+ let $t02478124971 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS)
1001+ let actions = $t02478124971._1
1002+ let wlgClaimedAmount = $t02478124971._2
8611003 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
8621004 }
8631005 else if ((isArkimalIssued(asset) == ""))
8641006 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
8651007 else {
866- let $t02218922340 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS)
867- let actions = $t02218922340._1
868- let wlgClaimedAmount = $t02218922340._2
1008+ let $t02515225303 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS)
1009+ let actions = $t02515225303._1
1010+ let wlgClaimedAmount = $t02515225303._2
8691011 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
8701012 }
8711013 }
9021044 then {
9031045 let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0)
9041046 let bonusVal = (bonusByDescription(value(asset.description)) * 10000)
905- let $t02350523584 = stakeUnstakeAcresInternal(0, addr, -(bonusVal))
906- let actions = $t02350523584._1
907- let wlgClaimedAmount = $t02350523584._2
1047+ let $t02646826547 = stakeUnstakeAcresInternal(0, addr, -(bonusVal))
1048+ let actions = $t02646826547._1
1049+ let wlgClaimedAmount = $t02646826547._2
9081050 $Tuple2(((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ IntegerEntry(keyWlNftTotalStaked, max([0, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) - 1)]))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount)
9091051 }
9101052 else {
9131055 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
9141056 else {
9151057 let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0)
916- let $t02424424328 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS))
917- let actions = $t02424424328._1
918- let wlgClaimedAmount = $t02424424328._2
1058+ let $t02720727291 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS))
1059+ let actions = $t02720727291._1
1060+ let wlgClaimedAmount = $t02720727291._2
9191061 $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount)
9201062 }
9211063 }
9571099 }
9581100 }
9591101
960- let $t02571725933 = {
1102+ let $t02868028896 = {
9611103 let $l = i.payments
9621104 let $s = size($l)
9631105 let $acc0 = $Tuple4(0, 0, nil, -1)
9711113
9721114 $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)
9731115 }
974- let wlgFee = $t02571725933._1
975- let totalBonus = $t02571725933._2
976- let burnActions = $t02571725933._3
977- let rarityIdx = $t02571725933._4
1116+ let wlgFee = $t02868028896._1
1117+ let totalBonus = $t02868028896._2
1118+ let burnActions = $t02868028896._3
1119+ let rarityIdx = $t02868028896._4
9781120 let newRarityIdx = if ((rarityIdx == idxRarityC))
9791121 then if ((rarityThresholds[idxThresholdC] > totalBonus))
9801122 then idxRarityC
10061148 let changeActions = if ((change > 0))
10071149 then [ScriptTransfer(i.caller, change, wlgAssetId)]
10081150 else nil
1009- let $t02747027631 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1010- let issueNftActions = $t02747027631._1
1011- let nftAssetId = $t02747027631._2
1151+ let $t03043330594 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1152+ let issueNftActions = $t03043330594._1
1153+ let nftAssetId = $t03043330594._2
10121154 let burned = size(burnActions)
10131155 let burnCounterActions = if ((burned == 0))
10141156 then nil
10521194 let entropy = value(value(blockInfoByHeight(finishBlock)).vrf)
10531195 let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1])
10541196 let rand = getRandomNumber(100, salt, entropy)
1055- let $t02965029922 = if ((84 > rand))
1197+ let $t03261332885 = if ((84 > rand))
10561198 then $Tuple2(1, idxRarityC)
10571199 else if ((98 > rand))
10581200 then $Tuple2(5, idxRarityU)
10591201 else $Tuple2(10, idxRarityL)
1060- let bonus = $t02965029922._1
1061- let rarityIdx = $t02965029922._2
1062- let $t02992530075 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1063- let issueNftActions = $t02992530075._1
1064- let nftAssetId = $t02992530075._2
1202+ let bonus = $t03261332885._1
1203+ let rarityIdx = $t03261332885._2
1204+ let $t03288833038 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1205+ let issueNftActions = $t03288833038._1
1206+ let nftAssetId = $t03288833038._2
10651207 $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain))
10661208 }
10671209 }
10851227 }
10861228
10871229
1230+
1231+@Callable(i)
1232+func drawDaylyPromo () = if ((i.caller != this))
1233+ then throw("Permission denied")
1234+ else {
1235+ let today = (height % DAY_BLOCKS)
1236+ let maxValue = valueOrElse(getInteger(keyTotalPromoTickets), 0)
1237+ if ((maxValue == 0))
1238+ then throw("No tickets to draw")
1239+ else {
1240+ let b = (today * DAY_BLOCKS)
1241+ let h = if ((b > VRF_OFFSET))
1242+ then b
1243+ else (b + VRF_OFFSET)
1244+ let entropy = value(value(blockInfoByHeight(h)).vrf)
1245+ let promoMap = valueOrElse(getString(keyPromoMap), "")
1246+ if ((promoMap == ""))
1247+ then throw("No participants")
1248+ else {
1249+ let promoList = split_51C(promoMap, "_")
1250+ func singleDraw (ac,j) = if ((j >= promoNumPrizes))
1251+ then ac
1252+ else {
1253+ let rand = getRandomNumber(ac._1, ac._2, entropy)
1254+ let promo4List = if ((ac._3 == ""))
1255+ then nil
1256+ else split_51C(ac._3, "_")
1257+ func countTickets (acc,el) = {
1258+ let parts = split(el, ":")
1259+ let addr = parts[0]
1260+ let tickets = parseIntValue(parts[1])
1261+ let newTotal = (acc._1 + tickets)
1262+ if (if ((acc._3 == ""))
1263+ then (newTotal > rand)
1264+ else false)
1265+ then $Tuple3(newTotal, tickets, addr)
1266+ else $Tuple3(newTotal, acc._2, acc._3)
1267+ }
1268+
1269+ let r = {
1270+ let $l = promo4List
1271+ let $s = size($l)
1272+ let $acc0 = $Tuple3(0, 0, "")
1273+ func $f0_1 ($a,$i) = if (($i >= $s))
1274+ then $a
1275+ else countTickets($a, $l[$i])
1276+
1277+ func $f0_2 ($a,$i) = if (($i >= $s))
1278+ then $a
1279+ else throw("List size exceeds 20")
1280+
1281+ $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
1282+ }
1283+ let winner = r._3
1284+ if ((winner == ""))
1285+ then ac
1286+ else {
1287+ let mapParts = split_51C(ac._3, winner)
1288+ let newMap = if ((mapParts[0] == ""))
1289+ then drop(mapParts[1], 5)
1290+ else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4))
1291+ let $t03563635787 = stakeAcresFor(winner, promoAwardPerRound[j], true)
1292+ let stakeActions = $t03563635787._1
1293+ let ignoredWlgClaimedAmount = $t03563635787._2
1294+ let newSalt = fromBase58String(valueOrElse(getString(stakingContract, keyCurWeekTxIdByUser(winner)), "DEFAULT"))
1295+ $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ stakeActions))
1296+ }
1297+ }
1298+
1299+ let draws = {
1300+ let $l = [0, 1, 2]
1301+ let $s = size($l)
1302+ let $acc0 = $Tuple4(maxValue, i.transactionId, promoMap, nil)
1303+ func $f0_1 ($a,$i) = if (($i >= $s))
1304+ then $a
1305+ else singleDraw($a, $l[$i])
1306+
1307+ func $f0_2 ($a,$i) = if (($i >= $s))
1308+ then $a
1309+ else throw("List size exceeds 3")
1310+
1311+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
1312+ }
1313+ $Tuple2(([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1)] ++ draws._4), 0)
1314+ }
1315+ }
1316+ }
1317+
1318+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT7 = 10000000
99
1010 let MULT8 = 100000000
1111
1212 let MULT14 = 100000000000000
1313
1414 let DAY_MILLIS = 86400000
1515
1616 let USDT2ACRES_MULTIPLIER = 10
1717
1818 let ONE_PERCENT_DIVISOR = 100
1919
2020 let RANDOM_DELAY = 2
2121
2222 let NFT_CHEST_PRICE_USDT = 5000000
2323
2424 let chain = take(drop(this.bytes, 1), 1)
2525
26+let DAILY_PROMO_START_BLOCK = match chain {
27+ case _ =>
28+ if ((base58'2W' == $match0))
29+ then 4487040
30+ else if ((base58'2T' == $match0))
31+ then 3412800
32+ else throw("Unknown chain")
33+}
34+
35+let DAILY_PROMO_END_BLOCK = match chain {
36+ case _ =>
37+ if ((base58'2W' == $match0))
38+ then 4517280
39+ else if ((base58'2T' == $match0))
40+ then 3443040
41+ else throw("Unknown chain")
42+}
43+
44+let DAY_BLOCKS = match chain {
45+ case _ =>
46+ if ((base58'2W' == $match0))
47+ then 1440
48+ else if ((base58'2T' == $match0))
49+ then 60
50+ else throw("Unknown chain")
51+}
52+
2653 let WEEK_BLOCKS = match chain {
2754 case _ =>
2855 if ((base58'2W' == $match0))
2956 then 10080
3057 else if ((base58'2T' == $match0))
3158 then 180
59+ else throw("Unknown chain")
60+}
61+
62+let VRF_OFFSET = match chain {
63+ case _ =>
64+ if ((base58'2W' == $match0))
65+ then 0
66+ else if ((base58'2T' == $match0))
67+ then 1146000
3268 else throw("Unknown chain")
3369 }
3470
3571 let usdtAssetId = match chain {
3672 case _ =>
3773 if ((base58'2W' == $match0))
3874 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
3975 else if ((base58'2T' == $match0))
4076 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
4177 else throw("Unknown chain")
4278 }
4379
4480 let defaultRest2AddressStr = match chain {
4581 case _ =>
4682 if ((base58'2W' == $match0))
4783 then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8"
4884 else if ((base58'2T' == $match0))
4985 then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv"
86+ else throw("Unknown chain")
87+}
88+
89+let defaultRestAddressStr = match chain {
90+ case _ =>
91+ if ((base58'2W' == $match0))
92+ then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
93+ else if ((base58'2T' == $match0))
94+ then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
5095 else throw("Unknown chain")
5196 }
5297
5398 let arbitrageDelay = match chain {
5499 case _ =>
55100 if ((base58'2W' == $match0))
56101 then DAY_MILLIS
57102 else if ((base58'2T' == $match0))
58103 then 60000
59104 else throw("Unknown chain")
60105 }
61106
62107 let oldStakingContractStr = match chain {
63108 case _ =>
64109 if ((base58'2W' == $match0))
65110 then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1"
66111 else if ((base58'2T' == $match0))
67112 then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm"
68113 else throw("Unknown chain")
69114 }
70115
71116 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
72117
73118
74119 let IdxCfgAcres2Dapp = 1
75120
76121 let IdxCfgWlgDapp = 2
77122
78123 let IdxCfgInvestFundDapp = 5
79124
80125 let IdxCfgMarketDapp = 6
81126
82127 func keyRestCfg () = "%s__restConfig"
83128
84129
85130 func keyRest2Address () = "%s__rest2Addr"
86131
87132
133+func keyRestAddress () = "%s__restAddr"
134+
135+
136+let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
137+
88138 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
89139
90140
91141 func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
92142
143+
144+let IdxCfgStakingDapp = 1
145+
146+let restCfg = readRestCfgOrFail(restContract)
147+
148+let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
93149
94150 let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr))
95151
96152 let rest2Cfg = readRestCfgOrFail(rest2Contract)
97153
98154 let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp)
99155
100156 let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp)
101157
102158 let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp)
103159
104160 let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp)
105161
106162 let oldAcresContractKey = "oldAcresContract"
107163
108164 func keyBlocked () = "contractsBlocked"
109165
110166
111167 func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr)
112168
113169
114170 func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr)
115171
116172
117173 func keyCommit (address) = ("finishBlockFor_" + address)
118174
119175
120176 let wlgAssetIdKey = "wlg_assetId"
121177
122178 let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet")
123179
124180 let acresIssuedAmountKey = "acresIssuedAmount"
125181
126182 let acresAssetIdKey = "acresAssetId"
127183
128184 let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet")
129185
130186 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
131187
132188
133189 func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr)
134190
135191
136192 func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr)
137193
138194
139195 func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr)
140196
141197
142198 func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr)
143199
200+
201+func keyUserPromoAcres (address) = ("promoAcres_" + address)
202+
203+
204+func keyUserPromoTickets (address) = ("promoTickets_" + address)
205+
206+
207+let keyTotalPromoTickets = "totalPromoTickets"
208+
209+let keyPromoMap = "promoMap"
144210
145211 func asInt (v) = match v {
146212 case n: Int =>
147213 n
148214 case _ =>
149215 throw("fail to cast into Int")
150216 }
151217
152218
153219 func asTuple5Ints (val) = match val {
154220 case t: (Int, Int, Int, Int, Int) =>
155221 t
156222 case _ =>
157223 throw("fail to cast into (Int, Int, Int, Int, Int)")
158224 }
159225
160226
161227 func asTuple4Ints (val) = match val {
162228 case t: (Int, Int, Int, Int) =>
163229 t
164230 case _ =>
165231 throw("fail to cast into (Int, Int, Int, Int)")
166232 }
167233
168234
169235 func asTuple3Ints (val) = match val {
170236 case t: (Int, Int, Int) =>
171237 t
172238 case _ =>
173239 throw("fail to cast into (Int, Int, Int)")
174240 }
175241
176242
177243 func asTuple2Ints (val) = match val {
178244 case t: (Int, Int) =>
179245 t
180246 case _ =>
181247 throw("fail to cast into (Int, Int)")
182248 }
183249
184250
185251 func fixedPoint (val,decimals) = {
186252 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
187253 let lowPart = toString((val % tenPow))
188254 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
189255 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
190256 }
191257
192258
193259 func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue))
194260 then throw("maxValue should be > 0")
195261 else {
196262 let randomHash = sha256_16Kb((salt + entropy))
197263 (toInt(randomHash) % maxValue)
198264 }
265+
266+
267+func padL (val,len) = {
268+ let valS = toString(val)
269+ let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
270+ (zeroes + valS)
271+ }
199272
200273
201274 let M6_ = 1000000
202275
203276 let M8_ = 100000000
204277
205278 let wlgIssuedAmtKey = "wlg_issuedAmount"
206279
207280 let zbIssuedAmtKey = "zbill_issuedAmount"
208281
209282 func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr)
210283
211284
212285 func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr)
213286
214287
215288 let acresStakdTotalKey = "acresStakedAmountTotal"
216289
217290 let totalFarmingPowerKey = "totalFarmingPower"
218291
219292 let MAX_WL_NFTS = 3
220293
221294 let MAX_ARK_NFTS = 1
222295
223296 let ARK_NFT_BONUS = 5000
224297
225298 let MAX_NFTS_STAKED_BY_USER = 4
226299
227300 let keyNftTotalIssued = "nftTotalIssued"
228301
229302 let keyNftTotalBurned = "nftTotalBurned"
230303
231304 let keyWlNftTotalStaked = "WlNftTotalStaked"
232305
233306 let keyArkNftTotalStaked = "ArkNftTotalStaked"
234307
235308 func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId)
236309
237310
238311 func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr)
239312
240313
241314 func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr)
242315
243316
244317 func keyUserFullBonus (addr) = ("userFullBonus_" + addr)
245318
246319
247320 let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000]
248321
249322 func getLevelByAcres (acres) = {
250323 let acr = ((acres + 99999999) / M8_)
251324 func checker (acc,item) = if ((item >= acr))
252325 then acc
253326 else (acc + 1)
254327
255328 let $l = levelAcres
256329 let $s = size($l)
257330 let $acc0 = 0
258331 func $f0_1 ($a,$i) = if (($i >= $s))
259332 then $a
260333 else checker($a, $l[$i])
261334
262335 func $f0_2 ($a,$i) = if (($i >= $s))
263336 then $a
264337 else throw("List size exceeds 10")
265338
266339 $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)
267340 }
268341
269342
270343 func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4))
271344
272345
273346 func getFarmingPowerByAcresAndBonus (acres,bonus6) = {
274347 let notBonused = getFarmingPowerByAcres(acres)
275348 $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused)
276349 }
277350
278351
279352 let teamAddrKey = "teamAddr"
280353
281354 func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr)
282355
283356
284357 let OLD_STAKING_DEADL = 1733346000000
285358
286359 let MAX_LANDS_TO_CONVERT = 14
287360
288361 let keyLastAcresSellTime = "lastAcresSellTime"
289362
290363 let keyLastLimitLeft = "lastLimitLeft"
291364
292365 let names = ["Gold shovel", "Pickaxe"]
293366
294367 let descriptions = ["Reward for early birds", "Increases FarmPower"]
295368
296369 let idxDescrShovel = 0
297370
298371 let idxDescrPickaxe = 1
299372
300373 let rarityThresholds = [5, 10, 20]
301374
302375 let idxThresholdC = 0
303376
304377 let idxThresholdU = 1
305378
306379 let idxThresholdL = 2
307380
308381 let namez = ["SHOVEL", "PICKAXE"]
309382
310383 let idxNameShovel = 0
311384
312385 let idxNamePickaxe = 1
313386
314387 let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP"]
315388
316389 let idxKeyC = 0
317390
318391 let idxKeyP = 4
319392
320393 let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"]
321394
322395 let idxRarityC = 0
323396
324397 let idxRarityU = 1
325398
326399 let idxRarityL = 2
327400
328401 let idxRarityE = 3
329402
330403 let idxRarityP = 4
331404
332405 let collectionz = ["Digging tools"]
333406
334407 let idxCollDig = 0
335408
336409 let bonusTypez = ["FarmPower"]
337410
338411 let idxBonusTypeFp = 0
339412
340413 func prolog (i) = if (if ((i.originCaller != rest2Contract))
341414 then valueOrElse(getBoolean(keyBlocked()), false)
342415 else false)
343416 then throw("Contracts are under maintenance")
344417 else {
345418 let addr = toString(i.originCaller)
346419 let week = (height / WEEK_BLOCKS)
347420 let lastWeekKey = keyLastWeekTxIdByUser(addr)
348421 let lastWeekTxIdByUser = getString(lastWeekKey)
349422 let txId = toBase58String(i.transactionId)
350423 let wtx = ((toString(week) + "_") + txId)
351424 let curWeekKey = keyCurWeekTxIdByUser(addr)
352425 if (isDefined(lastWeekTxIdByUser))
353426 then {
354427 let lastWeekTx = split(value(lastWeekTxIdByUser), "_")
355428 if ((lastWeekTx[0] == toString(week)))
356429 then [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)]
357430 else if ((lastWeekTx[0] == toString((week - 1))))
358431 then [StringEntry(curWeekKey, wtx)]
359432 else {
360433 let curWeekTxIdByUser = getStringValue(curWeekKey)
361434 let curWeekTx = split(curWeekTxIdByUser, "_")
362435 if ((curWeekTx[0] == toString(week)))
363436 then [StringEntry(curWeekKey, wtx)]
364437 else [StringEntry(lastWeekKey, curWeekTxIdByUser), StringEntry(curWeekKey, wtx)]
365438 }
366439 }
367440 else [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)]
368441 }
369442
370443
371444 func createNftDescrCustom (contKey,nftSerial,collection,name,descr,rarity,bonus,bonusType) = (((((((((((((((((((((((("{\"url\": \"https://waveslands.com\", " + "\"contentKey\": \"") + contKey) + "\", ") + "\"number\": ") + toString(nftSerial)) + ", ") + "\"collection\": \"") + collection) + "\", ") + "\"name\": \"") + name) + "\", ") + "\"description\": \"") + descr) + "\", ") + "\"rare\": \"") + rarity) + "\", ") + "\"bonus\": ") + toString(bonus)) + ", ") + "\"bonusType\": \"") + bonusType) + "\"}")
372445
373446
374447 func issueNftCustom (nameIdx,contKeyIdx,collIdx,rarityIdx,bonusPerc,descrIdx,bonusTypeIdx,addr) = {
375448 let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0)
376449 let rarity = rarityNames[rarityIdx]
377450 let name = (((namez[nameIdx] + "-") + take(rarity, 1)) + toString(bonusPerc))
378451 let issue = Issue(name, createNftDescrCustom(contentKeyz[contKeyIdx], nftSerial, collectionz[collIdx], names[nameIdx], descriptions[descrIdx], rarityNames[rarityIdx], bonusPerc, bonusTypez[bonusTypeIdx]), 1, 0, false)
379452 let nftAssetId = calculateAssetId(issue)
380453 $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId)
381454 }
382455
383456
384457 func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\"")))
385458 then throw(("NFT is not supported: " + descr))
386459 else {
387460 let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0]
388461 parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1)))
389462 }
390463
391464
392465 func rarityIdxByDescriprion (descr) = if (!(contains(descr, "\"rare\"")))
393466 then throw(("NFT is not supported: " + descr))
394467 else {
395468 let rarityStr = split_4C(split_4C(split_4C(descr, "\"rare\"")[1], ",")[0], "\"")[1]
396469 value(indexOf(rarityNames, rarityStr))
397470 }
398471
399472
400473 func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0))
401474 then (bonusDelta == 0)
402475 else false)
403476 then throw("Nothing to do")
404477 else {
405478 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
406479 if ((wlgResult == wlgResult))
407480 then {
408481 let now = lastBlock.timestamp
409482 let timeKey = keyAcresStakedTimeByUser(address)
410483 let amountKey = keyAcresStakedAmtByUser(address)
411484 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
412485 if (if ((0 > amt))
413486 then (0 > (oldAcresAmount + amt))
414487 else false)
415488 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8)))
416489 else {
417490 let newAcresAmount = (oldAcresAmount + amt)
418491 let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0)
419492 let userFpKey = keyFarmingPowerByUser(address)
420493 let oldFp = valueOrElse(getInteger(userFpKey), 0)
421494 let bonusKey = keyUserFullBonus(address)
422495 let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0)
423496 if (if ((0 > bonusDelta))
424497 then (0 > (oldBonus + bonusDelta))
425498 else false)
426499 then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%"))
427500 else {
428501 let $t062996398 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta))
429502 let newBonusedFp = $t062996398._1
430503 let ignored = $t062996398._2
431504 let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0)
432505 let acresActions = if ((amt == 0))
433506 then nil
434507 else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))]
435508 let bonusActions = if ((bonusDelta == 0))
436509 then nil
437510 else [IntegerEntry(bonusKey, (oldBonus + bonusDelta))]
438511 $Tuple2(((((acresActions ++ bonusActions) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))), wlgResult)
439512 }
440513 }
441514 }
442515 else throw("Strict value is not equal to itself.")
443516 }
444517
445518
446519 func getWlgPrice (usdtBalanceCorrection) = {
447520 let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet")
448521 let wlgUsd = assetBalance(wlgContract, usdtAssetId)
449522 let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection)
450523 let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0))
451524 let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal)
452525 fraction(totalFundsUsd, MULT8, issuedAmount)
453526 }
454527
455528
456529 func getSwapLimitAcres () = {
457530 let wlgUsd = assetBalance(wlgContract, usdtAssetId)
458531 let acres2Usd = assetBalance(this, usdtAssetId)
459532 let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0))
460533 let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR)
461534 let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit)
462535 let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0)
463536 let now = lastBlock.timestamp
464537 let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS))
465538 let limitLeftUsdt = min([currentLimit, defaultLimit])
466539 $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt)
467540 }
468541
469542
470543 let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og")
471544
472545 let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "")
473546
474547 let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "")
475548
476549 let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "")
477550
478551 let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "")
479552
480553 let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "")
481554
482555 let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "")
483556
484557 let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "")
485558
486559 let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "")
487560
488561 let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "")
489562
490563 func isArkimalIssued (nfo) = {
491564 let issuer = toString(nfo.issuer)
492565 if (if (if (if (if (if (if (if (if (if ((chain == base58'2T'))
493566 then (issuer == oldStakingContractStr)
494567 else false)
495568 then true
496569 else (issuer == incubator))
497570 then true
498571 else (issuer == breeder))
499572 then true
500573 else (issuer == turtleIncubator))
501574 then true
502575 else (issuer == turtleBreeder))
503576 then true
504577 else (issuer == canineIncubator))
505578 then true
506579 else (issuer == canineBreeder))
507580 then true
508581 else (issuer == felineIncubator))
509582 then true
510583 else (issuer == felineBreeder))
511584 then nfo.name
512585 else if ((issuer == mutantBreeder))
513586 then nfo.description
514587 else ""
515588 }
516589
517590
518591 func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = {
519592 let nftNumber = valueOrElse(getInteger(userNumKey), 0)
520593 if ((nftNumber >= limit))
521594 then throw((("You can stake max " + toString(limit)) + " of such NFTs"))
522595 else {
523596 let $t01067710753 = stakeUnstakeAcresInternal(0, addr, bonus6)
524597 let actions = $t01067710753._1
525598 let wlgClaimedAmount = $t01067710753._2
526599 $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount)
527600 }
528601 }
529602
530603
604+let promoNumPrizes = 3
605+
606+let promoAwardPerRound = [50000000, 25000000, 25000000]
607+
608+func stakeAcresFor (address,amt,shouldCleanPromo) = {
609+ let $t01122511301 = stakeUnstakeAcresInternal(amt, address, 0)
610+ let actions = $t01122511301._1
611+ let wlgClaimedAmount = $t01122511301._2
612+ let promoActions = if (if ((height >= DAILY_PROMO_START_BLOCK))
613+ then (DAILY_PROMO_END_BLOCK > height)
614+ else false)
615+ then {
616+ let promoAcresKey = keyUserPromoAcres(address)
617+ let promoAcres = ((if (shouldCleanPromo)
618+ then 0
619+ else valueOrElse(getInteger(promoAcresKey), 0)) + amt)
620+ let tickets = (promoAcres / MULT8)
621+ let ticketsKey = keyUserPromoTickets(address)
622+ let deltaTickets = (tickets - valueOrElse(getInteger(ticketsKey), 0))
623+ let totalTickets = (valueOrElse(getInteger(keyTotalPromoTickets), 0) + deltaTickets)
624+ if (if (shouldCleanPromo)
625+ then true
626+ else (deltaTickets > 0))
627+ then {
628+ let promoMap = valueOrElse(getString(keyPromoMap), "")
629+ let userRecord = ((address + ":") + padL(tickets, 3))
630+ let newMap = if (contains(promoMap, address))
631+ then {
632+ let mapParts = split_51C(promoMap, address)
633+ if ((mapParts[0] == ""))
634+ then {
635+ let r = drop(mapParts[1], 4)
636+ if ((r == ""))
637+ then if ((tickets == 0))
638+ then ""
639+ else userRecord
640+ else if ((tickets == 0))
641+ then drop(r, 1)
642+ else (userRecord + r)
643+ }
644+ else {
645+ let r = drop(mapParts[1], 4)
646+ if ((r == ""))
647+ then if ((tickets == 0))
648+ then dropRight(mapParts[0], 1)
649+ else (mapParts[0] + userRecord)
650+ else if ((tickets == 0))
651+ then (mapParts[0] + drop(r, 1))
652+ else ((mapParts[0] + userRecord) + r)
653+ }
654+ }
655+ else if ((tickets == 0))
656+ then promoMap
657+ else if ((promoMap == ""))
658+ then userRecord
659+ else ((promoMap + "_") + userRecord)
660+[IntegerEntry(promoAcresKey, promoAcres), IntegerEntry(ticketsKey, tickets), IntegerEntry(keyTotalPromoTickets, totalTickets), StringEntry(keyPromoMap, newMap)]
661+ }
662+ else [IntegerEntry(promoAcresKey, promoAcres)]
663+ }
664+ else nil
665+ $Tuple2((actions ++ promoActions), wlgClaimedAmount)
666+ }
667+
668+
531669 @Callable(i)
532670 func saveLastTx () = if (!(containsElement([wlgContract, marketContract], i.caller)))
533671 then throw("Access denied")
534672 else $Tuple2(prolog(i), 42)
535673
536674
537675
538676 @Callable(i)
539677 func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this))
540678 then throw("Permission denied")
541679 else {
542680 let oldAcrContAddr = addressFromStringValue(oldAcrContract)
543681 [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)]
544682 }
545683
546684
547685
548686 @Callable(i)
549687 func setBlocked (isBlocked) = if ((i.caller != this))
550688 then throw("permission denied")
551689 else [BooleanEntry(keyBlocked(), isBlocked)]
552690
553691
554692
555693 @Callable(i)
556694 func unstakeAcres (amount) = {
557695 let prologActions = prolog(i)
558- if ((0 >= amount))
559- then throw("Amount should be positive")
560- else {
561- let address = toString(i.caller)
562- if ((size(i.payments) != 0))
563- then throw("No payments required")
564- else {
565- let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay)
566- if ((arbReleaseTime > lastBlock.timestamp))
567- then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime)))
568- else {
569- let $t01234312423 = stakeUnstakeAcresInternal(-(amount), address, 0)
570- let actions = $t01234312423._1
571- let wlgClaimedAmount = $t01234312423._2
572- $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount)
573- }
574- }
575- }
696+ if (if ((height >= DAILY_PROMO_START_BLOCK))
697+ then (DAILY_PROMO_END_BLOCK > height)
698+ else false)
699+ then throw("You can't unstake during Xmas promo period")
700+ else if ((0 >= amount))
701+ then throw("Amount should be positive")
702+ else {
703+ let address = toString(i.caller)
704+ if ((size(i.payments) != 0))
705+ then throw("No payments required")
706+ else {
707+ let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay)
708+ if ((arbReleaseTime > lastBlock.timestamp))
709+ then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime)))
710+ else {
711+ let $t01530415384 = stakeUnstakeAcresInternal(-(amount), address, 0)
712+ let actions = $t01530415384._1
713+ let wlgClaimedAmount = $t01530415384._2
714+ $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount)
715+ }
716+ }
717+ }
576718 }
577719
578720
579721
580722 @Callable(i)
581723 func stakeAcres () = {
582724 let prologActions = prolog(i)
583725 let address = toString(i.caller)
584726 if ((size(i.payments) != 1))
585727 then throw("exactly 1 payment must be attached")
586728 else {
587729 let pmt = i.payments[0]
588730 let amt = pmt.amount
589731 if (if (!(isDefined(pmt.assetId)))
590732 then true
591733 else (value(pmt.assetId) != acresAssetId))
592734 then throw("ACRES payments only!")
593735 else {
594- let $t01287412950 = stakeUnstakeAcresInternal(amt, address, 0)
595- let actions = $t01287412950._1
596- let wlgClaimedAmount = $t01287412950._2
597- $Tuple2((actions ++ prologActions), wlgClaimedAmount)
736+ let $t01583515908 = stakeAcresFor(address, amt, false)
737+ let stakeActions = $t01583515908._1
738+ let wlgClaimedAmount = $t01583515908._2
739+ $Tuple2((stakeActions ++ prologActions), wlgClaimedAmount)
598740 }
599741 }
600742 }
601743
602744
603745
604746 @Callable(i)
605747 func buyAcres () = {
606748 let prologActions = prolog(i)
607749 if ((size(i.payments) != 1))
608750 then throw("exactly 1 payment must be attached")
609751 else {
610752 let pmt = i.payments[0]
611753 let usdtAmount = pmt.amount
612754 if (if (!(isDefined(pmt.assetId)))
613755 then true
614756 else (value(pmt.assetId) != usdtAssetId))
615757 then throw("USDT payments only!")
616758 else if ((MULT6 > usdtAmount))
617759 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
618760 else {
619761 let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER)
620762 let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount))
621763 let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey))
622764 let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil)
623765 if ((req == req))
624766 then {
625767 let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil))
626768 $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain)
627769 }
628770 else throw("Strict value is not equal to itself.")
629771 }
630772 }
631773 }
632774
633775
634776
635777 @Callable(i)
636778 func buyAcresREADONLY (usdtAmount) = {
637779 let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER)
638780 let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount))
639781 $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn])
640782 }
641783
642784
643785
644786 @Callable(i)
645787 func sellAcres () = {
646788 let prologActions = prolog(i)
647789 if ((size(i.payments) != 1))
648790 then throw("exactly 1 payment must be attached")
649791 else {
650792 let pmt = i.payments[0]
651793 let acresAmount = pmt.amount
652794 if (if (!(isDefined(pmt.assetId)))
653795 then true
654796 else (value(pmt.assetId) != acresAssetId))
655797 then throw("ACRES payments only!")
656798 else if ((MULT7 > acresAmount))
657799 then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES"))
658800 else {
659801 let addr = toString(i.caller)
660- let $t01480714855 = getSwapLimitAcres()
661- let limitAction = $t01480714855._1
662- let maxUsdt = $t01480714855._2
802+ let $t01777017818 = getSwapLimitAcres()
803+ let limitAction = $t01777017818._1
804+ let maxUsdt = $t01777017818._2
663805 let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER)
664806 if ((acresAmount > maxAcres))
665807 then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES"))
666808 else {
667809 let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2)
668810 $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount)
669811 }
670812 }
671813 }
672814 }
673815
674816
675817
676818 @Callable(i)
677819 func sellAcresREADONLY (address,acresAmount) = {
678- let $t01535115399 = getSwapLimitAcres()
679- let limitAction = $t01535115399._1
680- let maxUsdt = $t01535115399._2
820+ let $t01831418362 = getSwapLimitAcres()
821+ let limitAction = $t01831418362._1
822+ let maxUsdt = $t01831418362._2
681823 let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2)
682824 $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0])
683825 }
684826
685827
686828
687829 @Callable(i)
688830 func convertOldStakes () = {
689831 let prologActions = prolog(i)
690832 if ((OLD_STAKING_DEADL > lastBlock.timestamp))
691833 then throw(("Disabled until " + toString((OLD_STAKING_DEADL / 1000))))
692834 else {
693835 let address = toString(i.caller)
694836 if ((size(i.payments) != 0))
695837 then throw("No payments required")
696838 else {
697839 let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey))
698840 let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0)
699841 let gotAcres0 = if ((amount > 0))
700842 then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil))
701843 else $Tuple2(0, 0)
702844 let oldStakingAddress = addressFromStringValue(oldStakingContractStr)
703845 let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address))
704846 let landsResult = if (isDefined(landsStr))
705847 then {
706848 let lands = split_51C(value(landsStr), "_")
707849 if ((size(lands) > MAX_LANDS_TO_CONVERT))
708850 then throw((("You have more than " + toString(MAX_LANDS_TO_CONVERT)) + " lands staked, please contact support, we'll process your case manually"))
709851 else {
710852 func oneLand (acc,landAssetId) = if ((landAssetId == ""))
711853 then throw("landAssetId is required")
712854 else {
713855 let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil))
714856 if ((r == r))
715857 then $Tuple5((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4), (acc._5 + r._5))
716858 else throw("Strict value is not equal to itself.")
717859 }
718860
719861 let rr = {
720862 let $l = lands
721863 let $s = size($l)
722864 let $acc0 = $Tuple5(0, 0, 0, 0, 0)
723865 func $f0_1 ($a,$i) = if (($i >= $s))
724866 then $a
725867 else oneLand($a, $l[$i])
726868
727869 func $f0_2 ($a,$i) = if (($i >= $s))
728870 then $a
729871 else throw("List size exceeds 14")
730872
731873 $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14)
732874 }
733875 if ((rr == rr))
734876 then {
735877 let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil)
736878 if ((finalize == finalize))
737879 then {
738880 let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil)
739881 if ((req == req))
740882 then {
741- let $t01791318051 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller)
742- let nftActions = $t01791318051._1
743- let nftAssetId = $t01791318051._2
883+ let $t02087621014 = issueNftCustom(idxNameShovel, idxKeyP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller)
884+ let nftActions = $t02087621014._1
885+ let nftAssetId = $t02087621014._2
744886 $Tuple6(rr._1, rr._2, rr._3, rr._4, rr._5, nftActions)
745887 }
746888 else throw("Strict value is not equal to itself.")
747889 }
748890 else throw("Strict value is not equal to itself.")
749891 }
750892 else throw("Strict value is not equal to itself.")
751893 }
752894 }
753895 else $Tuple6(0, 0, 0, 0, 0, nil)
754896 let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "")
755897 let duckResult = if ((duckAssetId != ""))
756898 then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil))
757899 else $Tuple3(0, 0, 0)
758900 let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0)
759901 $Tuple2(((landsResult._6 ++ x._1) ++ prologActions), $Tuple3(gotAcres0._2, landsResult._5, x._2))
760902 }
761903 }
762904 }
763905
764906
765907
766908 @Callable(i)
767909 func unstakeLandsREADONLY (address) = {
768910 let oldStakingAddress = addressFromStringValue(oldStakingContractStr)
769911 let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address))
770912 let landsResult = if (isDefined(landsStr))
771913 then {
772914 let lands = split_51C(value(landsStr), "_")
773915 func oneLand (acc,landAssetId) = if ((landAssetId == ""))
774916 then throw("landAssetId is required")
775917 else {
776918 let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil))
777919 $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4))
778920 }
779921
780922 let $l = lands
781923 let $s = size($l)
782924 let $acc0 = $Tuple4(0, 0, 0, 0)
783925 func $f0_1 ($a,$i) = if (($i >= $s))
784926 then $a
785927 else oneLand($a, $l[$i])
786928
787929 func $f0_2 ($a,$i) = if (($i >= $s))
788930 then $a
789931 else throw("List size exceeds 100")
790932
791933 $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)
792934 }
793935 else $Tuple4(0, 0, 0, 0)
794936 $Tuple2(nil, landsResult)
795937 }
796938
797939
798940
799941 @Callable(i)
800942 func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr)))
801943 then throw("Permission denied")
802944 else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0)
803945
804946
805947
806948 @Callable(i)
807949 func simulateStakeAcresREADONLY (address,addedAmount) = {
808950 let amountKey = keyAcresStakedAmtByUser(address)
809951 let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount)
810952 let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0)
811953 let userFpKey = keyFarmingPowerByUser(address)
812954 let oldFp = valueOrElse(getInteger(userFpKey), 0)
813955 let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0)
814- let $t02032220409 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus)
815- let newBonusedFp = $t02032220409._1
816- let ignored = $t02032220409._2
956+ let $t02328523372 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus)
957+ let newBonusedFp = $t02328523372._1
958+ let ignored = $t02328523372._2
817959 let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0)
818960 let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp)
819961 $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp])
820962 }
821963
822964
823965
824966 @Callable(i)
825967 func issuePickC1 (forAddress) = if ((i.caller != wlgContract))
826968 then throw("Permission denied")
827969 else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress))
828970
829971
830972
831973 @Callable(i)
832974 func stakeNFT () = {
833975 let prologActions = prolog(i)
834976 if ((size(i.payments) != 1))
835977 then throw("Exactly one payment required")
836978 else {
837979 let pmt = value(i.payments[0])
838980 if ((pmt.amount != 1))
839981 then throw("NFT token should be attached as payment")
840982 else {
841983 let assetId = value(pmt.assetId)
842984 let asset = value(assetInfo(assetId))
843985 let assetIdStr = toBase58String(assetId)
844986 let addr = toString(i.caller)
845987 let nftsKey = keyStakedNFTsByOwner(addr)
846988 let nftsStr = getString(nftsKey)
847989 let nfts = if (isDefined(nftsStr))
848990 then split_4C(value(nftsStr), "_")
849991 else nil
850992 if (containsElement(nfts, assetIdStr))
851993 then throw(("Your staked NFTs already contain " + assetIdStr))
852994 else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER))
853995 then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs"))
854996 else {
855997 let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_"))
856998 if ((asset.issuer == this))
857999 then {
858- let $t02181822008 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS)
859- let actions = $t02181822008._1
860- let wlgClaimedAmount = $t02181822008._2
1000+ let $t02478124971 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS)
1001+ let actions = $t02478124971._1
1002+ let wlgClaimedAmount = $t02478124971._2
8611003 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
8621004 }
8631005 else if ((isArkimalIssued(asset) == ""))
8641006 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
8651007 else {
866- let $t02218922340 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS)
867- let actions = $t02218922340._1
868- let wlgClaimedAmount = $t02218922340._2
1008+ let $t02515225303 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS)
1009+ let actions = $t02515225303._1
1010+ let wlgClaimedAmount = $t02515225303._2
8691011 $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount)
8701012 }
8711013 }
8721014 }
8731015 }
8741016 }
8751017
8761018
8771019
8781020 @Callable(i)
8791021 func unstakeNFT (assetIdStr) = {
8801022 let prologActions = prolog(i)
8811023 if ((size(i.payments) != 0))
8821024 then throw("No payments required")
8831025 else {
8841026 let assetId = fromBase58String(assetIdStr)
8851027 let addr = toString(i.caller)
8861028 let asset = value(assetInfo(assetId))
8871029 let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr)
8881030 if (!(isDefined(getInteger(timeKey))))
8891031 then throw((("NFT " + asset.name) + " is not staked by you"))
8901032 else {
8911033 let nftsKey = keyStakedNFTsByOwner(addr)
8921034 let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_")
8931035 let idx = indexOf(nfts, assetIdStr)
8941036 if (!(isDefined(idx)))
8951037 then throw(("Your staked NFTs don't contain " + assetIdStr))
8961038 else {
8971039 let listAction = if ((size(nfts) > 1))
8981040 then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_"))
8991041 else DeleteEntry(nftsKey)
9001042 let isWL = (asset.issuer == this)
9011043 if (isWL)
9021044 then {
9031045 let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0)
9041046 let bonusVal = (bonusByDescription(value(asset.description)) * 10000)
905- let $t02350523584 = stakeUnstakeAcresInternal(0, addr, -(bonusVal))
906- let actions = $t02350523584._1
907- let wlgClaimedAmount = $t02350523584._2
1047+ let $t02646826547 = stakeUnstakeAcresInternal(0, addr, -(bonusVal))
1048+ let actions = $t02646826547._1
1049+ let wlgClaimedAmount = $t02646826547._2
9081050 $Tuple2(((((((actions :+ listAction) :+ IntegerEntry(keyUserWlNftNumber(addr), (wlNftNumber - 1))) :+ IntegerEntry(keyWlNftTotalStaked, max([0, (valueOrElse(getInteger(keyWlNftTotalStaked), 0) - 1)]))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount)
9091051 }
9101052 else {
9111053 let arkimalName = isArkimalIssued(asset)
9121054 if ((arkimalName == ""))
9131055 then throw("Only WavesLands and Arkimals NFT tokens are accepted")
9141056 else {
9151057 let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0)
916- let $t02424424328 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS))
917- let actions = $t02424424328._1
918- let wlgClaimedAmount = $t02424424328._2
1058+ let $t02720727291 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS))
1059+ let actions = $t02720727291._1
1060+ let wlgClaimedAmount = $t02720727291._2
9191061 $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount)
9201062 }
9211063 }
9221064 }
9231065 }
9241066 }
9251067 }
9261068
9271069
9281070
9291071 @Callable(i)
9301072 func exchangeNFTs () = {
9311073 let prologActions = prolog(i)
9321074 if ((3 > size(i.payments)))
9331075 then throw("Min one WLGOLD and 2 NFT payments allowed")
9341076 else if ((size(i.payments) > 10))
9351077 then throw("Max one WLGOLD and 9 NFT payments allowed")
9361078 else {
9371079 let addr = toString(i.caller)
9381080 func addUp (acc,pmt) = {
9391081 let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed")
9401082 if ((assetId == wlgAssetId))
9411083 then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4)
9421084 else {
9431085 let asset = value(assetInfo(assetId))
9441086 if ((asset.issuer != this))
9451087 then throw("Only WL-issued NFTs allowed")
9461088 else {
9471089 let rarityIx = rarityIdxByDescriprion(value(asset.description))
9481090 if (if ((acc._4 > 0))
9491091 then (rarityIx != acc._4)
9501092 else false)
9511093 then throw("You can exchange only NFTs of the same rarity")
9521094 else {
9531095 let bonusPerc = bonusByDescription(value(asset.description))
9541096 $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx)
9551097 }
9561098 }
9571099 }
9581100 }
9591101
960- let $t02571725933 = {
1102+ let $t02868028896 = {
9611103 let $l = i.payments
9621104 let $s = size($l)
9631105 let $acc0 = $Tuple4(0, 0, nil, -1)
9641106 func $f0_1 ($a,$i) = if (($i >= $s))
9651107 then $a
9661108 else addUp($a, $l[$i])
9671109
9681110 func $f0_2 ($a,$i) = if (($i >= $s))
9691111 then $a
9701112 else throw("List size exceeds 10")
9711113
9721114 $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)
9731115 }
974- let wlgFee = $t02571725933._1
975- let totalBonus = $t02571725933._2
976- let burnActions = $t02571725933._3
977- let rarityIdx = $t02571725933._4
1116+ let wlgFee = $t02868028896._1
1117+ let totalBonus = $t02868028896._2
1118+ let burnActions = $t02868028896._3
1119+ let rarityIdx = $t02868028896._4
9781120 let newRarityIdx = if ((rarityIdx == idxRarityC))
9791121 then if ((rarityThresholds[idxThresholdC] > totalBonus))
9801122 then idxRarityC
9811123 else if ((rarityThresholds[idxThresholdU] > totalBonus))
9821124 then idxRarityU
9831125 else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%"))
9841126 else if ((rarityIdx == idxRarityU))
9851127 then if ((rarityThresholds[idxThresholdU] > totalBonus))
9861128 then idxRarityU
9871129 else if ((rarityThresholds[idxThresholdL] > totalBonus))
9881130 then idxRarityL
9891131 else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%"))
9901132 else if ((rarityIdx == idxRarityL))
9911133 then if ((rarityThresholds[idxThresholdL] > totalBonus))
9921134 then idxRarityL
9931135 else idxRarityE
9941136 else if ((rarityIdx == idxRarityE))
9951137 then idxRarityE
9961138 else if ((rarityIdx == idxRarityP))
9971139 then throw("You can't exchange NFTs of this rarity")
9981140 else throw("Unknown rarity")
9991141 let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0))
10001142 let change = (wlgFee - minWlgFee)
10011143 let forTeam = (minWlgFee / 2)
10021144 let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
10031145 if ((0 > change))
10041146 then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
10051147 else {
10061148 let changeActions = if ((change > 0))
10071149 then [ScriptTransfer(i.caller, change, wlgAssetId)]
10081150 else nil
1009- let $t02747027631 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1010- let issueNftActions = $t02747027631._1
1011- let nftAssetId = $t02747027631._2
1151+ let $t03043330594 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1152+ let issueNftActions = $t03043330594._1
1153+ let nftAssetId = $t03043330594._2
10121154 let burned = size(burnActions)
10131155 let burnCounterActions = if ((burned == 0))
10141156 then nil
10151157 else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))]
10161158 $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain))
10171159 }
10181160 }
10191161 }
10201162
10211163
10221164
10231165 @Callable(i)
10241166 func openNftChest () = {
10251167 let prologActions = prolog(i)
10261168 if ((size(i.payments) != 1))
10271169 then throw("exactly 1 payment must be attached")
10281170 else {
10291171 let pmt = i.payments[0]
10301172 let wlgAmount = pmt.amount
10311173 if (if (!(isDefined(pmt.assetId)))
10321174 then true
10331175 else (value(pmt.assetId) != wlgAssetId))
10341176 then throw("WLGOLD payments only!")
10351177 else {
10361178 let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0))
10371179 let change = (wlgAmount - minWlgFee)
10381180 let forTeam = (minWlgFee / 2)
10391181 let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil))
10401182 if ((0 > change))
10411183 then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee"))
10421184 else {
10431185 let changeActions = if ((change > 0))
10441186 then [ScriptTransfer(i.caller, change, wlgAssetId)]
10451187 else nil
10461188 let addr = toString(i.caller)
10471189 let finishKey = keyCommit(addr)
10481190 let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!")
10491191 if ((finishBlock > height))
10501192 then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock)))
10511193 else {
10521194 let entropy = value(value(blockInfoByHeight(finishBlock)).vrf)
10531195 let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1])
10541196 let rand = getRandomNumber(100, salt, entropy)
1055- let $t02965029922 = if ((84 > rand))
1197+ let $t03261332885 = if ((84 > rand))
10561198 then $Tuple2(1, idxRarityC)
10571199 else if ((98 > rand))
10581200 then $Tuple2(5, idxRarityU)
10591201 else $Tuple2(10, idxRarityL)
1060- let bonus = $t02965029922._1
1061- let rarityIdx = $t02965029922._2
1062- let $t02992530075 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1063- let issueNftActions = $t02992530075._1
1064- let nftAssetId = $t02992530075._2
1202+ let bonus = $t03261332885._1
1203+ let rarityIdx = $t03261332885._2
1204+ let $t03288833038 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller)
1205+ let issueNftActions = $t03288833038._1
1206+ let nftAssetId = $t03288833038._2
10651207 $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain))
10661208 }
10671209 }
10681210 }
10691211 }
10701212 }
10711213
10721214
10731215
10741216 @Callable(i)
10751217 func commitForRandom () = {
10761218 let prologActions = prolog(i)
10771219 let addr = toString(i.caller)
10781220 let finishKey = keyCommit(addr)
10791221 if (isDefined(getInteger(finishKey)))
10801222 then throw("You already commited for random, please use it")
10811223 else {
10821224 let finishBlock = (height + RANDOM_DELAY)
10831225 $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock)
10841226 }
10851227 }
10861228
10871229
1230+
1231+@Callable(i)
1232+func drawDaylyPromo () = if ((i.caller != this))
1233+ then throw("Permission denied")
1234+ else {
1235+ let today = (height % DAY_BLOCKS)
1236+ let maxValue = valueOrElse(getInteger(keyTotalPromoTickets), 0)
1237+ if ((maxValue == 0))
1238+ then throw("No tickets to draw")
1239+ else {
1240+ let b = (today * DAY_BLOCKS)
1241+ let h = if ((b > VRF_OFFSET))
1242+ then b
1243+ else (b + VRF_OFFSET)
1244+ let entropy = value(value(blockInfoByHeight(h)).vrf)
1245+ let promoMap = valueOrElse(getString(keyPromoMap), "")
1246+ if ((promoMap == ""))
1247+ then throw("No participants")
1248+ else {
1249+ let promoList = split_51C(promoMap, "_")
1250+ func singleDraw (ac,j) = if ((j >= promoNumPrizes))
1251+ then ac
1252+ else {
1253+ let rand = getRandomNumber(ac._1, ac._2, entropy)
1254+ let promo4List = if ((ac._3 == ""))
1255+ then nil
1256+ else split_51C(ac._3, "_")
1257+ func countTickets (acc,el) = {
1258+ let parts = split(el, ":")
1259+ let addr = parts[0]
1260+ let tickets = parseIntValue(parts[1])
1261+ let newTotal = (acc._1 + tickets)
1262+ if (if ((acc._3 == ""))
1263+ then (newTotal > rand)
1264+ else false)
1265+ then $Tuple3(newTotal, tickets, addr)
1266+ else $Tuple3(newTotal, acc._2, acc._3)
1267+ }
1268+
1269+ let r = {
1270+ let $l = promo4List
1271+ let $s = size($l)
1272+ let $acc0 = $Tuple3(0, 0, "")
1273+ func $f0_1 ($a,$i) = if (($i >= $s))
1274+ then $a
1275+ else countTickets($a, $l[$i])
1276+
1277+ func $f0_2 ($a,$i) = if (($i >= $s))
1278+ then $a
1279+ else throw("List size exceeds 20")
1280+
1281+ $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
1282+ }
1283+ let winner = r._3
1284+ if ((winner == ""))
1285+ then ac
1286+ else {
1287+ let mapParts = split_51C(ac._3, winner)
1288+ let newMap = if ((mapParts[0] == ""))
1289+ then drop(mapParts[1], 5)
1290+ else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4))
1291+ let $t03563635787 = stakeAcresFor(winner, promoAwardPerRound[j], true)
1292+ let stakeActions = $t03563635787._1
1293+ let ignoredWlgClaimedAmount = $t03563635787._2
1294+ let newSalt = fromBase58String(valueOrElse(getString(stakingContract, keyCurWeekTxIdByUser(winner)), "DEFAULT"))
1295+ $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ stakeActions))
1296+ }
1297+ }
1298+
1299+ let draws = {
1300+ let $l = [0, 1, 2]
1301+ let $s = size($l)
1302+ let $acc0 = $Tuple4(maxValue, i.transactionId, promoMap, nil)
1303+ func $f0_1 ($a,$i) = if (($i >= $s))
1304+ then $a
1305+ else singleDraw($a, $l[$i])
1306+
1307+ func $f0_2 ($a,$i) = if (($i >= $s))
1308+ then $a
1309+ else throw("List size exceeds 3")
1310+
1311+ $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
1312+ }
1313+ $Tuple2(([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1)] ++ draws._4), 0)
1314+ }
1315+ }
1316+ }
1317+
1318+

github/deemru/w8io/169f3d6 
190.04 ms