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