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