tx · 2xcrEprGkH6o3eoKGURZMJMmLxiW8yKd3rG3CRWyvBe8 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh: -0.01600000 Waves 2024.11.12 23:55 [3368710] smart account 3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh > SELF 0.00000000 Waves
{ "type": 13, "id": "2xcrEprGkH6o3eoKGURZMJMmLxiW8yKd3rG3CRWyvBe8", "fee": 1600000, "feeAssetId": null, "timestamp": 1731445013107, "version": 2, "chainId": 84, "sender": "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh", "senderPublicKey": "3QtfC1XbLZXdeawMDeSERy9vvjUmj1XYd2GFmrvx7pWQ", "proofs": [ "Vt61CdfrcAsSAxA2k2GoMbEbmepv5CADcjjP7Qu6Jc4wG3sucUsWgszVga94J5kSgmVa9xqoEY3o6746iym96CG" ], "script": "base64:BgI3CAISABIECgIICBIDCgEEEgMKAQESABIAEgMKAQESABIECgIIARIAEgMKAQgSAwoBCBIECgIIATgAA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDcAgK3iBAAFTVVMVDgAgMLXLwAKREFZX01JTExJUwCAuJkpABVVU0RUMkFDUkVTX01VTFRJUExJRVIACgATT05FX1BFUkNFTlRfRElWSVNPUgBkAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQALdXNkdEFzc2V0SWQEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDABIITaerIIAz9O0bvKju6Lk7zJgt0LXfoHlqjUI/moD/+5AwkAAAIBAVQFByRtYXRjaDABIFWx2J9yh4Lv5eNbjawFq2XemkOhLxa7BfMat4el8cUYCQACAQINVW5rbm93biBjaGFpbgAWZGVmYXVsdFJlc3QyQWRkcmVzc1N0cgQHJG1hdGNoMAUFY2hhaW4DCQAAAgEBVwUHJG1hdGNoMAIjM1BGd1l0YThiaUV6MzF6cGVGZTVESks4d0U1dHJTcFFWRjgDCQAAAgEBVAUHJG1hd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xkVG90YWwJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUSYWNyZXNTdGFrZFRvdGFsS2V5AAAECXVzZXJGcEtleQkBFWtleUZhcm1pbmdQb3dlckJ5VXNlcgEFB2FkZHJlc3MEBW9sZEZwCQELdmFsdWVPckVsc2UCCQCfCAEFCXVzZXJGcEtleQAABAVuZXdGcAkBFmdldEZhcm1pbmdQb3dlckJ5QWNyZXMBBQ5uZXdBY3Jlc0Ftb3VudAQKb2xkVG90YWxGcAkBC3ZhbHVlT3JFbHNlAgkAnwgBBRR0b3RhbEZhcm1pbmdQb3dlcktleQAABApuZXdUb3RhbEZwCQBkAgkAZQIFCm9sZFRvdGFsRnAFBW9sZEZwBQVuZXdGcAkAlAoCBQNuaWwJAMwIAgUFb2xkRnAJAMwIAgUFbmV3RnAJAMwIAgUKb2xkVG90YWxGcAkAzAgCBQpuZXdUb3RhbEZwBQNuaWwAd8unlA==", "height": 3368710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CHgYFmgf7FyQfZSVTYNKVTAN6q3ey6uUCAUWGipqP3mx Next: none Diff:
Old | New | Differences | |
---|---|---|---|
241 | 241 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
242 | 242 | let acres2Usd = assetBalance(this, usdtAssetId) | |
243 | 243 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
244 | - | let | |
245 | - | let defaultLimit = ( | |
244 | + | let currTVL = ((acres2Usd + wlgUsd) + investFundTotal) | |
245 | + | let defaultLimit = (currTVL / ONE_PERCENT_DIVISOR) | |
246 | 246 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
247 | - | let | |
247 | + | let lastSavedTVL = valueOrElse(getInteger(keyLastSavedTVL), currTVL) | |
248 | 248 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
249 | 249 | let now = lastBlock.timestamp | |
250 | - | let currentLimit = (lastLimitLeft + fraction( | |
250 | + | let currentLimit = (lastLimitLeft + fraction(lastSavedTVL, (now - lastTime), (DAY_MILLIS * ONE_PERCENT_DIVISOR))) | |
251 | 251 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
252 | - | $Tuple2([IntegerEntry( | |
252 | + | $Tuple2([IntegerEntry(keyLastSavedTVL, currTVL), IntegerEntry(keyLastAcresSellTime, now)], limitLeftUsdt) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
287 | 287 | if ((size(i.payments) != 0)) | |
288 | 288 | then throw("No payments required") | |
289 | 289 | else { | |
290 | - | let $ | |
291 | - | let actions = $ | |
292 | - | let wlgClaimedAmount = $ | |
290 | + | let $t047464823 = stakeUnstakeAcresInternal(-(amount), address) | |
291 | + | let actions = $t047464823._1 | |
292 | + | let wlgClaimedAmount = $t047464823._2 | |
293 | 293 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
294 | 294 | } | |
295 | 295 | } | |
311 | 311 | else (value(pmt.assetId) != acresAssetId)) | |
312 | 312 | then throw("ACRES payments only!") | |
313 | 313 | else { | |
314 | - | let $ | |
315 | - | let actions = $ | |
316 | - | let wlgClaimedAmount = $ | |
314 | + | let $t052745347 = stakeUnstakeAcresInternal(amt, address) | |
315 | + | let actions = $t052745347._1 | |
316 | + | let wlgClaimedAmount = $t052745347._2 | |
317 | 317 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
318 | 318 | } | |
319 | 319 | } | |
377 | 377 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
378 | 378 | else { | |
379 | 379 | let addr = toString(i.caller) | |
380 | - | let $t072107260 = getSwapLimitAcres() | |
381 | - | let limitActions = $t072107260._1 | |
382 | - | let maxAcres = $t072107260._2 | |
380 | + | let $t072047253 = getSwapLimitAcres() | |
381 | + | let limitActions = $t072047253._1 | |
382 | + | let maxUsdt = $t072047253._2 | |
383 | + | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
383 | 384 | if ((acresAmount > maxAcres)) | |
384 | 385 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
385 | 386 | else { | |
386 | 387 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
387 | - | $Tuple2(((limitActions :+ ScriptTransfer(i.caller, usdtAmount, usdtAssetId)) ++ prologActions), usdtAmount) | |
388 | + | $Tuple2((((limitActions :+ IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount))) :+ ScriptTransfer(i.caller, usdtAmount, usdtAssetId)) ++ prologActions), usdtAmount) | |
388 | 389 | } | |
389 | 390 | } | |
390 | 391 | } | |
394 | 395 | ||
395 | 396 | @Callable(i) | |
396 | 397 | func sellAcresREADONLY (address,acresAmount) = { | |
397 | - | let $ | |
398 | - | let limitActions = $ | |
399 | - | let | |
398 | + | let $t077447793 = getSwapLimitAcres() | |
399 | + | let limitActions = $t077447793._1 | |
400 | + | let maxUsdt = $t077447793._2 | |
400 | 401 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
401 | - | $Tuple2(nil, [usdtAmount, MULT7, | |
402 | + | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
402 | 403 | } | |
403 | 404 | ||
404 | 405 |
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 DAY_MILLIS = 86400000 | |
13 | 13 | ||
14 | 14 | let USDT2ACRES_MULTIPLIER = 10 | |
15 | 15 | ||
16 | 16 | let ONE_PERCENT_DIVISOR = 100 | |
17 | 17 | ||
18 | 18 | let chain = take(drop(this.bytes, 1), 1) | |
19 | 19 | ||
20 | 20 | let usdtAssetId = match chain { | |
21 | 21 | case _ => | |
22 | 22 | if ((base58'2W' == $match0)) | |
23 | 23 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
24 | 24 | else if ((base58'2T' == $match0)) | |
25 | 25 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
26 | 26 | else throw("Unknown chain") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | let defaultRest2AddressStr = match chain { | |
30 | 30 | case _ => | |
31 | 31 | if ((base58'2W' == $match0)) | |
32 | 32 | then "3PFwYta8biEz31zpeFe5DJK8wE5trSpQVF8" | |
33 | 33 | else if ((base58'2T' == $match0)) | |
34 | 34 | then "3N7UuYar6264P58FBhVWKPQAh4Yua2hgngv" | |
35 | 35 | else throw("Unknown chain") | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | let oldStakingContractStr = match chain { | |
39 | 39 | case _ => | |
40 | 40 | if ((base58'2W' == $match0)) | |
41 | 41 | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
42 | 42 | else if ((base58'2T' == $match0)) | |
43 | 43 | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
44 | 44 | else throw("Unknown chain") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | let IdxCfgAcres2Dapp = 1 | |
51 | 51 | ||
52 | 52 | let IdxCfgWlgDapp = 2 | |
53 | 53 | ||
54 | 54 | let IdxCfgInvestFundDapp = 5 | |
55 | 55 | ||
56 | 56 | func keyRestCfg () = "%s__restConfig" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyRest2Address () = "%s__rest2Addr" | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func readRestCfgOrFail (rest) = split_4C(getStringOrFail(rest, keyRestCfg()), SEP) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getContractAddressOrFail (rest2Cfg,idx) = valueOrErrorMessage(addressFromString(rest2Cfg[idx]), ("Rest cfg doesn't contain address at index " + toString(idx))) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | let rest2Contract = addressFromStringValue(valueOrElse(getString(this, keyRest2Address()), defaultRest2AddressStr)) | |
69 | 69 | ||
70 | 70 | let rest2Cfg = readRestCfgOrFail(rest2Contract) | |
71 | 71 | ||
72 | 72 | let acres2Contract = getContractAddressOrFail(rest2Cfg, IdxCfgAcres2Dapp) | |
73 | 73 | ||
74 | 74 | let wlgContract = getContractAddressOrFail(rest2Cfg, IdxCfgWlgDapp) | |
75 | 75 | ||
76 | 76 | let investFundContract = getContractAddressOrFail(rest2Cfg, IdxCfgInvestFundDapp) | |
77 | 77 | ||
78 | 78 | let oldAcresContractKey = "oldAcresContract" | |
79 | 79 | ||
80 | 80 | func keyBlocked () = "contractsBlocked" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyLastTxIdByUser (addr) = ("lastTxIdByUser_" + addr) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | let acresIssuedAmountKey = "acresIssuedAmount" | |
87 | 87 | ||
88 | 88 | let acresAssetIdKey = "acresAssetId" | |
89 | 89 | ||
90 | 90 | let acresAssetId = valueOrErrorMessage(getBinary(acres2Contract, acresAssetIdKey), "ACRES is not issued yet") | |
91 | 91 | ||
92 | 92 | func keyAcresStakedTimeByUser (addr) = ("acresStakedTimeByUser_" + addr) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyStakedLandsByOwner (ownerAddr) = ("stakedLandsByOwner_" + ownerAddr) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func asInt (v) = match v { | |
102 | 102 | case n: Int => | |
103 | 103 | n | |
104 | 104 | case _ => | |
105 | 105 | throw("fail to cast into Int") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func asTuple5Ints (val) = match val { | |
110 | 110 | case t: (Int, Int, Int, Int, Int) => | |
111 | 111 | t | |
112 | 112 | case _ => | |
113 | 113 | throw("fail to cast into (Int, Int, Int, Int, Int)") | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func asTuple4Ints (val) = match val { | |
118 | 118 | case t: (Int, Int, Int, Int) => | |
119 | 119 | t | |
120 | 120 | case _ => | |
121 | 121 | throw("fail to cast into (Int, Int, Int, Int)") | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func asTuple3Ints (val) = match val { | |
126 | 126 | case t: (Int, Int, Int) => | |
127 | 127 | t | |
128 | 128 | case _ => | |
129 | 129 | throw("fail to cast into (Int, Int, Int)") | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func asTuple2Ints (val) = match val { | |
134 | 134 | case t: (Int, Int) => | |
135 | 135 | t | |
136 | 136 | case _ => | |
137 | 137 | throw("fail to cast into (Int, Int)") | |
138 | 138 | } | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func fixedPoint (val,decimals) = { | |
142 | 142 | let tenPow = pow(10, 0, decimals, 0, 0, DOWN) | |
143 | 143 | let lowPart = toString((val % tenPow)) | |
144 | 144 | let zeroes = drop(toString(tenPow), (1 + size(lowPart))) | |
145 | 145 | (((toString((val / tenPow)) + ".") + zeroes) + lowPart) | |
146 | 146 | } | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | let M8_ = 100000000 | |
150 | 150 | ||
151 | 151 | let wlgIssuedAmtKey = "wlg_issuedAmount" | |
152 | 152 | ||
153 | 153 | let zbIssuedAmtKey = "zbill_issuedAmount" | |
154 | 154 | ||
155 | 155 | func keyAcresStakedAmtByUser (addr) = ("acresStakedAmountByUser_" + addr) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyFarmingPowerByUser (addr) = ("farmingPowerByUser_" + addr) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | let acresStakdTotalKey = "acresStakedAmountTotal" | |
162 | 162 | ||
163 | 163 | let totalFarmingPowerKey = "totalFarmingPower" | |
164 | 164 | ||
165 | 165 | let levelAcres = [0, 10, 20, 40, 80, 150, 250, 400, 700, 1000] | |
166 | 166 | ||
167 | 167 | func getLevelByAcres (acres) = { | |
168 | 168 | let acr = ((acres + 99999999) / M8_) | |
169 | 169 | func checker (acc,item) = if ((item >= acr)) | |
170 | 170 | then acc | |
171 | 171 | else (acc + 1) | |
172 | 172 | ||
173 | 173 | let $l = levelAcres | |
174 | 174 | let $s = size($l) | |
175 | 175 | let $acc0 = 0 | |
176 | 176 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
177 | 177 | then $a | |
178 | 178 | else checker($a, $l[$i]) | |
179 | 179 | ||
180 | 180 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
181 | 181 | then $a | |
182 | 182 | else throw("List size exceeds 10") | |
183 | 183 | ||
184 | 184 | $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) | |
185 | 185 | } | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getFarmingPowerByAcres (acres) = ((acres * 20) * (getLevelByAcres(acres) + 4)) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func prolog (i) = if (if ((i.originCaller != rest2Contract)) | |
192 | 192 | then valueOrElse(getBoolean(keyBlocked()), false) | |
193 | 193 | else false) | |
194 | 194 | then throw("Contracts are under maintenance") | |
195 | 195 | else [StringEntry(keyLastTxIdByUser(toString(i.originCaller)), toBase58String(i.transactionId))] | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func stakeUnstakeAcresInternal (amt,address) = { | |
199 | 199 | let wlgResult = invoke(wlgContract, "onStakeUnstakeLand", [address], nil) | |
200 | 200 | if ((wlgResult == wlgResult)) | |
201 | 201 | then { | |
202 | 202 | let now = lastBlock.timestamp | |
203 | 203 | let timeKey = keyAcresStakedTimeByUser(address) | |
204 | 204 | let amountKey = keyAcresStakedAmtByUser(address) | |
205 | 205 | let oldAcresAmount = valueOrElse(getInteger(amountKey), 0) | |
206 | 206 | if (if ((0 > amt)) | |
207 | 207 | then (0 > (oldAcresAmount + amt)) | |
208 | 208 | else false) | |
209 | 209 | then throw(((("You have only " + fixedPoint(oldAcresAmount, 8)) + " ACRES staked, tried to unstake ") + fixedPoint(-(amt), 8))) | |
210 | 210 | else { | |
211 | 211 | let newAcresAmount = (oldAcresAmount + amt) | |
212 | 212 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
213 | 213 | let userFpKey = keyFarmingPowerByUser(address) | |
214 | 214 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
215 | 215 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
216 | 216 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
217 | 217 | $Tuple2([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(amountKey, newAcresAmount), IntegerEntry(acresStakdTotalKey, (oldTotal + amt)), IntegerEntry(userFpKey, newFp), IntegerEntry(totalFarmingPowerKey, ((oldTotalFp - oldFp) + newFp))], wlgResult) | |
218 | 218 | } | |
219 | 219 | } | |
220 | 220 | else throw("Strict value is not equal to itself.") | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func getWlgPrice (usdtBalanceCorrection) = { | |
225 | 225 | let issuedAmount = valueOrErrorMessage(getInteger(wlgContract, wlgIssuedAmtKey), "WLGOLD is not issued yet") | |
226 | 226 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
227 | 227 | let acres2Usd = (assetBalance(acres2Contract, usdtAssetId) - usdtBalanceCorrection) | |
228 | 228 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
229 | 229 | let totalFundsUsd = ((acres2Usd + wlgUsd) + investFundTotal) | |
230 | 230 | fraction(totalFundsUsd, MULT8, issuedAmount) | |
231 | 231 | } | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | let keyLastAcresSellTime = "lastAcresSellTime" | |
235 | 235 | ||
236 | 236 | let keyLastLimitLeft = "lastLimitLeft" | |
237 | 237 | ||
238 | 238 | let keyLastSavedTVL = "lastSavedTVL" | |
239 | 239 | ||
240 | 240 | func getSwapLimitAcres () = { | |
241 | 241 | let wlgUsd = assetBalance(wlgContract, usdtAssetId) | |
242 | 242 | let acres2Usd = assetBalance(this, usdtAssetId) | |
243 | 243 | let investFundTotal = (assetBalance(investFundContract, usdtAssetId) + valueOrElse(getInteger(investFundContract, zbIssuedAmtKey), 0)) | |
244 | - | let | |
245 | - | let defaultLimit = ( | |
244 | + | let currTVL = ((acres2Usd + wlgUsd) + investFundTotal) | |
245 | + | let defaultLimit = (currTVL / ONE_PERCENT_DIVISOR) | |
246 | 246 | let lastLimitLeft = valueOrElse(getInteger(keyLastLimitLeft), defaultLimit) | |
247 | - | let | |
247 | + | let lastSavedTVL = valueOrElse(getInteger(keyLastSavedTVL), currTVL) | |
248 | 248 | let lastTime = valueOrElse(getInteger(keyLastAcresSellTime), 0) | |
249 | 249 | let now = lastBlock.timestamp | |
250 | - | let currentLimit = (lastLimitLeft + fraction( | |
250 | + | let currentLimit = (lastLimitLeft + fraction(lastSavedTVL, (now - lastTime), (DAY_MILLIS * ONE_PERCENT_DIVISOR))) | |
251 | 251 | let limitLeftUsdt = min([currentLimit, defaultLimit]) | |
252 | - | $Tuple2([IntegerEntry( | |
252 | + | $Tuple2([IntegerEntry(keyLastSavedTVL, currTVL), IntegerEntry(keyLastAcresSellTime, now)], limitLeftUsdt) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func saveLastTx () = if (!(containsElement([wlgContract], i.caller))) | |
258 | 258 | then throw("Access denied") | |
259 | 259 | else $Tuple2(prolog(i), 42) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | ||
263 | 263 | @Callable(i) | |
264 | 264 | func constructorV1 (rest2Addr,oldAcrContract) = if ((i.caller != this)) | |
265 | 265 | then throw("Permission denied") | |
266 | 266 | else { | |
267 | 267 | let oldAcrContAddr = addressFromStringValue(oldAcrContract) | |
268 | 268 | [IntegerEntry(acresIssuedAmountKey, getIntegerValue(oldAcrContAddr, acresIssuedAmountKey)), BinaryEntry(acresAssetIdKey, getBinaryValue(oldAcrContAddr, acresAssetIdKey)), StringEntry(keyRest2Address(), rest2Addr), StringEntry(oldAcresContractKey, oldAcrContract)] | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | ||
273 | 273 | @Callable(i) | |
274 | 274 | func setBlocked (isBlocked) = if ((i.caller != this)) | |
275 | 275 | then throw("permission denied") | |
276 | 276 | else [BooleanEntry(keyBlocked(), isBlocked)] | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(i) | |
281 | 281 | func unstakeAcres (amount) = { | |
282 | 282 | let prologActions = prolog(i) | |
283 | 283 | if ((0 >= amount)) | |
284 | 284 | then throw("Amount should be positive") | |
285 | 285 | else { | |
286 | 286 | let address = toString(i.caller) | |
287 | 287 | if ((size(i.payments) != 0)) | |
288 | 288 | then throw("No payments required") | |
289 | 289 | else { | |
290 | - | let $ | |
291 | - | let actions = $ | |
292 | - | let wlgClaimedAmount = $ | |
290 | + | let $t047464823 = stakeUnstakeAcresInternal(-(amount), address) | |
291 | + | let actions = $t047464823._1 | |
292 | + | let wlgClaimedAmount = $t047464823._2 | |
293 | 293 | $Tuple2(((actions :+ ScriptTransfer(i.caller, amount, acresAssetId)) ++ prologActions), wlgClaimedAmount) | |
294 | 294 | } | |
295 | 295 | } | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func stakeAcres () = { | |
302 | 302 | let prologActions = prolog(i) | |
303 | 303 | let address = toString(i.caller) | |
304 | 304 | if ((size(i.payments) != 1)) | |
305 | 305 | then throw("exactly 1 payment must be attached") | |
306 | 306 | else { | |
307 | 307 | let pmt = i.payments[0] | |
308 | 308 | let amt = pmt.amount | |
309 | 309 | if (if (!(isDefined(pmt.assetId))) | |
310 | 310 | then true | |
311 | 311 | else (value(pmt.assetId) != acresAssetId)) | |
312 | 312 | then throw("ACRES payments only!") | |
313 | 313 | else { | |
314 | - | let $ | |
315 | - | let actions = $ | |
316 | - | let wlgClaimedAmount = $ | |
314 | + | let $t052745347 = stakeUnstakeAcresInternal(amt, address) | |
315 | + | let actions = $t052745347._1 | |
316 | + | let wlgClaimedAmount = $t052745347._2 | |
317 | 317 | $Tuple2((actions ++ prologActions), wlgClaimedAmount) | |
318 | 318 | } | |
319 | 319 | } | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | ||
324 | 324 | @Callable(i) | |
325 | 325 | func buyAcres () = { | |
326 | 326 | let prologActions = prolog(i) | |
327 | 327 | if ((size(i.payments) != 1)) | |
328 | 328 | then throw("exactly 1 payment must be attached") | |
329 | 329 | else { | |
330 | 330 | let pmt = i.payments[0] | |
331 | 331 | let usdtAmount = pmt.amount | |
332 | 332 | if (if (!(isDefined(pmt.assetId))) | |
333 | 333 | then true | |
334 | 334 | else (value(pmt.assetId) != usdtAssetId)) | |
335 | 335 | then throw("USDT payments only!") | |
336 | 336 | else if ((MULT6 > usdtAmount)) | |
337 | 337 | then throw((("Min payment should be " + fixedPoint(MULT6, 6)) + " USDT")) | |
338 | 338 | else { | |
339 | 339 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
340 | 340 | let wlgAmount = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
341 | 341 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
342 | 342 | let req = invoke(oldAcresAddress, "requestAcresCallback", [acresAmount], nil) | |
343 | 343 | if ((req == req)) | |
344 | 344 | then { | |
345 | 345 | let wlgRemain = asInt(invoke(wlgContract, "burnWlgold", [wlgAmount], nil)) | |
346 | 346 | $Tuple2(([ScriptTransfer(i.caller, acresAmount, acresAssetId)] ++ prologActions), wlgRemain) | |
347 | 347 | } | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | } | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | ||
355 | 355 | @Callable(i) | |
356 | 356 | func buyAcresREADONLY (usdtAmount) = { | |
357 | 357 | let acresAmount = (usdtAmount * USDT2ACRES_MULTIPLIER) | |
358 | 358 | let wlgToBurn = fraction(usdtAmount, MULT8, getWlgPrice(usdtAmount)) | |
359 | 359 | $Tuple2(nil, [acresAmount, MULT6, acresAmount, wlgToBurn]) | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | ||
364 | 364 | @Callable(i) | |
365 | 365 | func sellAcres () = { | |
366 | 366 | let prologActions = prolog(i) | |
367 | 367 | if ((size(i.payments) != 1)) | |
368 | 368 | then throw("exactly 1 payment must be attached") | |
369 | 369 | else { | |
370 | 370 | let pmt = i.payments[0] | |
371 | 371 | let acresAmount = pmt.amount | |
372 | 372 | if (if (!(isDefined(pmt.assetId))) | |
373 | 373 | then true | |
374 | 374 | else (value(pmt.assetId) != acresAssetId)) | |
375 | 375 | then throw("ACRES payments only!") | |
376 | 376 | else if ((MULT7 > acresAmount)) | |
377 | 377 | then throw((("Min payment should be " + fixedPoint(MULT7, 8)) + " ACRES")) | |
378 | 378 | else { | |
379 | 379 | let addr = toString(i.caller) | |
380 | - | let $t072107260 = getSwapLimitAcres() | |
381 | - | let limitActions = $t072107260._1 | |
382 | - | let maxAcres = $t072107260._2 | |
380 | + | let $t072047253 = getSwapLimitAcres() | |
381 | + | let limitActions = $t072047253._1 | |
382 | + | let maxUsdt = $t072047253._2 | |
383 | + | let maxAcres = (maxUsdt * USDT2ACRES_MULTIPLIER) | |
383 | 384 | if ((acresAmount > maxAcres)) | |
384 | 385 | then throw((("You can sell max " + fixedPoint(maxAcres, 8)) + " ACRES")) | |
385 | 386 | else { | |
386 | 387 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
387 | - | $Tuple2(((limitActions :+ ScriptTransfer(i.caller, usdtAmount, usdtAssetId)) ++ prologActions), usdtAmount) | |
388 | + | $Tuple2((((limitActions :+ IntegerEntry(keyLastLimitLeft, (maxUsdt - usdtAmount))) :+ ScriptTransfer(i.caller, usdtAmount, usdtAssetId)) ++ prologActions), usdtAmount) | |
388 | 389 | } | |
389 | 390 | } | |
390 | 391 | } | |
391 | 392 | } | |
392 | 393 | ||
393 | 394 | ||
394 | 395 | ||
395 | 396 | @Callable(i) | |
396 | 397 | func sellAcresREADONLY (address,acresAmount) = { | |
397 | - | let $ | |
398 | - | let limitActions = $ | |
399 | - | let | |
398 | + | let $t077447793 = getSwapLimitAcres() | |
399 | + | let limitActions = $t077447793._1 | |
400 | + | let maxUsdt = $t077447793._2 | |
400 | 401 | let usdtAmount = ((acresAmount / USDT2ACRES_MULTIPLIER) / 2) | |
401 | - | $Tuple2(nil, [usdtAmount, MULT7, | |
402 | + | $Tuple2(nil, [usdtAmount, MULT7, (maxUsdt * USDT2ACRES_MULTIPLIER), 0]) | |
402 | 403 | } | |
403 | 404 | ||
404 | 405 | ||
405 | 406 | ||
406 | 407 | @Callable(i) | |
407 | 408 | func convertOldStakes () = if ((i.caller != this)) | |
408 | 409 | then throw("Temporarily disabled") | |
409 | 410 | else { | |
410 | 411 | let address = toString(i.caller) | |
411 | 412 | if ((size(i.payments) != 0)) | |
412 | 413 | then throw("No payments required") | |
413 | 414 | else { | |
414 | 415 | let oldAcresAddress = addressFromStringValue(getStringValue(oldAcresContractKey)) | |
415 | 416 | let amount = valueOrElse(getInteger(oldAcresAddress, keyAcresStakedAmtByUser(address)), 0) | |
416 | 417 | let gotAcres0 = if ((amount > 0)) | |
417 | 418 | then asTuple2Ints(invoke(oldAcresAddress, "unstakeAcresCallback", [amount, address], nil)) | |
418 | 419 | else $Tuple2(0, 0) | |
419 | 420 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
420 | 421 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
421 | 422 | let landsResult = if (isDefined(landsStr)) | |
422 | 423 | then { | |
423 | 424 | let lands = split_51C(value(landsStr), "_") | |
424 | 425 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
425 | 426 | then throw("landAssetId is required") | |
426 | 427 | else { | |
427 | 428 | let r = asTuple5Ints(invoke(oldStakingAddress, "unstakeLandCallback", [landAssetId, address], nil)) | |
428 | 429 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
429 | 430 | } | |
430 | 431 | ||
431 | 432 | let rr = { | |
432 | 433 | let $l = lands | |
433 | 434 | let $s = size($l) | |
434 | 435 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
435 | 436 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
436 | 437 | then $a | |
437 | 438 | else oneLand($a, $l[$i]) | |
438 | 439 | ||
439 | 440 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
440 | 441 | then $a | |
441 | 442 | else throw("List size exceeds 100") | |
442 | 443 | ||
443 | 444 | $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) | |
444 | 445 | } | |
445 | 446 | let finalize = invoke(oldStakingAddress, "unstakeLandsFinalizeCallback", [address], nil) | |
446 | 447 | if ((finalize == finalize)) | |
447 | 448 | then { | |
448 | 449 | let req = invoke(oldAcresAddress, "requestAcresCallback", [(((rr._1 + rr._2) + rr._3) + rr._4)], nil) | |
449 | 450 | if ((req == req)) | |
450 | 451 | then { | |
451 | 452 | let issue = Issue("FPOWER10", "FarmingPower +10% NFT for WavesLands game", 1, 0, false) | |
452 | 453 | $Tuple5(rr._1, rr._2, rr._3, rr._4, [issue, ScriptTransfer(i.caller, 1, calculateAssetId(issue))]) | |
453 | 454 | } | |
454 | 455 | else throw("Strict value is not equal to itself.") | |
455 | 456 | } | |
456 | 457 | else throw("Strict value is not equal to itself.") | |
457 | 458 | } | |
458 | 459 | else $Tuple5(0, 0, 0, 0, nil) | |
459 | 460 | let duckAssetId = valueOrElse(getString(oldStakingAddress, keyStakedDuckByOwner(address)), "") | |
460 | 461 | let duckResult = if ((duckAssetId != "")) | |
461 | 462 | then asTuple3Ints(invoke(oldStakingAddress, "unstakeDuckCallback", [duckAssetId, address], nil)) | |
462 | 463 | else $Tuple3(0, 0, 0) | |
463 | 464 | let x = stakeUnstakeAcresInternal((((((((gotAcres0._1 + landsResult._1) + landsResult._2) + landsResult._3) + landsResult._4) + duckResult._1) + duckResult._2) + duckResult._3), address) | |
464 | 465 | $Tuple2((landsResult._5 ++ x._1), x._2) | |
465 | 466 | } | |
466 | 467 | } | |
467 | 468 | ||
468 | 469 | ||
469 | 470 | ||
470 | 471 | @Callable(i) | |
471 | 472 | func unstakeLandsREADONLY (address) = { | |
472 | 473 | let oldStakingAddress = addressFromStringValue(oldStakingContractStr) | |
473 | 474 | let landsStr = getString(oldStakingAddress, keyStakedLandsByOwner(address)) | |
474 | 475 | let landsResult = if (isDefined(landsStr)) | |
475 | 476 | then { | |
476 | 477 | let lands = split_51C(value(landsStr), "_") | |
477 | 478 | func oneLand (acc,landAssetId) = if ((landAssetId == "")) | |
478 | 479 | then throw("landAssetId is required") | |
479 | 480 | else { | |
480 | 481 | let r = asTuple4Ints(invoke(oldStakingAddress, "unstakeLandREADONLY", [landAssetId, address], nil)) | |
481 | 482 | $Tuple4((acc._1 + r._1), (acc._2 + r._2), (acc._3 + r._3), (acc._4 + r._4)) | |
482 | 483 | } | |
483 | 484 | ||
484 | 485 | let $l = lands | |
485 | 486 | let $s = size($l) | |
486 | 487 | let $acc0 = $Tuple4(0, 0, 0, 0) | |
487 | 488 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
488 | 489 | then $a | |
489 | 490 | else oneLand($a, $l[$i]) | |
490 | 491 | ||
491 | 492 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
492 | 493 | then $a | |
493 | 494 | else throw("List size exceeds 100") | |
494 | 495 | ||
495 | 496 | $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) | |
496 | 497 | } | |
497 | 498 | else $Tuple4(0, 0, 0, 0) | |
498 | 499 | $Tuple2(nil, landsResult) | |
499 | 500 | } | |
500 | 501 | ||
501 | 502 | ||
502 | 503 | ||
503 | 504 | @Callable(i) | |
504 | 505 | func stakeAcresCallback (addr) = if ((i.caller != addressFromStringValue(oldStakingContractStr))) | |
505 | 506 | then throw("Permission denied") | |
506 | 507 | else stakeUnstakeAcresInternal(i.payments[0].amount, addr) | |
507 | 508 | ||
508 | 509 | ||
509 | 510 | ||
510 | 511 | @Callable(i) | |
511 | 512 | func simulateStakeAcresREADONLY (address,addedAmount) = { | |
512 | 513 | let amountKey = keyAcresStakedAmtByUser(address) | |
513 | 514 | let newAcresAmount = (valueOrElse(getInteger(amountKey), 0) + addedAmount) | |
514 | 515 | let oldTotal = valueOrElse(getInteger(acresStakdTotalKey), 0) | |
515 | 516 | let userFpKey = keyFarmingPowerByUser(address) | |
516 | 517 | let oldFp = valueOrElse(getInteger(userFpKey), 0) | |
517 | 518 | let newFp = getFarmingPowerByAcres(newAcresAmount) | |
518 | 519 | let oldTotalFp = valueOrElse(getInteger(totalFarmingPowerKey), 0) | |
519 | 520 | let newTotalFp = ((oldTotalFp - oldFp) + newFp) | |
520 | 521 | $Tuple2(nil, [oldFp, newFp, oldTotalFp, newTotalFp]) | |
521 | 522 | } | |
522 | 523 | ||
523 | 524 |
github/deemru/w8io/026f985 54.06 ms ◑