tx · 6uedwq4r2S4T3BUsVkRYiVsA7cXRgQ4cPqPUgwDEtKaP 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.03800000 Waves 2024.12.15 01:15 [3414849] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "6uedwq4r2S4T3BUsVkRYiVsA7cXRgQ4cPqPUgwDEtKaP", "fee": 3800000, "feeAssetId": null, "timestamp": 1734214633271, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "63TY9NNApFR3DtV7vkQZs6oTx8hLm3jFU8SrDxNoqTJNaTaoRivXp7dvEgk3KvJ8Se6EnQY29eqaf7WHPRf5xYPU" ], "script": "base64:BgJaCAISABIECgIICBIDCgEEEgMKAQESABIFCgMIAQQSABIDCgEBEgASBAoCCAESABIDCgEIEgMKAQgSBAoCCAESAwoBCBIDCgEIEgASAwoBCBIAEgASABIDCgEBjwEAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAGTVVMVDE0AICA6YOx3hYACkRBWV9NSUxMSVMAgLiZKQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoAE09ORV9QRVJDRU5UX0RJVklTT1IAZAAMUkFORE9NX0RFTEFZAAIAFE5GVF9DSEVTVF9QUklDRV9VU0RUAMCWsQIABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABABdEQUlMWV9QUk9NT19TVEFSVF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMACA75ECAwkAAAIBAVQFByRtYXRjaDAAwKbQAQkAAgECDVVua25vd24gY2hhaW4AFURBSUxZX1BST01PX0VORF9CTE9DSwQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBV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CAUFZHJhd3MCXzQCAV8FA25pbAAAAGp9X3Y=", "height": 3414849, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9oRr1R77X9UFaYcZEGb9BpRSJFDVPzHseyZr8xcWrVX2 Next: 9t8hCM8sS1frREDQzwnbhsjFE9YMnvQPYPy5rL3hqGFF Diff:
Old | New | Differences | |
---|---|---|---|
188 | 188 | ||
189 | 189 | let keyPromoMap = "promoMap" | |
190 | 190 | ||
191 | - | func | |
191 | + | func keyPromoRoundWinners (day) = ("dailyWinners_" + toString(day)) | |
192 | 192 | ||
193 | - | ||
194 | - | let promoNumPrizes = 6 | |
195 | 193 | ||
196 | 194 | let promoAwardPerRound = [0, 500000000, 100000000, 100000000, 100000000, 100000000] | |
197 | 195 | ||
1240 | 1238 | ||
1241 | 1239 | ||
1242 | 1240 | @Callable(i) | |
1243 | - | func | |
1241 | + | func drawPromoRound (roundId) = if ((i.caller != this)) | |
1244 | 1242 | then throw("Permission denied") | |
1245 | 1243 | else { | |
1246 | 1244 | let today = (height / DAY_BLOCKS) | |
1257 | 1255 | if ((promoMap == "")) | |
1258 | 1256 | then throw("No participants") | |
1259 | 1257 | else { | |
1260 | - | func singleDraw (ac,j) = if ((j >= promoNumPrizes)) | |
1261 | - | then ac | |
1262 | - | else { | |
1263 | - | let rand = getRandomNumber(ac._1, ac._2, entropy) | |
1264 | - | let promoList = if ((ac._3 == "")) | |
1265 | - | then nil | |
1266 | - | else split_51C(ac._3, "_") | |
1267 | - | func countTickets (acc,el) = { | |
1268 | - | let parts = split(el, ":") | |
1269 | - | let addr = parts[0] | |
1270 | - | let tickets = parseIntValue(parts[1]) | |
1271 | - | let newTotal = (acc._1 + tickets) | |
1272 | - | if (if ((acc._3 == "")) | |
1273 | - | then (newTotal > rand) | |
1274 | - | else false) | |
1275 | - | then $Tuple3(newTotal, tickets, addr) | |
1276 | - | else $Tuple3(newTotal, acc._2, acc._3) | |
1258 | + | func singleDraw (ac,j) = { | |
1259 | + | let promoList = if ((ac._3 == "")) | |
1260 | + | then nil | |
1261 | + | else split_51C(ac._3, "_") | |
1262 | + | if ((j >= size(promoList))) | |
1263 | + | then ac | |
1264 | + | else { | |
1265 | + | let rand = getRandomNumber(ac._1, ac._2, entropy) | |
1266 | + | func countTickets (acc,el) = { | |
1267 | + | let parts = split(el, ":") | |
1268 | + | let addr = parts[0] | |
1269 | + | let tickets = parseIntValue(parts[1]) | |
1270 | + | let newTotal = (acc._1 + tickets) | |
1271 | + | if (if ((acc._3 == "")) | |
1272 | + | then (newTotal > rand) | |
1273 | + | else false) | |
1274 | + | then $Tuple3(newTotal, tickets, addr) | |
1275 | + | else $Tuple3(newTotal, acc._2, acc._3) | |
1276 | + | } | |
1277 | + | ||
1278 | + | let r = { | |
1279 | + | let $l = promoList | |
1280 | + | let $s = size($l) | |
1281 | + | let $acc0 = $Tuple3(0, 0, "") | |
1282 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1283 | + | then $a | |
1284 | + | else countTickets($a, $l[$i]) | |
1285 | + | ||
1286 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1287 | + | then $a | |
1288 | + | else throw("List size exceeds 200") | |
1289 | + | ||
1290 | + | $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($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115), 116), 117), 118), 119), 120), 121), 122), 123), 124), 125), 126), 127), 128), 129), 130), 131), 132), 133), 134), 135), 136), 137), 138), 139), 140), 141), 142), 143), 144), 145), 146), 147), 148), 149), 150), 151), 152), 153), 154), 155), 156), 157), 158), 159), 160), 161), 162), 163), 164), 165), 166), 167), 168), 169), 170), 171), 172), 173), 174), 175), 176), 177), 178), 179), 180), 181), 182), 183), 184), 185), 186), 187), 188), 189), 190), 191), 192), 193), 194), 195), 196), 197), 198), 199), 200) | |
1291 | + | } | |
1292 | + | let winner = r._3 | |
1293 | + | if ((winner == "")) | |
1294 | + | then ac | |
1295 | + | else { | |
1296 | + | let mapParts = split_51C(ac._3, winner) | |
1297 | + | let newMap = if ((mapParts[0] == "")) | |
1298 | + | then drop(mapParts[1], 5) | |
1299 | + | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1300 | + | let winActions = if ((j == 0)) | |
1301 | + | then invoke(this, "issueMittenP", [winner], nil) | |
1302 | + | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1303 | + | if ((winActions == winActions)) | |
1304 | + | then { | |
1305 | + | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1306 | + | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1307 | + | } | |
1308 | + | else throw("Strict value is not equal to itself.") | |
1309 | + | } | |
1277 | 1310 | } | |
1278 | - | ||
1279 | - | let r = { | |
1280 | - | let $l = promoList | |
1281 | - | let $s = size($l) | |
1282 | - | let $acc0 = $Tuple3(0, 0, "") | |
1283 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1284 | - | then $a | |
1285 | - | else countTickets($a, $l[$i]) | |
1286 | - | ||
1287 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1288 | - | then $a | |
1289 | - | else throw("List size exceeds 200") | |
1290 | - | ||
1291 | - | $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($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115), 116), 117), 118), 119), 120), 121), 122), 123), 124), 125), 126), 127), 128), 129), 130), 131), 132), 133), 134), 135), 136), 137), 138), 139), 140), 141), 142), 143), 144), 145), 146), 147), 148), 149), 150), 151), 152), 153), 154), 155), 156), 157), 158), 159), 160), 161), 162), 163), 164), 165), 166), 167), 168), 169), 170), 171), 172), 173), 174), 175), 176), 177), 178), 179), 180), 181), 182), 183), 184), 185), 186), 187), 188), 189), 190), 191), 192), 193), 194), 195), 196), 197), 198), 199), 200) | |
1292 | - | } | |
1293 | - | let winner = r._3 | |
1294 | - | if ((winner == "")) | |
1295 | - | then ac | |
1296 | - | else { | |
1297 | - | let mapParts = split_51C(ac._3, winner) | |
1298 | - | let newMap = if ((mapParts[0] == "")) | |
1299 | - | then drop(mapParts[1], 5) | |
1300 | - | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1301 | - | let winActions = if ((j == 0)) | |
1302 | - | then invoke(this, "issueMittenP", [winner], nil) | |
1303 | - | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1304 | - | if ((winActions == winActions)) | |
1305 | - | then { | |
1306 | - | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1307 | - | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1308 | - | } | |
1309 | - | else throw("Strict value is not equal to itself.") | |
1310 | - | } | |
1311 | - | } | |
1311 | + | } | |
1312 | 1312 | ||
1313 | 1313 | let draws = { | |
1314 | 1314 | let $l = [0, 1, 2, 3, 4, 5] | |
1324 | 1324 | ||
1325 | 1325 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1326 | 1326 | } | |
1327 | - | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry( | |
1327 | + | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry(keyPromoRoundWinners(roundId), makeString(draws._4, "_"))], 0) | |
1328 | 1328 | } | |
1329 | 1329 | } | |
1330 | 1330 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULT7 = 10000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULT14 = 100000000000000 | |
13 | 13 | ||
14 | 14 | let DAY_MILLIS = 86400000 | |
15 | 15 | ||
16 | 16 | let USDT2ACRES_MULTIPLIER = 10 | |
17 | 17 | ||
18 | 18 | let ONE_PERCENT_DIVISOR = 100 | |
19 | 19 | ||
20 | 20 | let RANDOM_DELAY = 2 | |
21 | 21 | ||
22 | 22 | let NFT_CHEST_PRICE_USDT = 5000000 | |
23 | 23 | ||
24 | 24 | let chain = take(drop(this.bytes, 1), 1) | |
25 | 25 | ||
26 | 26 | let DAILY_PROMO_START_BLOCK = match chain { | |
27 | 27 | case _ => | |
28 | 28 | if ((base58'2W' == $match0)) | |
29 | 29 | then 4487040 | |
30 | 30 | else if ((base58'2T' == $match0)) | |
31 | 31 | then 3412800 | |
32 | 32 | else throw("Unknown chain") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | let DAILY_PROMO_END_BLOCK = match chain { | |
36 | 36 | case _ => | |
37 | 37 | if ((base58'2W' == $match0)) | |
38 | 38 | then 4517280 | |
39 | 39 | else if ((base58'2T' == $match0)) | |
40 | 40 | then 3443040 | |
41 | 41 | else throw("Unknown chain") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | let DAY_BLOCKS = match chain { | |
45 | 45 | case _ => | |
46 | 46 | if ((base58'2W' == $match0)) | |
47 | 47 | then 1440 | |
48 | 48 | else if ((base58'2T' == $match0)) | |
49 | 49 | then 60 | |
50 | 50 | else throw("Unknown chain") | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | let WEEK_BLOCKS = match chain { | |
54 | 54 | case _ => | |
55 | 55 | if ((base58'2W' == $match0)) | |
56 | 56 | then 10080 | |
57 | 57 | else if ((base58'2T' == $match0)) | |
58 | 58 | then 180 | |
59 | 59 | else throw("Unknown chain") | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | let VRF_OFFSET = match chain { | |
63 | 63 | case _ => | |
64 | 64 | if ((base58'2W' == $match0)) | |
65 | 65 | then 0 | |
66 | 66 | else if ((base58'2T' == $match0)) | |
67 | 67 | then 1146000 | |
68 | 68 | else throw("Unknown chain") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let usdtAssetId = match chain { | |
72 | 72 | case _ => | |
73 | 73 | if ((base58'2W' == $match0)) | |
74 | 74 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
75 | 75 | else if ((base58'2T' == $match0)) | |
76 | 76 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
77 | 77 | else throw("Unknown chain") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let defaultRest2AddressStr = match chain { | |
81 | 81 | case _ => | |
82 | 82 | if ((base58'2W' == $match0)) | |
83 | 83 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
84 | 84 | else if ((base58'2T' == $match0)) | |
85 | 85 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
86 | 86 | else throw("Unknown chain") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let arbitrageDelay = match chain { | |
90 | 90 | case _ => | |
91 | 91 | if ((base58'2W' == $match0)) | |
92 | 92 | then DAY_MILLIS | |
93 | 93 | else if ((base58'2T' == $match0)) | |
94 | 94 | then 60000 | |
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let oldStakingContractStr = match chain { | |
99 | 99 | case _ => | |
100 | 100 | if ((base58'2W' == $match0)) | |
101 | 101 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
102 | 102 | else if ((base58'2T' == $match0)) | |
103 | 103 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
104 | 104 | else throw("Unknown chain") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | let IdxCfgAcres2Dapp = 1 | |
111 | 111 | ||
112 | 112 | let IdxCfgWlgDapp = 2 | |
113 | 113 | ||
114 | 114 | let IdxCfgInvestFundDapp = 5 | |
115 | 115 | ||
116 | 116 | let IdxCfgMarketDapp = 6 | |
117 | 117 | ||
118 | 118 | func keyRestCfg () = "%s__restConfig" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyRest2Address () = "%s__rest2Addr" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
131 | 131 | ||
132 | 132 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
133 | 133 | ||
134 | 134 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
135 | 135 | ||
136 | 136 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
137 | 137 | ||
138 | 138 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
139 | 139 | ||
140 | 140 | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
141 | 141 | ||
142 | 142 | let oldAcresContractKey = "oldAcresContract" | |
143 | 143 | ||
144 | 144 | func keyBlocked () = "contractsBlocked" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyCurWeekTxIdByUser (addr) = ("curWeekTxIdByUser_" + addr) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyCommit (address) = ("finishBlockFor_" + address) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let wlgAssetIdKey = "wlg_assetId" | |
157 | 157 | ||
158 | 158 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
159 | 159 | ||
160 | 160 | let acresIssuedAmountKey = "acresIssuedAmount" | |
161 | 161 | ||
162 | 162 | let acresAssetIdKey = "acresAssetId" | |
163 | 163 | ||
164 | 164 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
165 | 165 | ||
166 | 166 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyStakedTimeByAssetIdAndOwner (assetId,addr) = ((("st_" + assetId) + "_") + addr) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyStakedNFTsByOwner (ownerAddr) = ("stakedNFTsByOwner_" + ownerAddr) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyUserPromoAcres (address) = ("promoAcres_" + address) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyUserPromoTickets (address) = ("promoTickets_" + address) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | let keyTotalPromoTickets = "totalPromoTickets" | |
188 | 188 | ||
189 | 189 | let keyPromoMap = "promoMap" | |
190 | 190 | ||
191 | - | func | |
191 | + | func keyPromoRoundWinners (day) = ("dailyWinners_" + toString(day)) | |
192 | 192 | ||
193 | - | ||
194 | - | let promoNumPrizes = 6 | |
195 | 193 | ||
196 | 194 | let promoAwardPerRound = [0, 500000000, 100000000, 100000000, 100000000, 100000000] | |
197 | 195 | ||
198 | 196 | func asInt (v) = match v { | |
199 | 197 | case n: Int => | |
200 | 198 | n | |
201 | 199 | case _ => | |
202 | 200 | throw("fail to cast into Int") | |
203 | 201 | } | |
204 | 202 | ||
205 | 203 | ||
206 | 204 | func asTuple5Ints (val) = match val { | |
207 | 205 | case t: (Int, Int, Int, Int, Int) => | |
208 | 206 | t | |
209 | 207 | case _ => | |
210 | 208 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
211 | 209 | } | |
212 | 210 | ||
213 | 211 | ||
214 | 212 | func asTuple4Ints (val) = match val { | |
215 | 213 | case t: (Int, Int, Int, Int) => | |
216 | 214 | t | |
217 | 215 | case _ => | |
218 | 216 | throw("fail to cast into (Int, Int, Int, Int)") | |
219 | 217 | } | |
220 | 218 | ||
221 | 219 | ||
222 | 220 | func asTuple3Ints (val) = match val { | |
223 | 221 | case t: (Int, Int, Int) => | |
224 | 222 | t | |
225 | 223 | case _ => | |
226 | 224 | throw("fail to cast into (Int, Int, Int)") | |
227 | 225 | } | |
228 | 226 | ||
229 | 227 | ||
230 | 228 | func asTuple2Ints (val) = match val { | |
231 | 229 | case t: (Int, Int) => | |
232 | 230 | t | |
233 | 231 | case _ => | |
234 | 232 | throw("fail to cast into (Int, Int)") | |
235 | 233 | } | |
236 | 234 | ||
237 | 235 | ||
238 | 236 | func fixedPoint (val,decimals) = { | |
239 | 237 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
240 | 238 | let lowPart = toString((val % tenPow)) | |
241 | 239 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
242 | 240 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
243 | 241 | } | |
244 | 242 | ||
245 | 243 | ||
246 | 244 | func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue)) | |
247 | 245 | then throw("maxValue should be > 0") | |
248 | 246 | else { | |
249 | 247 | let randomHash = sha256_16Kb((salt + entropy)) | |
250 | 248 | (toInt(randomHash) % maxValue) | |
251 | 249 | } | |
252 | 250 | ||
253 | 251 | ||
254 | 252 | func padL (val,len) = { | |
255 | 253 | let valS = toString(val) | |
256 | 254 | let zeroes = drop(toString(pow(10, 0, (len - size(valS)), 0, 0, DOWN)), 1) | |
257 | 255 | (zeroes + valS) | |
258 | 256 | } | |
259 | 257 | ||
260 | 258 | ||
261 | 259 | let M6_ = 1000000 | |
262 | 260 | ||
263 | 261 | let M8_ = 100000000 | |
264 | 262 | ||
265 | 263 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
266 | 264 | ||
267 | 265 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
268 | 266 | ||
269 | 267 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
270 | 268 | ||
271 | 269 | ||
272 | 270 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
273 | 271 | ||
274 | 272 | ||
275 | 273 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
276 | 274 | ||
277 | 275 | let totalFarmingPowerKey = "totalFarmingPower" | |
278 | 276 | ||
279 | 277 | let MAX_WL_NFTS = 3 | |
280 | 278 | ||
281 | 279 | let MAX_ARK_NFTS = 1 | |
282 | 280 | ||
283 | 281 | let ARK_NFT_BONUS = 5000 | |
284 | 282 | ||
285 | 283 | let MAX_NFTS_STAKED_BY_USER = 4 | |
286 | 284 | ||
287 | 285 | let keyNftTotalIssued = "nftTotalIssued" | |
288 | 286 | ||
289 | 287 | let keyNftTotalBurned = "nftTotalBurned" | |
290 | 288 | ||
291 | 289 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
292 | 290 | ||
293 | 291 | let keyArkNftTotalStaked = "ArkNftTotalStaked" | |
294 | 292 | ||
295 | 293 | func keyNftNumberByAssetId (assetId) = ("nftNumberByAssetId_" + assetId) | |
296 | 294 | ||
297 | 295 | ||
298 | 296 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
299 | 297 | ||
300 | 298 | ||
301 | 299 | func keyUserArkNftNumber (addr) = ("userArkNftNumber_" + addr) | |
302 | 300 | ||
303 | 301 | ||
304 | 302 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
305 | 303 | ||
306 | 304 | ||
307 | 305 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
308 | 306 | ||
309 | 307 | func getLevelByAcres (acres) = { | |
310 | 308 | let acr = ((acres + 99999999) / M8_) | |
311 | 309 | func checker (acc,item) = if ((item >= acr)) | |
312 | 310 | then acc | |
313 | 311 | else (acc + 1) | |
314 | 312 | ||
315 | 313 | let $l = levelAcres | |
316 | 314 | let $s = size($l) | |
317 | 315 | let $acc0 = 0 | |
318 | 316 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
319 | 317 | then $a | |
320 | 318 | else checker($a, $l[$i]) | |
321 | 319 | ||
322 | 320 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
323 | 321 | then $a | |
324 | 322 | else throw("List size exceeds 10") | |
325 | 323 | ||
326 | 324 | $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) | |
327 | 325 | } | |
328 | 326 | ||
329 | 327 | ||
330 | 328 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
331 | 329 | ||
332 | 330 | ||
333 | 331 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
334 | 332 | let notBonused = getFarmingPowerByAcres(acres) | |
335 | 333 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
336 | 334 | } | |
337 | 335 | ||
338 | 336 | ||
339 | 337 | let teamAddrKey = "teamAddr" | |
340 | 338 | ||
341 | 339 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
342 | 340 | ||
343 | 341 | ||
344 | 342 | let OLD_STAKING_DEADL = 1733346000000 | |
345 | 343 | ||
346 | 344 | let MAX_LANDS_TO_CONVERT = 14 | |
347 | 345 | ||
348 | 346 | let keyLastAcresSellTime = "lastAcresSellTime" | |
349 | 347 | ||
350 | 348 | let keyLastLimitLeft = "lastLimitLeft" | |
351 | 349 | ||
352 | 350 | let names = ["Gold shovel", "Pickaxe"] | |
353 | 351 | ||
354 | 352 | let descriptions = ["Reward for early birds", "Increases FarmPower", "New Year promo reward"] | |
355 | 353 | ||
356 | 354 | let idxDescrShovel = 0 | |
357 | 355 | ||
358 | 356 | let idxDescrPickaxe = 1 | |
359 | 357 | ||
360 | 358 | let idxDescrMitten = 2 | |
361 | 359 | ||
362 | 360 | let rarityThresholds = [5, 10, 20] | |
363 | 361 | ||
364 | 362 | let idxThresholdC = 0 | |
365 | 363 | ||
366 | 364 | let idxThresholdU = 1 | |
367 | 365 | ||
368 | 366 | let idxThresholdL = 2 | |
369 | 367 | ||
370 | 368 | let namez = ["SHOVEL", "PICKAXE", "MITTEN"] | |
371 | 369 | ||
372 | 370 | let idxNameShovel = 0 | |
373 | 371 | ||
374 | 372 | let idxNamePickaxe = 1 | |
375 | 373 | ||
376 | 374 | let idxNameMitten = 2 | |
377 | 375 | ||
378 | 376 | let contentKeyz = ["contentPickaxeC", "contentPickaxeU", "contentPickaxeL", "contentPickaxeE", "contentShovelP", "contentMittenP"] | |
379 | 377 | ||
380 | 378 | let idxKeyC = 0 | |
381 | 379 | ||
382 | 380 | let idxKeySP = 4 | |
383 | 381 | ||
384 | 382 | let idxKeyMP = 5 | |
385 | 383 | ||
386 | 384 | let rarityNames = ["Common", "Uncommon", "Legendary", "Epic", "Promo"] | |
387 | 385 | ||
388 | 386 | let idxRarityC = 0 | |
389 | 387 | ||
390 | 388 | let idxRarityU = 1 | |
391 | 389 | ||
392 | 390 | let idxRarityL = 2 | |
393 | 391 | ||
394 | 392 | let idxRarityE = 3 | |
395 | 393 | ||
396 | 394 | let idxRarityP = 4 | |
397 | 395 | ||
398 | 396 | let collectionz = ["Digging tools", "New Year gifts"] | |
399 | 397 | ||
400 | 398 | let idxCollDig = 0 | |
401 | 399 | ||
402 | 400 | let idxCollNNewYear = 1 | |
403 | 401 | ||
404 | 402 | let bonusTypez = ["FarmPower"] | |
405 | 403 | ||
406 | 404 | let idxBonusTypeFp = 0 | |
407 | 405 | ||
408 | 406 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
409 | 407 | then valueOrElse(getBoolean(keyBlocked()), false) | |
410 | 408 | else false) | |
411 | 409 | then throw("Contracts are under maintenance") | |
412 | 410 | else { | |
413 | 411 | let addr = toString(i.originCaller) | |
414 | 412 | let week = (height / WEEK_BLOCKS) | |
415 | 413 | let lastWeekKey = keyLastWeekTxIdByUser(addr) | |
416 | 414 | let lastWeekTxIdByUser = getString(lastWeekKey) | |
417 | 415 | let txId = toBase58String(i.transactionId) | |
418 | 416 | let wtx = ((toString(week) + "_") + txId) | |
419 | 417 | let curWeekKey = keyCurWeekTxIdByUser(addr) | |
420 | 418 | if (isDefined(lastWeekTxIdByUser)) | |
421 | 419 | then { | |
422 | 420 | let lastWeekTx = split(value(lastWeekTxIdByUser), "_") | |
423 | 421 | if ((lastWeekTx[0] == toString(week))) | |
424 | 422 | then [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
425 | 423 | else if ((lastWeekTx[0] == toString((week - 1)))) | |
426 | 424 | then [StringEntry(curWeekKey, wtx)] | |
427 | 425 | else { | |
428 | 426 | let curWeekTxIdByUser = getStringValue(curWeekKey) | |
429 | 427 | let curWeekTx = split(curWeekTxIdByUser, "_") | |
430 | 428 | if ((curWeekTx[0] == toString(week))) | |
431 | 429 | then [StringEntry(curWeekKey, wtx)] | |
432 | 430 | else [StringEntry(lastWeekKey, curWeekTxIdByUser), StringEntry(curWeekKey, wtx)] | |
433 | 431 | } | |
434 | 432 | } | |
435 | 433 | else [StringEntry(lastWeekKey, wtx), StringEntry(curWeekKey, wtx)] | |
436 | 434 | } | |
437 | 435 | ||
438 | 436 | ||
439 | 437 | 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) + "\"}") | |
440 | 438 | ||
441 | 439 | ||
442 | 440 | func issueNftCustom (nameIdx,contKeyIdx,collIdx,rarityIdx,bonusPerc,descrIdx,bonusTypeIdx,addr) = { | |
443 | 441 | let nftSerial = valueOrElse(getInteger(keyNftTotalIssued), 0) | |
444 | 442 | let rarity = rarityNames[rarityIdx] | |
445 | 443 | let name = (((namez[nameIdx] + "-") + take(rarity, 1)) + toString(bonusPerc)) | |
446 | 444 | let issue = Issue(name, createNftDescrCustom(contentKeyz[contKeyIdx], nftSerial, collectionz[collIdx], names[nameIdx], descriptions[descrIdx], rarityNames[rarityIdx], bonusPerc, bonusTypez[bonusTypeIdx]), 1, 0, false) | |
447 | 445 | let nftAssetId = calculateAssetId(issue) | |
448 | 446 | $Tuple2([issue, IntegerEntry(keyNftTotalIssued, (nftSerial + 1)), IntegerEntry(keyNftNumberByAssetId(toBase58String(nftAssetId)), nftSerial), ScriptTransfer(addr, 1, nftAssetId)], nftAssetId) | |
449 | 447 | } | |
450 | 448 | ||
451 | 449 | ||
452 | 450 | func bonusByDescription (descr) = if (!(contains(descr, "\"bonusType\": \"FarmPower\""))) | |
453 | 451 | then throw(("NFT is not supported: " + descr)) | |
454 | 452 | else { | |
455 | 453 | let bonusStr = split_4C(split_4C(descr, "\"bonus\":")[1], ",")[0] | |
456 | 454 | parseIntValue(drop(bonusStr, (valueOrElse(lastIndexOf(bonusStr, " "), -1) + 1))) | |
457 | 455 | } | |
458 | 456 | ||
459 | 457 | ||
460 | 458 | func rarityIdxByDescriprion (descr) = if (!(contains(descr, "\"rare\""))) | |
461 | 459 | then throw(("NFT is not supported: " + descr)) | |
462 | 460 | else { | |
463 | 461 | let rarityStr = split_4C(split_4C(split_4C(descr, "\"rare\"")[1], ",")[0], "\"")[1] | |
464 | 462 | value(indexOf(rarityNames, rarityStr)) | |
465 | 463 | } | |
466 | 464 | ||
467 | 465 | ||
468 | 466 | func stakeUnstakeAcresInternal (amt,address,bonusDelta) = if (if ((amt == 0)) | |
469 | 467 | then (bonusDelta == 0) | |
470 | 468 | else false) | |
471 | 469 | then throw("Nothing to do") | |
472 | 470 | else { | |
473 | 471 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
474 | 472 | if ((wlgResult == wlgResult)) | |
475 | 473 | then { | |
476 | 474 | let now = lastBlock.timestamp | |
477 | 475 | let timeKey = keyAcresStakedTimeByUser(address) | |
478 | 476 | let amountKey = keyAcresStakedAmtByUser(address) | |
479 | 477 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
480 | 478 | if (if ((0 > amt)) | |
481 | 479 | then (0 > (oldAcresAmount + amt)) | |
482 | 480 | else false) | |
483 | 481 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
484 | 482 | else { | |
485 | 483 | let newAcresAmount = (oldAcresAmount + amt) | |
486 | 484 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
487 | 485 | let userFpKey = keyFarmingPowerByUser(address) | |
488 | 486 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
489 | 487 | let bonusKey = keyUserFullBonus(address) | |
490 | 488 | let oldBonus = valueOrElse(getInteger(acres2Contract, bonusKey), 0) | |
491 | 489 | if (if ((0 > bonusDelta)) | |
492 | 490 | then (0 > (oldBonus + bonusDelta)) | |
493 | 491 | else false) | |
494 | 492 | then throw((((("You have only " + fixedPoint(oldBonus, 4)) + "% bonus, and tried to unstake ") + fixedPoint(-(bonusDelta), 4)) + "%")) | |
495 | 493 | else { | |
496 | 494 | let $t064656564 = getFarmingPowerByAcresAndBonus(newAcresAmount, (oldBonus + bonusDelta)) | |
497 | 495 | let newBonusedFp = $t064656564._1 | |
498 | 496 | let ignored = $t064656564._2 | |
499 | 497 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
500 | 498 | let acresActions = if ((amt == 0)) | |
501 | 499 | then nil | |
502 | 500 | else [IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt))] | |
503 | 501 | let bonusActions = if ((bonusDelta == 0)) | |
504 | 502 | then nil | |
505 | 503 | else [IntegerEntry(bonusKey, (oldBonus + bonusDelta))] | |
506 | 504 | $Tuple2(((((acresActions ++ bonusActions) :+ IntegerEntry(timeKey, lastBlock.timestamp)) :+ IntegerEntry(userFpKey, newBonusedFp)) :+ IntegerEntry(totalFarmingPowerKey, ((oldTotalFp + newBonusedFp) - oldFp))), wlgResult) | |
507 | 505 | } | |
508 | 506 | } | |
509 | 507 | } | |
510 | 508 | else throw("Strict value is not equal to itself.") | |
511 | 509 | } | |
512 | 510 | ||
513 | 511 | ||
514 | 512 | func getWlgPrice (usdtBalanceCorrection) = { | |
515 | 513 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
516 | 514 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
517 | 515 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
518 | 516 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
519 | 517 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
520 | 518 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
521 | 519 | } | |
522 | 520 | ||
523 | 521 | ||
524 | 522 | func getSwapLimitAcres () = { | |
525 | 523 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
526 | 524 | let acres2Usd = assetBalance(this, usdtAssetId) | |
527 | 525 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
528 | 526 | let defaultLimit = (((acres2Usd + wlgUsd) + investFundTotal) / ONE_PERCENT_DIVISOR) | |
529 | 527 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
530 | 528 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
531 | 529 | let now = lastBlock.timestamp | |
532 | 530 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (now - lastTime), DAY_MILLIS)) | |
533 | 531 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
534 | 532 | $Tuple2(IntegerEntry(keyLastAcresSellTime, now), limitLeftUsdt) | |
535 | 533 | } | |
536 | 534 | ||
537 | 535 | ||
538 | 536 | let arkOracle = addressFromStringValue("3PJgZ6AK1WVCpdCmEZpesHmaKvrQDdXG5og") | |
539 | 537 | ||
540 | 538 | let incubator = valueOrElse(getString(arkOracle, "static_incubatorAddress"), "") | |
541 | 539 | ||
542 | 540 | let breeder = valueOrElse(getString(arkOracle, "static_breederAddress"), "") | |
543 | 541 | ||
544 | 542 | let turtleIncubator = valueOrElse(getString(arkOracle, "static_turtleIncubatorAddress"), "") | |
545 | 543 | ||
546 | 544 | let turtleBreeder = valueOrElse(getString(arkOracle, "static_turtleBreederAddress"), "") | |
547 | 545 | ||
548 | 546 | let canineIncubator = valueOrElse(getString(arkOracle, "static_canineIncubatorAddress"), "") | |
549 | 547 | ||
550 | 548 | let canineBreeder = valueOrElse(getString(arkOracle, "static_canineBreederAddress"), "") | |
551 | 549 | ||
552 | 550 | let felineIncubator = valueOrElse(getString(arkOracle, "static_felineIncubatorAddress"), "") | |
553 | 551 | ||
554 | 552 | let felineBreeder = valueOrElse(getString(arkOracle, "static_felineBreederAddress"), "") | |
555 | 553 | ||
556 | 554 | let mutantBreeder = valueOrElse(getString(arkOracle, "static_mutantIncubatorAddress"), "") | |
557 | 555 | ||
558 | 556 | func isArkimalIssued (nfo) = { | |
559 | 557 | let issuer = toString(nfo.issuer) | |
560 | 558 | if (if (if (if (if (if (if (if (if (if ((chain == base58'2T')) | |
561 | 559 | then (issuer == oldStakingContractStr) | |
562 | 560 | else false) | |
563 | 561 | then true | |
564 | 562 | else (issuer == incubator)) | |
565 | 563 | then true | |
566 | 564 | else (issuer == breeder)) | |
567 | 565 | then true | |
568 | 566 | else (issuer == turtleIncubator)) | |
569 | 567 | then true | |
570 | 568 | else (issuer == turtleBreeder)) | |
571 | 569 | then true | |
572 | 570 | else (issuer == canineIncubator)) | |
573 | 571 | then true | |
574 | 572 | else (issuer == canineBreeder)) | |
575 | 573 | then true | |
576 | 574 | else (issuer == felineIncubator)) | |
577 | 575 | then true | |
578 | 576 | else (issuer == felineBreeder)) | |
579 | 577 | then nfo.name | |
580 | 578 | else if ((issuer == mutantBreeder)) | |
581 | 579 | then nfo.description | |
582 | 580 | else "" | |
583 | 581 | } | |
584 | 582 | ||
585 | 583 | ||
586 | 584 | func stakeNftInternal (addr,assetIdStr,bonus6,userNumKey,totalNumKey,limit) = { | |
587 | 585 | let nftNumber = valueOrElse(getInteger(userNumKey), 0) | |
588 | 586 | if ((nftNumber >= limit)) | |
589 | 587 | then throw((("You can stake max " + toString(limit)) + " of such NFTs")) | |
590 | 588 | else { | |
591 | 589 | let $t01084310919 = stakeUnstakeAcresInternal(0, addr, bonus6) | |
592 | 590 | let actions = $t01084310919._1 | |
593 | 591 | let wlgClaimedAmount = $t01084310919._2 | |
594 | 592 | $Tuple2((((actions :+ IntegerEntry(userNumKey, (nftNumber + 1))) :+ IntegerEntry(totalNumKey, (valueOrElse(getInteger(totalNumKey), 0) + 1))) :+ IntegerEntry(keyStakedTimeByAssetIdAndOwner(assetIdStr, addr), lastBlock.timestamp)), wlgClaimedAmount) | |
595 | 593 | } | |
596 | 594 | } | |
597 | 595 | ||
598 | 596 | ||
599 | 597 | func stakeAcresForInternal (address,amt,shouldCleanPromo) = { | |
600 | 598 | let $t01125411330 = stakeUnstakeAcresInternal(amt, address, 0) | |
601 | 599 | let actions = $t01125411330._1 | |
602 | 600 | let wlgClaimedAmount = $t01125411330._2 | |
603 | 601 | let promoActions = if (if ((height >= DAILY_PROMO_START_BLOCK)) | |
604 | 602 | then (DAILY_PROMO_END_BLOCK > height) | |
605 | 603 | else false) | |
606 | 604 | then { | |
607 | 605 | let promoAcresKey = keyUserPromoAcres(address) | |
608 | 606 | let promoAcres = ((if (shouldCleanPromo) | |
609 | 607 | then 0 | |
610 | 608 | else valueOrElse(getInteger(promoAcresKey), 0)) + amt) | |
611 | 609 | let tickets = (promoAcres / MULT8) | |
612 | 610 | let ticketsKey = keyUserPromoTickets(address) | |
613 | 611 | let deltaTickets = (tickets - valueOrElse(getInteger(ticketsKey), 0)) | |
614 | 612 | let totalTickets = (valueOrElse(getInteger(keyTotalPromoTickets), 0) + deltaTickets) | |
615 | 613 | if (if (shouldCleanPromo) | |
616 | 614 | then true | |
617 | 615 | else (deltaTickets > 0)) | |
618 | 616 | then { | |
619 | 617 | let promoMap = valueOrElse(getString(keyPromoMap), "") | |
620 | 618 | let userRecord = ((address + ":") + padL(tickets, 3)) | |
621 | 619 | let newMap = if (contains(promoMap, address)) | |
622 | 620 | then { | |
623 | 621 | let mapParts = split_51C(promoMap, address) | |
624 | 622 | if ((mapParts[0] == "")) | |
625 | 623 | then { | |
626 | 624 | let r = drop(mapParts[1], 4) | |
627 | 625 | if ((r == "")) | |
628 | 626 | then if ((tickets == 0)) | |
629 | 627 | then "" | |
630 | 628 | else userRecord | |
631 | 629 | else if ((tickets == 0)) | |
632 | 630 | then drop(r, 1) | |
633 | 631 | else (userRecord + r) | |
634 | 632 | } | |
635 | 633 | else { | |
636 | 634 | let r = drop(mapParts[1], 4) | |
637 | 635 | if ((r == "")) | |
638 | 636 | then if ((tickets == 0)) | |
639 | 637 | then dropRight(mapParts[0], 1) | |
640 | 638 | else (mapParts[0] + userRecord) | |
641 | 639 | else if ((tickets == 0)) | |
642 | 640 | then (mapParts[0] + drop(r, 1)) | |
643 | 641 | else ((mapParts[0] + userRecord) + r) | |
644 | 642 | } | |
645 | 643 | } | |
646 | 644 | else if ((tickets == 0)) | |
647 | 645 | then promoMap | |
648 | 646 | else if ((promoMap == "")) | |
649 | 647 | then userRecord | |
650 | 648 | else ((promoMap + "_") + userRecord) | |
651 | 649 | [IntegerEntry(promoAcresKey, promoAcres), IntegerEntry(ticketsKey, tickets), IntegerEntry(keyTotalPromoTickets, totalTickets), StringEntry(keyPromoMap, newMap)] | |
652 | 650 | } | |
653 | 651 | else [IntegerEntry(promoAcresKey, promoAcres)] | |
654 | 652 | } | |
655 | 653 | else nil | |
656 | 654 | $Tuple2((actions ++ promoActions), wlgClaimedAmount) | |
657 | 655 | } | |
658 | 656 | ||
659 | 657 | ||
660 | 658 | @Callable(i) | |
661 | 659 | func saveLastTx () = if (!(containsElement([wlgContract, marketContract], i.caller))) | |
662 | 660 | then throw("Access denied") | |
663 | 661 | else $Tuple2(prolog(i), 42) | |
664 | 662 | ||
665 | 663 | ||
666 | 664 | ||
667 | 665 | @Callable(i) | |
668 | 666 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
669 | 667 | then throw("Permission denied") | |
670 | 668 | else { | |
671 | 669 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
672 | 670 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
673 | 671 | } | |
674 | 672 | ||
675 | 673 | ||
676 | 674 | ||
677 | 675 | @Callable(i) | |
678 | 676 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
679 | 677 | then throw("permission denied") | |
680 | 678 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
681 | 679 | ||
682 | 680 | ||
683 | 681 | ||
684 | 682 | @Callable(i) | |
685 | 683 | func unstakeAcres (amount) = { | |
686 | 684 | let prologActions = prolog(i) | |
687 | 685 | if (if ((height >= DAILY_PROMO_START_BLOCK)) | |
688 | 686 | then (DAILY_PROMO_END_BLOCK > height) | |
689 | 687 | else false) | |
690 | 688 | then throw("You can't unstake during Xmas promo period") | |
691 | 689 | else if ((0 >= amount)) | |
692 | 690 | then throw("Amount should be positive") | |
693 | 691 | else { | |
694 | 692 | let address = toString(i.caller) | |
695 | 693 | if ((size(i.payments) != 0)) | |
696 | 694 | then throw("No payments required") | |
697 | 695 | else { | |
698 | 696 | let arbReleaseTime = (valueOrElse(getInteger(wlgContract, keyLastWlgTradeTimeByUser(address)), 0) + arbitrageDelay) | |
699 | 697 | if ((arbReleaseTime > lastBlock.timestamp)) | |
700 | 698 | then throw(("You traded some WLGOLD, cannot unstake until " + toString(arbReleaseTime))) | |
701 | 699 | else { | |
702 | 700 | let $t01533315413 = stakeUnstakeAcresInternal(-(amount), address, 0) | |
703 | 701 | let actions = $t01533315413._1 | |
704 | 702 | let wlgClaimedAmount = $t01533315413._2 | |
705 | 703 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
706 | 704 | } | |
707 | 705 | } | |
708 | 706 | } | |
709 | 707 | } | |
710 | 708 | ||
711 | 709 | ||
712 | 710 | ||
713 | 711 | @Callable(i) | |
714 | 712 | func stakeAcres () = { | |
715 | 713 | let prologActions = prolog(i) | |
716 | 714 | let address = toString(i.caller) | |
717 | 715 | if ((size(i.payments) != 1)) | |
718 | 716 | then throw("exactly 1 payment must be attached") | |
719 | 717 | else { | |
720 | 718 | let pmt = i.payments[0] | |
721 | 719 | let amt = pmt.amount | |
722 | 720 | if (if (!(isDefined(pmt.assetId))) | |
723 | 721 | then true | |
724 | 722 | else (value(pmt.assetId) != acresAssetId)) | |
725 | 723 | then throw("ACRES payments only!") | |
726 | 724 | else { | |
727 | 725 | let $t01586415945 = stakeAcresForInternal(address, amt, false) | |
728 | 726 | let stakeActions = $t01586415945._1 | |
729 | 727 | let wlgClaimedAmount = $t01586415945._2 | |
730 | 728 | $Tuple2((stakeActions ++ prologActions), wlgClaimedAmount) | |
731 | 729 | } | |
732 | 730 | } | |
733 | 731 | } | |
734 | 732 | ||
735 | 733 | ||
736 | 734 | ||
737 | 735 | @Callable(i) | |
738 | 736 | func stakeAcresFor (address,amt,shouldCleanPromo) = if ((i.caller != this)) | |
739 | 737 | then throw("Permission denied") | |
740 | 738 | else stakeAcresForInternal(address, amt, shouldCleanPromo) | |
741 | 739 | ||
742 | 740 | ||
743 | 741 | ||
744 | 742 | @Callable(i) | |
745 | 743 | func buyAcres () = { | |
746 | 744 | let prologActions = prolog(i) | |
747 | 745 | if ((size(i.payments) != 1)) | |
748 | 746 | then throw("exactly 1 payment must be attached") | |
749 | 747 | else { | |
750 | 748 | let pmt = i.payments[0] | |
751 | 749 | let usdtAmount = pmt.amount | |
752 | 750 | if (if (!(isDefined(pmt.assetId))) | |
753 | 751 | then true | |
754 | 752 | else (value(pmt.assetId) != usdtAssetId)) | |
755 | 753 | then throw("USDT payments only!") | |
756 | 754 | else if ((MULT6 > usdtAmount)) | |
757 | 755 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
758 | 756 | else { | |
759 | 757 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
760 | 758 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
761 | 759 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
762 | 760 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
763 | 761 | if ((req == req)) | |
764 | 762 | then { | |
765 | 763 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
766 | 764 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
767 | 765 | } | |
768 | 766 | else throw("Strict value is not equal to itself.") | |
769 | 767 | } | |
770 | 768 | } | |
771 | 769 | } | |
772 | 770 | ||
773 | 771 | ||
774 | 772 | ||
775 | 773 | @Callable(i) | |
776 | 774 | func buyAcresREADONLY (usdtAmount) = { | |
777 | 775 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
778 | 776 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
779 | 777 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
780 | 778 | } | |
781 | 779 | ||
782 | 780 | ||
783 | 781 | ||
784 | 782 | @Callable(i) | |
785 | 783 | func sellAcres () = { | |
786 | 784 | let prologActions = prolog(i) | |
787 | 785 | if ((size(i.payments) != 1)) | |
788 | 786 | then throw("exactly 1 payment must be attached") | |
789 | 787 | else { | |
790 | 788 | let pmt = i.payments[0] | |
791 | 789 | let acresAmount = pmt.amount | |
792 | 790 | if (if (!(isDefined(pmt.assetId))) | |
793 | 791 | then true | |
794 | 792 | else (value(pmt.assetId) != acresAssetId)) | |
795 | 793 | then throw("ACRES payments only!") | |
796 | 794 | else if ((MULT7 > acresAmount)) | |
797 | 795 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
798 | 796 | else { | |
799 | 797 | let addr = toString(i.caller) | |
800 | 798 | let $t01801718065 = getSwapLimitAcres() | |
801 | 799 | let limitAction = $t01801718065._1 | |
802 | 800 | let maxUsdt = $t01801718065._2 | |
803 | 801 | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
804 | 802 | if ((acresAmount > maxAcres)) | |
805 | 803 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
806 | 804 | else { | |
807 | 805 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
808 | 806 | $Tuple2(([limitAction, IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount)), ScriptTransfer(i.caller, usdtAmount, usdtAssetId)] ++ prologActions), usdtAmount) | |
809 | 807 | } | |
810 | 808 | } | |
811 | 809 | } | |
812 | 810 | } | |
813 | 811 | ||
814 | 812 | ||
815 | 813 | ||
816 | 814 | @Callable(i) | |
817 | 815 | func sellAcresREADONLY (address,acresAmount) = { | |
818 | 816 | let $t01856118609 = getSwapLimitAcres() | |
819 | 817 | let limitAction = $t01856118609._1 | |
820 | 818 | let maxUsdt = $t01856118609._2 | |
821 | 819 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
822 | 820 | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
823 | 821 | } | |
824 | 822 | ||
825 | 823 | ||
826 | 824 | ||
827 | 825 | @Callable(i) | |
828 | 826 | func convertOldStakes () = { | |
829 | 827 | let prologActions = prolog(i) | |
830 | 828 | if ((OLD_STAKING_DEADL > lastBlock.timestamp)) | |
831 | 829 | then throw(("Disabled until " + toString((OLD_STAKING_DEADL / 1000)))) | |
832 | 830 | else { | |
833 | 831 | let address = toString(i.caller) | |
834 | 832 | if ((size(i.payments) != 0)) | |
835 | 833 | then throw("No payments required") | |
836 | 834 | else { | |
837 | 835 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
838 | 836 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
839 | 837 | let gotAcres0 = if ((amount > 0)) | |
840 | 838 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
841 | 839 | else $Tuple2(0, 0) | |
842 | 840 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
843 | 841 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
844 | 842 | let landsResult = if (isDefined(landsStr)) | |
845 | 843 | then { | |
846 | 844 | let lands = split_51C(value(landsStr), "_") | |
847 | 845 | if ((size(lands) > MAX_LANDS_TO_CONVERT)) | |
848 | 846 | then throw((("You have more than " + toString(MAX_LANDS_TO_CONVERT)) + " lands staked, please contact support, we'll process your case manually")) | |
849 | 847 | else { | |
850 | 848 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
851 | 849 | then throw("landAssetId is required") | |
852 | 850 | else { | |
853 | 851 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
854 | 852 | if ((r == r)) | |
855 | 853 | then $Tuple5((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4), (acc._5 + r._5)) | |
856 | 854 | else throw("Strict value is not equal to itself.") | |
857 | 855 | } | |
858 | 856 | ||
859 | 857 | let rr = { | |
860 | 858 | let $l = lands | |
861 | 859 | let $s = size($l) | |
862 | 860 | let $acc0 = $Tuple5(0, 0, 0, 0, 0) | |
863 | 861 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
864 | 862 | then $a | |
865 | 863 | else oneLand($a, $l[$i]) | |
866 | 864 | ||
867 | 865 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
868 | 866 | then $a | |
869 | 867 | else throw("List size exceeds 14") | |
870 | 868 | ||
871 | 869 | $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) | |
872 | 870 | } | |
873 | 871 | if ((rr == rr)) | |
874 | 872 | then { | |
875 | 873 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
876 | 874 | if ((finalize == finalize)) | |
877 | 875 | then { | |
878 | 876 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
879 | 877 | if ((req == req)) | |
880 | 878 | then { | |
881 | 879 | let $t02112321262 = issueNftCustom(idxNameShovel, idxKeySP, idxCollDig, idxRarityP, 3, idxDescrShovel, idxBonusTypeFp, i.caller) | |
882 | 880 | let nftActions = $t02112321262._1 | |
883 | 881 | let nftAssetId = $t02112321262._2 | |
884 | 882 | $Tuple6(rr._1, rr._2, rr._3, rr._4, rr._5, nftActions) | |
885 | 883 | } | |
886 | 884 | else throw("Strict value is not equal to itself.") | |
887 | 885 | } | |
888 | 886 | else throw("Strict value is not equal to itself.") | |
889 | 887 | } | |
890 | 888 | else throw("Strict value is not equal to itself.") | |
891 | 889 | } | |
892 | 890 | } | |
893 | 891 | else $Tuple6(0, 0, 0, 0, 0, nil) | |
894 | 892 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
895 | 893 | let duckResult = if ((duckAssetId != "")) | |
896 | 894 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
897 | 895 | else $Tuple3(0, 0, 0) | |
898 | 896 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address, 0) | |
899 | 897 | $Tuple2(((landsResult._6 ++ x._1) ++ prologActions), $Tuple3(gotAcres0._2, landsResult._5, x._2)) | |
900 | 898 | } | |
901 | 899 | } | |
902 | 900 | } | |
903 | 901 | ||
904 | 902 | ||
905 | 903 | ||
906 | 904 | @Callable(i) | |
907 | 905 | func unstakeLandsREADONLY (address) = { | |
908 | 906 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
909 | 907 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
910 | 908 | let landsResult = if (isDefined(landsStr)) | |
911 | 909 | then { | |
912 | 910 | let lands = split_51C(value(landsStr), "_") | |
913 | 911 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
914 | 912 | then throw("landAssetId is required") | |
915 | 913 | else { | |
916 | 914 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
917 | 915 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
918 | 916 | } | |
919 | 917 | ||
920 | 918 | let $l = lands | |
921 | 919 | let $s = size($l) | |
922 | 920 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
923 | 921 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
924 | 922 | then $a | |
925 | 923 | else oneLand($a, $l[$i]) | |
926 | 924 | ||
927 | 925 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
928 | 926 | then $a | |
929 | 927 | else throw("List size exceeds 100") | |
930 | 928 | ||
931 | 929 | $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) | |
932 | 930 | } | |
933 | 931 | else $Tuple4(0, 0, 0, 0) | |
934 | 932 | $Tuple2(nil, landsResult) | |
935 | 933 | } | |
936 | 934 | ||
937 | 935 | ||
938 | 936 | ||
939 | 937 | @Callable(i) | |
940 | 938 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
941 | 939 | then throw("Permission denied") | |
942 | 940 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr, 0) | |
943 | 941 | ||
944 | 942 | ||
945 | 943 | ||
946 | 944 | @Callable(i) | |
947 | 945 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
948 | 946 | let amountKey = keyAcresStakedAmtByUser(address) | |
949 | 947 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
950 | 948 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
951 | 949 | let userFpKey = keyFarmingPowerByUser(address) | |
952 | 950 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
953 | 951 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(address)), 0) | |
954 | 952 | let $t02353323620 = getFarmingPowerByAcresAndBonus(newAcresAmount, userBonus) | |
955 | 953 | let newBonusedFp = $t02353323620._1 | |
956 | 954 | let ignored = $t02353323620._2 | |
957 | 955 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
958 | 956 | let newTotalFp = ((oldTotalFp + newBonusedFp) - oldFp) | |
959 | 957 | $Tuple2(nil, [oldFp, newBonusedFp, oldTotalFp, newTotalFp]) | |
960 | 958 | } | |
961 | 959 | ||
962 | 960 | ||
963 | 961 | ||
964 | 962 | @Callable(i) | |
965 | 963 | func issuePickC1 (forAddress) = if ((i.caller != wlgContract)) | |
966 | 964 | then throw("Permission denied") | |
967 | 965 | else issueNftCustom(idxNamePickaxe, idxKeyC, idxCollDig, idxRarityC, 1, idxDescrPickaxe, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
968 | 966 | ||
969 | 967 | ||
970 | 968 | ||
971 | 969 | @Callable(i) | |
972 | 970 | func issueMittenP (forAddress) = if ((i.caller != this)) | |
973 | 971 | then throw("Permission denied") | |
974 | 972 | else issueNftCustom(idxNameMitten, idxKeyMP, idxCollNNewYear, idxRarityP, 3, idxDescrMitten, idxBonusTypeFp, addressFromStringValue(forAddress)) | |
975 | 973 | ||
976 | 974 | ||
977 | 975 | ||
978 | 976 | @Callable(i) | |
979 | 977 | func stakeNFT () = { | |
980 | 978 | let prologActions = prolog(i) | |
981 | 979 | if ((size(i.payments) != 1)) | |
982 | 980 | then throw("Exactly one payment required") | |
983 | 981 | else { | |
984 | 982 | let pmt = value(i.payments[0]) | |
985 | 983 | if ((pmt.amount != 1)) | |
986 | 984 | then throw("NFT token should be attached as payment") | |
987 | 985 | else { | |
988 | 986 | let assetId = value(pmt.assetId) | |
989 | 987 | let asset = value(assetInfo(assetId)) | |
990 | 988 | let assetIdStr = toBase58String(assetId) | |
991 | 989 | let addr = toString(i.caller) | |
992 | 990 | let nftsKey = keyStakedNFTsByOwner(addr) | |
993 | 991 | let nftsStr = getString(nftsKey) | |
994 | 992 | let nfts = if (isDefined(nftsStr)) | |
995 | 993 | then split_4C(value(nftsStr), "_") | |
996 | 994 | else nil | |
997 | 995 | if (containsElement(nfts, assetIdStr)) | |
998 | 996 | then throw(("Your staked NFTs already contain " + assetIdStr)) | |
999 | 997 | else if ((size(nfts) >= MAX_NFTS_STAKED_BY_USER)) | |
1000 | 998 | then throw((("Your already staked max (" + toString(MAX_NFTS_STAKED_BY_USER)) + ") NFTs")) | |
1001 | 999 | else { | |
1002 | 1000 | let listAction = StringEntry(nftsKey, makeString_2C((nfts :+ assetIdStr), "_")) | |
1003 | 1001 | if ((asset.issuer == this)) | |
1004 | 1002 | then { | |
1005 | 1003 | let $t02532025510 = stakeNftInternal(addr, assetIdStr, (bonusByDescription(value(asset.description)) * 10000), keyUserWlNftNumber(addr), keyWlNftTotalStaked, MAX_WL_NFTS) | |
1006 | 1004 | let actions = $t02532025510._1 | |
1007 | 1005 | let wlgClaimedAmount = $t02532025510._2 | |
1008 | 1006 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
1009 | 1007 | } | |
1010 | 1008 | else if ((isArkimalIssued(asset) == "")) | |
1011 | 1009 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
1012 | 1010 | else { | |
1013 | 1011 | let $t02569125842 = stakeNftInternal(addr, assetIdStr, ARK_NFT_BONUS, keyUserArkNftNumber(addr), keyArkNftTotalStaked, MAX_ARK_NFTS) | |
1014 | 1012 | let actions = $t02569125842._1 | |
1015 | 1013 | let wlgClaimedAmount = $t02569125842._2 | |
1016 | 1014 | $Tuple2(((prologActions ++ actions) :+ listAction), wlgClaimedAmount) | |
1017 | 1015 | } | |
1018 | 1016 | } | |
1019 | 1017 | } | |
1020 | 1018 | } | |
1021 | 1019 | } | |
1022 | 1020 | ||
1023 | 1021 | ||
1024 | 1022 | ||
1025 | 1023 | @Callable(i) | |
1026 | 1024 | func unstakeNFT (assetIdStr) = { | |
1027 | 1025 | let prologActions = prolog(i) | |
1028 | 1026 | if ((size(i.payments) != 0)) | |
1029 | 1027 | then throw("No payments required") | |
1030 | 1028 | else { | |
1031 | 1029 | let assetId = fromBase58String(assetIdStr) | |
1032 | 1030 | let addr = toString(i.caller) | |
1033 | 1031 | let asset = value(assetInfo(assetId)) | |
1034 | 1032 | let timeKey = keyStakedTimeByAssetIdAndOwner(assetIdStr, addr) | |
1035 | 1033 | if (!(isDefined(getInteger(timeKey)))) | |
1036 | 1034 | then throw((("NFT " + asset.name) + " is not staked by you")) | |
1037 | 1035 | else { | |
1038 | 1036 | let nftsKey = keyStakedNFTsByOwner(addr) | |
1039 | 1037 | let nfts = split_4C(valueOrElse(getString(nftsKey), ""), "_") | |
1040 | 1038 | let idx = indexOf(nfts, assetIdStr) | |
1041 | 1039 | if (!(isDefined(idx))) | |
1042 | 1040 | then throw(("Your staked NFTs don't contain " + assetIdStr)) | |
1043 | 1041 | else { | |
1044 | 1042 | let listAction = if ((size(nfts) > 1)) | |
1045 | 1043 | then StringEntry(nftsKey, makeString_2C(removeByIndex(nfts, value(idx)), "_")) | |
1046 | 1044 | else DeleteEntry(nftsKey) | |
1047 | 1045 | let isWL = (asset.issuer == this) | |
1048 | 1046 | if (isWL) | |
1049 | 1047 | then { | |
1050 | 1048 | let wlNftNumber = valueOrElse(getInteger(keyUserWlNftNumber(addr)), 0) | |
1051 | 1049 | let bonusVal = (bonusByDescription(value(asset.description)) * 10000) | |
1052 | 1050 | let $t02700727086 = stakeUnstakeAcresInternal(0, addr, -(bonusVal)) | |
1053 | 1051 | let actions = $t02700727086._1 | |
1054 | 1052 | let wlgClaimedAmount = $t02700727086._2 | |
1055 | 1053 | $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) | |
1056 | 1054 | } | |
1057 | 1055 | else { | |
1058 | 1056 | let arkimalName = isArkimalIssued(asset) | |
1059 | 1057 | if ((arkimalName == "")) | |
1060 | 1058 | then throw("Only WavesLands and Arkimals NFT tokens are accepted") | |
1061 | 1059 | else { | |
1062 | 1060 | let arkNftNumber = valueOrElse(getInteger(keyUserArkNftNumber(addr)), 0) | |
1063 | 1061 | let $t02774627830 = stakeUnstakeAcresInternal(0, addr, -(ARK_NFT_BONUS)) | |
1064 | 1062 | let actions = $t02774627830._1 | |
1065 | 1063 | let wlgClaimedAmount = $t02774627830._2 | |
1066 | 1064 | $Tuple2((((((actions :+ listAction) :+ IntegerEntry(keyUserArkNftNumber(addr), (arkNftNumber - 1))) :+ DeleteEntry(keyStakedTimeByAssetIdAndOwner(toBase58String(assetId), addr))) :+ ScriptTransfer(i.caller, 1, assetId)) ++ prologActions), wlgClaimedAmount) | |
1067 | 1065 | } | |
1068 | 1066 | } | |
1069 | 1067 | } | |
1070 | 1068 | } | |
1071 | 1069 | } | |
1072 | 1070 | } | |
1073 | 1071 | ||
1074 | 1072 | ||
1075 | 1073 | ||
1076 | 1074 | @Callable(i) | |
1077 | 1075 | func exchangeNFTs () = if ((i.caller != this)) | |
1078 | 1076 | then throw("Temporary disabled") | |
1079 | 1077 | else { | |
1080 | 1078 | let prologActions = prolog(i) | |
1081 | 1079 | if ((3 > size(i.payments))) | |
1082 | 1080 | then throw("Min one WLGOLD and 2 NFT payments allowed") | |
1083 | 1081 | else if ((size(i.payments) > 10)) | |
1084 | 1082 | then throw("Max one WLGOLD and 9 NFT payments allowed") | |
1085 | 1083 | else { | |
1086 | 1084 | let addr = toString(i.caller) | |
1087 | 1085 | func addUp (acc,pmt) = { | |
1088 | 1086 | let assetId = valueOrErrorMessage(pmt.assetId, "WAVES payments not allowed") | |
1089 | 1087 | if ((assetId == wlgAssetId)) | |
1090 | 1088 | then $Tuple4((acc._1 + pmt.amount), acc._2, acc._3, acc._4) | |
1091 | 1089 | else { | |
1092 | 1090 | let asset = value(assetInfo(assetId)) | |
1093 | 1091 | if ((asset.issuer != this)) | |
1094 | 1092 | then throw("Only WL-issued NFTs allowed") | |
1095 | 1093 | else { | |
1096 | 1094 | let rarityIx = rarityIdxByDescriprion(value(asset.description)) | |
1097 | 1095 | if (if ((acc._4 > 0)) | |
1098 | 1096 | then (rarityIx != acc._4) | |
1099 | 1097 | else false) | |
1100 | 1098 | then throw("You can exchange only NFTs of the same rarity") | |
1101 | 1099 | else { | |
1102 | 1100 | let bonusPerc = bonusByDescription(value(asset.description)) | |
1103 | 1101 | $Tuple4(acc._1, (acc._2 + bonusPerc), (acc._3 :+ Burn(assetId, 1)), rarityIx) | |
1104 | 1102 | } | |
1105 | 1103 | } | |
1106 | 1104 | } | |
1107 | 1105 | } | |
1108 | 1106 | ||
1109 | 1107 | let $t02928129497 = { | |
1110 | 1108 | let $l = i.payments | |
1111 | 1109 | let $s = size($l) | |
1112 | 1110 | let $acc0 = $Tuple4(0, 0, nil, -1) | |
1113 | 1111 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1114 | 1112 | then $a | |
1115 | 1113 | else addUp($a, $l[$i]) | |
1116 | 1114 | ||
1117 | 1115 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1118 | 1116 | then $a | |
1119 | 1117 | else throw("List size exceeds 10") | |
1120 | 1118 | ||
1121 | 1119 | $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) | |
1122 | 1120 | } | |
1123 | 1121 | let wlgFee = $t02928129497._1 | |
1124 | 1122 | let totalBonus = $t02928129497._2 | |
1125 | 1123 | let burnActions = $t02928129497._3 | |
1126 | 1124 | let rarityIdx = $t02928129497._4 | |
1127 | 1125 | let newRarityIdx = if ((rarityIdx == idxRarityC)) | |
1128 | 1126 | then if ((rarityThresholds[idxThresholdC] > totalBonus)) | |
1129 | 1127 | then idxRarityC | |
1130 | 1128 | else if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1131 | 1129 | then idxRarityU | |
1132 | 1130 | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdU])) + "%")) | |
1133 | 1131 | else if ((rarityIdx == idxRarityU)) | |
1134 | 1132 | then if ((rarityThresholds[idxThresholdU] > totalBonus)) | |
1135 | 1133 | then idxRarityU | |
1136 | 1134 | else if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1137 | 1135 | then idxRarityL | |
1138 | 1136 | else throw((("You can advance only one level of rarity, max total bonus " + toString(rarityThresholds[idxThresholdL])) + "%")) | |
1139 | 1137 | else if ((rarityIdx == idxRarityL)) | |
1140 | 1138 | then if ((rarityThresholds[idxThresholdL] > totalBonus)) | |
1141 | 1139 | then idxRarityL | |
1142 | 1140 | else idxRarityE | |
1143 | 1141 | else if ((rarityIdx == idxRarityE)) | |
1144 | 1142 | then idxRarityE | |
1145 | 1143 | else if ((rarityIdx == idxRarityP)) | |
1146 | 1144 | then throw("You can't exchange NFTs of this rarity") | |
1147 | 1145 | else throw("Unknown rarity") | |
1148 | 1146 | let minWlgFee = fraction(totalBonus, MULT14, getWlgPrice(0)) | |
1149 | 1147 | let change = (wlgFee - minWlgFee) | |
1150 | 1148 | let forTeam = (minWlgFee / 2) | |
1151 | 1149 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1152 | 1150 | if ((0 > change)) | |
1153 | 1151 | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1154 | 1152 | else { | |
1155 | 1153 | let changeActions = if ((change > 0)) | |
1156 | 1154 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1157 | 1155 | else nil | |
1158 | 1156 | let $t03103431195 = issueNftCustom(idxNamePickaxe, newRarityIdx, idxCollDig, newRarityIdx, totalBonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1159 | 1157 | let issueNftActions = $t03103431195._1 | |
1160 | 1158 | let nftAssetId = $t03103431195._2 | |
1161 | 1159 | let burned = size(burnActions) | |
1162 | 1160 | let burnCounterActions = if ((burned == 0)) | |
1163 | 1161 | then nil | |
1164 | 1162 | else [IntegerEntry(keyNftTotalBurned, (valueOrElse(getInteger(keyNftTotalBurned), 0) + burned))] | |
1165 | 1163 | $Tuple2((((((issueNftActions ++ burnActions) ++ burnCounterActions) ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)), $Tuple2(nftAssetId, wlgRemain)) | |
1166 | 1164 | } | |
1167 | 1165 | } | |
1168 | 1166 | } | |
1169 | 1167 | ||
1170 | 1168 | ||
1171 | 1169 | ||
1172 | 1170 | @Callable(i) | |
1173 | 1171 | func openNftChest () = if ((i.caller != this)) | |
1174 | 1172 | then throw("Temporary disabled") | |
1175 | 1173 | else { | |
1176 | 1174 | let prologActions = prolog(i) | |
1177 | 1175 | if ((size(i.payments) != 1)) | |
1178 | 1176 | then throw("exactly 1 payment must be attached") | |
1179 | 1177 | else { | |
1180 | 1178 | let pmt = i.payments[0] | |
1181 | 1179 | let wlgAmount = pmt.amount | |
1182 | 1180 | if (if (!(isDefined(pmt.assetId))) | |
1183 | 1181 | then true | |
1184 | 1182 | else (value(pmt.assetId) != wlgAssetId)) | |
1185 | 1183 | then throw("WLGOLD payments only!") | |
1186 | 1184 | else { | |
1187 | 1185 | let minWlgFee = fraction(NFT_CHEST_PRICE_USDT, MULT8, getWlgPrice(0)) | |
1188 | 1186 | let change = (wlgAmount - minWlgFee) | |
1189 | 1187 | let forTeam = (minWlgFee / 2) | |
1190 | 1188 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [(minWlgFee - forTeam)], nil)) | |
1191 | 1189 | if ((0 > change)) | |
1192 | 1190 | then throw((("You need to attach " + fixedPoint(minWlgFee, 8)) + " WLGOLD as fee")) | |
1193 | 1191 | else { | |
1194 | 1192 | let changeActions = if ((change > 0)) | |
1195 | 1193 | then [ScriptTransfer(i.caller, change, wlgAssetId)] | |
1196 | 1194 | else nil | |
1197 | 1195 | let addr = toString(i.caller) | |
1198 | 1196 | let finishKey = keyCommit(addr) | |
1199 | 1197 | let finishBlock = valueOrErrorMessage(getInteger(finishKey), "You have to commitForRandom() first!") | |
1200 | 1198 | if ((finishBlock > height)) | |
1201 | 1199 | then throw(("Random number is not ready yet, wait until height = " + toString(finishBlock))) | |
1202 | 1200 | else { | |
1203 | 1201 | let entropy = value(value(blockInfoByHeight(finishBlock)).vrf) | |
1204 | 1202 | let salt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
1205 | 1203 | let rand = getRandomNumber(100, salt, entropy) | |
1206 | 1204 | let $t03327633548 = if ((84 > rand)) | |
1207 | 1205 | then $Tuple2(1, idxRarityC) | |
1208 | 1206 | else if ((98 > rand)) | |
1209 | 1207 | then $Tuple2(5, idxRarityU) | |
1210 | 1208 | else $Tuple2(10, idxRarityL) | |
1211 | 1209 | let bonus = $t03327633548._1 | |
1212 | 1210 | let rarityIdx = $t03327633548._2 | |
1213 | 1211 | let $t03355133701 = issueNftCustom(idxNamePickaxe, rarityIdx, idxCollDig, rarityIdx, bonus, idxDescrPickaxe, idxBonusTypeFp, i.caller) | |
1214 | 1212 | let issueNftActions = $t03355133701._1 | |
1215 | 1213 | let nftAssetId = $t03355133701._2 | |
1216 | 1214 | $Tuple2(((((issueNftActions ++ prologActions) ++ changeActions) :+ ScriptTransfer(addressFromStringValue(getStringValue(wlgContract, teamAddrKey)), forTeam, wlgAssetId)) :+ DeleteEntry(finishKey)), $Tuple2(nftAssetId, wlgRemain)) | |
1217 | 1215 | } | |
1218 | 1216 | } | |
1219 | 1217 | } | |
1220 | 1218 | } | |
1221 | 1219 | } | |
1222 | 1220 | ||
1223 | 1221 | ||
1224 | 1222 | ||
1225 | 1223 | @Callable(i) | |
1226 | 1224 | func commitForRandom () = if ((i.caller != this)) | |
1227 | 1225 | then throw("Temporary disabled") | |
1228 | 1226 | else { | |
1229 | 1227 | let prologActions = prolog(i) | |
1230 | 1228 | let addr = toString(i.caller) | |
1231 | 1229 | let finishKey = keyCommit(addr) | |
1232 | 1230 | if (isDefined(getInteger(finishKey))) | |
1233 | 1231 | then throw("You already commited for random, please use it") | |
1234 | 1232 | else { | |
1235 | 1233 | let finishBlock = (height + RANDOM_DELAY) | |
1236 | 1234 | $Tuple2(([IntegerEntry(finishKey, finishBlock)] ++ prologActions), finishBlock) | |
1237 | 1235 | } | |
1238 | 1236 | } | |
1239 | 1237 | ||
1240 | 1238 | ||
1241 | 1239 | ||
1242 | 1240 | @Callable(i) | |
1243 | - | func | |
1241 | + | func drawPromoRound (roundId) = if ((i.caller != this)) | |
1244 | 1242 | then throw("Permission denied") | |
1245 | 1243 | else { | |
1246 | 1244 | let today = (height / DAY_BLOCKS) | |
1247 | 1245 | let maxValue = valueOrElse(getInteger(keyTotalPromoTickets), 0) | |
1248 | 1246 | if ((maxValue == 0)) | |
1249 | 1247 | then throw("No tickets to draw") | |
1250 | 1248 | else { | |
1251 | 1249 | let b = (today * DAY_BLOCKS) | |
1252 | 1250 | let h = if ((b > VRF_OFFSET)) | |
1253 | 1251 | then b | |
1254 | 1252 | else (b + VRF_OFFSET) | |
1255 | 1253 | let entropy = value(value(blockInfoByHeight(h)).vrf) | |
1256 | 1254 | let promoMap = valueOrElse(getString(keyPromoMap), "") | |
1257 | 1255 | if ((promoMap == "")) | |
1258 | 1256 | then throw("No participants") | |
1259 | 1257 | else { | |
1260 | - | func singleDraw (ac,j) = if ((j >= promoNumPrizes)) | |
1261 | - | then ac | |
1262 | - | else { | |
1263 | - | let rand = getRandomNumber(ac._1, ac._2, entropy) | |
1264 | - | let promoList = if ((ac._3 == "")) | |
1265 | - | then nil | |
1266 | - | else split_51C(ac._3, "_") | |
1267 | - | func countTickets (acc,el) = { | |
1268 | - | let parts = split(el, ":") | |
1269 | - | let addr = parts[0] | |
1270 | - | let tickets = parseIntValue(parts[1]) | |
1271 | - | let newTotal = (acc._1 + tickets) | |
1272 | - | if (if ((acc._3 == "")) | |
1273 | - | then (newTotal > rand) | |
1274 | - | else false) | |
1275 | - | then $Tuple3(newTotal, tickets, addr) | |
1276 | - | else $Tuple3(newTotal, acc._2, acc._3) | |
1258 | + | func singleDraw (ac,j) = { | |
1259 | + | let promoList = if ((ac._3 == "")) | |
1260 | + | then nil | |
1261 | + | else split_51C(ac._3, "_") | |
1262 | + | if ((j >= size(promoList))) | |
1263 | + | then ac | |
1264 | + | else { | |
1265 | + | let rand = getRandomNumber(ac._1, ac._2, entropy) | |
1266 | + | func countTickets (acc,el) = { | |
1267 | + | let parts = split(el, ":") | |
1268 | + | let addr = parts[0] | |
1269 | + | let tickets = parseIntValue(parts[1]) | |
1270 | + | let newTotal = (acc._1 + tickets) | |
1271 | + | if (if ((acc._3 == "")) | |
1272 | + | then (newTotal > rand) | |
1273 | + | else false) | |
1274 | + | then $Tuple3(newTotal, tickets, addr) | |
1275 | + | else $Tuple3(newTotal, acc._2, acc._3) | |
1276 | + | } | |
1277 | + | ||
1278 | + | let r = { | |
1279 | + | let $l = promoList | |
1280 | + | let $s = size($l) | |
1281 | + | let $acc0 = $Tuple3(0, 0, "") | |
1282 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1283 | + | then $a | |
1284 | + | else countTickets($a, $l[$i]) | |
1285 | + | ||
1286 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1287 | + | then $a | |
1288 | + | else throw("List size exceeds 200") | |
1289 | + | ||
1290 | + | $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($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115), 116), 117), 118), 119), 120), 121), 122), 123), 124), 125), 126), 127), 128), 129), 130), 131), 132), 133), 134), 135), 136), 137), 138), 139), 140), 141), 142), 143), 144), 145), 146), 147), 148), 149), 150), 151), 152), 153), 154), 155), 156), 157), 158), 159), 160), 161), 162), 163), 164), 165), 166), 167), 168), 169), 170), 171), 172), 173), 174), 175), 176), 177), 178), 179), 180), 181), 182), 183), 184), 185), 186), 187), 188), 189), 190), 191), 192), 193), 194), 195), 196), 197), 198), 199), 200) | |
1291 | + | } | |
1292 | + | let winner = r._3 | |
1293 | + | if ((winner == "")) | |
1294 | + | then ac | |
1295 | + | else { | |
1296 | + | let mapParts = split_51C(ac._3, winner) | |
1297 | + | let newMap = if ((mapParts[0] == "")) | |
1298 | + | then drop(mapParts[1], 5) | |
1299 | + | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1300 | + | let winActions = if ((j == 0)) | |
1301 | + | then invoke(this, "issueMittenP", [winner], nil) | |
1302 | + | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1303 | + | if ((winActions == winActions)) | |
1304 | + | then { | |
1305 | + | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1306 | + | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1307 | + | } | |
1308 | + | else throw("Strict value is not equal to itself.") | |
1309 | + | } | |
1277 | 1310 | } | |
1278 | - | ||
1279 | - | let r = { | |
1280 | - | let $l = promoList | |
1281 | - | let $s = size($l) | |
1282 | - | let $acc0 = $Tuple3(0, 0, "") | |
1283 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1284 | - | then $a | |
1285 | - | else countTickets($a, $l[$i]) | |
1286 | - | ||
1287 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1288 | - | then $a | |
1289 | - | else throw("List size exceeds 200") | |
1290 | - | ||
1291 | - | $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($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 101), 102), 103), 104), 105), 106), 107), 108), 109), 110), 111), 112), 113), 114), 115), 116), 117), 118), 119), 120), 121), 122), 123), 124), 125), 126), 127), 128), 129), 130), 131), 132), 133), 134), 135), 136), 137), 138), 139), 140), 141), 142), 143), 144), 145), 146), 147), 148), 149), 150), 151), 152), 153), 154), 155), 156), 157), 158), 159), 160), 161), 162), 163), 164), 165), 166), 167), 168), 169), 170), 171), 172), 173), 174), 175), 176), 177), 178), 179), 180), 181), 182), 183), 184), 185), 186), 187), 188), 189), 190), 191), 192), 193), 194), 195), 196), 197), 198), 199), 200) | |
1292 | - | } | |
1293 | - | let winner = r._3 | |
1294 | - | if ((winner == "")) | |
1295 | - | then ac | |
1296 | - | else { | |
1297 | - | let mapParts = split_51C(ac._3, winner) | |
1298 | - | let newMap = if ((mapParts[0] == "")) | |
1299 | - | then drop(mapParts[1], 5) | |
1300 | - | else (dropRight(mapParts[0], 1) + drop(mapParts[1], 4)) | |
1301 | - | let winActions = if ((j == 0)) | |
1302 | - | then invoke(this, "issueMittenP", [winner], nil) | |
1303 | - | else invoke(this, "stakeAcresFor", [winner, promoAwardPerRound[j], true], nil) | |
1304 | - | if ((winActions == winActions)) | |
1305 | - | then { | |
1306 | - | let newSalt = fromBase58String(split(valueOrElse(getString(keyCurWeekTxIdByUser(winner)), "0_DEFAULT"), "_")[1]) | |
1307 | - | $Tuple4((ac._1 - r._2), newSalt, newMap, (ac._4 :+ winner)) | |
1308 | - | } | |
1309 | - | else throw("Strict value is not equal to itself.") | |
1310 | - | } | |
1311 | - | } | |
1311 | + | } | |
1312 | 1312 | ||
1313 | 1313 | let draws = { | |
1314 | 1314 | let $l = [0, 1, 2, 3, 4, 5] | |
1315 | 1315 | let $s = size($l) | |
1316 | 1316 | let $acc0 = $Tuple4(maxValue, i.transactionId, promoMap, nil) | |
1317 | 1317 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1318 | 1318 | then $a | |
1319 | 1319 | else singleDraw($a, $l[$i]) | |
1320 | 1320 | ||
1321 | 1321 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1322 | 1322 | then $a | |
1323 | 1323 | else throw("List size exceeds 6") | |
1324 | 1324 | ||
1325 | 1325 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
1326 | 1326 | } | |
1327 | - | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry( | |
1327 | + | $Tuple2([StringEntry(keyPromoMap, draws._3), IntegerEntry(keyTotalPromoTickets, draws._1), StringEntry(keyPromoRoundWinners(roundId), makeString(draws._4, "_"))], 0) | |
1328 | 1328 | } | |
1329 | 1329 | } | |
1330 | 1330 | } | |
1331 | 1331 | ||
1332 | 1332 |
github/deemru/w8io/169f3d6 139.65 ms ◑