tx · GgFwSmoGs3sUbhcrnfWtc47ns3PbnFmt3xKXrz18iczK 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.03700000 Waves 2024.12.21 01:23 [3423450] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "GgFwSmoGs3sUbhcrnfWtc47ns3PbnFmt3xKXrz18iczK", "fee": 3700000, "feeAssetId": null, "timestamp": 1734733480079, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "48V48KUgCU1ZMT7i6FmYSbdfwkjNm9HQ6gH3nvB4kgDCBote634qqoMQViPyEGybHmmJVjewFNYuixSWnC2pqhmV" ], "script": "base64:BgJSCAISBgoECAgICBIDCgEIEgMKAQESBAoCCAESAwoBARIECgIIARIAEgMKAQgSAwoBCBIDCgEBEgMKAQESAwoBCBIDCgEIEgMKAQESABIECgIIAb0BAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ADk1JTlNIT1BQQVlNRU5UAKCNBgAKREFZX01JTExJUwCAuJkpABJBQ1JFU19XRUVLTFlfUFJJWkUAwPD1CwAFY2hhaW4JAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACkRBWV9CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAoAsDCQAAAgEBVAUHJG1hdGNoMAA8CQACAQINVW5rbm93biBjaGFpbgALV0VFS19CTE9DS1MEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAA4E4DCQAAAgEBVAUHJG1hdGNoMAC0AQkAAgECDVVua25vd24gY2hhaW4AClZSRl9PRkZTRVQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDAAAAMJAAACAQFUBQckbWF0Y2gwAJD5RQ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JuYWwBBQRhZGRyCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBCmFkZEdlbXNGb3ICBGFkZHIMZGVsdGFUaWNrZXRzAwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIRUGVybWlzc2lvbiBkZW5pZWQEBHdlZWsJAGkCBQZoZWlnaHQFC1dFRUtfQkxPQ0tTBAp0aWNrZXRzS2V5CQESa2V5VXNlcldlZWtUaWNrZXRzAgUEYWRkcgUEd2VlawQPb2xkVG90YWxUaWNrZXRzCQELdmFsdWVPckVsc2UCCQCfCAEJARNrZXlUb3RhbFdlZWtUaWNrZXRzAQUEd2VlawAABApvbGRUaWNrZXRzCQELdmFsdWVPckVsc2UCCQCfCAEFCnRpY2tldHNLZXkAAAQPb2xkUGFydGljaXBhbnRzCQELdmFsdWVPckVsc2UCCQCfCAEJARhrZXlUb3RhbFdlZWtQYXJ0aWNpcGFudHMBBQR3ZWVrAAAEEnVwZGF0ZVBhcnRpY2lwYW50cwMDCQAAAgUKb2xkVGlja2V0cwAACQAAAgUMZGVsdGFUaWNrZXRzAAEHCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQEYa2V5VG90YWxXZWVrUGFydGljaXBhbnRzAQUEd2VlawkAZAIFD29sZFBhcnRpY2lwYW50cwABBQNuaWwFA25pbAkAlAoCCQDNCAIJAM0IAgUSdXBkYXRlUGFydGljaXBhbnRzCQEMSW50ZWdlckVudHJ5AgUKdGlja2V0c0tleQkAZAIFCm9sZFRpY2tldHMFDGRlbHRhVGlja2V0cwkBDEludGVnZXJFbnRyeQIJARNrZXlUb3RhbFdlZWtUaWNrZXRzAQUEd2VlawkAZAIFD29sZFRvdGFsVGlja2V0cwUMZGVsdGFUaWNrZXRzBQxkZWx0YVRpY2tldHMAQbsiAQ==", "height": 3423450, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F9paorUAK9Va7AvHqTHxhYen97Yukb2Jep8hv8ykKMqr Next: none Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let MINSHOPPAYMENT = 100000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | + | ||
14 | + | let ACRES_WEEKLY_PRIZE = 25000000 | |
13 | 15 | ||
14 | 16 | let chain = take(drop(this.bytes, 1), 1) | |
15 | 17 | ||
149 | 151 | func keyTotalWeekParticipants (week) = ("totalWeekParticipants_" + toString(week)) | |
150 | 152 | ||
151 | 153 | ||
152 | - | func | |
154 | + | func keyNumPrizes2Draw (week) = ("numPrizes2Draw_" + toString(week)) | |
153 | 155 | ||
154 | 156 | ||
155 | 157 | func keyNumNFTDrawn (week) = ("numNFTDrawn_" + toString(week)) | |
158 | + | ||
159 | + | ||
160 | + | func keyAcresDrawn (week) = ("acresDrawn_" + toString(week)) | |
156 | 161 | ||
157 | 162 | ||
158 | 163 | func keyWeekWinners (week) = ("weekWinners_" + toString(week)) | |
751 | 756 | func openChestInternal (addr) = { | |
752 | 757 | let week = (height / WEEK_BLOCKS) | |
753 | 758 | let drawWeek = (week - 1) | |
754 | - | let numPrizes = valueOrElse(getInteger(keyNumNFT2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
755 | - | let prizesDrawn = valueOrElse(getInteger(keyNumNFTDrawn(drawWeek)), 0) | |
759 | + | let numPrizes = valueOrElse(getInteger(keyNumPrizes2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
760 | + | let nftKey = keyNumNFTDrawn(drawWeek) | |
761 | + | let acresKey = keyAcresDrawn(drawWeek) | |
756 | 762 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
757 | 763 | if ((0 >= userTickets)) | |
758 | 764 | then $Tuple2(nil, unit) | |
767 | 773 | if (isWin(userTickets, totalTickets, numPrizes, random4)) | |
768 | 774 | then { | |
769 | 775 | let rnd = getRandomNumber(100, (base58'29' + salt), entropy) | |
770 | - | let prizeResult = if ((rnd >= 90)) | |
771 | - | then invoke(acres2Contract, "issuePickC1", [addr], nil) | |
772 | - | else invoke(acresContract, "sendAcresFor", [addr, 25000000], nil) | |
776 | + | let $t087619129 = if ((rnd >= 90)) | |
777 | + | then $Tuple2(invoke(acres2Contract, "issuePickC1", [addr], nil), IntegerEntry(nftKey, (valueOrElse(getInteger(nftKey), 0) + 1))) | |
778 | + | else $Tuple2(invoke(acresContract, "sendAcresFor", [addr, ACRES_WEEKLY_PRIZE], nil), IntegerEntry(acresKey, (valueOrElse(getInteger(acresKey), 0) + ACRES_WEEKLY_PRIZE))) | |
779 | + | let prizeResult = $t087619129._1 | |
780 | + | let prizeAction = $t087619129._2 | |
773 | 781 | let winners = getString(keyWeekWinners(drawWeek)) | |
774 | 782 | let newWinners = if (isDefined(winners)) | |
775 | 783 | then ((value(winners) + "_") + addr) | |
776 | 784 | else addr | |
777 | - | $Tuple2([ | |
785 | + | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], prizeResult) | |
778 | 786 | } | |
779 | 787 | else { | |
780 | 788 | let random1 = (getRandomNumber(9, (base58'29' + salt), entropy) + 1) | |
950 | 958 | then if ((size(i.payments) != 0)) | |
951 | 959 | then throw("No payments required") | |
952 | 960 | else { | |
953 | - | let $ | |
954 | - | let actions = $ | |
955 | - | let wlgClaimedAmount = $ | |
961 | + | let $t01682016889 = claimInternal2(toString(i.caller)) | |
962 | + | let actions = $t01682016889._1 | |
963 | + | let wlgClaimedAmount = $t01682016889._2 | |
956 | 964 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
957 | 965 | } | |
958 | 966 | else throw("Strict value is not equal to itself.") | |
968 | 976 | else false) | |
969 | 977 | then throw("Permission denied") | |
970 | 978 | else { | |
971 | - | let $ | |
972 | - | if (($ | |
979 | + | let $t01720917266 = claimInternal2(addr) | |
980 | + | if (($t01720917266 == $t01720917266)) | |
973 | 981 | then { | |
974 | - | let wlgClaimedAmount = $ | |
975 | - | let actions = $ | |
982 | + | let wlgClaimedAmount = $t01720917266._2 | |
983 | + | let actions = $t01720917266._1 | |
976 | 984 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
977 | 985 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
978 | 986 | else actions, wlgClaimedAmount) | |
990 | 998 | else false) | |
991 | 999 | then throw("Permission denied") | |
992 | 1000 | else { | |
993 | - | let $ | |
994 | - | if (($ | |
1001 | + | let $t01764917705 = claimInternal(addr) | |
1002 | + | if (($t01764917705 == $t01764917705)) | |
995 | 1003 | then { | |
996 | - | let wlgClaimedAmount = $ | |
997 | - | let actions = $ | |
1004 | + | let wlgClaimedAmount = $t01764917705._2 | |
1005 | + | let actions = $t01764917705._1 | |
998 | 1006 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
999 | 1007 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
1000 | 1008 | else nil, wlgClaimedAmount) | |
1075 | 1083 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
1076 | 1084 | then throw("Permission denied") | |
1077 | 1085 | else { | |
1078 | - | let $ | |
1079 | - | let actions = $ | |
1080 | - | let xp = $ | |
1086 | + | let $t02033720380 = takeXpInternal(addr, 0) | |
1087 | + | let actions = $t02033720380._1 | |
1088 | + | let xp = $t02033720380._2 | |
1081 | 1089 | $Tuple2(actions, xp) | |
1082 | 1090 | } | |
1083 | 1091 | ||
1085 | 1093 | ||
1086 | 1094 | @Callable(i) | |
1087 | 1095 | func checkWlgXpREADONLY (addr) = { | |
1088 | - | let $ | |
1089 | - | let ignored = $ | |
1090 | - | let deltaXP = $ | |
1096 | + | let $t02045720505 = takeXpInternal(addr, 0) | |
1097 | + | let ignored = $t02045720505._1 | |
1098 | + | let deltaXP = $t02045720505._2 | |
1091 | 1099 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
1092 | 1100 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
1093 | 1101 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
1100 | 1108 | then throw("Permission denied") | |
1101 | 1109 | else { | |
1102 | 1110 | let week = (height / WEEK_BLOCKS) | |
1103 | - | $Tuple2([IntegerEntry( | |
1111 | + | $Tuple2([IntegerEntry(keyNumPrizes2Draw(week), numPrizes)], numPrizes) | |
1104 | 1112 | } | |
1105 | 1113 | ||
1106 | 1114 |
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 MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let MINSHOPPAYMENT = 100000 | |
11 | 11 | ||
12 | 12 | let DAY_MILLIS = 86400000 | |
13 | + | ||
14 | + | let ACRES_WEEKLY_PRIZE = 25000000 | |
13 | 15 | ||
14 | 16 | let chain = take(drop(this.bytes, 1), 1) | |
15 | 17 | ||
16 | 18 | let DAY_BLOCKS = match chain { | |
17 | 19 | case _ => | |
18 | 20 | if ((base58'2W' == $match0)) | |
19 | 21 | then 1440 | |
20 | 22 | else if ((base58'2T' == $match0)) | |
21 | 23 | then 60 | |
22 | 24 | else throw("Unknown chain") | |
23 | 25 | } | |
24 | 26 | ||
25 | 27 | let WEEK_BLOCKS = match chain { | |
26 | 28 | case _ => | |
27 | 29 | if ((base58'2W' == $match0)) | |
28 | 30 | then 10080 | |
29 | 31 | else if ((base58'2T' == $match0)) | |
30 | 32 | then 180 | |
31 | 33 | else throw("Unknown chain") | |
32 | 34 | } | |
33 | 35 | ||
34 | 36 | let VRF_OFFSET = match chain { | |
35 | 37 | case _ => | |
36 | 38 | if ((base58'2W' == $match0)) | |
37 | 39 | then 0 | |
38 | 40 | else if ((base58'2T' == $match0)) | |
39 | 41 | then 1146000 | |
40 | 42 | else throw("Unknown chain") | |
41 | 43 | } | |
42 | 44 | ||
43 | 45 | let usdtAssetId = match chain { | |
44 | 46 | case _ => | |
45 | 47 | if ((base58'2W' == $match0)) | |
46 | 48 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
47 | 49 | else if ((base58'2T' == $match0)) | |
48 | 50 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
49 | 51 | else throw("Unknown chain") | |
50 | 52 | } | |
51 | 53 | ||
52 | 54 | let defaultRest2AddressStr = match chain { | |
53 | 55 | case _ => | |
54 | 56 | if ((base58'2W' == $match0)) | |
55 | 57 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
56 | 58 | else if ((base58'2T' == $match0)) | |
57 | 59 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
58 | 60 | else throw("Unknown chain") | |
59 | 61 | } | |
60 | 62 | ||
61 | 63 | let defaultRestAddressStr = match chain { | |
62 | 64 | case _ => | |
63 | 65 | if ((base58'2W' == $match0)) | |
64 | 66 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
65 | 67 | else if ((base58'2T' == $match0)) | |
66 | 68 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
67 | 69 | else throw("Unknown chain") | |
68 | 70 | } | |
69 | 71 | ||
70 | 72 | let economyContractStr = match chain { | |
71 | 73 | case _ => | |
72 | 74 | if ((base58'2W' == $match0)) | |
73 | 75 | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
74 | 76 | else if ((base58'2T' == $match0)) | |
75 | 77 | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
76 | 78 | else throw("Unknown chain") | |
77 | 79 | } | |
78 | 80 | ||
79 | 81 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
80 | 82 | ||
81 | 83 | ||
82 | 84 | let IdxCfgAcres2Dapp = 1 | |
83 | 85 | ||
84 | 86 | let IdxCfgWlgDapp = 2 | |
85 | 87 | ||
86 | 88 | let IdxCfgPuzzlePoolDapp = 4 | |
87 | 89 | ||
88 | 90 | let IdxCfgInvestFundDapp = 5 | |
89 | 91 | ||
90 | 92 | let IdxCfgMarketDapp = 6 | |
91 | 93 | ||
92 | 94 | func keyRestCfg () = "%s__restConfig" | |
93 | 95 | ||
94 | 96 | ||
95 | 97 | func keyRest2Address () = "%s__rest2Addr" | |
96 | 98 | ||
97 | 99 | ||
98 | 100 | func keyRestAddress () = "%s__restAddr" | |
99 | 101 | ||
100 | 102 | ||
101 | 103 | let restContract = addressFromStringValue(valueOrElse(getString(this, keyRestAddress()), defaultRestAddressStr)) | |
102 | 104 | ||
103 | 105 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
104 | 106 | ||
105 | 107 | ||
106 | 108 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
107 | 109 | ||
108 | 110 | ||
109 | 111 | let IdxCfgStakingDapp = 1 | |
110 | 112 | ||
111 | 113 | let IdxCfgAcresDapp = 8 | |
112 | 114 | ||
113 | 115 | let restCfg = readRestCfgOrFail(restContract) | |
114 | 116 | ||
115 | 117 | let stakingContract = getContractAddressOrFail(restCfg, IdxCfgStakingDapp) | |
116 | 118 | ||
117 | 119 | let acresContract = getContractAddressOrFail(restCfg, IdxCfgAcresDapp) | |
118 | 120 | ||
119 | 121 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
120 | 122 | ||
121 | 123 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
122 | 124 | ||
123 | 125 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
124 | 126 | ||
125 | 127 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
126 | 128 | ||
127 | 129 | let puzzlePoolContract = getContractAddressOrFail(rest2Cfg, IdxCfgPuzzlePoolDapp) | |
128 | 130 | ||
129 | 131 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
130 | 132 | ||
131 | 133 | let marketContract = getContractAddressOrFail(rest2Cfg, IdxCfgMarketDapp) | |
132 | 134 | ||
133 | 135 | func keyLastWeekTxIdByUser (addr) = ("lastWeekTxIdByUser_" + addr) | |
134 | 136 | ||
135 | 137 | ||
136 | 138 | let wlgAssetIdKey = "wlg_assetId" | |
137 | 139 | ||
138 | 140 | let wlgAssetId = valueOrErrorMessage(getBinary(wlgContract, wlgAssetIdKey), "WLGOLD is not issued yet") | |
139 | 141 | ||
140 | 142 | func keyUserBet (addr) = ("userBet_" + addr) | |
141 | 143 | ||
142 | 144 | ||
143 | 145 | func keyUserWeekTickets (addr,week) = ((("userWeekTickets_" + addr) + "_") + toString(week)) | |
144 | 146 | ||
145 | 147 | ||
146 | 148 | func keyTotalWeekTickets (week) = ("totalWeekTickets_" + toString(week)) | |
147 | 149 | ||
148 | 150 | ||
149 | 151 | func keyTotalWeekParticipants (week) = ("totalWeekParticipants_" + toString(week)) | |
150 | 152 | ||
151 | 153 | ||
152 | - | func | |
154 | + | func keyNumPrizes2Draw (week) = ("numPrizes2Draw_" + toString(week)) | |
153 | 155 | ||
154 | 156 | ||
155 | 157 | func keyNumNFTDrawn (week) = ("numNFTDrawn_" + toString(week)) | |
158 | + | ||
159 | + | ||
160 | + | func keyAcresDrawn (week) = ("acresDrawn_" + toString(week)) | |
156 | 161 | ||
157 | 162 | ||
158 | 163 | func keyWeekWinners (week) = ("weekWinners_" + toString(week)) | |
159 | 164 | ||
160 | 165 | ||
161 | 166 | func winningBet (day) = { | |
162 | 167 | let b = (day * DAY_BLOCKS) | |
163 | 168 | let h = if ((b > VRF_OFFSET)) | |
164 | 169 | then b | |
165 | 170 | else (b + VRF_OFFSET) | |
166 | 171 | (toInt(value(value(blockInfoByHeight(h)).vrf)) % 4) | |
167 | 172 | } | |
168 | 173 | ||
169 | 174 | ||
170 | 175 | let ixWlgAmount = 0 | |
171 | 176 | ||
172 | 177 | let ixWlgWlg = 1 | |
173 | 178 | ||
174 | 179 | let ixWlgPrice = 2 | |
175 | 180 | ||
176 | 181 | let ixWlgIssueTime = 8 | |
177 | 182 | ||
178 | 183 | let ixWlgTeamAmLeft = 11 | |
179 | 184 | ||
180 | 185 | let ixWlgTeamAmAvailNow = 12 | |
181 | 186 | ||
182 | 187 | let ixWlgActAmLeft = 15 | |
183 | 188 | ||
184 | 189 | let ixWlgActAmAvailNow = 16 | |
185 | 190 | ||
186 | 191 | let ixWlgAmLeftTotal = 19 | |
187 | 192 | ||
188 | 193 | let ixWlgUserAmAvailNow = 23 | |
189 | 194 | ||
190 | 195 | let ixWlgEffUserTime = 24 | |
191 | 196 | ||
192 | 197 | let ixWlgIssue10Amount = 25 | |
193 | 198 | ||
194 | 199 | let ixWlgMarketingIssue10Amount = 26 | |
195 | 200 | ||
196 | 201 | let ixWlgTeamIssue10Amount = 27 | |
197 | 202 | ||
198 | 203 | let ixWlgUser10part = 28 | |
199 | 204 | ||
200 | 205 | let ixWlgIssue10Time = 29 | |
201 | 206 | ||
202 | 207 | func asInt (v) = match v { | |
203 | 208 | case n: Int => | |
204 | 209 | n | |
205 | 210 | case _ => | |
206 | 211 | throw("fail to cast into Int") | |
207 | 212 | } | |
208 | 213 | ||
209 | 214 | ||
210 | 215 | func fixedPoint (val,decimals) = { | |
211 | 216 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
212 | 217 | let lowPart = toString((val % tenPow)) | |
213 | 218 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
214 | 219 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
215 | 220 | } | |
216 | 221 | ||
217 | 222 | ||
218 | 223 | func getRandomNumber (maxValue,salt,entropy) = if ((0 >= maxValue)) | |
219 | 224 | then throw("maxValue should be > 0") | |
220 | 225 | else { | |
221 | 226 | let randomHash = sha256_16Kb((salt + entropy)) | |
222 | 227 | (toInt(randomHash) % maxValue) | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | 231 | let M4 = 10000 | |
227 | 232 | ||
228 | 233 | let SCALE8 = 100000000 | |
229 | 234 | ||
230 | 235 | let xpLevelScale = 3200 | |
231 | 236 | ||
232 | 237 | let xpLevelRecipPow = 4000 | |
233 | 238 | ||
234 | 239 | let numPointsOnLevelUp = 3 | |
235 | 240 | ||
236 | 241 | let wlgBaseAmountXp = 100000000000 | |
237 | 242 | ||
238 | 243 | func keyUserXP (addr) = ("userXP_" + addr) | |
239 | 244 | ||
240 | 245 | ||
241 | 246 | func keyUserLevel (addr) = ("userLevel_" + addr) | |
242 | 247 | ||
243 | 248 | ||
244 | 249 | let xpWlg = 10000 | |
245 | 250 | ||
246 | 251 | func levelByXP (xp) = fraction(xpLevelScale, pow(xp, 4, xpLevelRecipPow, 4, 4, DOWN), SCALE8) | |
247 | 252 | ||
248 | 253 | ||
249 | 254 | func levelUp (currLevel,newXP) = { | |
250 | 255 | let newLevel = levelByXP(newXP) | |
251 | 256 | [newLevel, (numPointsOnLevelUp * (newLevel - currLevel))] | |
252 | 257 | } | |
253 | 258 | ||
254 | 259 | ||
255 | 260 | func isWin (userTickets,totalTickets,numPrizes,random4) = { | |
256 | 261 | let a4 = fraction(M4, (totalTickets - userTickets), totalTickets) | |
257 | 262 | let p4 = pow(a4, 4, numPrizes, 0, 4, DOWN) | |
258 | 263 | ((M4 - random4) > p4) | |
259 | 264 | } | |
260 | 265 | ||
261 | 266 | ||
262 | 267 | let M6 = 1000000 | |
263 | 268 | ||
264 | 269 | let M8 = 100000000 | |
265 | 270 | ||
266 | 271 | let MILLION6 = 100000000000000 | |
267 | 272 | ||
268 | 273 | let TEAMSHARE = 200000 | |
269 | 274 | ||
270 | 275 | let ACTIVITYSHARE = 100000 | |
271 | 276 | ||
272 | 277 | let PLAYERSHARE = 400000 | |
273 | 278 | ||
274 | 279 | let YEARMILLIS = 31557600000 | |
275 | 280 | ||
276 | 281 | let DAYMILLIS = 86400000 | |
277 | 282 | ||
278 | 283 | let BANK_FEE = 50000 | |
279 | 284 | ||
280 | 285 | let ch = take(drop(this.bytes, 1), 1) | |
281 | 286 | ||
282 | 287 | let USDT_TVL_CORRECTION = match ch { | |
283 | 288 | case _ => | |
284 | 289 | if ((base58'2W' == $match0)) | |
285 | 290 | then 1208630000 | |
286 | 291 | else if ((base58'2T' == $match0)) | |
287 | 292 | then 0 | |
288 | 293 | else throw("Unknown chain") | |
289 | 294 | } | |
290 | 295 | ||
291 | 296 | let teamAddrKey = "teamAddr" | |
292 | 297 | ||
293 | 298 | let lastTeamTimeKey = "lastClaimedTime_team" | |
294 | 299 | ||
295 | 300 | let teamAmountLeftKey = "teamAmountLeft" | |
296 | 301 | ||
297 | 302 | let lastActivitiesTimeKey = "lastClaimedTime_activities" | |
298 | 303 | ||
299 | 304 | let actAmountLeftKey = "activitiesAmountLeft" | |
300 | 305 | ||
301 | 306 | let stakersAmountLeftKey = "stakersAmountLeft" | |
302 | 307 | ||
303 | 308 | func keyLastClaimedTimeByUserOld (addr) = ("lastClaimedTimeUserOld_" + addr) | |
304 | 309 | ||
305 | 310 | ||
306 | 311 | func keyLastWlgTradeTimeByUser (addr) = ("lastArbTimeUser_" + addr) | |
307 | 312 | ||
308 | 313 | ||
309 | 314 | func keyLastWlgTradeLimitByUser (addr) = ("lastWlgLimitUser_" + addr) | |
310 | 315 | ||
311 | 316 | ||
312 | 317 | func distributionByPeriod (period) = fraction(MILLION6, (PLAYERSHARE * (period + 1)), (6 * M6)) | |
313 | 318 | ||
314 | 319 | ||
315 | 320 | let wlgIssueTimeKey = "wlg_issueTime" | |
316 | 321 | ||
317 | 322 | let wlgIssuedAmountKey = "wlg_issuedAmount" | |
318 | 323 | ||
319 | 324 | let zbIssuedAmountKey = "zbill_issuedAmount" | |
320 | 325 | ||
321 | 326 | func keyAcresStakedAmountByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
322 | 327 | ||
323 | 328 | ||
324 | 329 | let acresStakedTotalKey = "acresStakedAmountTotal" | |
325 | 330 | ||
326 | 331 | func keyWlgStakedAmountByUser (addr) = ("wlgStakedAmountByUser_" + addr) | |
327 | 332 | ||
328 | 333 | ||
329 | 334 | let wlgStakedTotalKey = "wlgStakedAmountTotal" | |
330 | 335 | ||
331 | 336 | func keyWlgStakedTimeByUser (addr) = ("wlgStakedTimeByUser_" + addr) | |
332 | 337 | ||
333 | 338 | ||
334 | 339 | let dappRest = 0 | |
335 | 340 | ||
336 | 341 | let dappStaking = 1 | |
337 | 342 | ||
338 | 343 | let dappEconomy = 2 | |
339 | 344 | ||
340 | 345 | let dappWlg = 3 | |
341 | 346 | ||
342 | 347 | let dappPuzzle = 4 | |
343 | 348 | ||
344 | 349 | let dappInvestFund = 5 | |
345 | 350 | ||
346 | 351 | let dappAcres = 6 | |
347 | 352 | ||
348 | 353 | func getLands (userAddrStrOrEmpty,stakingContract,acresContract) = { | |
349 | 354 | let props = split(valueOrElse(getString(stakingContract, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
350 | 355 | func adder (acc,item) = (acc + parseIntValue(item)) | |
351 | 356 | ||
352 | 357 | let totalPieces = { | |
353 | 358 | let $l = props | |
354 | 359 | let $s = size($l) | |
355 | 360 | let $acc0 = 0 | |
356 | 361 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
357 | 362 | then $a | |
358 | 363 | else adder($a, $l[$i]) | |
359 | 364 | ||
360 | 365 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
361 | 366 | then $a | |
362 | 367 | else throw("List size exceeds 6") | |
363 | 368 | ||
364 | 369 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
365 | 370 | } | |
366 | 371 | let userPieces = valueOrElse(getInteger(stakingContract, ("stakedPiecesByOwner_" + userAddrStrOrEmpty)), 0) | |
367 | 372 | let totalAcres = valueOrElse(getInteger(acresContract, acresStakedTotalKey), 0) | |
368 | 373 | let userAcres = valueOrElse(getInteger(acresContract, keyAcresStakedAmountByUser(userAddrStrOrEmpty)), 0) | |
369 | 374 | [totalPieces, userPieces, totalAcres, userAcres] | |
370 | 375 | } | |
371 | 376 | ||
372 | 377 | ||
373 | 378 | let idxTotalPieces = 0 | |
374 | 379 | ||
375 | 380 | let idxUserPieces = 1 | |
376 | 381 | ||
377 | 382 | let idxTotalAcres = 2 | |
378 | 383 | ||
379 | 384 | let idxUserAcres = 3 | |
380 | 385 | ||
381 | 386 | let OLD_STAKING_DEADL = 1733346000000 | |
382 | 387 | ||
383 | 388 | func getWlgStats (userAddrOpt,contracts,usdtId,usdtBalanceCorrection,userProportion6) = { | |
384 | 389 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssuedAmountKey), "WLGOLD is not issued yet") | |
385 | 390 | let economyUsd = assetBalance(contracts[dappEconomy], usdtId) | |
386 | 391 | let restUsd = assetBalance(contracts[dappRest], usdtId) | |
387 | 392 | let wlgUsd = (assetBalance(contracts[dappWlg], usdtId) - usdtBalanceCorrection) | |
388 | 393 | let puzzleUsd = assetBalance(contracts[dappPuzzle], usdtId) | |
389 | 394 | let investFndContract = contracts[dappInvestFund] | |
390 | 395 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmountKey), 0)) | |
391 | 396 | let totalFundsUsd = ((economyUsd + wlgUsd) + investFundTotal) | |
392 | 397 | let wlgId = valueOrErrorMessage(getBinary(contracts[dappWlg], "wlg_assetId"), "Not initialized yet") | |
393 | 398 | let now = lastBlock.timestamp | |
394 | 399 | let issueTime = valueOrErrorMessage(getInteger(contracts[dappWlg], wlgIssueTimeKey), "Not initialized") | |
395 | 400 | let bankWlgold = assetBalance(contracts[dappStaking], wlgId) | |
396 | 401 | let teamTotal = fraction(MILLION6, TEAMSHARE, M6) | |
397 | 402 | let teamAmountLeft = valueOrElse(getInteger(contracts[dappWlg], teamAmountLeftKey), teamTotal) | |
398 | 403 | let lastTeamTime = valueOrElse(getInteger(contracts[dappWlg], lastTeamTimeKey), issueTime) | |
399 | 404 | let teamAddr = addressFromStringValue(value(getString(contracts[dappWlg], teamAddrKey))) | |
400 | 405 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEARMILLIS)), teamAmountLeft]) | |
401 | 406 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
402 | 407 | let actTotal = fraction(MILLION6, ACTIVITYSHARE, M6) | |
403 | 408 | let actAmountLeft = valueOrElse(getInteger(contracts[dappWlg], actAmountLeftKey), actTotal) | |
404 | 409 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dappWlg], lastActivitiesTimeKey), issueTime) | |
405 | 410 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEARMILLIS)), actAmountLeft]) | |
406 | 411 | let actWlgold = assetBalance(contracts[dappRest], wlgId) | |
407 | 412 | let lastUserTime = valueOrElse(getInteger(contracts[dappWlg], keyLastClaimedTimeByUserOld(userAddrOpt)), issueTime) | |
408 | 413 | let lastUserPeriod = ((lastUserTime - issueTime) / YEARMILLIS) | |
409 | 414 | let nowLimited = min([min([now, (issueTime + (3 * YEARMILLIS))]), OLD_STAKING_DEADL]) | |
410 | 415 | let curPeriod = min([((now - issueTime) / YEARMILLIS), 2]) | |
411 | 416 | let eff = getLands(userAddrOpt, contracts[dappStaking], contracts[dappAcres]) | |
412 | 417 | let curPeriodDistribution = distributionByPeriod(curPeriod) | |
413 | 418 | let $t079143 = if ((lastUserPeriod == curPeriod)) | |
414 | 419 | then { | |
415 | 420 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEARMILLIS) | |
416 | 421 | let userPart = fraction(a0, userProportion6, M6) | |
417 | 422 | let effTime = (lastUserTime + fraction((nowLimited - lastUserTime), userProportion6, M6)) | |
418 | 423 | $Tuple3(userPart, a0, effTime) | |
419 | 424 | } | |
420 | 425 | else if ((lastUserPeriod == (curPeriod - 1))) | |
421 | 426 | then { | |
422 | 427 | let a1 = fraction(distributionByPeriod((curPeriod - 1)), ((issueTime + (YEARMILLIS * curPeriod)) - lastUserTime), YEARMILLIS) | |
423 | 428 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
424 | 429 | let avail = (a1 + a0) | |
425 | 430 | let userPart = fraction(avail, userProportion6, M6) | |
426 | 431 | let effTime = if ((a1 >= userPart)) | |
427 | 432 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 1)))) | |
428 | 433 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, (userPart - a1), curPeriodDistribution)) | |
429 | 434 | $Tuple3(userPart, avail, effTime) | |
430 | 435 | } | |
431 | 436 | else { | |
432 | 437 | let a2 = fraction(distributionByPeriod((curPeriod - 2)), ((issueTime + (YEARMILLIS * (curPeriod - 1))) - lastUserTime), YEARMILLIS) | |
433 | 438 | let a1 = distributionByPeriod((curPeriod - 1)) | |
434 | 439 | let a0 = fraction(curPeriodDistribution, (nowLimited - (issueTime + (YEARMILLIS * curPeriod))), YEARMILLIS) | |
435 | 440 | let avail = ((a2 + a1) + a0) | |
436 | 441 | let userPart = fraction(avail, userProportion6, M6) | |
437 | 442 | let effTime = if ((a2 >= userPart)) | |
438 | 443 | then (lastUserTime + fraction(YEARMILLIS, userPart, distributionByPeriod((curPeriod - 2)))) | |
439 | 444 | else if (((a2 + a1) >= userPart)) | |
440 | 445 | then ((issueTime + (YEARMILLIS * (curPeriod - 1))) + fraction(YEARMILLIS, (userPart - a2), distributionByPeriod((curPeriod - 1)))) | |
441 | 446 | else ((issueTime + (YEARMILLIS * curPeriod)) + fraction(YEARMILLIS, ((userPart - a2) - a1), curPeriodDistribution)) | |
442 | 447 | $Tuple3(userPart, avail, effTime) | |
443 | 448 | } | |
444 | 449 | let userAmount = $t079143._1 | |
445 | 450 | let userAvailable = $t079143._2 | |
446 | 451 | let effLastTime = $t079143._3 | |
447 | 452 | let sLandDailyAmount = fraction(fraction(curPeriodDistribution, DAYMILLIS, YEARMILLIS), 25, eff[idxTotalPieces]) | |
448 | 453 | let amountLeftTotal = valueOrElse(getInteger(contracts[dappWlg], stakersAmountLeftKey), 0) | |
449 | 454 | let userTemp = fraction(userAmount, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
450 | 455 | let bankFromUser = fraction(userTemp, BANK_FEE, M6) | |
451 | 456 | let robbedUser = (userTemp - bankFromUser) | |
452 | 457 | let unrobbedUser = fraction(userAvailable, ((eff[idxUserPieces] * M8) + eff[idxUserAcres]), ((eff[idxTotalPieces] * M8) + eff[idxTotalAcres])) | |
453 | 458 | [issuedAmount, fraction((totalFundsUsd - USDT_TVL_CORRECTION), M8, issuedAmount), totalFundsUsd, economyUsd, restUsd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, robbedUser, sLandDailyAmount, investFundTotal, unrobbedUser, effLastTime, bankWlgold] | |
454 | 459 | } | |
455 | 460 | ||
456 | 461 | ||
457 | 462 | let M6_ = 1000000 | |
458 | 463 | ||
459 | 464 | let M8_ = 100000000 | |
460 | 465 | ||
461 | 466 | let TEAM_SHARE = 200000 | |
462 | 467 | ||
463 | 468 | let ACTIVITY_SHARE = 100000 | |
464 | 469 | ||
465 | 470 | let PLAYER_SHARE = 400000 | |
466 | 471 | ||
467 | 472 | let YEAR_MILLIS = 31557600000 | |
468 | 473 | ||
469 | 474 | let DAY_MS = 86400000 | |
470 | 475 | ||
471 | 476 | let ISSUE10 = 1000000000 | |
472 | 477 | ||
473 | 478 | let PLAYERS10_SHARE = 800000 | |
474 | 479 | ||
475 | 480 | let MARKETING10_SHARE = 100000 | |
476 | 481 | ||
477 | 482 | let TEAM10_SHARE = 100000 | |
478 | 483 | ||
479 | 484 | let NEW_STAKING_START = 1731279600000 | |
480 | 485 | ||
481 | 486 | let marketingAddrKey = "marketingAddr" | |
482 | 487 | ||
483 | 488 | let teamAdrKey = "teamAddr" | |
484 | 489 | ||
485 | 490 | let lastTeamTimKey = "lastClaimedTime_team" | |
486 | 491 | ||
487 | 492 | let teamAmtLeftKey = "teamAmountLeft" | |
488 | 493 | ||
489 | 494 | let lastActivitiesTimKey = "lastClaimedTime_activities" | |
490 | 495 | ||
491 | 496 | let actAmtLeftKey = "activitiesAmountLeft" | |
492 | 497 | ||
493 | 498 | let stakersAmtLeftKey = "stakersAmountLeft" | |
494 | 499 | ||
495 | 500 | func keyLastClaimTimeByUser (addr) = ("lastClaimedTimeUser_" + addr) | |
496 | 501 | ||
497 | 502 | ||
498 | 503 | func distrByPeriod (issuedAmount,period) = fraction(issuedAmount, (PLAYER_SHARE * (period + 1)), (6 * M6_)) | |
499 | 504 | ||
500 | 505 | ||
501 | 506 | let wlgIssue10TimeKey = "wlg_issue10Time" | |
502 | 507 | ||
503 | 508 | let wlgIssueTimKey = "wlg_issueTime" | |
504 | 509 | ||
505 | 510 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
506 | 511 | ||
507 | 512 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
508 | 513 | ||
509 | 514 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
510 | 515 | ||
511 | 516 | ||
512 | 517 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
513 | 518 | ||
514 | 519 | let totalFarmingPowerKey = "totalFarmingPower" | |
515 | 520 | ||
516 | 521 | let dapp2Rest = 0 | |
517 | 522 | ||
518 | 523 | let dapp2Staking = 1 | |
519 | 524 | ||
520 | 525 | let dapp2Wlg = 2 | |
521 | 526 | ||
522 | 527 | let dapp2Puzzle = 3 | |
523 | 528 | ||
524 | 529 | let dapp2InvestFund = 4 | |
525 | 530 | ||
526 | 531 | let DEFAULT_WEEKLY_PRIZES = 5 | |
527 | 532 | ||
528 | 533 | let ACRES_FOR_BET = 100000000 | |
529 | 534 | ||
530 | 535 | let keyNftTotalIssued = "nftTotalIssued" | |
531 | 536 | ||
532 | 537 | let keyNftTotalBurned = "nftTotalBurned" | |
533 | 538 | ||
534 | 539 | let keyWlNftTotalStaked = "WlNftTotalStaked" | |
535 | 540 | ||
536 | 541 | func keyUserWlNftNumber (addr) = ("userWlNftNumber_" + addr) | |
537 | 542 | ||
538 | 543 | ||
539 | 544 | func keyUserFullBonus (addr) = ("userFullBonus_" + addr) | |
540 | 545 | ||
541 | 546 | ||
542 | 547 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
543 | 548 | ||
544 | 549 | func getLevelByAcres (acres) = { | |
545 | 550 | let acr = ((acres + 99999999) / M8_) | |
546 | 551 | func checker (acc,item) = if ((item >= acr)) | |
547 | 552 | then acc | |
548 | 553 | else (acc + 1) | |
549 | 554 | ||
550 | 555 | let $l = levelAcres | |
551 | 556 | let $s = size($l) | |
552 | 557 | let $acc0 = 0 | |
553 | 558 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
554 | 559 | then $a | |
555 | 560 | else checker($a, $l[$i]) | |
556 | 561 | ||
557 | 562 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
558 | 563 | then $a | |
559 | 564 | else throw("List size exceeds 10") | |
560 | 565 | ||
561 | 566 | $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) | |
562 | 567 | } | |
563 | 568 | ||
564 | 569 | ||
565 | 570 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
566 | 571 | ||
567 | 572 | ||
568 | 573 | func getFarmingPowerByAcresAndBonus (acres,bonus6) = { | |
569 | 574 | let notBonused = getFarmingPowerByAcres(acres) | |
570 | 575 | $Tuple2(fraction(notBonused, (M6_ + bonus6), M6_), notBonused) | |
571 | 576 | } | |
572 | 577 | ||
573 | 578 | ||
574 | 579 | func getFarmingPowers (userAddrStrOrEmpty,acres2Contract) = { | |
575 | 580 | let totalFP = valueOrElse(getInteger(acres2Contract, totalFarmingPowerKey), 0) | |
576 | 581 | let userAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(userAddrStrOrEmpty)), 0) | |
577 | 582 | let userBonus = valueOrElse(getInteger(acres2Contract, keyUserFullBonus(userAddrStrOrEmpty)), 0) | |
578 | 583 | let $t079143 = getFarmingPowerByAcresAndBonus(userAcres, userBonus) | |
579 | 584 | let userFPbonused = $t079143._1 | |
580 | 585 | let userFPnotBonused = $t079143._2 | |
581 | 586 | [totalFP, userFPbonused, userFPnotBonused, userBonus] | |
582 | 587 | } | |
583 | 588 | ||
584 | 589 | ||
585 | 590 | let idxTotalFP = 0 | |
586 | 591 | ||
587 | 592 | let idxUserFPbonused = 1 | |
588 | 593 | ||
589 | 594 | func getWlgStats2 (userAddrOpt,contracts,usdtId,usdtBalanceCorrection) = { | |
590 | 595 | let issuedAmount = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
591 | 596 | let restUsd = assetBalance(contracts[dapp2Rest], usdtId) | |
592 | 597 | let wlgUsd = (assetBalance(contracts[dapp2Wlg], usdtId) - usdtBalanceCorrection) | |
593 | 598 | let puzzleUsd = assetBalance(contracts[dapp2Puzzle], usdtId) | |
594 | 599 | let acres2Usd = assetBalance(contracts[dapp2Staking], usdtId) | |
595 | 600 | let investFndContract = contracts[dapp2InvestFund] | |
596 | 601 | let investFundTotal = (assetBalance(investFndContract, usdtId) + valueOrElse(getInteger(investFndContract, zbIssuedAmtKey), 0)) | |
597 | 602 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
598 | 603 | let wlgId = valueOrErrorMessage(getBinary(contracts[dapp2Wlg], "wlg_assetId"), "Not initialized yet") | |
599 | 604 | let now = lastBlock.timestamp | |
600 | 605 | let issueTime = valueOrErrorMessage(getInteger(contracts[dapp2Wlg], wlgIssueTimKey), "Not initialized") | |
601 | 606 | let wlgWlg = assetBalance(contracts[dapp2Wlg], wlgId) | |
602 | 607 | let teamTotal = fraction(issuedAmount, TEAM_SHARE, M6_) | |
603 | 608 | let teamAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], teamAmtLeftKey), teamTotal) | |
604 | 609 | let lastTeamTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastTeamTimKey), issueTime) | |
605 | 610 | let teamAddr = addressFromStringValue(value(getString(contracts[dapp2Wlg], teamAdrKey))) | |
606 | 611 | let teamAmountAvailableNow = min([fraction(teamTotal, (now - lastTeamTime), (3 * YEAR_MILLIS)), teamAmountLeft]) | |
607 | 612 | let teamWlgold = assetBalance(teamAddr, wlgId) | |
608 | 613 | let actTotal = fraction(issuedAmount, ACTIVITY_SHARE, M6_) | |
609 | 614 | let actAmountLeft = valueOrElse(getInteger(contracts[dapp2Wlg], actAmtLeftKey), actTotal) | |
610 | 615 | let lastActivitiesTime = valueOrElse(getInteger(contracts[dapp2Wlg], lastActivitiesTimKey), issueTime) | |
611 | 616 | let actAmountAvailableNow = min([fraction(actTotal, (now - lastActivitiesTime), (3 * YEAR_MILLIS)), actAmountLeft]) | |
612 | 617 | let actWlgold = assetBalance(contracts[dapp2Rest], wlgId) | |
613 | 618 | let lastUserTime = valueOrElse(getInteger(contracts[dapp2Wlg], keyLastClaimTimeByUser(userAddrOpt)), issueTime) | |
614 | 619 | let lastUserPeriod = ((lastUserTime - issueTime) / YEAR_MILLIS) | |
615 | 620 | let nowLimited = min([now, (issueTime + (3 * YEAR_MILLIS))]) | |
616 | 621 | let curPeriod = min([((now - issueTime) / YEAR_MILLIS), 2]) | |
617 | 622 | let eff = getFarmingPowers(userAddrOpt, contracts[dapp2Staking]) | |
618 | 623 | let curPeriodDistribution = distrByPeriod(issuedAmount, curPeriod) | |
619 | 624 | let prevPeriodEnd = (issueTime + (YEAR_MILLIS * curPeriod)) | |
620 | 625 | let prevPrevPeriodEnd = (issueTime + (YEAR_MILLIS * (curPeriod - 1))) | |
621 | 626 | let a0 = fraction(curPeriodDistribution, (nowLimited - lastUserTime), YEAR_MILLIS) | |
622 | 627 | let userAvailable = if ((lastUserPeriod == curPeriod)) | |
623 | 628 | then a0 | |
624 | 629 | else if ((lastUserPeriod == (curPeriod - 1))) | |
625 | 630 | then { | |
626 | 631 | let a1 = fraction(distrByPeriod(issuedAmount, (curPeriod - 1)), (prevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
627 | 632 | (a1 + a0) | |
628 | 633 | } | |
629 | 634 | else { | |
630 | 635 | let a2 = fraction(distrByPeriod(issuedAmount, (curPeriod - 2)), (prevPrevPeriodEnd - lastUserTime), YEAR_MILLIS) | |
631 | 636 | let a1 = distrByPeriod(issuedAmount, (curPeriod - 1)) | |
632 | 637 | ((a2 + a1) + a0) | |
633 | 638 | } | |
634 | 639 | let amountLeftTotal = valueOrElse(getInteger(contracts[dapp2Wlg], stakersAmtLeftKey), 0) | |
635 | 640 | let userAmount = if ((eff[idxTotalFP] != 0)) | |
636 | 641 | then fraction(userAvailable, eff[idxUserFPbonused], eff[idxTotalFP]) | |
637 | 642 | else 0 | |
638 | 643 | let lastIssue10Time = valueOrElse(getInteger(contracts[dapp2Wlg], wlgIssue10TimeKey), NEW_STAKING_START) | |
639 | 644 | let issue10Amount = fraction(ISSUE10, max([(now - lastIssue10Time), 0]), DAY_MS) | |
640 | 645 | let marketingIssue10Amount = fraction(issue10Amount, MARKETING10_SHARE, M6_) | |
641 | 646 | let teamIssue10Amount = fraction(issue10Amount, TEAM10_SHARE, M6_) | |
642 | 647 | let user10Interval = max([(now - max([NEW_STAKING_START, lastUserTime])), 0]) | |
643 | 648 | let user10part = if ((eff[idxTotalFP] != 0)) | |
644 | 649 | then fraction(fraction(fraction(ISSUE10, user10Interval, DAY_MS), eff[idxUserFPbonused], eff[idxTotalFP]), PLAYERS10_SHARE, M6_) | |
645 | 650 | else 0 | |
646 | 651 | let newIssue10Time = max([NEW_STAKING_START, now]) | |
647 | 652 | let acresStakedTotal = valueOrElse(getInteger(contracts[dapp2Staking], acresStakdTotalKey), 0) | |
648 | 653 | let nftTotalIssued = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalIssued), 0) | |
649 | 654 | let nftTotalBurned = valueOrElse(getInteger(contracts[dapp2Staking], keyNftTotalBurned), 0) | |
650 | 655 | let wlNftTotalStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyWlNftTotalStaked), 0) | |
651 | 656 | let wlNftUserStaked = valueOrElse(getInteger(contracts[dapp2Staking], keyUserWlNftNumber(valueOrElse(userAddrOpt, ""))), 0) | |
652 | 657 | [issuedAmount, wlgWlg, fraction(totalFundsUsd, M8_, issuedAmount), totalFundsUsd, restUsd, acres2Usd, wlgUsd, puzzleUsd, issueTime, lastTeamTime, teamTotal, teamAmountLeft, teamAmountAvailableNow, teamWlgold, actTotal, actAmountLeft, actAmountAvailableNow, actWlgold, curPeriod, amountLeftTotal, curPeriodDistribution, lastUserTime, investFundTotal, userAmount, nowLimited, issue10Amount, marketingIssue10Amount, teamIssue10Amount, user10part, newIssue10Time, eff[idxTotalFP], acresStakedTotal, nftTotalIssued, nftTotalBurned, wlNftTotalStaked, wlNftUserStaked] | |
653 | 658 | } | |
654 | 659 | ||
655 | 660 | ||
656 | 661 | let profitAddrKey = "profitAddr" | |
657 | 662 | ||
658 | 663 | let stakersAmountPaidTotalKey = "stakersAmountPaidTotal" | |
659 | 664 | ||
660 | 665 | func keyStakersAmountPaidUser (addr) = ("stakersAmountPaidUser_" + addr) | |
661 | 666 | ||
662 | 667 | ||
663 | 668 | func prolog2 () = asInt(reentrantInvoke(acres2Contract, "saveLastTx", nil, nil)) | |
664 | 669 | ||
665 | 670 | ||
666 | 671 | func getSwapLimitWlgold (addr) = { | |
667 | 672 | let lastTime = valueOrElse(getInteger(keyLastWlgTradeTimeByUser(addr)), 0) | |
668 | 673 | let defaultLimit = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmountByUser(addr)), 0) | |
669 | 674 | let lastLimitLeft = valueOrElse(getInteger(keyLastWlgTradeLimitByUser(addr)), defaultLimit) | |
670 | 675 | let currentLimit = (lastLimitLeft + fraction(defaultLimit, (lastBlock.timestamp - lastTime), DAY_MILLIS)) | |
671 | 676 | min([currentLimit, defaultLimit]) | |
672 | 677 | } | |
673 | 678 | ||
674 | 679 | ||
675 | 680 | let idxWlgTeamAmLeft = 10 | |
676 | 681 | ||
677 | 682 | let idxWlgTeamAmAvailNow = 11 | |
678 | 683 | ||
679 | 684 | let idxWlgActAmLeft = 14 | |
680 | 685 | ||
681 | 686 | let idxWlgActAmAvailNow = 15 | |
682 | 687 | ||
683 | 688 | let idxWlgAmLeftTotal = 18 | |
684 | 689 | ||
685 | 690 | let idxWlgUserTotalAvail = 24 | |
686 | 691 | ||
687 | 692 | let idxWlgEffUserTime = 25 | |
688 | 693 | ||
689 | 694 | func claimInternal (addr) = { | |
690 | 695 | let caller = addressFromStringValue(addr) | |
691 | 696 | let economyContract = addressFromStringValue(economyContractStr) | |
692 | 697 | let curStats = getWlgStats(addr, [restContract, stakingContract, economyContract, wlgContract, puzzlePoolContract, investFundContract, acresContract], usdtAssetId, 0, MULT6) | |
693 | 698 | let now = lastBlock.timestamp | |
694 | 699 | let teamAmountLeft = curStats[idxWlgTeamAmLeft] | |
695 | 700 | let teamAmount = curStats[idxWlgTeamAmAvailNow] | |
696 | 701 | let actAmountLeft = curStats[idxWlgActAmLeft] | |
697 | 702 | let actAmount = curStats[idxWlgActAmAvailNow] | |
698 | 703 | let userAmount = curStats[idxWlgUserTotalAvail] | |
699 | 704 | let userKey = keyStakersAmountPaidUser(addr) | |
700 | 705 | let userTotal = curStats[idxWlgUserTotalAvail] | |
701 | 706 | let userEffTime = curStats[idxWlgEffUserTime] | |
702 | 707 | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId), ScriptTransfer(restContract, actAmount, wlgAssetId), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userTotal)), IntegerEntry(stakersAmountLeftKey, (curStats[idxWlgAmLeftTotal] - userTotal)), IntegerEntry(teamAmountLeftKey, (teamAmountLeft - teamAmount)), IntegerEntry(lastTeamTimeKey, now), IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), IntegerEntry(keyLastClaimedTimeByUserOld(addr), userEffTime)], userAmount) | |
703 | 708 | } | |
704 | 709 | ||
705 | 710 | ||
706 | 711 | func claimInternal2 (addr) = { | |
707 | 712 | let curStats = getWlgStats2(addr, [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
708 | 713 | let userTimeKey = keyLastClaimTimeByUser(addr) | |
709 | 714 | let lastUserTime = valueOrElse(getInteger(userTimeKey), 0) | |
710 | 715 | let userEffTime = curStats[ixWlgEffUserTime] | |
711 | 716 | if ((lastUserTime == userEffTime)) | |
712 | 717 | then $Tuple2(nil, 0) | |
713 | 718 | else { | |
714 | 719 | let now = lastBlock.timestamp | |
715 | 720 | let issueTime = curStats[ixWlgIssueTime] | |
716 | 721 | let teamAmountLeft = curStats[ixWlgTeamAmLeft] | |
717 | 722 | let teamAmount = (curStats[ixWlgTeamAmAvailNow] + curStats[ixWlgTeamIssue10Amount]) | |
718 | 723 | let teamActions = if ((teamAmount > 0)) | |
719 | 724 | then [IntegerEntry(teamAmountLeftKey, ((teamAmountLeft - teamAmount) + curStats[ixWlgTeamIssue10Amount])), IntegerEntry(lastTeamTimeKey, now), ScriptTransfer(addressFromStringValue(value(getString(teamAddrKey))), teamAmount, wlgAssetId)] | |
720 | 725 | else nil | |
721 | 726 | let actAmountLeft = curStats[ixWlgActAmLeft] | |
722 | 727 | let actAmount = curStats[ixWlgActAmAvailNow] | |
723 | 728 | let actActions = if ((actAmount > 0)) | |
724 | 729 | then [IntegerEntry(actAmountLeftKey, (actAmountLeft - actAmount)), IntegerEntry(lastActivitiesTimeKey, now), ScriptTransfer(restContract, actAmount, wlgAssetId)] | |
725 | 730 | else nil | |
726 | 731 | let marketingAmount = curStats[ixWlgMarketingIssue10Amount] | |
727 | 732 | let marketingTransfer = if ((marketingAmount > 0)) | |
728 | 733 | then [ScriptTransfer(addressFromStringValue(value(getString(marketingAddrKey))), marketingAmount, wlgAssetId)] | |
729 | 734 | else nil | |
730 | 735 | let userAmount = curStats[ixWlgUserAmAvailNow] | |
731 | 736 | let userKey = keyStakersAmountPaidUser(addr) | |
732 | 737 | let userTotal = (userAmount + curStats[ixWlgUser10part]) | |
733 | 738 | let issued10Amount = curStats[ixWlgIssue10Amount] | |
734 | 739 | $Tuple2(((([Reissue(wlgAssetId, issued10Amount, true), IntegerEntry(wlgIssuedAmountKey, (curStats[ixWlgAmount] + issued10Amount)), IntegerEntry(wlgIssue10TimeKey, curStats[ixWlgIssue10Time]), IntegerEntry(userKey, (valueOrElse(getInteger(userKey), 0) + userAmount)), IntegerEntry(stakersAmountPaidTotalKey, (valueOrElse(getInteger(stakersAmountPaidTotalKey), 0) + userAmount)), IntegerEntry(stakersAmountLeftKey, (curStats[ixWlgAmLeftTotal] - userAmount)), IntegerEntry(userTimeKey, userEffTime)] ++ teamActions) ++ actActions) ++ marketingTransfer), userTotal) | |
735 | 740 | } | |
736 | 741 | } | |
737 | 742 | ||
738 | 743 | ||
739 | 744 | func takeXpInternal (addr,delta) = { | |
740 | 745 | let now = lastBlock.timestamp | |
741 | 746 | let timeKey = keyWlgStakedTimeByUser(addr) | |
742 | 747 | let amountKey = keyWlgStakedAmountByUser(addr) | |
743 | 748 | let lastTime = valueOrElse(getInteger(timeKey), 0) | |
744 | 749 | let oldUser = valueOrElse(getInteger(amountKey), 0) | |
745 | 750 | let oldTotal = valueOrElse(getInteger(wlgStakedTotalKey), 0) | |
746 | 751 | let xp = fraction(fraction(xpWlg, oldUser, wlgBaseAmountXp), (lastTime - now), DAYMILLIS) | |
747 | 752 | $Tuple3([IntegerEntry(timeKey, now), IntegerEntry(amountKey, (oldUser + delta)), IntegerEntry(wlgStakedTotalKey, (oldTotal + delta))], xp, oldUser) | |
748 | 753 | } | |
749 | 754 | ||
750 | 755 | ||
751 | 756 | func openChestInternal (addr) = { | |
752 | 757 | let week = (height / WEEK_BLOCKS) | |
753 | 758 | let drawWeek = (week - 1) | |
754 | - | let numPrizes = valueOrElse(getInteger(keyNumNFT2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
755 | - | let prizesDrawn = valueOrElse(getInteger(keyNumNFTDrawn(drawWeek)), 0) | |
759 | + | let numPrizes = valueOrElse(getInteger(keyNumPrizes2Draw(drawWeek)), DEFAULT_WEEKLY_PRIZES) | |
760 | + | let nftKey = keyNumNFTDrawn(drawWeek) | |
761 | + | let acresKey = keyAcresDrawn(drawWeek) | |
756 | 762 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
757 | 763 | if ((0 >= userTickets)) | |
758 | 764 | then $Tuple2(nil, unit) | |
759 | 765 | else { | |
760 | 766 | let totalTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
761 | 767 | if ((0 >= totalTickets)) | |
762 | 768 | then $Tuple2([DeleteEntry(keyUserWeekTickets(addr, drawWeek))], unit) | |
763 | 769 | else { | |
764 | 770 | let entropy = value(value(blockInfoByHeight((week * WEEK_BLOCKS))).vrf) | |
765 | 771 | let salt = fromBase58String(split(valueOrElse(getString(acres2Contract, keyLastWeekTxIdByUser(addr)), "42_DEFAULT"), "_")[1]) | |
766 | 772 | let random4 = getRandomNumber(M4, salt, entropy) | |
767 | 773 | if (isWin(userTickets, totalTickets, numPrizes, random4)) | |
768 | 774 | then { | |
769 | 775 | let rnd = getRandomNumber(100, (base58'29' + salt), entropy) | |
770 | - | let prizeResult = if ((rnd >= 90)) | |
771 | - | then invoke(acres2Contract, "issuePickC1", [addr], nil) | |
772 | - | else invoke(acresContract, "sendAcresFor", [addr, 25000000], nil) | |
776 | + | let $t087619129 = if ((rnd >= 90)) | |
777 | + | then $Tuple2(invoke(acres2Contract, "issuePickC1", [addr], nil), IntegerEntry(nftKey, (valueOrElse(getInteger(nftKey), 0) + 1))) | |
778 | + | else $Tuple2(invoke(acresContract, "sendAcresFor", [addr, ACRES_WEEKLY_PRIZE], nil), IntegerEntry(acresKey, (valueOrElse(getInteger(acresKey), 0) + ACRES_WEEKLY_PRIZE))) | |
779 | + | let prizeResult = $t087619129._1 | |
780 | + | let prizeAction = $t087619129._2 | |
773 | 781 | let winners = getString(keyWeekWinners(drawWeek)) | |
774 | 782 | let newWinners = if (isDefined(winners)) | |
775 | 783 | then ((value(winners) + "_") + addr) | |
776 | 784 | else addr | |
777 | - | $Tuple2([ | |
785 | + | $Tuple2([prizeAction, DeleteEntry(keyUserWeekTickets(addr, drawWeek)), StringEntry(keyWeekWinners(drawWeek), newWinners)], prizeResult) | |
778 | 786 | } | |
779 | 787 | else { | |
780 | 788 | let random1 = (getRandomNumber(9, (base58'29' + salt), entropy) + 1) | |
781 | 789 | let consTickets = fraction(userTickets, random1, 10) | |
782 | 790 | let ticketsKey = keyUserWeekTickets(addr, week) | |
783 | 791 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
784 | 792 | $Tuple2(((if ((consTickets == 0)) | |
785 | 793 | then nil | |
786 | 794 | else { | |
787 | 795 | let commonActions = [IntegerEntry(keyTotalWeekTickets(week), (valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) + consTickets)), IntegerEntry(ticketsKey, (oldTickets + consTickets))] | |
788 | 796 | if ((oldTickets > 0)) | |
789 | 797 | then commonActions | |
790 | 798 | else (commonActions :+ IntegerEntry(keyTotalWeekParticipants(week), (valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) + 1))) | |
791 | 799 | }) :+ DeleteEntry(keyUserWeekTickets(addr, drawWeek))), consTickets) | |
792 | 800 | } | |
793 | 801 | } | |
794 | 802 | } | |
795 | 803 | } | |
796 | 804 | ||
797 | 805 | ||
798 | 806 | func claimTicketsInternal (addr,userBetStr) = { | |
799 | 807 | let week = (height / WEEK_BLOCKS) | |
800 | 808 | let ticketsKey = keyUserWeekTickets(addr, week) | |
801 | 809 | let dayBet = split(userBetStr, "_") | |
802 | 810 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
803 | 811 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
804 | 812 | let deltaTickets = if ((winningBet(parseIntValue(dayBet[0])) == parseIntValue(dayBet[1]))) | |
805 | 813 | then 1 | |
806 | 814 | else 0 | |
807 | 815 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
808 | 816 | let updateParticipants = if (if ((oldTickets == 0)) | |
809 | 817 | then (deltaTickets == 1) | |
810 | 818 | else false) | |
811 | 819 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
812 | 820 | else nil | |
813 | 821 | $Tuple2(if ((deltaTickets == 0)) | |
814 | 822 | then nil | |
815 | 823 | else ((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
816 | 824 | } | |
817 | 825 | ||
818 | 826 | ||
819 | 827 | @Callable(i) | |
820 | 828 | func constructorV1 (restAddr,marketingAddr,teamAddr,profitAddr) = if ((i.caller != this)) | |
821 | 829 | then throw("Permission denied") | |
822 | 830 | else if (isDefined(getBinary(wlgAssetIdKey))) | |
823 | 831 | then throw("Already initialized") | |
824 | 832 | else { | |
825 | 833 | let issuedAmount = MILLION6 | |
826 | 834 | let issue = Issue("WLGOLD", "WavesLands Gold investment token", issuedAmount, 8, true, unit, 0) | |
827 | 835 | let assetId = calculateAssetId(issue) | |
828 | 836 | [issue, IntegerEntry(wlgIssueTimeKey, lastBlock.timestamp), IntegerEntry(wlgIssuedAmountKey, issuedAmount), IntegerEntry(stakersAmountPaidTotalKey, 0), IntegerEntry(stakersAmountLeftKey, fraction(MILLION6, PLAYERSHARE, MULT6)), BinaryEntry(wlgAssetIdKey, assetId), StringEntry(keyRestAddress(), restAddr), StringEntry(marketingAddrKey, marketingAddr), StringEntry(teamAddrKey, teamAddr), StringEntry(profitAddrKey, profitAddr)] | |
829 | 837 | } | |
830 | 838 | ||
831 | 839 | ||
832 | 840 | ||
833 | 841 | @Callable(i) | |
834 | 842 | func constructorV2 (rest2Addr) = if ((i.caller != this)) | |
835 | 843 | then throw("Permission denied") | |
836 | 844 | else [StringEntry(keyRest2Address(), rest2Addr)] | |
837 | 845 | ||
838 | 846 | ||
839 | 847 | ||
840 | 848 | @Callable(i) | |
841 | 849 | func buyWlg (minToReceive) = { | |
842 | 850 | let prologResult = prolog2() | |
843 | 851 | if ((prologResult == prologResult)) | |
844 | 852 | then if ((size(i.payments) != 1)) | |
845 | 853 | then throw("exactly 1 payment must be attached") | |
846 | 854 | else { | |
847 | 855 | let pmt = i.payments[0] | |
848 | 856 | let usdtAmt = pmt.amount | |
849 | 857 | if (if (!(isDefined(pmt.assetId))) | |
850 | 858 | then true | |
851 | 859 | else (value(pmt.assetId) != usdtAssetId)) | |
852 | 860 | then throw("USDT payments only!") | |
853 | 861 | else { | |
854 | 862 | let caller = i.caller | |
855 | 863 | let addr = toString(caller) | |
856 | 864 | if ((MINSHOPPAYMENT > usdtAmt)) | |
857 | 865 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
858 | 866 | else { | |
859 | 867 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
860 | 868 | let curWlgAmount = curStats[ixWlgAmount] | |
861 | 869 | let wlgPrice = curStats[ixWlgPrice] | |
862 | 870 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
863 | 871 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
864 | 872 | let maxWlg = getSwapLimitWlgold(addr) | |
865 | 873 | if ((wlgAmount > maxWlg)) | |
866 | 874 | then throw((("You can get max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
867 | 875 | else if ((minToReceive > wlgAmount)) | |
868 | 876 | then throw("Price changed during operation, please try again") | |
869 | 877 | else { | |
870 | 878 | let profitAmount = (usdtAmt / 6) | |
871 | 879 | $Tuple2([Reissue(wlgAssetId, wlgAmount, true), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount + wlgAmount)), IntegerEntry(keyLastWlgTradeTimeByUser(addr), lastBlock.timestamp), IntegerEntry(keyLastWlgTradeLimitByUser(addr), (maxWlg - wlgAmount)), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, wlgAmount, wlgAssetId)], prologResult) | |
872 | 880 | } | |
873 | 881 | } | |
874 | 882 | } | |
875 | 883 | } | |
876 | 884 | else throw("Strict value is not equal to itself.") | |
877 | 885 | } | |
878 | 886 | ||
879 | 887 | ||
880 | 888 | ||
881 | 889 | @Callable(i) | |
882 | 890 | func buyWlgREADONLY (address,usdtAmt) = { | |
883 | 891 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, usdtAmt) | |
884 | 892 | let wlgPrice = curStats[ixWlgPrice] | |
885 | 893 | let buyPrice = fraction(wlgPrice, 6, 5, CEILING) | |
886 | 894 | let wlgAmount = fraction(usdtAmt, MULT8, buyPrice) | |
887 | 895 | let maxWlg = getSwapLimitWlgold(address) | |
888 | 896 | let maxUsdt = fraction(maxWlg, buyPrice, MULT8) | |
889 | 897 | let profitAmount = (usdtAmt / 6) | |
890 | 898 | $Tuple2(nil, [wlgAmount, MINSHOPPAYMENT, maxUsdt, profitAmount]) | |
891 | 899 | } | |
892 | 900 | ||
893 | 901 | ||
894 | 902 | ||
895 | 903 | @Callable(i) | |
896 | 904 | func sellWlg (minAmount) = { | |
897 | 905 | let prologResult = prolog2() | |
898 | 906 | if ((prologResult == prologResult)) | |
899 | 907 | then if ((size(i.payments) != 1)) | |
900 | 908 | then throw("exactly 1 payment must be attached") | |
901 | 909 | else { | |
902 | 910 | let pmt = i.payments[0] | |
903 | 911 | let wlgAmt = pmt.amount | |
904 | 912 | let caller = i.caller | |
905 | 913 | let addr = toString(caller) | |
906 | 914 | let maxWlg = getSwapLimitWlgold(addr) | |
907 | 915 | if ((wlgAmt > maxWlg)) | |
908 | 916 | then throw((("You can spend max " + fixedPoint(maxWlg, 8)) + " WLGOLD at the moment")) | |
909 | 917 | else if (if (!(isDefined(pmt.assetId))) | |
910 | 918 | then true | |
911 | 919 | else (value(pmt.assetId) != wlgAssetId)) | |
912 | 920 | then throw("WLGOLD payments only!") | |
913 | 921 | else { | |
914 | 922 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
915 | 923 | let curWlgAmount = curStats[ixWlgAmount] | |
916 | 924 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
917 | 925 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
918 | 926 | if ((MINSHOPPAYMENT > usdtAmt)) | |
919 | 927 | then throw((("You can trade min " + fixedPoint(MINSHOPPAYMENT, 6)) + " USDT")) | |
920 | 928 | else if ((minAmount > usdtAmt)) | |
921 | 929 | then throw("Price changed during operation, please try again") | |
922 | 930 | else { | |
923 | 931 | let profitAmount = (usdtAmt / 5) | |
924 | 932 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, (curWlgAmount - wlgAmt)), IntegerEntry(keyLastWlgTradeTimeByUser(addr), lastBlock.timestamp), IntegerEntry(keyLastWlgTradeLimitByUser(addr), (maxWlg - wlgAmt)), ScriptTransfer(addressFromStringValue(value(getString(profitAddrKey))), profitAmount, usdtAssetId), ScriptTransfer(caller, usdtAmt, usdtAssetId)], prologResult) | |
925 | 933 | } | |
926 | 934 | } | |
927 | 935 | } | |
928 | 936 | else throw("Strict value is not equal to itself.") | |
929 | 937 | } | |
930 | 938 | ||
931 | 939 | ||
932 | 940 | ||
933 | 941 | @Callable(i) | |
934 | 942 | func sellWlgREADONLY (address,wlgAmt) = { | |
935 | 943 | let maxWlg = getSwapLimitWlgold(address) | |
936 | 944 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
937 | 945 | let sellPrice = (curStats[ixWlgPrice] / 2) | |
938 | 946 | let usdtAmt = fraction(wlgAmt, sellPrice, MULT8) | |
939 | 947 | let minWlg = fraction(MINSHOPPAYMENT, MULT8, sellPrice) | |
940 | 948 | let profitAmount = (usdtAmt / 5) | |
941 | 949 | $Tuple2(nil, [usdtAmt, minWlg, maxWlg, profitAmount]) | |
942 | 950 | } | |
943 | 951 | ||
944 | 952 | ||
945 | 953 | ||
946 | 954 | @Callable(i) | |
947 | 955 | func claim () = { | |
948 | 956 | let prologResult = prolog2() | |
949 | 957 | if ((prologResult == prologResult)) | |
950 | 958 | then if ((size(i.payments) != 0)) | |
951 | 959 | then throw("No payments required") | |
952 | 960 | else { | |
953 | - | let $ | |
954 | - | let actions = $ | |
955 | - | let wlgClaimedAmount = $ | |
961 | + | let $t01682016889 = claimInternal2(toString(i.caller)) | |
962 | + | let actions = $t01682016889._1 | |
963 | + | let wlgClaimedAmount = $t01682016889._2 | |
956 | 964 | $Tuple2((actions :+ ScriptTransfer(i.caller, wlgClaimedAmount, wlgAssetId)), prologResult) | |
957 | 965 | } | |
958 | 966 | else throw("Strict value is not equal to itself.") | |
959 | 967 | } | |
960 | 968 | ||
961 | 969 | ||
962 | 970 | ||
963 | 971 | @Callable(i) | |
964 | 972 | func onStakeUnstakeLand (addr) = if (if (if ((i.caller != stakingContract)) | |
965 | 973 | then (i.caller != acresContract) | |
966 | 974 | else false) | |
967 | 975 | then (i.caller != acres2Contract) | |
968 | 976 | else false) | |
969 | 977 | then throw("Permission denied") | |
970 | 978 | else { | |
971 | - | let $ | |
972 | - | if (($ | |
979 | + | let $t01720917266 = claimInternal2(addr) | |
980 | + | if (($t01720917266 == $t01720917266)) | |
973 | 981 | then { | |
974 | - | let wlgClaimedAmount = $ | |
975 | - | let actions = $ | |
982 | + | let wlgClaimedAmount = $t01720917266._2 | |
983 | + | let actions = $t01720917266._1 | |
976 | 984 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
977 | 985 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
978 | 986 | else actions, wlgClaimedAmount) | |
979 | 987 | } | |
980 | 988 | else throw("Strict value is not equal to itself.") | |
981 | 989 | } | |
982 | 990 | ||
983 | 991 | ||
984 | 992 | ||
985 | 993 | @Callable(i) | |
986 | 994 | func onStakeUnstakeLandOld (addr) = if (if (if ((i.caller != stakingContract)) | |
987 | 995 | then (i.caller != acresContract) | |
988 | 996 | else false) | |
989 | 997 | then (i.caller != acres2Contract) | |
990 | 998 | else false) | |
991 | 999 | then throw("Permission denied") | |
992 | 1000 | else { | |
993 | - | let $ | |
994 | - | if (($ | |
1001 | + | let $t01764917705 = claimInternal(addr) | |
1002 | + | if (($t01764917705 == $t01764917705)) | |
995 | 1003 | then { | |
996 | - | let wlgClaimedAmount = $ | |
997 | - | let actions = $ | |
1004 | + | let wlgClaimedAmount = $t01764917705._2 | |
1005 | + | let actions = $t01764917705._1 | |
998 | 1006 | $Tuple2(if ((wlgClaimedAmount > 0)) | |
999 | 1007 | then (actions :+ ScriptTransfer(addressFromStringValue(addr), wlgClaimedAmount, wlgAssetId)) | |
1000 | 1008 | else nil, wlgClaimedAmount) | |
1001 | 1009 | } | |
1002 | 1010 | else throw("Strict value is not equal to itself.") | |
1003 | 1011 | } | |
1004 | 1012 | ||
1005 | 1013 | ||
1006 | 1014 | ||
1007 | 1015 | @Callable(i) | |
1008 | 1016 | func burnWlgold (wlgAmt) = if (if ((i.caller != acres2Contract)) | |
1009 | 1017 | then (i.caller != marketContract) | |
1010 | 1018 | else false) | |
1011 | 1019 | then throw("Permission denied") | |
1012 | 1020 | else { | |
1013 | 1021 | let curStats = getWlgStats2("", [rest2Contract, acres2Contract, wlgContract, puzzlePoolContract, investFundContract], usdtAssetId, 0) | |
1014 | 1022 | if ((wlgAmt > curStats[ixWlgWlg])) | |
1015 | 1023 | then throw(((("Only " + fixedPoint(curStats[ixWlgWlg], 8)) + " WLGOLD left on contract, can't burn ") + fixedPoint(wlgAmt, 8))) | |
1016 | 1024 | else { | |
1017 | 1025 | let wlgAmountLeft = (curStats[ixWlgAmount] - wlgAmt) | |
1018 | 1026 | $Tuple2([Burn(wlgAssetId, wlgAmt), IntegerEntry(wlgIssuedAmountKey, wlgAmountLeft)], wlgAmountLeft) | |
1019 | 1027 | } | |
1020 | 1028 | } | |
1021 | 1029 | ||
1022 | 1030 | ||
1023 | 1031 | ||
1024 | 1032 | @Callable(i) | |
1025 | 1033 | func betForTicket (bet) = { | |
1026 | 1034 | let prologResult = prolog2() | |
1027 | 1035 | if ((prologResult == prologResult)) | |
1028 | 1036 | then if ((size(i.payments) != 0)) | |
1029 | 1037 | then throw("No payments required") | |
1030 | 1038 | else { | |
1031 | 1039 | let addr = toString(i.caller) | |
1032 | 1040 | let drawWeek = ((height / WEEK_BLOCKS) - 1) | |
1033 | 1041 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
1034 | 1042 | let weekTickets = valueOrElse(getInteger(keyTotalWeekTickets(drawWeek)), 0) | |
1035 | 1043 | if (if ((userTickets > 0)) | |
1036 | 1044 | then (weekTickets > 0) | |
1037 | 1045 | else false) | |
1038 | 1046 | then throw("Please open the chest first") | |
1039 | 1047 | else if (((bet / 4) != 0)) | |
1040 | 1048 | then throw("Invalid bet: should be 0..3") | |
1041 | 1049 | else { | |
1042 | 1050 | let moment = (height % DAY_BLOCKS) | |
1043 | 1051 | if ((moment > (DAY_BLOCKS - 3))) | |
1044 | 1052 | then throw((("Cannot bet: the day is almost ended, please wait " + toString((DAY_BLOCKS - moment))) + " blocks")) | |
1045 | 1053 | else { | |
1046 | 1054 | let stakedAcres = valueOrElse(getInteger(acres2Contract, keyAcresStakedAmtByUser(addr)), 0) | |
1047 | 1055 | if ((ACRES_FOR_BET > stakedAcres)) | |
1048 | 1056 | then throw((("You need to stake at least " + fixedPoint(ACRES_FOR_BET, 8)) + " ACRES to bet")) | |
1049 | 1057 | else { | |
1050 | 1058 | let tomorrow = ((height / DAY_BLOCKS) + 1) | |
1051 | 1059 | let betKey = keyUserBet(addr) | |
1052 | 1060 | let oldUserBetStr = getString(betKey) | |
1053 | 1061 | let newBetEntry = StringEntry(betKey, ((toString(tomorrow) + "_") + toString(bet))) | |
1054 | 1062 | if (isDefined(oldUserBetStr)) | |
1055 | 1063 | then { | |
1056 | 1064 | let userBet = value(oldUserBetStr) | |
1057 | 1065 | if ((split(userBet, "_")[0] == toString(tomorrow))) | |
1058 | 1066 | then throw("You already bet for tomorrow") | |
1059 | 1067 | else { | |
1060 | 1068 | let r = claimTicketsInternal(addr, userBet) | |
1061 | 1069 | $Tuple2((r._1 :+ newBetEntry), r._2) | |
1062 | 1070 | } | |
1063 | 1071 | } | |
1064 | 1072 | else $Tuple2([newBetEntry], 0) | |
1065 | 1073 | } | |
1066 | 1074 | } | |
1067 | 1075 | } | |
1068 | 1076 | } | |
1069 | 1077 | else throw("Strict value is not equal to itself.") | |
1070 | 1078 | } | |
1071 | 1079 | ||
1072 | 1080 | ||
1073 | 1081 | ||
1074 | 1082 | @Callable(i) | |
1075 | 1083 | func takeWlgXp (addr) = if ((i.caller != stakingContract)) | |
1076 | 1084 | then throw("Permission denied") | |
1077 | 1085 | else { | |
1078 | - | let $ | |
1079 | - | let actions = $ | |
1080 | - | let xp = $ | |
1086 | + | let $t02033720380 = takeXpInternal(addr, 0) | |
1087 | + | let actions = $t02033720380._1 | |
1088 | + | let xp = $t02033720380._2 | |
1081 | 1089 | $Tuple2(actions, xp) | |
1082 | 1090 | } | |
1083 | 1091 | ||
1084 | 1092 | ||
1085 | 1093 | ||
1086 | 1094 | @Callable(i) | |
1087 | 1095 | func checkWlgXpREADONLY (addr) = { | |
1088 | - | let $ | |
1089 | - | let ignored = $ | |
1090 | - | let deltaXP = $ | |
1096 | + | let $t02045720505 = takeXpInternal(addr, 0) | |
1097 | + | let ignored = $t02045720505._1 | |
1098 | + | let deltaXP = $t02045720505._2 | |
1091 | 1099 | let newXP = (valueOrElse(getInteger(stakingContract, keyUserXP(addr)), 0) + deltaXP) | |
1092 | 1100 | let lvlPoints = levelUp(valueOrElse(getInteger(stakingContract, keyUserLevel(addr)), 0), newXP) | |
1093 | 1101 | $Tuple2(nil, (lvlPoints :+ newXP)) | |
1094 | 1102 | } | |
1095 | 1103 | ||
1096 | 1104 | ||
1097 | 1105 | ||
1098 | 1106 | @Callable(i) | |
1099 | 1107 | func setNumPrizes (numPrizes) = if ((i.caller != this)) | |
1100 | 1108 | then throw("Permission denied") | |
1101 | 1109 | else { | |
1102 | 1110 | let week = (height / WEEK_BLOCKS) | |
1103 | - | $Tuple2([IntegerEntry( | |
1111 | + | $Tuple2([IntegerEntry(keyNumPrizes2Draw(week), numPrizes)], numPrizes) | |
1104 | 1112 | } | |
1105 | 1113 | ||
1106 | 1114 | ||
1107 | 1115 | ||
1108 | 1116 | @Callable(i) | |
1109 | 1117 | func openChest () = { | |
1110 | 1118 | let prologResult = prolog2() | |
1111 | 1119 | if ((prologResult == prologResult)) | |
1112 | 1120 | then if ((size(i.payments) != 0)) | |
1113 | 1121 | then throw("No payments required") | |
1114 | 1122 | else { | |
1115 | 1123 | let drawWeek = ((height / WEEK_BLOCKS) - 1) | |
1116 | 1124 | let addr = toString(i.caller) | |
1117 | 1125 | let userTickets = valueOrElse(getInteger(keyUserWeekTickets(addr, drawWeek)), 0) | |
1118 | 1126 | if ((0 >= userTickets)) | |
1119 | 1127 | then throw("No gems to open the chest") | |
1120 | 1128 | else openChestInternal(addr) | |
1121 | 1129 | } | |
1122 | 1130 | else throw("Strict value is not equal to itself.") | |
1123 | 1131 | } | |
1124 | 1132 | ||
1125 | 1133 | ||
1126 | 1134 | ||
1127 | 1135 | @Callable(i) | |
1128 | 1136 | func addGemsFor (addr,deltaTickets) = if ((i.caller != this)) | |
1129 | 1137 | then throw("Permission denied") | |
1130 | 1138 | else { | |
1131 | 1139 | let week = (height / WEEK_BLOCKS) | |
1132 | 1140 | let ticketsKey = keyUserWeekTickets(addr, week) | |
1133 | 1141 | let oldTotalTickets = valueOrElse(getInteger(keyTotalWeekTickets(week)), 0) | |
1134 | 1142 | let oldTickets = valueOrElse(getInteger(ticketsKey), 0) | |
1135 | 1143 | let oldParticipants = valueOrElse(getInteger(keyTotalWeekParticipants(week)), 0) | |
1136 | 1144 | let updateParticipants = if (if ((oldTickets == 0)) | |
1137 | 1145 | then (deltaTickets == 1) | |
1138 | 1146 | else false) | |
1139 | 1147 | then [IntegerEntry(keyTotalWeekParticipants(week), (oldParticipants + 1))] | |
1140 | 1148 | else nil | |
1141 | 1149 | $Tuple2(((updateParticipants :+ IntegerEntry(ticketsKey, (oldTickets + deltaTickets))) :+ IntegerEntry(keyTotalWeekTickets(week), (oldTotalTickets + deltaTickets))), deltaTickets) | |
1142 | 1150 | } | |
1143 | 1151 | ||
1144 | 1152 |
github/deemru/w8io/169f3d6 126.59 ms ◑