tx · FQmE36qNwo3eacM5XEnJRiL3NK8U3FRYCrnBo23SdLbD 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg: -0.01400000 Waves 2023.11.19 21:55 [2850660] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves
{ "type": 13, "id": "FQmE36qNwo3eacM5XEnJRiL3NK8U3FRYCrnBo23SdLbD", "fee": 1400000, "feeAssetId": null, "timestamp": 1700420183450, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "3G7LENruAbswpH9UvZYoHD7eYgHnbarwLd4jxZDEfrAa7xtbjPNkFGGXTcAniWbJ9KawXz594z7jk2uMfXDbk8fJ" ], "script": "base64:BgIsCAISBAoCCAESABIDCgEBEgASABIECgIIARIFCgMIAQESAwoBARIAEgMKAQg1AAhNSUxMSU9ONgCAgOmDsd4WAAlEQVlNSUxMSVMAgLiZKQEaa2V5QWNyZXNTdGFrZWRBbW91bnRCeVVzZXIBBGFkZHIJAKwCAgIYYWNyZXNTdGFrZWRBbW91bnRCeVVzZXJfBQRhZGRyARprZXlBY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcgEEYWRkcgkArAICAhhhY3Jlc0xvY2tlZEFtb3VudEJ5VXNlcl8FBGFkZHIBF2tleUFjcmVzTG9ja2VkRXRhQnlVc2VyAQRhZGRyCQCsAgICFWFjcmVzTG9ja2VkRXRhQnlVc2VyXwUEYWRkcgATYWNyZXNTdGFrZWRUb3RhbEtleQIWYWNyZXNTdGFrZWRBbW91bnRUb3RhbAAKeHBOZXdTTGFuZADAlrECAA9EQUlMWVJFU0JZUElFQ0UAgPjSAQAVVVNEVDJBQ1JFU19NVUxUSVBMSUVSAAoABWNoYWluCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2R0QXNzZ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FRpbWVCeVVzZXIBBQdhZGRyZXNzBAlhbW91bnRLZXkJARprZXlBY3Jlc1N0YWtlZEFtb3VudEJ5VXNlcgEFB2FkZHJlc3MEC2FjcmVzQW1vdW50CQELdmFsdWVPckVsc2UCCQCfCAEFCWFtb3VudEtleQAABAhsYXN0VGltZQkBC3ZhbHVlT3JFbHNlAgkAnwgBBQd0aW1lS2V5AAAEDGNsYWltZWRBY3JlcwkBEmNsYWltQWNyZXNJbnRlcm5hbAMFB2FkZHJlc3MFC2FjcmVzQW1vdW50BQhsYXN0VGltZQkAlAoCBQNuaWwJAMwIAgUMY2xhaW1lZEFjcmVzCQDMCAIFCGxhc3RUaW1lBQNuaWwA4i0E3g==", "height": 2850660, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E2JN3F1oqYzoP5pTv4TtpwMPbvRbYFbCHmniF6ijiSig Next: 2gMXPUhHd9EYANm6KQ5hd9dVFQniBYQFjfNBWHurPhUq Diff:
Old | New | Differences | |
---|---|---|---|
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | - | let as = 10000000 | |
157 | - | ||
158 | - | func at () = S(reentrantInvoke(G, "saveLastTx", nil, nil)) | |
159 | - | ||
160 | - | ||
161 | - | func au (d,av,aw) = { | |
162 | - | let ax = (lastBlock.timestamp - aw) | |
163 | - | let ay = fraction(ax, (i * av), (b * q)) | |
164 | - | let az = S(invoke(H, "sellResourcesWorldREADONLY", [ay], nil)) | |
165 | - | let aA = max([0, az]) | |
166 | - | (aA * j) | |
156 | + | func as (W,at) = { | |
157 | + | let au = toString(W) | |
158 | + | let ar = drop(toString(pow(10, 0, (at - size(au)), 0, 0, DOWN)), 1) | |
159 | + | (ar + au) | |
167 | 160 | } | |
168 | 161 | ||
169 | 162 | ||
170 | - | func aB (d,av,aw) = { | |
171 | - | let ax = (lastBlock.timestamp - aw) | |
172 | - | if ((0 > ax)) | |
173 | - | then throw(((("Saved timestamp is in future, saved = " + toString(aw)) + ", current = ") + toString(lastBlock.timestamp))) | |
163 | + | let av = 10000000 | |
164 | + | ||
165 | + | let aw = "3P2NGX4Q5nge1MCauwQW5aqYLdkccSGj1Ep_3P2xFAHW9yhyNohYozWd4HFhEXZu3bsNSoR_3P2yKaZ2gvn9Xe5tti81a7P9LZhHgjvToV9_3P37zQ3cf2ecu55RmJqEiGSivdzN9avt3m9_3P4az6dtzsvGCWFAxa94UdevKzXyEwxEiFG_3P4kZU6X3TTLFcSUe55JSy8BySqitcPgMBz_3P5hCxBEh3NgNizZhNBreyBSqtbhJYLkKPD_3P7HLvucy11yxyMJUwjzXFHHKMEDwi1EwfC_3P8JuaqH9PTQAv8D5HBGgQfKauLTYt2NQft_3P9gTDB4rtDEVbpX3asU63H4Zinh2EnTmZE_3P9iN3qrtfJicUVy7amZeVsetVD3vUMk8be_3PCa2BsAa6JBLirszQfV5r9fJrujfhwtwfP_3PD3i4XN8KtygcFx4ry5M7UGqdfH8VYvtRT_3PDEMnnJNc2kx9cPEmvVvhXUr8SvhANKhsa_3PDGE9tKQizaeZFeDDq5aYSv89nwYbfirpZ_3PDMKQTCrUPZECVXEJJ8m1sHtutSu1naSf1_3PGh2Qu6Yvx8GTCRRVNvBUVZLdaidYSaxo5_3PKkmAtbSK5D2hQdo1RfEg8eXyMbDcRUc92_3PLMnbxzssP8W8E8XjJ1RLBBg8UZL8Cz3P2_3PMuxo4PCAox9s4a7R1eszh4iqqu8gS7jHv_3PNrMtEQChw87WZU1JAJ7aGHykCa8TjnDNK_3PPuBXfWoBy3EEory7c7vgi9Usjka7o5tBj_3PQwyeyEhT4Y6aGAL6tg73aQWJtV1zRt3nR_3PRGDShuMGb84MJtTJvtTg8qDfswkYWcm3e" | |
166 | + | ||
167 | + | let ax = 4970178 | |
168 | + | ||
169 | + | let ay = { | |
170 | + | let m = k | |
171 | + | if ((base58'2W' == m)) | |
172 | + | then 1700524800000 | |
173 | + | else if ((base58'2T' == m)) | |
174 | + | then 1700420400000 | |
175 | + | else throw("Unknown chain") | |
176 | + | } | |
177 | + | ||
178 | + | let az = { | |
179 | + | let m = k | |
180 | + | if ((base58'2W' == m)) | |
181 | + | then 1701043199999 | |
182 | + | else if ((base58'2T' == m)) | |
183 | + | then 1700496000000 | |
184 | + | else throw("Unknown chain") | |
185 | + | } | |
186 | + | ||
187 | + | let aA = "promo2Map" | |
188 | + | ||
189 | + | func aB (d) = contains(aw, d) | |
190 | + | ||
191 | + | ||
192 | + | func aC () = S(reentrantInvoke(G, "saveLastTx", nil, nil)) | |
193 | + | ||
194 | + | ||
195 | + | func aD (d,aE,aF) = { | |
196 | + | let aG = (lastBlock.timestamp - aF) | |
197 | + | let aH = fraction(aG, (i * aE), (b * q)) | |
198 | + | let aI = S(invoke(H, "sellResourcesWorldREADONLY", [aH], nil)) | |
199 | + | let aJ = max([0, aI]) | |
200 | + | (aJ * j) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | func aK (d,aE,aF) = { | |
205 | + | let aG = (lastBlock.timestamp - aF) | |
206 | + | if ((0 > aG)) | |
207 | + | then throw(((("Saved timestamp is in future, saved = " + toString(aF)) + ", current = ") + toString(lastBlock.timestamp))) | |
174 | 208 | else { | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
209 | + | let aH = fraction(aG, (i * aE), (b * q)) | |
210 | + | let aI = S(invoke(H, "sellResourcesWorldREADONLY", [aH], nil)) | |
211 | + | let aJ = if ((0 >= aI)) | |
178 | 212 | then 0 | |
179 | - | else V(invoke(H, "sellResourcesWorld", [d, | |
180 | - | ( | |
213 | + | else V(invoke(H, "sellResourcesWorld", [d, aH], nil))._1 | |
214 | + | (aJ * j) | |
181 | 215 | } | |
182 | 216 | } | |
183 | 217 | ||
184 | 218 | ||
185 | - | func | |
186 | - | let | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
219 | + | func aL (aM,aN,aO,aP) = { | |
220 | + | let aQ = lastBlock.timestamp | |
221 | + | let aR = max([0, (aN - aQ)]) | |
222 | + | let aS = max([0, (aP - aQ)]) | |
223 | + | let aT = (aM + aO) | |
224 | + | let aU = if ((aT == 0)) | |
191 | 225 | then 0 | |
192 | - | else (fraction( | |
193 | - | ( | |
226 | + | else (fraction(aR, aM, aT) + fraction(aS, aO, aT)) | |
227 | + | (aQ + aU) | |
194 | 228 | } | |
195 | 229 | ||
196 | 230 | ||
197 | - | @Callable( | |
198 | - | func constructorV1 ( | |
231 | + | @Callable(aV) | |
232 | + | func constructorV1 (aW,aX) = if ((aV.caller != this)) | |
199 | 233 | then throw("Permission denied") | |
200 | 234 | else if (isDefined(getBinary(L))) | |
201 | 235 | then throw("Already initialized") | |
202 | 236 | else { | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | [ | |
237 | + | let aY = (Y("")[O] + aX) | |
238 | + | let aZ = (a - (aY * q)) | |
239 | + | let ba = Issue("ACRES", "WavesLands land acres investment token", aZ, 8, false, unit, 0) | |
240 | + | let bb = calculateAssetId(ba) | |
241 | + | [ba, IntegerEntry(K, aZ), BinaryEntry(L, bb), StringEntry(z(), aW)] | |
208 | 242 | } | |
209 | 243 | ||
210 | 244 | ||
211 | 245 | ||
212 | - | @Callable( | |
213 | - | func stakeAcres () = if (( | |
246 | + | @Callable(aV) | |
247 | + | func stakeAcres () = if ((aV.caller != this)) | |
214 | 248 | then throw("Temporarily disabled during promo action") | |
215 | 249 | else { | |
216 | - | let | |
217 | - | if (( | |
250 | + | let bc = aC() | |
251 | + | if ((bc == bc)) | |
218 | 252 | then { | |
219 | - | let s = toString( | |
220 | - | if ((size( | |
253 | + | let s = toString(aV.caller) | |
254 | + | if ((size(aV.payments) != 1)) | |
221 | 255 | then throw("exactly 1 payment must be attached") | |
222 | 256 | else { | |
223 | - | let | |
224 | - | let | |
225 | - | if (if (!(isDefined( | |
257 | + | let bd = aV.payments[0] | |
258 | + | let be = bd.amount | |
259 | + | if (if (!(isDefined(bd.assetId))) | |
226 | 260 | then true | |
227 | - | else (value( | |
261 | + | else (value(bd.assetId) != M)) | |
228 | 262 | then throw("ACRES payments only!") | |
229 | 263 | else { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | $Tuple2(((((if (( | |
264 | + | let bf = N(s) | |
265 | + | let bg = c(s) | |
266 | + | let bh = valueOrElse(getInteger(bg), 0) | |
267 | + | let bi = valueOrElse(getInteger(g), 0) | |
268 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
269 | + | let bk = aK(s, bh, valueOrElse(getInteger(bf), 0)) | |
270 | + | $Tuple2(((((if ((bk == 0)) | |
237 | 271 | then nil | |
238 | - | else [ScriptTransfer( | |
272 | + | else [ScriptTransfer(aV.caller, bk, M)]) :+ IntegerEntry(bf, lastBlock.timestamp)) :+ IntegerEntry(bg, (bh + be))) :+ IntegerEntry(g, (bi + be))), $Tuple2(bc, bj)) | |
239 | 273 | } | |
240 | 274 | } | |
241 | 275 | } | |
244 | 278 | ||
245 | 279 | ||
246 | 280 | ||
247 | - | @Callable( | |
248 | - | func unstakeAcres ( | |
249 | - | let | |
250 | - | if (( | |
251 | - | then if ((0 >= | |
281 | + | @Callable(aV) | |
282 | + | func unstakeAcres (bl) = { | |
283 | + | let bc = aC() | |
284 | + | if ((bc == bc)) | |
285 | + | then if ((0 >= bl)) | |
252 | 286 | then throw("Amount should be positive") | |
253 | 287 | else { | |
254 | - | let s = toString( | |
255 | - | if ((size( | |
288 | + | let s = toString(aV.caller) | |
289 | + | if ((size(aV.payments) != 0)) | |
256 | 290 | then throw("No payments required") | |
257 | 291 | else { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | if (( | |
262 | - | then throw(((("You have only " + an( | |
292 | + | let bf = N(s) | |
293 | + | let bg = c(s) | |
294 | + | let bh = valueOrElse(getInteger(bg), 0) | |
295 | + | if ((bl > bh)) | |
296 | + | then throw(((("You have only " + an(bh, 8)) + " ACRES staked, tried to unstake ") + an(bl, 8))) | |
263 | 297 | else { | |
264 | - | let bd = valueOrElse(getInteger(e(s)), 0) | |
265 | - | let be = valueOrElse(getInteger(f(s)), 0) | |
266 | - | let aH = lastBlock.timestamp | |
267 | - | let bf = (aY - bd) | |
268 | - | if (if ((be > aH)) | |
269 | - | then (bc > bf) | |
298 | + | let bm = valueOrElse(getInteger(e(s)), 0) | |
299 | + | let bn = valueOrElse(getInteger(f(s)), 0) | |
300 | + | let aQ = lastBlock.timestamp | |
301 | + | let bo = if (aB(s)) | |
302 | + | then ((bh - bm) - ax) | |
303 | + | else (bh - bm) | |
304 | + | if (if ((bn > aQ)) | |
305 | + | then (bl > bo) | |
270 | 306 | else false) | |
271 | - | then throw(((("Only " + an( | |
307 | + | then throw(((("Only " + an(bo, 8)) + " ACRES can be unstaked now, wait until ") + toString(bn))) | |
272 | 308 | else { | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | $Tuple2([IntegerEntry( | |
309 | + | let bi = valueOrElse(getInteger(g), 0) | |
310 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
311 | + | let bk = aK(s, bh, valueOrElse(getInteger(bf), 0)) | |
312 | + | $Tuple2([IntegerEntry(bf, lastBlock.timestamp), IntegerEntry(bg, (bh - bl)), IntegerEntry(g, (bi - bl)), ScriptTransfer(aV.caller, (bl + bk), M)], $Tuple2(bc, bj)) | |
277 | 313 | } | |
278 | 314 | } | |
279 | 315 | } | |
283 | 319 | ||
284 | 320 | ||
285 | 321 | ||
286 | - | @Callable( | |
322 | + | @Callable(aV) | |
287 | 323 | func stakeAcresLocked () = { | |
288 | - | let | |
289 | - | if (( | |
324 | + | let bc = aC() | |
325 | + | if ((bc == bc)) | |
290 | 326 | then { | |
291 | - | let s = toString( | |
292 | - | if ((size( | |
327 | + | let s = toString(aV.caller) | |
328 | + | if ((size(aV.payments) != 1)) | |
293 | 329 | then throw("exactly 1 payment must be attached") | |
294 | 330 | else { | |
295 | - | let | |
296 | - | let | |
297 | - | if (if (!(isDefined( | |
331 | + | let bd = aV.payments[0] | |
332 | + | let be = bd.amount | |
333 | + | if (if (!(isDefined(bd.assetId))) | |
298 | 334 | then true | |
299 | - | else (value( | |
335 | + | else (value(bd.assetId) != M)) | |
300 | 336 | then throw("ACRES payments only!") | |
301 | - | else if (( | |
302 | - | then throw((("Min staked amount during promo action should be at least " + an( | |
337 | + | else if ((av > be)) | |
338 | + | then throw((("Min staked amount during promo action should be at least " + an(av, 8)) + " ACRES")) | |
303 | 339 | else { | |
304 | - | let ba = invoke(I, "onStakeUnstakeLand", [s], nil) | |
305 | - | if ((ba == ba)) | |
306 | - | then { | |
307 | - | let bg = invoke(this, "sendLockedAcres", [s, aV, 30], nil) | |
308 | - | $Tuple2(nil, $Tuple3(aT, ba, bg)) | |
309 | - | } | |
310 | - | else throw("Strict value is not equal to itself.") | |
340 | + | let aQ = lastBlock.timestamp | |
341 | + | if ((ay > aQ)) | |
342 | + | then throw("Promo2 is not started yet") | |
343 | + | else if ((aQ > az)) | |
344 | + | then throw("Promo2 is already finished") | |
345 | + | else { | |
346 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
347 | + | if ((bj == bj)) | |
348 | + | then { | |
349 | + | let bp = invoke(this, "sendLockedAcres", [s, be, 30], nil) | |
350 | + | let bq = valueOrElse(getString(aA), "") | |
351 | + | let br = if (contains(bq, s)) | |
352 | + | then { | |
353 | + | let bs = split_51C(bq, s) | |
354 | + | let aM = parseIntValue(take(drop(bs[1], 1), 14)) | |
355 | + | ((((bs[0] + s) + ":") + as((aM + be), 14)) + drop(bs[1], 15)) | |
356 | + | } | |
357 | + | else { | |
358 | + | let bt = ((s + ":") + as(be, 14)) | |
359 | + | if ((bq == "")) | |
360 | + | then bt | |
361 | + | else ((bq + "_") + bt) | |
362 | + | } | |
363 | + | $Tuple2([StringEntry(aA, br)], $Tuple3(bc, bj, bp)) | |
364 | + | } | |
365 | + | else throw("Strict value is not equal to itself.") | |
366 | + | } | |
311 | 367 | } | |
312 | 368 | } | |
313 | 369 | } | |
316 | 372 | ||
317 | 373 | ||
318 | 374 | ||
319 | - | @Callable( | |
375 | + | @Callable(aV) | |
320 | 376 | func buyAcres () = { | |
321 | - | let | |
322 | - | if (( | |
377 | + | let bc = aC() | |
378 | + | if ((bc == bc)) | |
323 | 379 | then { | |
324 | - | let s = toString( | |
325 | - | if ((size( | |
380 | + | let s = toString(aV.caller) | |
381 | + | if ((size(aV.payments) != 1)) | |
326 | 382 | then throw("exactly 1 payment must be attached") | |
327 | 383 | else { | |
328 | - | let | |
329 | - | let | |
330 | - | if (if (!(isDefined( | |
384 | + | let bd = aV.payments[0] | |
385 | + | let be = bd.amount | |
386 | + | if (if (!(isDefined(bd.assetId))) | |
331 | 387 | then true | |
332 | - | else (value( | |
388 | + | else (value(bd.assetId) != l)) | |
333 | 389 | then throw("USDT payments only!") | |
334 | - | else if ((p > | |
390 | + | else if ((p > be)) | |
335 | 391 | then throw((("Min payment should be " + an(p, 6)) + " USDT")) | |
336 | 392 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | $Tuple2([ScriptTransfer(H, | |
393 | + | let aE = (be * j) | |
394 | + | let bu = S(invoke(G, "updateAccStats", [s, fraction(h, aE, (25 * q))], nil)) | |
395 | + | $Tuple2([ScriptTransfer(H, be, l), ScriptTransfer(aV.caller, aE, M)], $Tuple2(bc, bu)) | |
340 | 396 | } | |
341 | 397 | } | |
342 | 398 | } | |
345 | 401 | ||
346 | 402 | ||
347 | 403 | ||
348 | - | @Callable( | |
349 | - | func sendAcres (d, | |
404 | + | @Callable(aV) | |
405 | + | func sendAcres (d,bl) = if ((aV.caller != H)) | |
350 | 406 | then throw("Permission denied") | |
351 | - | else $Tuple2([ScriptTransfer(addressFromStringValue(d), | |
407 | + | else $Tuple2([ScriptTransfer(addressFromStringValue(d), bl, M)], bl) | |
352 | 408 | ||
353 | 409 | ||
354 | 410 | ||
355 | - | @Callable( | |
356 | - | func sendLockedAcres (d, | |
357 | - | then ( | |
411 | + | @Callable(aV) | |
412 | + | func sendLockedAcres (d,bl,bv) = if (if ((aV.caller != this)) | |
413 | + | then (aV.caller != F) | |
358 | 414 | else false) | |
359 | 415 | then throw("Permission denied") | |
360 | 416 | else { | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | $Tuple2([IntegerEntry( | |
417 | + | let aQ = lastBlock.timestamp | |
418 | + | let bf = N(d) | |
419 | + | let bg = c(d) | |
420 | + | let bh = valueOrElse(getInteger(bg), 0) | |
421 | + | let bi = valueOrElse(getInteger(g), 0) | |
422 | + | let bw = valueOrElse(getInteger(bf), aQ) | |
423 | + | let bx = f(d) | |
424 | + | let by = e(d) | |
425 | + | let bz = valueOrElse(getInteger(by), 0) | |
426 | + | let bA = valueOrElse(getInteger(bx), 0) | |
427 | + | let bB = aL(bz, bA, bl, (aQ + (bv * b))) | |
428 | + | $Tuple2([IntegerEntry(bf, bw), IntegerEntry(bg, (bh + bl)), IntegerEntry(g, (bi + bl)), IntegerEntry(bx, bB), IntegerEntry(by, (bz + bl))], bl) | |
373 | 429 | } | |
374 | 430 | ||
375 | 431 | ||
376 | 432 | ||
377 | - | @Callable( | |
378 | - | func burnAcres ( | |
433 | + | @Callable(aV) | |
434 | + | func burnAcres (bl) = if ((aV.caller != G)) | |
379 | 435 | then throw("Permission denied") | |
380 | 436 | else { | |
381 | - | let | |
382 | - | if ((0 > | |
437 | + | let bC = (valueOrElse(getInteger(K), 0) - bl) | |
438 | + | if ((0 > bC)) | |
383 | 439 | then throw("Attempt to burn more ACRES, than exists") | |
384 | - | else $Tuple2([Burn(M, | |
440 | + | else $Tuple2([Burn(M, bl), IntegerEntry(K, bC)], bl) | |
385 | 441 | } | |
386 | 442 | ||
387 | 443 | ||
388 | 444 | ||
389 | - | @Callable( | |
445 | + | @Callable(aV) | |
390 | 446 | func claimAcres () = { | |
391 | - | let | |
392 | - | if (( | |
447 | + | let bc = aC() | |
448 | + | if ((bc == bc)) | |
393 | 449 | then { | |
394 | - | let s = toString( | |
395 | - | if ((size( | |
450 | + | let s = toString(aV.caller) | |
451 | + | if ((size(aV.payments) != 0)) | |
396 | 452 | then throw("No payments required") | |
397 | 453 | else { | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | $Tuple2([IntegerEntry( | |
454 | + | let bf = N(s) | |
455 | + | let bg = c(s) | |
456 | + | let aE = valueOrElse(getInteger(bg), 0) | |
457 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
458 | + | let bk = aK(s, aE, valueOrElse(getInteger(bf), 0)) | |
459 | + | $Tuple2([IntegerEntry(bf, lastBlock.timestamp), ScriptTransfer(aV.caller, bk, M)], $Tuple2(bc, bj)) | |
404 | 460 | } | |
405 | 461 | } | |
406 | 462 | else throw("Strict value is not equal to itself.") | |
408 | 464 | ||
409 | 465 | ||
410 | 466 | ||
411 | - | @Callable( | |
467 | + | @Callable(aV) | |
412 | 468 | func claimAcresREADONLY (s) = { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | $Tuple2(nil, [ | |
469 | + | let bf = N(s) | |
470 | + | let bg = c(s) | |
471 | + | let aE = valueOrElse(getInteger(bg), 0) | |
472 | + | let bD = valueOrElse(getInteger(bf), 0) | |
473 | + | let bk = aD(s, aE, bD) | |
474 | + | $Tuple2(nil, [bk, bD]) | |
419 | 475 | } | |
420 | 476 | ||
421 | 477 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000000000 | |
5 | 5 | ||
6 | 6 | let b = 86400000 | |
7 | 7 | ||
8 | 8 | func c (d) = ("acresStakedAmountByUser_" + d) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func e (d) = ("acresLockedAmountByUser_" + d) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func f (d) = ("acresLockedEtaByUser_" + d) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | let g = "acresStakedAmountTotal" | |
18 | 18 | ||
19 | 19 | let h = 5000000 | |
20 | 20 | ||
21 | 21 | let i = 3456000 | |
22 | 22 | ||
23 | 23 | let j = 10 | |
24 | 24 | ||
25 | 25 | let k = take(drop(this.bytes, 1), 1) | |
26 | 26 | ||
27 | 27 | let l = { | |
28 | 28 | let m = k | |
29 | 29 | if ((base58'2W' == m)) | |
30 | 30 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
31 | 31 | else if ((base58'2T' == m)) | |
32 | 32 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
33 | 33 | else throw("Unknown chain") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | let n = { | |
37 | 37 | let m = k | |
38 | 38 | if ((base58'2W' == m)) | |
39 | 39 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
40 | 40 | else if ((base58'2T' == m)) | |
41 | 41 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
42 | 42 | else throw("Unknown chain") | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | let o = "__" | |
46 | 46 | ||
47 | 47 | let p = 1000000 | |
48 | 48 | ||
49 | 49 | let q = 100000000 | |
50 | 50 | ||
51 | 51 | func r (s,t) = valueOrErrorMessage(getString(s, t), makeString(["mandatory ", toString(s), ".", t, " is not defined"], "")) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | let u = 1 | |
55 | 55 | ||
56 | 56 | let v = 2 | |
57 | 57 | ||
58 | 58 | let w = 4 | |
59 | 59 | ||
60 | 60 | let x = 8 | |
61 | 61 | ||
62 | 62 | func y () = "%s__restConfig" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func z () = "%s__restAddr" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func A (B) = split_4C(r(B, y()), o) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func C (D,E) = valueOrErrorMessage(addressFromString(D[E]), ("Rest cfg doesn't contain address at index " + toString(E))) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | let F = addressFromStringValue(valueOrElse(getString(this, z()), n)) | |
75 | 75 | ||
76 | 76 | let D = A(F) | |
77 | 77 | ||
78 | 78 | let G = C(D, u) | |
79 | 79 | ||
80 | 80 | let H = C(D, v) | |
81 | 81 | ||
82 | 82 | let I = C(D, w) | |
83 | 83 | ||
84 | 84 | let J = C(D, x) | |
85 | 85 | ||
86 | 86 | let K = "acresIssuedAmount" | |
87 | 87 | ||
88 | 88 | let L = "acresAssetId" | |
89 | 89 | ||
90 | 90 | let M = valueOrErrorMessage(getBinary(J, L), "ACRES is not issued yet") | |
91 | 91 | ||
92 | 92 | func N (d) = ("acresStakedTimeByUser_" + d) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | let O = 0 | |
96 | 96 | ||
97 | 97 | func P () = "resTypesProportions" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func Q (R) = ("stakedPiecesByOwner_" + R) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func S (T) = { | |
104 | 104 | let m = T | |
105 | 105 | if ($isInstanceOf(m, "Int")) | |
106 | 106 | then { | |
107 | 107 | let U = m | |
108 | 108 | U | |
109 | 109 | } | |
110 | 110 | else throw("fail to cast into Int") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func V (W) = { | |
115 | 115 | let m = W | |
116 | 116 | if ($isInstanceOf(m, "(Int, Int)")) | |
117 | 117 | then { | |
118 | 118 | let X = m | |
119 | 119 | X | |
120 | 120 | } | |
121 | 121 | else throw("fail to cast into (Int, Int)") | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func Y (Z) = { | |
126 | 126 | let aa = split(valueOrElse(getString(G, P()), "0_0_0_0_0_0"), "_") | |
127 | 127 | func ab (ac,ad) = (ac + parseIntValue(ad)) | |
128 | 128 | ||
129 | 129 | let ae = { | |
130 | 130 | let af = aa | |
131 | 131 | let ag = size(af) | |
132 | 132 | let ah = 0 | |
133 | 133 | func ai (aj,ak) = if ((ak >= ag)) | |
134 | 134 | then aj | |
135 | 135 | else ab(aj, af[ak]) | |
136 | 136 | ||
137 | 137 | func al (aj,ak) = if ((ak >= ag)) | |
138 | 138 | then aj | |
139 | 139 | else throw("List size exceeds 6") | |
140 | 140 | ||
141 | 141 | al(ai(ai(ai(ai(ai(ai(ah, 0), 1), 2), 3), 4), 5), 6) | |
142 | 142 | } | |
143 | 143 | let am = valueOrElse(getInteger(G, Q(Z)), 0) | |
144 | 144 | [ae, am] | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func an (W,ao) = { | |
149 | 149 | let ap = pow(10, 0, ao, 0, 0, DOWN) | |
150 | 150 | let aq = toString((W % ap)) | |
151 | 151 | let ar = drop(toString(ap), (1 + size(aq))) | |
152 | 152 | (((toString((W / ap)) + ".") + ar) + aq) | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | - | let as = 10000000 | |
157 | - | ||
158 | - | func at () = S(reentrantInvoke(G, "saveLastTx", nil, nil)) | |
159 | - | ||
160 | - | ||
161 | - | func au (d,av,aw) = { | |
162 | - | let ax = (lastBlock.timestamp - aw) | |
163 | - | let ay = fraction(ax, (i * av), (b * q)) | |
164 | - | let az = S(invoke(H, "sellResourcesWorldREADONLY", [ay], nil)) | |
165 | - | let aA = max([0, az]) | |
166 | - | (aA * j) | |
156 | + | func as (W,at) = { | |
157 | + | let au = toString(W) | |
158 | + | let ar = drop(toString(pow(10, 0, (at - size(au)), 0, 0, DOWN)), 1) | |
159 | + | (ar + au) | |
167 | 160 | } | |
168 | 161 | ||
169 | 162 | ||
170 | - | func aB (d,av,aw) = { | |
171 | - | let ax = (lastBlock.timestamp - aw) | |
172 | - | if ((0 > ax)) | |
173 | - | then throw(((("Saved timestamp is in future, saved = " + toString(aw)) + ", current = ") + toString(lastBlock.timestamp))) | |
163 | + | let av = 10000000 | |
164 | + | ||
165 | + | let aw = "3P2NGX4Q5nge1MCauwQW5aqYLdkccSGj1Ep_3P2xFAHW9yhyNohYozWd4HFhEXZu3bsNSoR_3P2yKaZ2gvn9Xe5tti81a7P9LZhHgjvToV9_3P37zQ3cf2ecu55RmJqEiGSivdzN9avt3m9_3P4az6dtzsvGCWFAxa94UdevKzXyEwxEiFG_3P4kZU6X3TTLFcSUe55JSy8BySqitcPgMBz_3P5hCxBEh3NgNizZhNBreyBSqtbhJYLkKPD_3P7HLvucy11yxyMJUwjzXFHHKMEDwi1EwfC_3P8JuaqH9PTQAv8D5HBGgQfKauLTYt2NQft_3P9gTDB4rtDEVbpX3asU63H4Zinh2EnTmZE_3P9iN3qrtfJicUVy7amZeVsetVD3vUMk8be_3PCa2BsAa6JBLirszQfV5r9fJrujfhwtwfP_3PD3i4XN8KtygcFx4ry5M7UGqdfH8VYvtRT_3PDEMnnJNc2kx9cPEmvVvhXUr8SvhANKhsa_3PDGE9tKQizaeZFeDDq5aYSv89nwYbfirpZ_3PDMKQTCrUPZECVXEJJ8m1sHtutSu1naSf1_3PGh2Qu6Yvx8GTCRRVNvBUVZLdaidYSaxo5_3PKkmAtbSK5D2hQdo1RfEg8eXyMbDcRUc92_3PLMnbxzssP8W8E8XjJ1RLBBg8UZL8Cz3P2_3PMuxo4PCAox9s4a7R1eszh4iqqu8gS7jHv_3PNrMtEQChw87WZU1JAJ7aGHykCa8TjnDNK_3PPuBXfWoBy3EEory7c7vgi9Usjka7o5tBj_3PQwyeyEhT4Y6aGAL6tg73aQWJtV1zRt3nR_3PRGDShuMGb84MJtTJvtTg8qDfswkYWcm3e" | |
166 | + | ||
167 | + | let ax = 4970178 | |
168 | + | ||
169 | + | let ay = { | |
170 | + | let m = k | |
171 | + | if ((base58'2W' == m)) | |
172 | + | then 1700524800000 | |
173 | + | else if ((base58'2T' == m)) | |
174 | + | then 1700420400000 | |
175 | + | else throw("Unknown chain") | |
176 | + | } | |
177 | + | ||
178 | + | let az = { | |
179 | + | let m = k | |
180 | + | if ((base58'2W' == m)) | |
181 | + | then 1701043199999 | |
182 | + | else if ((base58'2T' == m)) | |
183 | + | then 1700496000000 | |
184 | + | else throw("Unknown chain") | |
185 | + | } | |
186 | + | ||
187 | + | let aA = "promo2Map" | |
188 | + | ||
189 | + | func aB (d) = contains(aw, d) | |
190 | + | ||
191 | + | ||
192 | + | func aC () = S(reentrantInvoke(G, "saveLastTx", nil, nil)) | |
193 | + | ||
194 | + | ||
195 | + | func aD (d,aE,aF) = { | |
196 | + | let aG = (lastBlock.timestamp - aF) | |
197 | + | let aH = fraction(aG, (i * aE), (b * q)) | |
198 | + | let aI = S(invoke(H, "sellResourcesWorldREADONLY", [aH], nil)) | |
199 | + | let aJ = max([0, aI]) | |
200 | + | (aJ * j) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | func aK (d,aE,aF) = { | |
205 | + | let aG = (lastBlock.timestamp - aF) | |
206 | + | if ((0 > aG)) | |
207 | + | then throw(((("Saved timestamp is in future, saved = " + toString(aF)) + ", current = ") + toString(lastBlock.timestamp))) | |
174 | 208 | else { | |
175 | - | let | |
176 | - | let | |
177 | - | let | |
209 | + | let aH = fraction(aG, (i * aE), (b * q)) | |
210 | + | let aI = S(invoke(H, "sellResourcesWorldREADONLY", [aH], nil)) | |
211 | + | let aJ = if ((0 >= aI)) | |
178 | 212 | then 0 | |
179 | - | else V(invoke(H, "sellResourcesWorld", [d, | |
180 | - | ( | |
213 | + | else V(invoke(H, "sellResourcesWorld", [d, aH], nil))._1 | |
214 | + | (aJ * j) | |
181 | 215 | } | |
182 | 216 | } | |
183 | 217 | ||
184 | 218 | ||
185 | - | func | |
186 | - | let | |
187 | - | let | |
188 | - | let | |
189 | - | let | |
190 | - | let | |
219 | + | func aL (aM,aN,aO,aP) = { | |
220 | + | let aQ = lastBlock.timestamp | |
221 | + | let aR = max([0, (aN - aQ)]) | |
222 | + | let aS = max([0, (aP - aQ)]) | |
223 | + | let aT = (aM + aO) | |
224 | + | let aU = if ((aT == 0)) | |
191 | 225 | then 0 | |
192 | - | else (fraction( | |
193 | - | ( | |
226 | + | else (fraction(aR, aM, aT) + fraction(aS, aO, aT)) | |
227 | + | (aQ + aU) | |
194 | 228 | } | |
195 | 229 | ||
196 | 230 | ||
197 | - | @Callable( | |
198 | - | func constructorV1 ( | |
231 | + | @Callable(aV) | |
232 | + | func constructorV1 (aW,aX) = if ((aV.caller != this)) | |
199 | 233 | then throw("Permission denied") | |
200 | 234 | else if (isDefined(getBinary(L))) | |
201 | 235 | then throw("Already initialized") | |
202 | 236 | else { | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | [ | |
237 | + | let aY = (Y("")[O] + aX) | |
238 | + | let aZ = (a - (aY * q)) | |
239 | + | let ba = Issue("ACRES", "WavesLands land acres investment token", aZ, 8, false, unit, 0) | |
240 | + | let bb = calculateAssetId(ba) | |
241 | + | [ba, IntegerEntry(K, aZ), BinaryEntry(L, bb), StringEntry(z(), aW)] | |
208 | 242 | } | |
209 | 243 | ||
210 | 244 | ||
211 | 245 | ||
212 | - | @Callable( | |
213 | - | func stakeAcres () = if (( | |
246 | + | @Callable(aV) | |
247 | + | func stakeAcres () = if ((aV.caller != this)) | |
214 | 248 | then throw("Temporarily disabled during promo action") | |
215 | 249 | else { | |
216 | - | let | |
217 | - | if (( | |
250 | + | let bc = aC() | |
251 | + | if ((bc == bc)) | |
218 | 252 | then { | |
219 | - | let s = toString( | |
220 | - | if ((size( | |
253 | + | let s = toString(aV.caller) | |
254 | + | if ((size(aV.payments) != 1)) | |
221 | 255 | then throw("exactly 1 payment must be attached") | |
222 | 256 | else { | |
223 | - | let | |
224 | - | let | |
225 | - | if (if (!(isDefined( | |
257 | + | let bd = aV.payments[0] | |
258 | + | let be = bd.amount | |
259 | + | if (if (!(isDefined(bd.assetId))) | |
226 | 260 | then true | |
227 | - | else (value( | |
261 | + | else (value(bd.assetId) != M)) | |
228 | 262 | then throw("ACRES payments only!") | |
229 | 263 | else { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | $Tuple2(((((if (( | |
264 | + | let bf = N(s) | |
265 | + | let bg = c(s) | |
266 | + | let bh = valueOrElse(getInteger(bg), 0) | |
267 | + | let bi = valueOrElse(getInteger(g), 0) | |
268 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
269 | + | let bk = aK(s, bh, valueOrElse(getInteger(bf), 0)) | |
270 | + | $Tuple2(((((if ((bk == 0)) | |
237 | 271 | then nil | |
238 | - | else [ScriptTransfer( | |
272 | + | else [ScriptTransfer(aV.caller, bk, M)]) :+ IntegerEntry(bf, lastBlock.timestamp)) :+ IntegerEntry(bg, (bh + be))) :+ IntegerEntry(g, (bi + be))), $Tuple2(bc, bj)) | |
239 | 273 | } | |
240 | 274 | } | |
241 | 275 | } | |
242 | 276 | else throw("Strict value is not equal to itself.") | |
243 | 277 | } | |
244 | 278 | ||
245 | 279 | ||
246 | 280 | ||
247 | - | @Callable( | |
248 | - | func unstakeAcres ( | |
249 | - | let | |
250 | - | if (( | |
251 | - | then if ((0 >= | |
281 | + | @Callable(aV) | |
282 | + | func unstakeAcres (bl) = { | |
283 | + | let bc = aC() | |
284 | + | if ((bc == bc)) | |
285 | + | then if ((0 >= bl)) | |
252 | 286 | then throw("Amount should be positive") | |
253 | 287 | else { | |
254 | - | let s = toString( | |
255 | - | if ((size( | |
288 | + | let s = toString(aV.caller) | |
289 | + | if ((size(aV.payments) != 0)) | |
256 | 290 | then throw("No payments required") | |
257 | 291 | else { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | if (( | |
262 | - | then throw(((("You have only " + an( | |
292 | + | let bf = N(s) | |
293 | + | let bg = c(s) | |
294 | + | let bh = valueOrElse(getInteger(bg), 0) | |
295 | + | if ((bl > bh)) | |
296 | + | then throw(((("You have only " + an(bh, 8)) + " ACRES staked, tried to unstake ") + an(bl, 8))) | |
263 | 297 | else { | |
264 | - | let bd = valueOrElse(getInteger(e(s)), 0) | |
265 | - | let be = valueOrElse(getInteger(f(s)), 0) | |
266 | - | let aH = lastBlock.timestamp | |
267 | - | let bf = (aY - bd) | |
268 | - | if (if ((be > aH)) | |
269 | - | then (bc > bf) | |
298 | + | let bm = valueOrElse(getInteger(e(s)), 0) | |
299 | + | let bn = valueOrElse(getInteger(f(s)), 0) | |
300 | + | let aQ = lastBlock.timestamp | |
301 | + | let bo = if (aB(s)) | |
302 | + | then ((bh - bm) - ax) | |
303 | + | else (bh - bm) | |
304 | + | if (if ((bn > aQ)) | |
305 | + | then (bl > bo) | |
270 | 306 | else false) | |
271 | - | then throw(((("Only " + an( | |
307 | + | then throw(((("Only " + an(bo, 8)) + " ACRES can be unstaked now, wait until ") + toString(bn))) | |
272 | 308 | else { | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | $Tuple2([IntegerEntry( | |
309 | + | let bi = valueOrElse(getInteger(g), 0) | |
310 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
311 | + | let bk = aK(s, bh, valueOrElse(getInteger(bf), 0)) | |
312 | + | $Tuple2([IntegerEntry(bf, lastBlock.timestamp), IntegerEntry(bg, (bh - bl)), IntegerEntry(g, (bi - bl)), ScriptTransfer(aV.caller, (bl + bk), M)], $Tuple2(bc, bj)) | |
277 | 313 | } | |
278 | 314 | } | |
279 | 315 | } | |
280 | 316 | } | |
281 | 317 | else throw("Strict value is not equal to itself.") | |
282 | 318 | } | |
283 | 319 | ||
284 | 320 | ||
285 | 321 | ||
286 | - | @Callable( | |
322 | + | @Callable(aV) | |
287 | 323 | func stakeAcresLocked () = { | |
288 | - | let | |
289 | - | if (( | |
324 | + | let bc = aC() | |
325 | + | if ((bc == bc)) | |
290 | 326 | then { | |
291 | - | let s = toString( | |
292 | - | if ((size( | |
327 | + | let s = toString(aV.caller) | |
328 | + | if ((size(aV.payments) != 1)) | |
293 | 329 | then throw("exactly 1 payment must be attached") | |
294 | 330 | else { | |
295 | - | let | |
296 | - | let | |
297 | - | if (if (!(isDefined( | |
331 | + | let bd = aV.payments[0] | |
332 | + | let be = bd.amount | |
333 | + | if (if (!(isDefined(bd.assetId))) | |
298 | 334 | then true | |
299 | - | else (value( | |
335 | + | else (value(bd.assetId) != M)) | |
300 | 336 | then throw("ACRES payments only!") | |
301 | - | else if (( | |
302 | - | then throw((("Min staked amount during promo action should be at least " + an( | |
337 | + | else if ((av > be)) | |
338 | + | then throw((("Min staked amount during promo action should be at least " + an(av, 8)) + " ACRES")) | |
303 | 339 | else { | |
304 | - | let ba = invoke(I, "onStakeUnstakeLand", [s], nil) | |
305 | - | if ((ba == ba)) | |
306 | - | then { | |
307 | - | let bg = invoke(this, "sendLockedAcres", [s, aV, 30], nil) | |
308 | - | $Tuple2(nil, $Tuple3(aT, ba, bg)) | |
309 | - | } | |
310 | - | else throw("Strict value is not equal to itself.") | |
340 | + | let aQ = lastBlock.timestamp | |
341 | + | if ((ay > aQ)) | |
342 | + | then throw("Promo2 is not started yet") | |
343 | + | else if ((aQ > az)) | |
344 | + | then throw("Promo2 is already finished") | |
345 | + | else { | |
346 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
347 | + | if ((bj == bj)) | |
348 | + | then { | |
349 | + | let bp = invoke(this, "sendLockedAcres", [s, be, 30], nil) | |
350 | + | let bq = valueOrElse(getString(aA), "") | |
351 | + | let br = if (contains(bq, s)) | |
352 | + | then { | |
353 | + | let bs = split_51C(bq, s) | |
354 | + | let aM = parseIntValue(take(drop(bs[1], 1), 14)) | |
355 | + | ((((bs[0] + s) + ":") + as((aM + be), 14)) + drop(bs[1], 15)) | |
356 | + | } | |
357 | + | else { | |
358 | + | let bt = ((s + ":") + as(be, 14)) | |
359 | + | if ((bq == "")) | |
360 | + | then bt | |
361 | + | else ((bq + "_") + bt) | |
362 | + | } | |
363 | + | $Tuple2([StringEntry(aA, br)], $Tuple3(bc, bj, bp)) | |
364 | + | } | |
365 | + | else throw("Strict value is not equal to itself.") | |
366 | + | } | |
311 | 367 | } | |
312 | 368 | } | |
313 | 369 | } | |
314 | 370 | else throw("Strict value is not equal to itself.") | |
315 | 371 | } | |
316 | 372 | ||
317 | 373 | ||
318 | 374 | ||
319 | - | @Callable( | |
375 | + | @Callable(aV) | |
320 | 376 | func buyAcres () = { | |
321 | - | let | |
322 | - | if (( | |
377 | + | let bc = aC() | |
378 | + | if ((bc == bc)) | |
323 | 379 | then { | |
324 | - | let s = toString( | |
325 | - | if ((size( | |
380 | + | let s = toString(aV.caller) | |
381 | + | if ((size(aV.payments) != 1)) | |
326 | 382 | then throw("exactly 1 payment must be attached") | |
327 | 383 | else { | |
328 | - | let | |
329 | - | let | |
330 | - | if (if (!(isDefined( | |
384 | + | let bd = aV.payments[0] | |
385 | + | let be = bd.amount | |
386 | + | if (if (!(isDefined(bd.assetId))) | |
331 | 387 | then true | |
332 | - | else (value( | |
388 | + | else (value(bd.assetId) != l)) | |
333 | 389 | then throw("USDT payments only!") | |
334 | - | else if ((p > | |
390 | + | else if ((p > be)) | |
335 | 391 | then throw((("Min payment should be " + an(p, 6)) + " USDT")) | |
336 | 392 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | $Tuple2([ScriptTransfer(H, | |
393 | + | let aE = (be * j) | |
394 | + | let bu = S(invoke(G, "updateAccStats", [s, fraction(h, aE, (25 * q))], nil)) | |
395 | + | $Tuple2([ScriptTransfer(H, be, l), ScriptTransfer(aV.caller, aE, M)], $Tuple2(bc, bu)) | |
340 | 396 | } | |
341 | 397 | } | |
342 | 398 | } | |
343 | 399 | else throw("Strict value is not equal to itself.") | |
344 | 400 | } | |
345 | 401 | ||
346 | 402 | ||
347 | 403 | ||
348 | - | @Callable( | |
349 | - | func sendAcres (d, | |
404 | + | @Callable(aV) | |
405 | + | func sendAcres (d,bl) = if ((aV.caller != H)) | |
350 | 406 | then throw("Permission denied") | |
351 | - | else $Tuple2([ScriptTransfer(addressFromStringValue(d), | |
407 | + | else $Tuple2([ScriptTransfer(addressFromStringValue(d), bl, M)], bl) | |
352 | 408 | ||
353 | 409 | ||
354 | 410 | ||
355 | - | @Callable( | |
356 | - | func sendLockedAcres (d, | |
357 | - | then ( | |
411 | + | @Callable(aV) | |
412 | + | func sendLockedAcres (d,bl,bv) = if (if ((aV.caller != this)) | |
413 | + | then (aV.caller != F) | |
358 | 414 | else false) | |
359 | 415 | then throw("Permission denied") | |
360 | 416 | else { | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | $Tuple2([IntegerEntry( | |
417 | + | let aQ = lastBlock.timestamp | |
418 | + | let bf = N(d) | |
419 | + | let bg = c(d) | |
420 | + | let bh = valueOrElse(getInteger(bg), 0) | |
421 | + | let bi = valueOrElse(getInteger(g), 0) | |
422 | + | let bw = valueOrElse(getInteger(bf), aQ) | |
423 | + | let bx = f(d) | |
424 | + | let by = e(d) | |
425 | + | let bz = valueOrElse(getInteger(by), 0) | |
426 | + | let bA = valueOrElse(getInteger(bx), 0) | |
427 | + | let bB = aL(bz, bA, bl, (aQ + (bv * b))) | |
428 | + | $Tuple2([IntegerEntry(bf, bw), IntegerEntry(bg, (bh + bl)), IntegerEntry(g, (bi + bl)), IntegerEntry(bx, bB), IntegerEntry(by, (bz + bl))], bl) | |
373 | 429 | } | |
374 | 430 | ||
375 | 431 | ||
376 | 432 | ||
377 | - | @Callable( | |
378 | - | func burnAcres ( | |
433 | + | @Callable(aV) | |
434 | + | func burnAcres (bl) = if ((aV.caller != G)) | |
379 | 435 | then throw("Permission denied") | |
380 | 436 | else { | |
381 | - | let | |
382 | - | if ((0 > | |
437 | + | let bC = (valueOrElse(getInteger(K), 0) - bl) | |
438 | + | if ((0 > bC)) | |
383 | 439 | then throw("Attempt to burn more ACRES, than exists") | |
384 | - | else $Tuple2([Burn(M, | |
440 | + | else $Tuple2([Burn(M, bl), IntegerEntry(K, bC)], bl) | |
385 | 441 | } | |
386 | 442 | ||
387 | 443 | ||
388 | 444 | ||
389 | - | @Callable( | |
445 | + | @Callable(aV) | |
390 | 446 | func claimAcres () = { | |
391 | - | let | |
392 | - | if (( | |
447 | + | let bc = aC() | |
448 | + | if ((bc == bc)) | |
393 | 449 | then { | |
394 | - | let s = toString( | |
395 | - | if ((size( | |
450 | + | let s = toString(aV.caller) | |
451 | + | if ((size(aV.payments) != 0)) | |
396 | 452 | then throw("No payments required") | |
397 | 453 | else { | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | $Tuple2([IntegerEntry( | |
454 | + | let bf = N(s) | |
455 | + | let bg = c(s) | |
456 | + | let aE = valueOrElse(getInteger(bg), 0) | |
457 | + | let bj = invoke(I, "onStakeUnstakeLand", [s], nil) | |
458 | + | let bk = aK(s, aE, valueOrElse(getInteger(bf), 0)) | |
459 | + | $Tuple2([IntegerEntry(bf, lastBlock.timestamp), ScriptTransfer(aV.caller, bk, M)], $Tuple2(bc, bj)) | |
404 | 460 | } | |
405 | 461 | } | |
406 | 462 | else throw("Strict value is not equal to itself.") | |
407 | 463 | } | |
408 | 464 | ||
409 | 465 | ||
410 | 466 | ||
411 | - | @Callable( | |
467 | + | @Callable(aV) | |
412 | 468 | func claimAcresREADONLY (s) = { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | $Tuple2(nil, [ | |
469 | + | let bf = N(s) | |
470 | + | let bg = c(s) | |
471 | + | let aE = valueOrElse(getInteger(bg), 0) | |
472 | + | let bD = valueOrElse(getInteger(bf), 0) | |
473 | + | let bk = aD(s, aE, bD) | |
474 | + | $Tuple2(nil, [bk, bD]) | |
419 | 475 | } | |
420 | 476 | ||
421 | 477 |
github/deemru/w8io/169f3d6 104.93 ms ◑