tx · 7BL5dmwEYLNmezGLzG7RY1Beb1cJYrMb367BmnhYesBF 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg: -0.00800000 Waves 2024.09.13 17:17 [3281975] smart account 3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg > SELF 0.00000000 Waves
{ "type": 13, "id": "7BL5dmwEYLNmezGLzG7RY1Beb1cJYrMb367BmnhYesBF", "fee": 800000, "feeAssetId": null, "timestamp": 1726237108572, "version": 2, "chainId": 84, "sender": "3N7dQeENwSgKPp9Ki4aEHhRWWKVjn1DE9Qg", "senderPublicKey": "5BN6FQeKuMm2XJYToUZvbBX4UELGpE3Z47P4q6sP46PG", "proofs": [ "5ggAMFxNJERQFKPo6UKPh7BLKfqg94gyELFGvwz2CysYLgiUtNEzEGYDn1B4PN54izKEXSRbZ1xgEjFHj6kiQQVn" ], "script": "base64:BgIdCAISBAoCCAESBAoCAQgSAwoBCBIDCgEBEgMKAQguAAVjaGFpbgkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQAVZGVmYXVsdFJlc3RBZGRyZXNzU3RyBAckbWF0Y2gwBQVjaGFpbgMJAAACAQFXBQckbWF0Y2gwAiMzUFFDdXZGYnZoNExrUFVucm5VMXozam5iQTFwOW0zV05odgMJAAACAQFUBQckbWF0Y2gwAiMzTXVta0dHenRDS0FYcFdEcXhrZGRvZnFYU1VicVFrdlNKeQkAAgECDVVua25vd24gY2hhaW4AEGFjcmVzMkFkZHJlc3NTdHIEByRtYXRjaDAFBWNoYWluAwkAAAIBAVcFByRtYXRjaDACIzNQNFVIM1Q5blhwTU5wVW1TbVFqUG1FejNHODV0M3puNmVBAwkAAAIBAVQFByRtYXRjaDACIzNOQlB4MUZjaXUzSlFORUdaMjFqU25UZHV0TE5HR0JVU1hoCQACAQINVW5rbm93biBjaGFpbgADU0VQAgJfXwAFTVVMVDgAgMLXLwEPZ2V0U3RyaW5nT3JGYWlsAgdhZGRyZXNzA2tleQkBE3Zh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VzU3Rha2VkQW1vdW50QnlVc2VyAQUHYWRkcmVzcwQLYWNyZXNBbW91bnQJAQt2YWx1ZU9yRWxzZQIJAJ8IAQUJYW1vdW50S2V5AAAECGxhc3RUaW1lCQELdmFsdWVPckVsc2UCCQCfCAEFB3RpbWVLZXkAAAQMY2xhaW1lZEFjcmVzCQESY2xhaW1BY3Jlc0ludGVybmFsAwUHYWRkcmVzcwULYWNyZXNBbW91bnQFCGxhc3RUaW1lCQCUCgIFA25pbAkAzAgCBQxjbGFpbWVkQWNyZXMJAMwIAgUIbGFzdFRpbWUFA25pbACIAQRT", "height": 3281975, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 95ubc5EYtRyPPJgZokfyZ1SMfA8MXfRCn9XuJDXWckAh Next: 2jGDdtqxis5m52qzjswowB72TUw7E1ZMY8vbnryyBigh Diff:
Old | New | Differences | |
---|---|---|---|
156 | 156 | ||
157 | 157 | let as = 4970178 | |
158 | 158 | ||
159 | - | let at = { | |
160 | - | let c = a | |
161 | - | if ((base58'2W' == c)) | |
162 | - | then 1700524800000 | |
163 | - | else if ((base58'2T' == c)) | |
164 | - | then 1700420400000 | |
165 | - | else throw("Unknown chain") | |
166 | - | } | |
167 | - | ||
168 | - | let au = { | |
169 | - | let c = a | |
170 | - | if ((base58'2W' == c)) | |
171 | - | then 1701043199999 | |
172 | - | else if ((base58'2T' == c)) | |
173 | - | then 1700496000000 | |
174 | - | else throw("Unknown chain") | |
175 | - | } | |
176 | - | ||
177 | - | func av (D) = contains(ar, D) | |
159 | + | func at (D) = contains(ar, D) | |
178 | 160 | ||
179 | 161 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | ( | |
162 | + | func au (D,av,aw) = { | |
163 | + | let ax = (ai() - aw) | |
164 | + | let ay = fraction(ax, (aj * av), (am * f)) | |
165 | + | let az = I(invoke(w, "sellResourcesWorldREADONLY", [ay], nil)) | |
166 | + | let aA = max([0, az]) | |
167 | + | (aA * ak) | |
186 | 168 | } | |
187 | 169 | ||
188 | 170 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ((0 > | |
192 | - | then throw(((("Saved timestamp is in future, saved = " + toString( | |
171 | + | func aB (D,av,aw) = { | |
172 | + | let ax = (ai() - aw) | |
173 | + | if ((0 > ax)) | |
174 | + | then throw(((("Saved timestamp is in future, saved = " + toString(aw)) + ", final = ") + toString(ai()))) | |
193 | 175 | else { | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
176 | + | let ay = fraction(ax, (aj * av), (am * f)) | |
177 | + | let az = I(invoke(w, "sellResourcesWorldREADONLY", [ay], nil)) | |
178 | + | let aA = if ((0 >= az)) | |
197 | 179 | then 0 | |
198 | - | else L(invoke(w, "sellResourcesWorld", [D, | |
199 | - | ( | |
180 | + | else L(invoke(w, "sellResourcesWorld", [D, ay], nil))._1 | |
181 | + | (aA * ak) | |
200 | 182 | } | |
201 | 183 | } | |
202 | 184 | ||
203 | 185 | ||
204 | - | func | |
205 | - | let | |
206 | - | let | |
207 | - | $Tuple2( | |
186 | + | func aC (aD,h) = { | |
187 | + | let aE = C(h) | |
188 | + | let aF = au(h, aD, valueOrElse(getInteger(aE), 0)) | |
189 | + | $Tuple2(aD, aF) | |
208 | 190 | } | |
209 | 191 | ||
210 | 192 | ||
211 | - | func aI (aF,h) = if ((0 >= aF)) | |
212 | - | then throw("Amount should be positive") | |
213 | - | else { | |
214 | - | let aG = C(h) | |
215 | - | let aJ = an(h) | |
216 | - | let aK = valueOrElse(getInteger(aJ), 0) | |
217 | - | if ((aF > aK)) | |
218 | - | then throw(((("You have only " + ad(aK, 8)) + " ACRES staked, tried to unstake ") + ad(aF, 8))) | |
219 | - | else { | |
220 | - | let aL = valueOrElse(getInteger(ao(h)), 0) | |
221 | - | let aM = valueOrElse(getInteger(ap(h)), 0) | |
222 | - | let aN = lastBlock.timestamp | |
223 | - | if (if ((aN >= at)) | |
224 | - | then (au >= aN) | |
225 | - | else false) | |
226 | - | then throw("You cannot unstake ACRES during Promo2") | |
227 | - | else { | |
228 | - | let aO = if (av(h)) | |
229 | - | then ((aK - aL) - as) | |
230 | - | else (aK - aL) | |
231 | - | if (if ((aM > aN)) | |
232 | - | then (aF > aO) | |
233 | - | else false) | |
234 | - | then throw(((("Only " + ad(aO, 8)) + " ACRES can be unstaked now, wait until ") + toString(aM))) | |
235 | - | else { | |
236 | - | let aP = valueOrElse(getInteger(aq), 0) | |
237 | - | let aQ = invoke(x, "onStakeUnstakeLand", [h], nil) | |
238 | - | let aH = aD(h, aK, valueOrElse(getInteger(aG), 0)) | |
239 | - | $Tuple2([IntegerEntry(aG, lastBlock.timestamp), IntegerEntry(aJ, (aK - aF)), IntegerEntry(aq, (aP - aF)), ScriptTransfer(addressFromStringValue(h), (aF + aH), B)], $Tuple2((aF + aH), aQ)) | |
240 | - | } | |
241 | - | } | |
242 | - | } | |
243 | - | } | |
244 | - | ||
245 | - | ||
246 | - | @Callable(aR) | |
247 | - | func constructorV1 (aS,aT) = if ((aR.caller != this)) | |
193 | + | @Callable(aG) | |
194 | + | func constructorV1 (aH,aI) = if ((aG.caller != this)) | |
248 | 195 | then throw("Permission denied") | |
249 | 196 | else if (isDefined(getBinary(A))) | |
250 | 197 | then throw("Already initialized") | |
251 | 198 | else { | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | [ | |
199 | + | let aJ = (O("")[E] + aI) | |
200 | + | let aK = (al - (aJ * f)) | |
201 | + | let aL = Issue("ACRES", "WavesLands land acres investment token", aK, 8, false, unit, 0) | |
202 | + | let aM = calculateAssetId(aL) | |
203 | + | [aL, IntegerEntry(z, aK), BinaryEntry(A, aM), StringEntry(o(), aH)] | |
257 | 204 | } | |
258 | 205 | ||
259 | 206 | ||
260 | 207 | ||
261 | - | @Callable( | |
262 | - | func unstakeAcresCallback ( | |
208 | + | @Callable(aG) | |
209 | + | func unstakeAcresCallback (aD,h) = if ((toString(aG.caller) != d)) | |
263 | 210 | then throw("Permission denied") | |
264 | - | else aI(aF, h) | |
211 | + | else if ((0 >= aD)) | |
212 | + | then throw("Amount should be positive") | |
213 | + | else { | |
214 | + | let aE = C(h) | |
215 | + | let aN = an(h) | |
216 | + | let aO = valueOrElse(getInteger(aN), 0) | |
217 | + | if ((aD > aO)) | |
218 | + | then throw(((("You have only " + ad(aO, 8)) + " ACRES staked, tried to unstake ") + ad(aD, 8))) | |
219 | + | else { | |
220 | + | let aP = valueOrElse(getInteger(ao(h)), 0) | |
221 | + | let aQ = valueOrElse(getInteger(ap(h)), 0) | |
222 | + | let aR = lastBlock.timestamp | |
223 | + | let aS = if (at(h)) | |
224 | + | then ((aO - aP) - as) | |
225 | + | else (aO - aP) | |
226 | + | if (if ((aQ > aR)) | |
227 | + | then (aD > aS) | |
228 | + | else false) | |
229 | + | then throw(((("Only " + ad(aS, 8)) + " ACRES can be unstaked now, wait until ") + toString(aQ))) | |
230 | + | else { | |
231 | + | let aT = valueOrElse(getInteger(aq), 0) | |
232 | + | let aU = invoke(x, "onStakeUnstakeLand", [h], nil) | |
233 | + | let aF = aB(h, aO, valueOrElse(getInteger(aE), 0)) | |
234 | + | $Tuple2([IntegerEntry(aE, lastBlock.timestamp), IntegerEntry(aN, (aO - aD)), IntegerEntry(aq, (aT - aD)), ScriptTransfer(aG.caller, (aD + aF), B)], $Tuple2((aD + aF), aU)) | |
235 | + | } | |
236 | + | } | |
237 | + | } | |
265 | 238 | ||
266 | 239 | ||
267 | 240 | ||
268 | - | @Callable( | |
241 | + | @Callable(aG) | |
269 | 242 | func unstakeAllAcresREADONLY (h) = { | |
270 | - | let | |
271 | - | let | |
272 | - | $Tuple2(nil, | |
243 | + | let aD = valueOrElse(getInteger(an(h)), 0) | |
244 | + | let aV = aC(aD, h) | |
245 | + | $Tuple2(nil, aV) | |
273 | 246 | } | |
274 | 247 | ||
275 | 248 | ||
276 | 249 | ||
277 | - | @Callable( | |
278 | - | func requestAcresCallback ( | |
250 | + | @Callable(aG) | |
251 | + | func requestAcresCallback (aD) = if ((toString(aG.caller) != d)) | |
279 | 252 | then throw("Permission denied") | |
280 | - | else $Tuple2([ScriptTransfer( | |
253 | + | else $Tuple2([ScriptTransfer(aG.caller, aD, B)], aD) | |
281 | 254 | ||
282 | 255 | ||
283 | 256 | ||
284 | - | @Callable( | |
257 | + | @Callable(aG) | |
285 | 258 | func claimAcresREADONLY (h) = { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | $Tuple2(nil, [ | |
259 | + | let aE = C(h) | |
260 | + | let aN = an(h) | |
261 | + | let av = valueOrElse(getInteger(aN), 0) | |
262 | + | let aW = valueOrElse(getInteger(aE), 0) | |
263 | + | let aF = au(h, av, aW) | |
264 | + | $Tuple2(nil, [aF, aW]) | |
292 | 265 | } | |
293 | 266 | ||
294 | 267 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = take(drop(this.bytes, 1), 1) | |
5 | 5 | ||
6 | 6 | let b = { | |
7 | 7 | let c = a | |
8 | 8 | if ((base58'2W' == c)) | |
9 | 9 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
10 | 10 | else if ((base58'2T' == c)) | |
11 | 11 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let d = { | |
16 | 16 | let c = a | |
17 | 17 | if ((base58'2W' == c)) | |
18 | 18 | then "3P4UH3T9nXpMNpUmSmQjPmEz3G85t3zn6eA" | |
19 | 19 | else if ((base58'2T' == c)) | |
20 | 20 | then "3NBPx1Fciu3JQNEGZ21jSnTdutLNGGBUSXh" | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let e = "__" | |
25 | 25 | ||
26 | 26 | let f = 100000000 | |
27 | 27 | ||
28 | 28 | func g (h,i) = valueOrErrorMessage(getString(h, i), makeString(["mandatory ", toString(h), ".", i, " is not defined"], "")) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let j = 1 | |
32 | 32 | ||
33 | 33 | let k = 2 | |
34 | 34 | ||
35 | 35 | let l = 4 | |
36 | 36 | ||
37 | 37 | let m = 8 | |
38 | 38 | ||
39 | 39 | func n () = "%s__restConfig" | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func o () = "%s__restAddr" | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func p (q) = split_4C(g(q, n()), e) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func r (s,t) = valueOrErrorMessage(addressFromString(s[t]), ("Rest cfg doesn't contain address at index " + toString(t))) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | let u = addressFromStringValue(valueOrElse(getString(this, o()), b)) | |
52 | 52 | ||
53 | 53 | let s = p(u) | |
54 | 54 | ||
55 | 55 | let v = r(s, j) | |
56 | 56 | ||
57 | 57 | let w = r(s, k) | |
58 | 58 | ||
59 | 59 | let x = r(s, l) | |
60 | 60 | ||
61 | 61 | let y = r(s, m) | |
62 | 62 | ||
63 | 63 | let z = "acresIssuedAmount" | |
64 | 64 | ||
65 | 65 | let A = "acresAssetId" | |
66 | 66 | ||
67 | 67 | let B = valueOrErrorMessage(getBinary(y, A), "ACRES is not issued yet") | |
68 | 68 | ||
69 | 69 | func C (D) = ("acresStakedTimeByUser_" + D) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | let E = 0 | |
73 | 73 | ||
74 | 74 | func F () = "resTypesProportions" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func G (H) = ("stakedPiecesByOwner_" + H) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func I (J) = { | |
81 | 81 | let c = J | |
82 | 82 | if ($isInstanceOf(c, "Int")) | |
83 | 83 | then { | |
84 | 84 | let K = c | |
85 | 85 | K | |
86 | 86 | } | |
87 | 87 | else throw("fail to cast into Int") | |
88 | 88 | } | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func L (M) = { | |
92 | 92 | let c = M | |
93 | 93 | if ($isInstanceOf(c, "(Int, Int)")) | |
94 | 94 | then { | |
95 | 95 | let N = c | |
96 | 96 | N | |
97 | 97 | } | |
98 | 98 | else throw("fail to cast into (Int, Int)") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func O (P) = { | |
103 | 103 | let Q = split(valueOrElse(getString(v, F()), "0_0_0_0_0_0"), "_") | |
104 | 104 | func R (S,T) = (S + parseIntValue(T)) | |
105 | 105 | ||
106 | 106 | let U = { | |
107 | 107 | let V = Q | |
108 | 108 | let W = size(V) | |
109 | 109 | let X = 0 | |
110 | 110 | func Y (Z,aa) = if ((aa >= W)) | |
111 | 111 | then Z | |
112 | 112 | else R(Z, V[aa]) | |
113 | 113 | ||
114 | 114 | func ab (Z,aa) = if ((aa >= W)) | |
115 | 115 | then Z | |
116 | 116 | else throw("List size exceeds 6") | |
117 | 117 | ||
118 | 118 | ab(Y(Y(Y(Y(Y(Y(X, 0), 1), 2), 3), 4), 5), 6) | |
119 | 119 | } | |
120 | 120 | let ac = valueOrElse(getInteger(v, G(P)), 0) | |
121 | 121 | [U, ac] | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func ad (M,ae) = { | |
126 | 126 | let af = pow(10, 0, ae, 0, 0, DOWN) | |
127 | 127 | let ag = toString((M % af)) | |
128 | 128 | let ah = drop(toString(af), (1 + size(ag))) | |
129 | 129 | (((toString((M / af)) + ".") + ah) + ag) | |
130 | 130 | } | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func ai () = min([lastBlock.timestamp, 1727740799000]) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | let aj = 3456000 | |
137 | 137 | ||
138 | 138 | let ak = 10 | |
139 | 139 | ||
140 | 140 | let al = 100000000000000 | |
141 | 141 | ||
142 | 142 | let am = 86400000 | |
143 | 143 | ||
144 | 144 | func an (D) = ("acresStakedAmountByUser_" + D) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func ao (D) = ("acresLockedAmountByUser_" + D) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func ap (D) = ("acresLockedEtaByUser_" + D) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | let aq = "acresStakedAmountTotal" | |
154 | 154 | ||
155 | 155 | let ar = "3P2NGX4Q5nge1MCauwQW5aqYLdkccSGj1Ep_3P2xFAHW9yhyNohYozWd4HFhEXZu3bsNSoR_3P2yKaZ2gvn9Xe5tti81a7P9LZhHgjvToV9_3P37zQ3cf2ecu55RmJqEiGSivdzN9avt3m9_3P4az6dtzsvGCWFAxa94UdevKzXyEwxEiFG_3P4kZU6X3TTLFcSUe55JSy8BySqitcPgMBz_3P5hCxBEh3NgNizZhNBreyBSqtbhJYLkKPD_3P7HLvucy11yxyMJUwjzXFHHKMEDwi1EwfC_3P8JuaqH9PTQAv8D5HBGgQfKauLTYt2NQft_3P9gTDB4rtDEVbpX3asU63H4Zinh2EnTmZE_3P9iN3qrtfJicUVy7amZeVsetVD3vUMk8be_3PCa2BsAa6JBLirszQfV5r9fJrujfhwtwfP_3PD3i4XN8KtygcFx4ry5M7UGqdfH8VYvtRT_3PDEMnnJNc2kx9cPEmvVvhXUr8SvhANKhsa_3PDGE9tKQizaeZFeDDq5aYSv89nwYbfirpZ_3PDMKQTCrUPZECVXEJJ8m1sHtutSu1naSf1_3PGh2Qu6Yvx8GTCRRVNvBUVZLdaidYSaxo5_3PKkmAtbSK5D2hQdo1RfEg8eXyMbDcRUc92_3PLMnbxzssP8W8E8XjJ1RLBBg8UZL8Cz3P2_3PMuxo4PCAox9s4a7R1eszh4iqqu8gS7jHv_3PNrMtEQChw87WZU1JAJ7aGHykCa8TjnDNK_3PPuBXfWoBy3EEory7c7vgi9Usjka7o5tBj_3PQwyeyEhT4Y6aGAL6tg73aQWJtV1zRt3nR_3PRGDShuMGb84MJtTJvtTg8qDfswkYWcm3e" | |
156 | 156 | ||
157 | 157 | let as = 4970178 | |
158 | 158 | ||
159 | - | let at = { | |
160 | - | let c = a | |
161 | - | if ((base58'2W' == c)) | |
162 | - | then 1700524800000 | |
163 | - | else if ((base58'2T' == c)) | |
164 | - | then 1700420400000 | |
165 | - | else throw("Unknown chain") | |
166 | - | } | |
167 | - | ||
168 | - | let au = { | |
169 | - | let c = a | |
170 | - | if ((base58'2W' == c)) | |
171 | - | then 1701043199999 | |
172 | - | else if ((base58'2T' == c)) | |
173 | - | then 1700496000000 | |
174 | - | else throw("Unknown chain") | |
175 | - | } | |
176 | - | ||
177 | - | func av (D) = contains(ar, D) | |
159 | + | func at (D) = contains(ar, D) | |
178 | 160 | ||
179 | 161 | ||
180 | - | func | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | ( | |
162 | + | func au (D,av,aw) = { | |
163 | + | let ax = (ai() - aw) | |
164 | + | let ay = fraction(ax, (aj * av), (am * f)) | |
165 | + | let az = I(invoke(w, "sellResourcesWorldREADONLY", [ay], nil)) | |
166 | + | let aA = max([0, az]) | |
167 | + | (aA * ak) | |
186 | 168 | } | |
187 | 169 | ||
188 | 170 | ||
189 | - | func | |
190 | - | let | |
191 | - | if ((0 > | |
192 | - | then throw(((("Saved timestamp is in future, saved = " + toString( | |
171 | + | func aB (D,av,aw) = { | |
172 | + | let ax = (ai() - aw) | |
173 | + | if ((0 > ax)) | |
174 | + | then throw(((("Saved timestamp is in future, saved = " + toString(aw)) + ", final = ") + toString(ai()))) | |
193 | 175 | else { | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
176 | + | let ay = fraction(ax, (aj * av), (am * f)) | |
177 | + | let az = I(invoke(w, "sellResourcesWorldREADONLY", [ay], nil)) | |
178 | + | let aA = if ((0 >= az)) | |
197 | 179 | then 0 | |
198 | - | else L(invoke(w, "sellResourcesWorld", [D, | |
199 | - | ( | |
180 | + | else L(invoke(w, "sellResourcesWorld", [D, ay], nil))._1 | |
181 | + | (aA * ak) | |
200 | 182 | } | |
201 | 183 | } | |
202 | 184 | ||
203 | 185 | ||
204 | - | func | |
205 | - | let | |
206 | - | let | |
207 | - | $Tuple2( | |
186 | + | func aC (aD,h) = { | |
187 | + | let aE = C(h) | |
188 | + | let aF = au(h, aD, valueOrElse(getInteger(aE), 0)) | |
189 | + | $Tuple2(aD, aF) | |
208 | 190 | } | |
209 | 191 | ||
210 | 192 | ||
211 | - | func aI (aF,h) = if ((0 >= aF)) | |
212 | - | then throw("Amount should be positive") | |
213 | - | else { | |
214 | - | let aG = C(h) | |
215 | - | let aJ = an(h) | |
216 | - | let aK = valueOrElse(getInteger(aJ), 0) | |
217 | - | if ((aF > aK)) | |
218 | - | then throw(((("You have only " + ad(aK, 8)) + " ACRES staked, tried to unstake ") + ad(aF, 8))) | |
219 | - | else { | |
220 | - | let aL = valueOrElse(getInteger(ao(h)), 0) | |
221 | - | let aM = valueOrElse(getInteger(ap(h)), 0) | |
222 | - | let aN = lastBlock.timestamp | |
223 | - | if (if ((aN >= at)) | |
224 | - | then (au >= aN) | |
225 | - | else false) | |
226 | - | then throw("You cannot unstake ACRES during Promo2") | |
227 | - | else { | |
228 | - | let aO = if (av(h)) | |
229 | - | then ((aK - aL) - as) | |
230 | - | else (aK - aL) | |
231 | - | if (if ((aM > aN)) | |
232 | - | then (aF > aO) | |
233 | - | else false) | |
234 | - | then throw(((("Only " + ad(aO, 8)) + " ACRES can be unstaked now, wait until ") + toString(aM))) | |
235 | - | else { | |
236 | - | let aP = valueOrElse(getInteger(aq), 0) | |
237 | - | let aQ = invoke(x, "onStakeUnstakeLand", [h], nil) | |
238 | - | let aH = aD(h, aK, valueOrElse(getInteger(aG), 0)) | |
239 | - | $Tuple2([IntegerEntry(aG, lastBlock.timestamp), IntegerEntry(aJ, (aK - aF)), IntegerEntry(aq, (aP - aF)), ScriptTransfer(addressFromStringValue(h), (aF + aH), B)], $Tuple2((aF + aH), aQ)) | |
240 | - | } | |
241 | - | } | |
242 | - | } | |
243 | - | } | |
244 | - | ||
245 | - | ||
246 | - | @Callable(aR) | |
247 | - | func constructorV1 (aS,aT) = if ((aR.caller != this)) | |
193 | + | @Callable(aG) | |
194 | + | func constructorV1 (aH,aI) = if ((aG.caller != this)) | |
248 | 195 | then throw("Permission denied") | |
249 | 196 | else if (isDefined(getBinary(A))) | |
250 | 197 | then throw("Already initialized") | |
251 | 198 | else { | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | [ | |
199 | + | let aJ = (O("")[E] + aI) | |
200 | + | let aK = (al - (aJ * f)) | |
201 | + | let aL = Issue("ACRES", "WavesLands land acres investment token", aK, 8, false, unit, 0) | |
202 | + | let aM = calculateAssetId(aL) | |
203 | + | [aL, IntegerEntry(z, aK), BinaryEntry(A, aM), StringEntry(o(), aH)] | |
257 | 204 | } | |
258 | 205 | ||
259 | 206 | ||
260 | 207 | ||
261 | - | @Callable( | |
262 | - | func unstakeAcresCallback ( | |
208 | + | @Callable(aG) | |
209 | + | func unstakeAcresCallback (aD,h) = if ((toString(aG.caller) != d)) | |
263 | 210 | then throw("Permission denied") | |
264 | - | else aI(aF, h) | |
211 | + | else if ((0 >= aD)) | |
212 | + | then throw("Amount should be positive") | |
213 | + | else { | |
214 | + | let aE = C(h) | |
215 | + | let aN = an(h) | |
216 | + | let aO = valueOrElse(getInteger(aN), 0) | |
217 | + | if ((aD > aO)) | |
218 | + | then throw(((("You have only " + ad(aO, 8)) + " ACRES staked, tried to unstake ") + ad(aD, 8))) | |
219 | + | else { | |
220 | + | let aP = valueOrElse(getInteger(ao(h)), 0) | |
221 | + | let aQ = valueOrElse(getInteger(ap(h)), 0) | |
222 | + | let aR = lastBlock.timestamp | |
223 | + | let aS = if (at(h)) | |
224 | + | then ((aO - aP) - as) | |
225 | + | else (aO - aP) | |
226 | + | if (if ((aQ > aR)) | |
227 | + | then (aD > aS) | |
228 | + | else false) | |
229 | + | then throw(((("Only " + ad(aS, 8)) + " ACRES can be unstaked now, wait until ") + toString(aQ))) | |
230 | + | else { | |
231 | + | let aT = valueOrElse(getInteger(aq), 0) | |
232 | + | let aU = invoke(x, "onStakeUnstakeLand", [h], nil) | |
233 | + | let aF = aB(h, aO, valueOrElse(getInteger(aE), 0)) | |
234 | + | $Tuple2([IntegerEntry(aE, lastBlock.timestamp), IntegerEntry(aN, (aO - aD)), IntegerEntry(aq, (aT - aD)), ScriptTransfer(aG.caller, (aD + aF), B)], $Tuple2((aD + aF), aU)) | |
235 | + | } | |
236 | + | } | |
237 | + | } | |
265 | 238 | ||
266 | 239 | ||
267 | 240 | ||
268 | - | @Callable( | |
241 | + | @Callable(aG) | |
269 | 242 | func unstakeAllAcresREADONLY (h) = { | |
270 | - | let | |
271 | - | let | |
272 | - | $Tuple2(nil, | |
243 | + | let aD = valueOrElse(getInteger(an(h)), 0) | |
244 | + | let aV = aC(aD, h) | |
245 | + | $Tuple2(nil, aV) | |
273 | 246 | } | |
274 | 247 | ||
275 | 248 | ||
276 | 249 | ||
277 | - | @Callable( | |
278 | - | func requestAcresCallback ( | |
250 | + | @Callable(aG) | |
251 | + | func requestAcresCallback (aD) = if ((toString(aG.caller) != d)) | |
279 | 252 | then throw("Permission denied") | |
280 | - | else $Tuple2([ScriptTransfer( | |
253 | + | else $Tuple2([ScriptTransfer(aG.caller, aD, B)], aD) | |
281 | 254 | ||
282 | 255 | ||
283 | 256 | ||
284 | - | @Callable( | |
257 | + | @Callable(aG) | |
285 | 258 | func claimAcresREADONLY (h) = { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | $Tuple2(nil, [ | |
259 | + | let aE = C(h) | |
260 | + | let aN = an(h) | |
261 | + | let av = valueOrElse(getInteger(aN), 0) | |
262 | + | let aW = valueOrElse(getInteger(aE), 0) | |
263 | + | let aF = au(h, av, aW) | |
264 | + | $Tuple2(nil, [aF, aW]) | |
292 | 265 | } | |
293 | 266 | ||
294 | 267 |
github/deemru/w8io/026f985 46.49 ms ◑