tx · 2n2W1esMCudU9czcvYterovpXA7NP4RjDPP8pxrJgj7Z

3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg:  -0.02000000 Waves

2023.12.17 19:52 [2890971] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves

{ "type": 13, "id": "2n2W1esMCudU9czcvYterovpXA7NP4RjDPP8pxrJgj7Z", "fee": 2000000, "feeAssetId": null, "timestamp": 1702831992983, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "2QGip2pUkWo2qgE3UEH1dRZ4gPsdPfsTY1jrRr5vGfqF755UVSR6jgtKzSgBdyRpKeCEeStoPTz9jXpb13mCY7F2" ], "script": "base64:BgI7CAISBAoCCAESAwoBARIAEgASBAoCCAESBQoDCAEBEgMKAQESABIDCgEIEgASAwoBCBIDCgEBEgMKAQFCAAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyARprZXlBY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcgEEYWRkcgkArAICAhhhY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcl8FBGFkZHIBF2tleUFjcmVzTG9ja2VkRXRhQnlVc2VyAQRhZGRyCQCsAgICFWFjcmVzTG9ja2VkRXRhQnlVc2VyXwUEYWRkcgATYWNyZXNTdGFrZWRUb3RhbEtleQIWYWNyZXNTdGFrZWRBbW91bnRUb3RhbAAKeHBOZXdTTGFuZADAlrECAA9EQUlMWVJFU0JZUElFQ0UAgPjSAQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoBGmtleUlzQXdhcmRlZEJ5UHJvbW9BbmRVc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W50cnkCCQEea2V5VGlja2V0c1RvdGFsQnlQcm9tb0FuZFJvdW5kAgADCQBkAgUHcm91bmRJZAABCAUFZHJhd3MCXzEFA25pbAgFBWRyYXdzAl80ABq2ZMs=", "height": 2890971, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: KDZbuaYuM5yQNSeet7Nq97R8X9KckCCFTc8fBaf6Nv1 Next: B7rSLVnk7Tbfvz5SN81iVfcCjqekinxBH9Ydt7E7EkEp Diff:
OldNewDifferences
5656 func keyPromo2MapForRound (roundId) = ("promo2MapForRound__" + toString(roundId))
5757
5858
59+func keyPromo3MapForRound (roundId) = ("promo3MapForRound__" + toString(roundId))
60+
61+
5962 let SEP = "__"
6063
6164 let MULT6 = 1000000
6265
6366 let MULT8 = 100000000
6467
65-let ITER20 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
68+let ITER6 = [0, 1, 2, 3, 4, 5]
6669
6770 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
6871
212215
213216 let PROMO_2_DISTRIBUTION_FUND = 1000000000
214217
215-let promo2NumPrizesPerRound = [1, 3, 5, 20]
218+let promo3NumPrizesPerRound = [1, 5]
216219
217-let promo2AwardPerRound = [500000000, 200000000, 100000000, 20000000]
220+let promo3AwardPerRound = [500000000, 100000000]
218221
219222 func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr)
220223
513516 let acresAmount = parseIntValue(take(drop(parts[1], 1), 14))
514517 let tickets = (acresAmount / MIN_ACRES_AMOUNT_DURING_PROMO)
515518 let totalTikets = valueOrElse(getInteger(keyTicketsTotalByPromo(2)), 0)
516- let $t01238112821 = if ((totalTikets == 0))
519+ let $t01254712987 = if ((totalTikets == 0))
517520 then {
518521 func countTickets (acc,el) = (acc + (parseIntValue(split(el, ":")[1]) / MIN_ACRES_AMOUNT_DURING_PROMO))
519522
534537 $Tuple2([IntegerEntry(keyTicketsTotalByPromo(2), ticketsCount), IntegerEntry(keyTicketsTotalByPromoAndRound(2, 1), ticketsCount)], ticketsCount)
535538 }
536539 else $Tuple2(nil, totalTikets)
537- let ticketsActions = $t01238112821._1
538- let totalCount = $t01238112821._2
540+ let ticketsActions = $t01254712987._1
541+ let totalCount = $t01254712987._2
539542 let award = fraction(PROMO_2_DISTRIBUTION_FUND, tickets, totalCount)
540543 let stakeResult = invoke(this, "sendLockedAcres", [address, award, 30], nil)
541544 $Tuple2(((ticketsActions :+ BooleanEntry(awardedKey, true)) :+ StringEntry(keyPromo2MapForRound(1), promo2Map)), stakeResult)
550553
551554
552555 @Callable(i)
553-func commitForPromo2Round (roundId) = if ((i.caller != this))
556+func initPromo3 (promo3Map) = if ((i.caller != this))
557+ then throw("Permission denied")
558+ else {
559+ func countTickets (acc,el) = (acc + parseIntValue(split(el, ":")[1]))
560+
561+ let ticketsTotal = {
562+ let $l = split_51C(promo3Map, "_")
563+ let $s = size($l)
564+ let $acc0 = 0
565+ func $f0_1 ($a,$i) = if (($i >= $s))
566+ then $a
567+ else countTickets($a, $l[$i])
568+
569+ func $f0_2 ($a,$i) = if (($i >= $s))
570+ then $a
571+ else throw("List size exceeds 20")
572+
573+ $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)
574+ }
575+ $Tuple2([IntegerEntry(keyTicketsTotalByPromoAndRound(3, 1), ticketsTotal), StringEntry(keyPromo3MapForRound(1), promo3Map)], ticketsTotal)
576+ }
577+
578+
579+
580+@Callable(i)
581+func commitForPromo3Round (roundId) = if ((i.caller != this))
554582 then throw("Permission denied")
555583 else if (if ((1 > roundId))
556584 then true
557- else (roundId > 4))
585+ else (roundId > 2))
558586 then throw(("Invalid roundId: " + toString(roundId)))
559587 else {
560588 let finishBlock = (height + randomDelay)
561- $Tuple2([IntegerEntry(keyCommit(("2_" + toString(roundId))), finishBlock)], finishBlock)
589+ $Tuple2([IntegerEntry(keyCommit(("3_" + toString(roundId))), finishBlock)], finishBlock)
562590 }
563591
564592
565593
566594 @Callable(i)
567-func drawPromo2Round (roundId) = if ((i.caller != this))
595+func drawPromo3Round (roundId) = if ((i.caller != this))
568596 then throw("Permission denied")
569597 else if (if ((1 > roundId))
570598 then true
571- else (roundId > 4))
599+ else (roundId > 2))
572600 then throw(("Invalid roundId: " + toString(roundId)))
573601 else {
574- let finishKey = keyCommit(("2_" + toString(roundId)))
575- let finishBlock = valueOrErrorMessage(getInteger(finishKey), (("You have to commitForPromo2Round(" + toString(roundId)) + ") first!"))
602+ let finishKey = keyCommit(("3_" + toString(roundId)))
603+ let finishBlock = valueOrErrorMessage(getInteger(finishKey), (("You have to commitForPromo3Round(" + toString(roundId)) + ") first!"))
576604 if ((finishBlock > height))
577605 then throw((((("Random number is not ready yet, wait until height = " + toString(finishBlock)) + " (current height = ") + toString(height)) + ")"))
578606 else {
579- let maxValue = valueOrElse(getInteger(keyTicketsTotalByPromoAndRound(2, roundId)), 0)
607+ let maxValue = valueOrElse(getInteger(keyTicketsTotalByPromoAndRound(3, roundId)), 0)
580608 if ((maxValue == 0))
581- then throw("No tickets to draw (was claimPromo2() called at least once?)")
609+ then throw("No tickets to draw")
582610 else {
583611 let entropy = value(value(blockInfoByHeight(finishBlock)).vrf)
584612 let salt = i.transactionId
585- let promo2Map = valueOrElse(getString(keyPromo2MapForRound(roundId)), "")
586- func singleDraw (ac,j) = if ((j >= promo2NumPrizesPerRound[(roundId - 1)]))
613+ let promo3Map = valueOrElse(getString(keyPromo3MapForRound(roundId)), "")
614+ func singleDraw (ac,j) = if ((j >= promo3NumPrizesPerRound[(roundId - 1)]))
587615 then ac
588616 else {
589617 let rand = getRandomNumber(ac._1, ac._2, entropy)
590- let promo2List = if ((ac._3 == ""))
618+ let promo3List = if ((ac._3 == ""))
591619 then nil
592620 else split_51C(ac._3, "_")
593621 func countTickets (acc,el) = {
594622 let parts = split(el, ":")
595623 let addr = parts[0]
596- let tickets = (parseIntValue(parts[1]) / MIN_ACRES_AMOUNT_DURING_PROMO)
624+ let tickets = parseIntValue(parts[1])
597625 let newTotal = (acc._1 + tickets)
598626 if (if ((acc._3 == ""))
599627 then (newTotal > rand)
603631 }
604632
605633 let r = {
606- let $l = promo2List
634+ let $l = promo3List
607635 let $s = size($l)
608636 let $acc0 = $Tuple3(0, 0, "")
609637 func $f0_1 ($a,$i) = if (($i >= $s))
612640
613641 func $f0_2 ($a,$i) = if (($i >= $s))
614642 then $a
615- else throw("List size exceeds 50")
643+ else throw("List size exceeds 20")
616644
617- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
645+ $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)
618646 }
619647 let winner = r._3
620648 if ((winner == ""))
622650 else {
623651 let mapParts = split_51C(ac._3, winner)
624652 let newMap = if ((mapParts[0] == ""))
625- then drop(mapParts[1], 16)
626- else (dropRight(mapParts[0], 1) + drop(mapParts[1], 15))
627- let stakeResult = invoke(this, "sendLockedAcres", [winner, promo2AwardPerRound[(roundId - 1)], 30], nil)
628- $Tuple4((ac._1 - r._2), fromBase58String(getStringValue(stakingContract, keyLastTxIdByUser(winner))), newMap, (ac._4 :+ stakeResult))
653+ then drop(mapParts[1], 4)
654+ else (dropRight(mapParts[0], 1) + drop(mapParts[1], 3))
655+ let stakeResult = invoke(this, "sendLockedAcres", [winner, promo3AwardPerRound[(roundId - 1)], 30], nil)
656+ let newSalt = fromBase58String(valueOrElse(getString(stakingContract, keyLastTxIdByUser(winner)), "DEFAULT"))
657+ $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ stakeResult))
629658 }
630659 }
631660
632661 let draws = {
633- let $l = ITER20
662+ let $l = ITER6
634663 let $s = size($l)
635- let $acc0 = $Tuple4(maxValue, i.transactionId, promo2Map, nil)
664+ let $acc0 = $Tuple4(maxValue, i.transactionId, promo3Map, nil)
636665 func $f0_1 ($a,$i) = if (($i >= $s))
637666 then $a
638667 else singleDraw($a, $l[$i])
639668
640669 func $f0_2 ($a,$i) = if (($i >= $s))
641670 then $a
642- else throw("List size exceeds 20")
671+ else throw("List size exceeds 6")
643672
644- $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)
673+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
645674 }
646- $Tuple2([DeleteEntry(finishKey), StringEntry(keyPromo2MapForRound((roundId + 1)), draws._3), IntegerEntry(keyTicketsTotalByPromoAndRound(2, (roundId + 1)), draws._1)], draws._4)
675+ $Tuple2([DeleteEntry(finishKey), StringEntry(keyPromo3MapForRound((roundId + 1)), draws._3), IntegerEntry(keyTicketsTotalByPromoAndRound(3, (roundId + 1)), draws._1)], draws._4)
647676 }
648677 }
649678 }
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 func keyIsAwardedByPromoAndUser (promoId,addr) = makeString(["%s%d%s__isAwardedByPromoAndUser", toString(promoId), addr], "__")
2626
2727
2828 func keyTicketsTotalByPromo (promoId) = ("%s%d__ticketsTotalByPromo__" + toString(promoId))
2929
3030
3131 func keyTicketsTotalByPromoAndRound (promoId,roundId) = makeString(["%s%d%d__ticketsTotalByPromoAndRound", toString(promoId), toString(roundId)], "__")
3232
3333
3434 let chain = take(drop(this.bytes, 1), 1)
3535
3636 let usdtAssetId = match chain {
3737 case _ =>
3838 if ((base58'2W' == $match0))
3939 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
4040 else if ((base58'2T' == $match0))
4141 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
4242 else throw("Unknown chain")
4343 }
4444
4545 let defaultRestAddressStr = match chain {
4646 case _ =>
4747 if ((base58'2W' == $match0))
4848 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
4949 else if ((base58'2T' == $match0))
5050 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
5151 else throw("Unknown chain")
5252 }
5353
5454 let promo2MapKey = "promo2Map"
5555
5656 func keyPromo2MapForRound (roundId) = ("promo2MapForRound__" + toString(roundId))
5757
5858
59+func keyPromo3MapForRound (roundId) = ("promo3MapForRound__" + toString(roundId))
60+
61+
5962 let SEP = "__"
6063
6164 let MULT6 = 1000000
6265
6366 let MULT8 = 100000000
6467
65-let ITER20 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
68+let ITER6 = [0, 1, 2, 3, 4, 5]
6669
6770 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
6871
6972
7073 let IdxCfgStakingDapp = 1
7174
7275 let IdxCfgEconomyDapp = 2
7376
7477 let IdxCfgWlgDapp = 4
7578
7679 let IdxCfgAcresDapp = 8
7780
7881 func keyRestCfg () = "%s__restConfig"
7982
8083
8184 func keyRestAddress () = "%s__restAddr"
8285
8386
8487 func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP)
8588
8689
8790 func getContractAddressOrFail (restCfg,idx) = valueOrErrorMessage(addressFromString(restCfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx)))
8891
8992
9093 let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr))
9194
9295 let restCfg = readRestCfgOrFail(restContract)
9396
9497 let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp)
9598
9699 let economyContract = getContractAddressOrFail(restCfg, IdxCfgEconomyDapp)
97100
98101 let wlgContract = getContractAddressOrFail(restCfg, IdxCfgWlgDapp)
99102
100103 let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp)
101104
102105 let acresIssuedAmountKey = "acresIssuedAmount"
103106
104107 let acresAssetIdKey = "acresAssetId"
105108
106109 let acresAssetId = valueOrErrorMessage(getBinary(acresContract, acresAssetIdKey), "ACRES is not issued yet")
107110
108111 func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr)
109112
110113
111114 let IdxEffTotal = 0
112115
113116 let randomDelay = 2
114117
115118 func keyCommit (address) = ("finishBlockFor_" + address)
116119
117120
118121 func keyResProportions () = "resTypesProportions"
119122
120123
121124 func keyStakedPiecesByOwner (ownerAddr) = ("stakedPiecesByOwner_" + ownerAddr)
122125
123126
124127 func asInt (v) = match v {
125128 case n: Int =>
126129 n
127130 case _ =>
128131 throw("fail to cast into Int")
129132 }
130133
131134
132135 func asTwoIntsTuple (val) = match val {
133136 case t2: (Int, Int) =>
134137 t2
135138 case _ =>
136139 throw("fail to cast into (Int, Int)")
137140 }
138141
139142
140143 func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr)
141144
142145
143146 func getVotingPower (userAddrStrOrEmpty) = {
144147 let props = split(valueOrElse(getString(stakingContract, keyResProportions()), "0_0_0_0_0_0"), "_")
145148 func adder (acc,item) = (acc + parseIntValue(item))
146149
147150 let totalPower = {
148151 let $l = props
149152 let $s = size($l)
150153 let $acc0 = 0
151154 func $f0_1 ($a,$i) = if (($i >= $s))
152155 then $a
153156 else adder($a, $l[$i])
154157
155158 func $f0_2 ($a,$i) = if (($i >= $s))
156159 then $a
157160 else throw("List size exceeds 6")
158161
159162 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
160163 }
161164 let usersPower = valueOrElse(getInteger(stakingContract, keyStakedPiecesByOwner(userAddrStrOrEmpty)), 0)
162165 [totalPower, usersPower]
163166 }
164167
165168
166169 func fixedPoint (val,decimals) = {
167170 let tenPow = pow(10, 0, decimals, 0, 0, DOWN)
168171 let lowPart = toString((val % tenPow))
169172 let zeroes = drop(toString(tenPow), (1 + size(lowPart)))
170173 (((toString((val / tenPow)) + ".") + zeroes) + lowPart)
171174 }
172175
173176
174177 func padL (val,len) = {
175178 let valS = toString(val)
176179 let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1)
177180 (zeroes + valS)
178181 }
179182
180183
181184 func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue))
182185 then throw("maxValue should be > 0")
183186 else {
184187 let randomHash = sha256((salt + entropy))
185188 (toInt(randomHash) % maxValue)
186189 }
187190
188191
189192 let MIN_ACRES_AMOUNT_DURING_PROMO = 10000000
190193
191194 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"
192195
193196 let PROMO1_AMOUNT = 4970178
194197
195198 let PROMO_2_START_TIMESTAMP = match chain {
196199 case _ =>
197200 if ((base58'2W' == $match0))
198201 then 1700524800000
199202 else if ((base58'2T' == $match0))
200203 then 1700420400000
201204 else throw("Unknown chain")
202205 }
203206
204207 let PROMO_2_END_TIMESTAMP = match chain {
205208 case _ =>
206209 if ((base58'2W' == $match0))
207210 then 1701043199999
208211 else if ((base58'2T' == $match0))
209212 then 1700496000000
210213 else throw("Unknown chain")
211214 }
212215
213216 let PROMO_2_DISTRIBUTION_FUND = 1000000000
214217
215-let promo2NumPrizesPerRound = [1, 3, 5, 20]
218+let promo3NumPrizesPerRound = [1, 5]
216219
217-let promo2AwardPerRound = [500000000, 200000000, 100000000, 20000000]
220+let promo3AwardPerRound = [500000000, 100000000]
218221
219222 func isBlacklistedPromo1 (addr) = contains(BLACKLISTED1, addr)
220223
221224
222225 func prolog () = asInt(reentrantInvoke(stakingContract, "saveLastTx", nil, nil))
223226
224227
225228 func claimAcresInternal (addr,acresAmount,lastClaimTime) = {
226229 let deltaTime = (lastBlock.timestamp - lastClaimTime)
227230 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
228231 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
229232 let gotUsdt = max([0, canGetUsdt])
230233 (gotUsdt * USDT2ACRES_MULTIPLIER)
231234 }
232235
233236
234237 func claimInternal (addr,acresAmount,lastClaimTime) = {
235238 let deltaTime = (lastBlock.timestamp - lastClaimTime)
236239 if ((0 > deltaTime))
237240 then throw(((("Saved timestamp is in future, saved = " + toString(lastClaimTime)) + ", current = ") + toString(lastBlock.timestamp)))
238241 else {
239242 let availRes = fraction(deltaTime, (DAILYRESBYPIECE * acresAmount), (DAYMILLIS * MULT8))
240243 let canGetUsdt = asInt(invoke(economyContract, "sellResourcesWorldREADONLY", [availRes], nil))
241244 let gotUsdt = if ((0 >= canGetUsdt))
242245 then 0
243246 else asTwoIntsTuple(invoke(economyContract, "sellResourcesWorld", [addr, availRes], nil))._1
244247 (gotUsdt * USDT2ACRES_MULTIPLIER)
245248 }
246249 }
247250
248251
249252 func mergeLocked (oldAmount,oldETA,newAmount,newETA) = {
250253 let now = lastBlock.timestamp
251254 let dt1 = max([0, (oldETA - now)])
252255 let dt2 = max([0, (newETA - now)])
253256 let sum = (oldAmount + newAmount)
254257 let dt = if ((sum == 0))
255258 then 0
256259 else (fraction(dt1, oldAmount, sum) + fraction(dt2, newAmount, sum))
257260 (now + dt)
258261 }
259262
260263
261264 @Callable(i)
262265 func constructorV1 (restAddr,unstakedPieces) = if ((i.caller != this))
263266 then throw("Permission denied")
264267 else if (isDefined(getBinary(acresAssetIdKey)))
265268 then throw("Already initialized")
266269 else {
267270 let nftAcres = (getVotingPower("")[IdxEffTotal] + unstakedPieces)
268271 let issuedAmount = (MILLION6 - (nftAcres * MULT8))
269272 let issue = Issue("ACRES", "WavesLands land acres investment token", issuedAmount, 8, false, unit, 0)
270273 let assetId = calculateAssetId(issue)
271274 [issue, IntegerEntry(acresIssuedAmountKey, issuedAmount), BinaryEntry(acresAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr)]
272275 }
273276
274277
275278
276279 @Callable(i)
277280 func unstakeAcres (amount) = {
278281 let prologResult = prolog()
279282 if ((prologResult == prologResult))
280283 then if ((0 >= amount))
281284 then throw("Amount should be positive")
282285 else {
283286 let address = toString(i.caller)
284287 if ((size(i.payments) != 0))
285288 then throw("No payments required")
286289 else {
287290 let timeKey = keyAcresStakedTimeByUser(address)
288291 let amountKey = keyAcresStakedAmountByUser(address)
289292 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
290293 if ((amount > oldAcresAmount))
291294 then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(amount, 8)))
292295 else {
293296 let lockedAmount = valueOrElse(getInteger(keyAcresLockedAmountByUser(address)), 0)
294297 let lockedETA = valueOrElse(getInteger(keyAcresLockedEtaByUser(address)), 0)
295298 let now = lastBlock.timestamp
296299 if (if ((now >= PROMO_2_START_TIMESTAMP))
297300 then (PROMO_2_END_TIMESTAMP >= now)
298301 else false)
299302 then throw("You cannot unstake ACRES during Promo2")
300303 else {
301304 let unstakableAmount = if (isBlacklistedPromo1(address))
302305 then ((oldAcresAmount - lockedAmount) - PROMO1_AMOUNT)
303306 else (oldAcresAmount - lockedAmount)
304307 if (if ((lockedETA > now))
305308 then (amount > unstakableAmount)
306309 else false)
307310 then throw(((("Only " + fixedPoint(unstakableAmount, 8)) + " ACRES can be unstaked now, wait until ") + toString(lockedETA)))
308311 else {
309312 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
310313 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
311314 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
312315 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, (oldAcresAmount - amount)), IntegerEntry(acresStakedTotalKey, (oldTotal - amount)), ScriptTransfer(i.caller, (amount + claimedAcres), acresAssetId)], $Tuple2(prologResult, wlgResult))
313316 }
314317 }
315318 }
316319 }
317320 }
318321 else throw("Strict value is not equal to itself.")
319322 }
320323
321324
322325
323326 @Callable(i)
324327 func stakeAcres () = {
325328 let prologResult = prolog()
326329 if ((prologResult == prologResult))
327330 then {
328331 let address = toString(i.caller)
329332 if ((size(i.payments) != 1))
330333 then throw("exactly 1 payment must be attached")
331334 else {
332335 let pmt = i.payments[0]
333336 let amt = pmt.amount
334337 if (if (!(isDefined(pmt.assetId)))
335338 then true
336339 else (value(pmt.assetId) != acresAssetId))
337340 then throw("ACRES payments only!")
338341 else {
339342 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
340343 if ((wlgResult == wlgResult))
341344 then {
342345 let now = lastBlock.timestamp
343346 if (if ((PROMO_2_START_TIMESTAMP > now))
344347 then true
345348 else (now > PROMO_2_END_TIMESTAMP))
346349 then {
347350 let timeKey = keyAcresStakedTimeByUser(address)
348351 let amountKey = keyAcresStakedAmountByUser(address)
349352 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
350353 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
351354 let claimedAcres = claimInternal(address, oldAcresAmount, valueOrElse(getInteger(timeKey), 0))
352355 $Tuple2(((((if ((claimedAcres == 0))
353356 then nil
354357 else [ScriptTransfer(i.caller, claimedAcres, acresAssetId)]) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(amountKey, (oldAcresAmount + amt))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amt))), $Tuple2(prologResult, wlgResult))
355358 }
356359 else if ((MIN_ACRES_AMOUNT_DURING_PROMO > amt))
357360 then throw((("Min staked amount during promo action should be at least " + fixedPoint(MIN_ACRES_AMOUNT_DURING_PROMO, 8)) + " ACRES"))
358361 else {
359362 let stakeResult = invoke(this, "sendLockedAcres", [address, amt, 30], nil)
360363 let promo2Map = valueOrElse(getString(promo2MapKey), "")
361364 let newMap2 = if (contains(promo2Map, address))
362365 then {
363366 let parts = split_51C(promo2Map, address)
364367 let oldAmount = parseIntValue(take(drop(parts[1], 1), 14))
365368 ((((parts[0] + address) + ":") + padL((oldAmount + amt), 14)) + drop(parts[1], 15))
366369 }
367370 else {
368371 let finalPart = ((address + ":") + padL(amt, 14))
369372 if ((promo2Map == ""))
370373 then finalPart
371374 else ((promo2Map + "_") + finalPart)
372375 }
373376 $Tuple2([StringEntry(promo2MapKey, newMap2)], $Tuple3(prologResult, wlgResult, stakeResult))
374377 }
375378 }
376379 else throw("Strict value is not equal to itself.")
377380 }
378381 }
379382 }
380383 else throw("Strict value is not equal to itself.")
381384 }
382385
383386
384387
385388 @Callable(i)
386389 func buyAcres () = {
387390 let prologResult = prolog()
388391 if ((prologResult == prologResult))
389392 then {
390393 let address = toString(i.caller)
391394 if ((size(i.payments) != 1))
392395 then throw("exactly 1 payment must be attached")
393396 else {
394397 let pmt = i.payments[0]
395398 let amt = pmt.amount
396399 if (if (!(isDefined(pmt.assetId)))
397400 then true
398401 else (value(pmt.assetId) != usdtAssetId))
399402 then throw("USDT payments only!")
400403 else if ((MULT6 > amt))
401404 then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT"))
402405 else {
403406 let acresAmount = (amt * USDT2ACRES_MULTIPLIER)
404407 let accStatsResult = asInt(invoke(stakingContract, "updateAccStats", [address, fraction(xpNewSLand, acresAmount, (25 * MULT8))], nil))
405408 $Tuple2([ScriptTransfer(economyContract, amt, usdtAssetId), ScriptTransfer(i.caller, acresAmount, acresAssetId)], $Tuple2(prologResult, accStatsResult))
406409 }
407410 }
408411 }
409412 else throw("Strict value is not equal to itself.")
410413 }
411414
412415
413416
414417 @Callable(i)
415418 func sendAcres (addr,amount) = if ((i.caller != economyContract))
416419 then throw("Permission denied")
417420 else $Tuple2([ScriptTransfer(addressFromStringValue(addr), amount, acresAssetId)], amount)
418421
419422
420423
421424 @Callable(i)
422425 func sendLockedAcres (addr,amount,lockDays) = if (if ((i.caller != this))
423426 then (i.caller != restContract)
424427 else false)
425428 then throw("Permission denied")
426429 else {
427430 let now = lastBlock.timestamp
428431 let timeKey = keyAcresStakedTimeByUser(addr)
429432 let amountKey = keyAcresStakedAmountByUser(addr)
430433 let oldAcresAmount = valueOrElse(getInteger(amountKey), 0)
431434 let oldTotal = valueOrElse(getInteger(acresStakedTotalKey), 0)
432435 let timeAction = if (isDefined(getInteger(timeKey)))
433436 then nil
434437 else [IntegerEntry(timeKey, now)]
435438 let etaKey = keyAcresLockedEtaByUser(addr)
436439 let lockedAmountKey = keyAcresLockedAmountByUser(addr)
437440 let oldLockedAmount = valueOrElse(getInteger(lockedAmountKey), 0)
438441 let oldLockedETA = valueOrElse(getInteger(etaKey), 0)
439442 let mergedETA = mergeLocked(oldLockedAmount, oldLockedETA, amount, (now + (lockDays * DAYMILLIS)))
440443 $Tuple2(((((timeAction :+ IntegerEntry(amountKey, (oldAcresAmount + amount))) :+ IntegerEntry(acresStakedTotalKey, (oldTotal + amount))) :+ IntegerEntry(etaKey, mergedETA)) :+ IntegerEntry(lockedAmountKey, (oldLockedAmount + amount))), amount)
441444 }
442445
443446
444447
445448 @Callable(i)
446449 func burnAcres (amount) = if ((i.caller != stakingContract))
447450 then throw("Permission denied")
448451 else {
449452 let amountLeft = (valueOrElse(getInteger(acresIssuedAmountKey), 0) - amount)
450453 if ((0 > amountLeft))
451454 then throw("Attempt to burn more ACRES, than exists")
452455 else $Tuple2([Burn(acresAssetId, amount), IntegerEntry(acresIssuedAmountKey, amountLeft)], amount)
453456 }
454457
455458
456459
457460 @Callable(i)
458461 func claimAcres () = {
459462 let prologResult = prolog()
460463 if ((prologResult == prologResult))
461464 then {
462465 let address = toString(i.caller)
463466 if ((size(i.payments) != 0))
464467 then throw("No payments required")
465468 else {
466469 let timeKey = keyAcresStakedTimeByUser(address)
467470 let amountKey = keyAcresStakedAmountByUser(address)
468471 let acresAmount = valueOrElse(getInteger(amountKey), 0)
469472 let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil)
470473 let claimedAcres = claimInternal(address, acresAmount, valueOrElse(getInteger(timeKey), 0))
471474 $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), ScriptTransfer(i.caller, claimedAcres, acresAssetId)], $Tuple2(prologResult, wlgResult))
472475 }
473476 }
474477 else throw("Strict value is not equal to itself.")
475478 }
476479
477480
478481
479482 @Callable(i)
480483 func claimAcresREADONLY (address) = {
481484 let timeKey = keyAcresStakedTimeByUser(address)
482485 let amountKey = keyAcresStakedAmountByUser(address)
483486 let acresAmount = valueOrElse(getInteger(amountKey), 0)
484487 let lastTime = valueOrElse(getInteger(timeKey), 0)
485488 let claimedAcres = claimAcresInternal(address, acresAmount, lastTime)
486489 $Tuple2(nil, [claimedAcres, lastTime])
487490 }
488491
489492
490493
491494 @Callable(i)
492495 func claimPromo2 () = {
493496 let prologResult = prolog()
494497 if ((prologResult == prologResult))
495498 then {
496499 let address = toString(i.caller)
497500 if ((size(i.payments) != 0))
498501 then throw("No payments required")
499502 else {
500503 let now = lastBlock.timestamp
501504 if ((PROMO_2_END_TIMESTAMP > now))
502505 then throw("Promo 2 is not over yet")
503506 else {
504507 let awardedKey = keyIsAwardedByPromoAndUser(2, address)
505508 if (valueOrElse(getBoolean(awardedKey), false))
506509 then throw((("Your wallet " + address) + " is already awarded in promo 2"))
507510 else {
508511 let promo2Map = valueOrElse(getString(promo2MapKey), "")
509512 if (!(contains(promo2Map, address)))
510513 then throw("You are not participant of promo 2")
511514 else {
512515 let parts = split_51C(promo2Map, address)
513516 let acresAmount = parseIntValue(take(drop(parts[1], 1), 14))
514517 let tickets = (acresAmount / MIN_ACRES_AMOUNT_DURING_PROMO)
515518 let totalTikets = valueOrElse(getInteger(keyTicketsTotalByPromo(2)), 0)
516- let $t01238112821 = if ((totalTikets == 0))
519+ let $t01254712987 = if ((totalTikets == 0))
517520 then {
518521 func countTickets (acc,el) = (acc + (parseIntValue(split(el, ":")[1]) / MIN_ACRES_AMOUNT_DURING_PROMO))
519522
520523 let ticketsCount = {
521524 let $l = split_51C(promo2Map, "_")
522525 let $s = size($l)
523526 let $acc0 = 0
524527 func $f0_1 ($a,$i) = if (($i >= $s))
525528 then $a
526529 else countTickets($a, $l[$i])
527530
528531 func $f0_2 ($a,$i) = if (($i >= $s))
529532 then $a
530533 else throw("List size exceeds 50")
531534
532535 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
533536 }
534537 $Tuple2([IntegerEntry(keyTicketsTotalByPromo(2), ticketsCount), IntegerEntry(keyTicketsTotalByPromoAndRound(2, 1), ticketsCount)], ticketsCount)
535538 }
536539 else $Tuple2(nil, totalTikets)
537- let ticketsActions = $t01238112821._1
538- let totalCount = $t01238112821._2
540+ let ticketsActions = $t01254712987._1
541+ let totalCount = $t01254712987._2
539542 let award = fraction(PROMO_2_DISTRIBUTION_FUND, tickets, totalCount)
540543 let stakeResult = invoke(this, "sendLockedAcres", [address, award, 30], nil)
541544 $Tuple2(((ticketsActions :+ BooleanEntry(awardedKey, true)) :+ StringEntry(keyPromo2MapForRound(1), promo2Map)), stakeResult)
542545 }
543546 }
544547 }
545548 }
546549 }
547550 else throw("Strict value is not equal to itself.")
548551 }
549552
550553
551554
552555 @Callable(i)
553-func commitForPromo2Round (roundId) = if ((i.caller != this))
556+func initPromo3 (promo3Map) = if ((i.caller != this))
557+ then throw("Permission denied")
558+ else {
559+ func countTickets (acc,el) = (acc + parseIntValue(split(el, ":")[1]))
560+
561+ let ticketsTotal = {
562+ let $l = split_51C(promo3Map, "_")
563+ let $s = size($l)
564+ let $acc0 = 0
565+ func $f0_1 ($a,$i) = if (($i >= $s))
566+ then $a
567+ else countTickets($a, $l[$i])
568+
569+ func $f0_2 ($a,$i) = if (($i >= $s))
570+ then $a
571+ else throw("List size exceeds 20")
572+
573+ $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)
574+ }
575+ $Tuple2([IntegerEntry(keyTicketsTotalByPromoAndRound(3, 1), ticketsTotal), StringEntry(keyPromo3MapForRound(1), promo3Map)], ticketsTotal)
576+ }
577+
578+
579+
580+@Callable(i)
581+func commitForPromo3Round (roundId) = if ((i.caller != this))
554582 then throw("Permission denied")
555583 else if (if ((1 > roundId))
556584 then true
557- else (roundId > 4))
585+ else (roundId > 2))
558586 then throw(("Invalid roundId: " + toString(roundId)))
559587 else {
560588 let finishBlock = (height + randomDelay)
561- $Tuple2([IntegerEntry(keyCommit(("2_" + toString(roundId))), finishBlock)], finishBlock)
589+ $Tuple2([IntegerEntry(keyCommit(("3_" + toString(roundId))), finishBlock)], finishBlock)
562590 }
563591
564592
565593
566594 @Callable(i)
567-func drawPromo2Round (roundId) = if ((i.caller != this))
595+func drawPromo3Round (roundId) = if ((i.caller != this))
568596 then throw("Permission denied")
569597 else if (if ((1 > roundId))
570598 then true
571- else (roundId > 4))
599+ else (roundId > 2))
572600 then throw(("Invalid roundId: " + toString(roundId)))
573601 else {
574- let finishKey = keyCommit(("2_" + toString(roundId)))
575- let finishBlock = valueOrErrorMessage(getInteger(finishKey), (("You have to commitForPromo2Round(" + toString(roundId)) + ") first!"))
602+ let finishKey = keyCommit(("3_" + toString(roundId)))
603+ let finishBlock = valueOrErrorMessage(getInteger(finishKey), (("You have to commitForPromo3Round(" + toString(roundId)) + ") first!"))
576604 if ((finishBlock > height))
577605 then throw((((("Random number is not ready yet, wait until height = " + toString(finishBlock)) + " (current height = ") + toString(height)) + ")"))
578606 else {
579- let maxValue = valueOrElse(getInteger(keyTicketsTotalByPromoAndRound(2, roundId)), 0)
607+ let maxValue = valueOrElse(getInteger(keyTicketsTotalByPromoAndRound(3, roundId)), 0)
580608 if ((maxValue == 0))
581- then throw("No tickets to draw (was claimPromo2() called at least once?)")
609+ then throw("No tickets to draw")
582610 else {
583611 let entropy = value(value(blockInfoByHeight(finishBlock)).vrf)
584612 let salt = i.transactionId
585- let promo2Map = valueOrElse(getString(keyPromo2MapForRound(roundId)), "")
586- func singleDraw (ac,j) = if ((j >= promo2NumPrizesPerRound[(roundId - 1)]))
613+ let promo3Map = valueOrElse(getString(keyPromo3MapForRound(roundId)), "")
614+ func singleDraw (ac,j) = if ((j >= promo3NumPrizesPerRound[(roundId - 1)]))
587615 then ac
588616 else {
589617 let rand = getRandomNumber(ac._1, ac._2, entropy)
590- let promo2List = if ((ac._3 == ""))
618+ let promo3List = if ((ac._3 == ""))
591619 then nil
592620 else split_51C(ac._3, "_")
593621 func countTickets (acc,el) = {
594622 let parts = split(el, ":")
595623 let addr = parts[0]
596- let tickets = (parseIntValue(parts[1]) / MIN_ACRES_AMOUNT_DURING_PROMO)
624+ let tickets = parseIntValue(parts[1])
597625 let newTotal = (acc._1 + tickets)
598626 if (if ((acc._3 == ""))
599627 then (newTotal > rand)
600628 else false)
601629 then $Tuple3(newTotal, tickets, addr)
602630 else $Tuple3(newTotal, acc._2, acc._3)
603631 }
604632
605633 let r = {
606- let $l = promo2List
634+ let $l = promo3List
607635 let $s = size($l)
608636 let $acc0 = $Tuple3(0, 0, "")
609637 func $f0_1 ($a,$i) = if (($i >= $s))
610638 then $a
611639 else countTickets($a, $l[$i])
612640
613641 func $f0_2 ($a,$i) = if (($i >= $s))
614642 then $a
615- else throw("List size exceeds 50")
643+ else throw("List size exceeds 20")
616644
617- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
645+ $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)
618646 }
619647 let winner = r._3
620648 if ((winner == ""))
621649 then ac
622650 else {
623651 let mapParts = split_51C(ac._3, winner)
624652 let newMap = if ((mapParts[0] == ""))
625- then drop(mapParts[1], 16)
626- else (dropRight(mapParts[0], 1) + drop(mapParts[1], 15))
627- let stakeResult = invoke(this, "sendLockedAcres", [winner, promo2AwardPerRound[(roundId - 1)], 30], nil)
628- $Tuple4((ac._1 - r._2), fromBase58String(getStringValue(stakingContract, keyLastTxIdByUser(winner))), newMap, (ac._4 :+ stakeResult))
653+ then drop(mapParts[1], 4)
654+ else (dropRight(mapParts[0], 1) + drop(mapParts[1], 3))
655+ let stakeResult = invoke(this, "sendLockedAcres", [winner, promo3AwardPerRound[(roundId - 1)], 30], nil)
656+ let newSalt = fromBase58String(valueOrElse(getString(stakingContract, keyLastTxIdByUser(winner)), "DEFAULT"))
657+ $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ stakeResult))
629658 }
630659 }
631660
632661 let draws = {
633- let $l = ITER20
662+ let $l = ITER6
634663 let $s = size($l)
635- let $acc0 = $Tuple4(maxValue, i.transactionId, promo2Map, nil)
664+ let $acc0 = $Tuple4(maxValue, i.transactionId, promo3Map, nil)
636665 func $f0_1 ($a,$i) = if (($i >= $s))
637666 then $a
638667 else singleDraw($a, $l[$i])
639668
640669 func $f0_2 ($a,$i) = if (($i >= $s))
641670 then $a
642- else throw("List size exceeds 20")
671+ else throw("List size exceeds 6")
643672
644- $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)
673+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
645674 }
646- $Tuple2([DeleteEntry(finishKey), StringEntry(keyPromo2MapForRound((roundId + 1)), draws._3), IntegerEntry(keyTicketsTotalByPromoAndRound(2, (roundId + 1)), draws._1)], draws._4)
675+ $Tuple2([DeleteEntry(finishKey), StringEntry(keyPromo3MapForRound((roundId + 1)), draws._3), IntegerEntry(keyTicketsTotalByPromoAndRound(3, (roundId + 1)), draws._1)], draws._4)
647676 }
648677 }
649678 }
650679
651680

github/deemru/w8io/169f3d6 
106.61 ms