tx · 4t1JDHitYd8g9E5n4PB6XJiAiBmtW72kvkRfrf3U1MiL 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy: -0.02000000 Waves 2023.10.07 01:57 [2787403] smart account 3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy > SELF 0.00000000 Waves
{ "type": 13, "id": "4t1JDHitYd8g9E5n4PB6XJiAiBmtW72kvkRfrf3U1MiL", "fee": 2000000, "feeAssetId": null, "timestamp": 1696633095023, "version": 2, "chainId": 84, "sender": "3N7HtrKeFFLz5oy6PfGv1Lg3GwPk4gCPdGy", "senderPublicKey": "FsR18761ZAsUqsTd7TK3XmR6bhihs1UXVmpHYxz5JzQ1", "proofs": [ "5sCUWzHBoSvsJcxDuaxXUXwHeKtggDpKWAr95SDzAgGLzQfH1bsbRK4dEFTEZRiPZvFZQ4Azbc7UMNakcnRyFpzJ" ], "script": "base64:BgIzCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgUKAwgIARIAEgMKAQESAwoBCBIDCgEIbQACTTYAwIQ9AAJNOACAwtcvAAhNSUxMSU9ONgCAgOmDsd4WAA5NQVJLRVRJTkdTSEFSRQCgjQYACVRFQU1TSEFSRQDAmgwADUFDVElWSVRZU0hBUkUAoI0GAAtQTEFZRVJTSEFSRQCAtRgACllFQVJNSUxMSVMAgIbrx3UACUNIRUNLVElNRQCAyeCrsAEACURBWU1JTExJUwCAuJkpABBtYXJrZXRpbmdBZGRyS2V5Ag1tYXJrZXRpbmdBZGRyAAt0ZWFtQWRkcktleQIIdGVhbUFkZHIAFGxhc3RNYXJrZXRpbmdUaW1lS2V5AhlsYXN0Q2xhaW1lZFRpbWVfbWFya2V0aW5nABZtYXJrZXRpbmdBbW91bnRMZWZ0S2V5AhNtYXJrZXRpbmdBbW91bnRMZWZ0AA9sYXN0VGVhbVRpbWVLZXkCFGxhc3RDbGFpbWVkVGltZV90ZWFtABF0ZWFtQW1vdW50TGVmdEtleQIOdGVhbUFtb3VudExlZn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VsdAkBBWFzSW50AQkA/AcEBQ9zdGFraW5nQ29udHJhY3QCDnVwZGF0ZUFjY1N0YXRzCQDMCAIFBGFkZHIJAMwIAgUCeHAFA25pbAUDbmlsCQCUCgIFB2FjdGlvbnMJAJQKAgUMcHJvbG9nUmVzdWx0BQ5hY2NTdGF0c1Jlc3VsdAFpAQl0YWtlV2xnWHABBGFkZHIDCQECIT0CCAUBaQZjYWxsZXIFD3N0YWtpbmdDb250cmFjdAkAAgECEVBlcm1pc3Npb24gZGVuaWVkBA0kdDAxMDk1NjEwOTk5CQEOdGFrZVhwSW50ZXJuYWwCBQRhZGRyAAAEB2FjdGlvbnMIBQ0kdDAxMDk1NjEwOTk5Al8xBAJ4cAgFDSR0MDEwOTU2MTA5OTkCXzIJAJQKAgUHYWN0aW9ucwUCeHABaQESY2hlY2tXbGdYcFJFQURPTkxZAQRhZGRyBA0kdDAxMTA3NjExMTI0CQEOdGFrZVhwSW50ZXJuYWwCBQRhZGRyAAAEB2lnbm9yZWQIBQ0kdDAxMTA3NjExMTI0Al8xBAdkZWx0YVhQCAUNJHQwMTEwNzYxMTEyNAJfMgQGbHZsS2V5CQEMa2V5VXNlckxldmVsAQUEYWRkcgQFeHBLZXkJAQlrZXlVc2VyWFABBQRhZGRyBAJ4cAkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QFBXhwS2V5AAAEBW5ld1hQCQBkAgUCeHAFB2RlbHRhWFAECWx2bFBvaW50cwkBB2xldmVsVXACCQELdmFsdWVPckVsc2UCCQCaCAIFD3N0YWtpbmdDb250cmFjdAUGbHZsS2V5AAAFBW5ld1hQCQCUCgIFA25pbAUJbHZsUG9pbnRzAF1ozNU=", "height": 2787403, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B5qhKauRHBTzKGVMBsvE3fnnNe6Gt15BH6kwyt863i7D Next: D4X9oU19yFxnnFszRKAoPbZ8eu6UWbxLLU1yshMNdVXx Diff:
Old | New | Differences | |
---|---|---|---|
59 | 59 | ||
60 | 60 | let C = "acresStakedAmountTotal" | |
61 | 61 | ||
62 | - | ||
62 | + | func D (u) = ("wlgStakedAmountByUser_" + u) | |
63 | 63 | ||
64 | - | let E = 1 | |
65 | 64 | ||
66 | - | let | |
65 | + | let E = "wlgStakedAmountTotal" | |
67 | 66 | ||
68 | - | ||
67 | + | func F (u) = ("wlgStakedTimeByUser_" + u) | |
69 | 68 | ||
70 | - | let H = 10 | |
71 | 69 | ||
72 | - | let | |
70 | + | let G = 0 | |
73 | 71 | ||
74 | - | let | |
72 | + | let H = 1 | |
75 | 73 | ||
76 | - | let | |
74 | + | let I = 2 | |
77 | 75 | ||
78 | - | let | |
76 | + | let J = 3 | |
79 | 77 | ||
80 | - | let | |
78 | + | let K = 4 | |
81 | 79 | ||
82 | - | let | |
80 | + | let L = 5 | |
83 | 81 | ||
84 | - | let | |
82 | + | let M = 6 | |
85 | 83 | ||
86 | - | let P = 28 | |
84 | + | func N (O,P,Q) = { | |
85 | + | let R = split(valueOrElse(getString(P, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
86 | + | func S (T,U) = (T + parseIntValue(U)) | |
87 | 87 | ||
88 | - | let Q = 29 | |
88 | + | let V = { | |
89 | + | let W = R | |
90 | + | let X = size(W) | |
91 | + | let Y = 0 | |
92 | + | func Z (aa,ab) = if ((ab >= X)) | |
93 | + | then aa | |
94 | + | else S(aa, W[ab]) | |
89 | 95 | ||
90 | - | let R = 0 | |
91 | - | ||
92 | - | let S = 1 | |
93 | - | ||
94 | - | let T = 2 | |
95 | - | ||
96 | - | let U = 3 | |
97 | - | ||
98 | - | let V = 4 | |
99 | - | ||
100 | - | let W = 5 | |
101 | - | ||
102 | - | let X = 6 | |
103 | - | ||
104 | - | func Y (Z,aa,ab) = { | |
105 | - | let ac = split(valueOrElse(getString(aa, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
106 | - | func ad (ae,af) = (ae + parseIntValue(af)) | |
107 | - | ||
108 | - | let ag = { | |
109 | - | let ah = ac | |
110 | - | let ai = size(ah) | |
111 | - | let aj = 0 | |
112 | - | func ak (al,am) = if ((am >= ai)) | |
113 | - | then al | |
114 | - | else ad(al, ah[am]) | |
115 | - | ||
116 | - | func an (al,am) = if ((am >= ai)) | |
117 | - | then al | |
96 | + | func ac (aa,ab) = if ((ab >= X)) | |
97 | + | then aa | |
118 | 98 | else throw("List size exceeds 6") | |
119 | 99 | ||
120 | - | | |
100 | + | ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6) | |
121 | 101 | } | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | [ | |
102 | + | let ad = valueOrElse(getInteger(P, ("stakedPiecesByOwner_" + O)), 0) | |
103 | + | let ae = valueOrElse(getInteger(Q, C), 0) | |
104 | + | let af = valueOrElse(getInteger(Q, B(O)), 0) | |
105 | + | [V, ad, ae, af] | |
126 | 106 | } | |
127 | 107 | ||
128 | 108 | ||
129 | - | let | |
109 | + | let ag = 0 | |
130 | 110 | ||
131 | - | let | |
111 | + | let ah = 1 | |
132 | 112 | ||
133 | - | let | |
113 | + | let ai = 2 | |
134 | 114 | ||
135 | - | let | |
115 | + | let aj = 3 | |
136 | 116 | ||
137 | - | func | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | let | |
117 | + | func ak (al,am,an,ao,ap) = { | |
118 | + | let aq = valueOrErrorMessage(getInteger(am[J], z), "WLGOLD is not issued yet") | |
119 | + | let ar = assetBalance(am[I], an) | |
120 | + | let as = assetBalance(am[G], an) | |
121 | + | let at = (assetBalance(am[J], an) - ao) | |
122 | + | let au = assetBalance(am[K], an) | |
123 | + | let av = am[L] | |
124 | + | let aw = (assetBalance(av, an) + valueOrElse(getInteger(av, A), 0)) | |
125 | + | let ax = ((ar + at) + aw) | |
126 | + | let ay = valueOrErrorMessage(getBinary(am[J], "wlg_assetId"), "Not initialized yet") | |
127 | + | let az = lastBlock.timestamp | |
128 | + | let aA = valueOrErrorMessage(getInteger(am[J], y), "Not initialized") | |
129 | + | let aB = fraction(c, d, a) | |
130 | + | let aC = valueOrElse(getInteger(am[J], n), aB) | |
131 | + | let aD = valueOrElse(getInteger(am[J], m), aA) | |
132 | + | let aE = addressFromStringValue(value(getString(am[J], k))) | |
133 | + | let aF = min([fraction(aB, (az - aD), h), aC]) | |
134 | + | let aG = assetBalance(aE, ay) | |
135 | + | let aH = fraction(c, e, a) | |
136 | + | let aI = valueOrElse(getInteger(am[J], p), aH) | |
137 | + | let aJ = valueOrElse(getInteger(am[J], o), aA) | |
138 | + | let aK = addressFromStringValue(value(getString(am[J], l))) | |
139 | + | let aL = min([fraction(aH, (az - aJ), (3 * h)), aI]) | |
140 | + | let aM = assetBalance(aK, ay) | |
141 | + | let aN = fraction(c, f, a) | |
142 | + | let aO = valueOrElse(getInteger(am[J], r), aN) | |
143 | + | let aP = valueOrElse(getInteger(am[J], q), aA) | |
144 | + | let aQ = min([fraction(aN, (az - aP), (3 * h)), aO]) | |
145 | + | let aR = assetBalance(am[G], ay) | |
146 | + | let aS = valueOrElse(getInteger(am[J], t(al)), aA) | |
147 | + | let aT = ((aS - aA) / h) | |
148 | + | let aU = min([az, (aA + (3 * h))]) | |
149 | + | let aV = min([((az - aA) / h), 2]) | |
150 | + | let aW = N(al, am[H], am[M]) | |
151 | + | let aX = w(aV) | |
152 | + | let aY = if ((aT == aV)) | |
173 | 153 | then { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | $Tuple3( | |
154 | + | let aZ = fraction(aX, (aU - aS), h) | |
155 | + | let ba = fraction(aZ, ap, a) | |
156 | + | let bb = (aS + fraction((aU - aS), ap, a)) | |
157 | + | $Tuple3(ba, aZ, bb) | |
178 | 158 | } | |
179 | - | else if (( | |
159 | + | else if ((aT == (aV - 1))) | |
180 | 160 | then { | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | then ( | |
187 | - | else (( | |
188 | - | $Tuple3( | |
161 | + | let bc = fraction(w((aV - 1)), ((aA + (h * aV)) - aS), h) | |
162 | + | let aZ = fraction(aX, (aU - (aA + (h * aV))), h) | |
163 | + | let bd = (bc + aZ) | |
164 | + | let ba = fraction(bd, ap, a) | |
165 | + | let bb = if ((bc >= ba)) | |
166 | + | then (aS + fraction(h, ba, w((aV - 1)))) | |
167 | + | else ((aA + (h * aV)) + fraction(h, (ba - bc), aX)) | |
168 | + | $Tuple3(ba, bd, bb) | |
189 | 169 | } | |
190 | 170 | else { | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | then ( | |
198 | - | else if ((( | |
199 | - | then (( | |
200 | - | else (( | |
201 | - | $Tuple3( | |
171 | + | let be = fraction(w((aV - 2)), ((aA + (h * (aV - 1))) - aS), h) | |
172 | + | let bc = w((aV - 1)) | |
173 | + | let aZ = fraction(aX, (aU - (aA + (h * aV))), h) | |
174 | + | let bd = ((be + bc) + aZ) | |
175 | + | let ba = fraction(bd, ap, a) | |
176 | + | let bb = if ((be >= ba)) | |
177 | + | then (aS + fraction(h, ba, w((aV - 2)))) | |
178 | + | else if (((be + bc) >= ba)) | |
179 | + | then ((aA + (h * (aV - 1))) + fraction(h, (ba - be), w((aV - 1)))) | |
180 | + | else ((aA + (h * aV)) + fraction(h, ((ba - be) - bc), aX)) | |
181 | + | $Tuple3(ba, bd, bb) | |
202 | 182 | } | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | [ | |
183 | + | let bf = aY._1 | |
184 | + | let bg = aY._2 | |
185 | + | let bh = aY._3 | |
186 | + | let bi = fraction(fraction(aX, j, h), 25, aW[ag]) | |
187 | + | let bj = valueOrElse(getInteger(am[J], s), 0) | |
188 | + | let bk = fraction(bf, ((aW[ah] * b) + aW[aj]), ((aW[ag] * b) + aW[ai])) | |
189 | + | let bl = fraction(bg, ((aW[ah] * b) + aW[aj]), ((aW[ag] * b) + aW[ai])) | |
190 | + | [aq, fraction(ax, b, aq), ax, ar, as, at, au, aA, aD, aB, aC, aF, aG, aH, aI, aL, aM, aN, aO, aQ, aR, aV, bj, aX, aS, bk, bi, aw, bl, bh] | |
211 | 191 | } | |
212 | 192 | ||
213 | 193 | ||
214 | - | let | |
194 | + | let bm = 100000000 | |
215 | 195 | ||
216 | - | let by = { | |
217 | - | let bz = bx | |
218 | - | if ((base58'2W' == bz)) | |
196 | + | let bn = 3200 | |
197 | + | ||
198 | + | let bo = 4000 | |
199 | + | ||
200 | + | let bp = 3 | |
201 | + | ||
202 | + | let bq = 100000000000 | |
203 | + | ||
204 | + | func br (u) = ("userXP_" + u) | |
205 | + | ||
206 | + | ||
207 | + | func bs (u) = ("userLevel_" + u) | |
208 | + | ||
209 | + | ||
210 | + | let bt = 10000 | |
211 | + | ||
212 | + | func bu (bv) = fraction(bn, pow(bv, 4, bo, 4, 4, DOWN), bm) | |
213 | + | ||
214 | + | ||
215 | + | func bw (bx,by) = { | |
216 | + | let bz = bu(by) | |
217 | + | [bz, (bp * (bz - bx))] | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | let bA = take(drop(this.bytes, 1), 1) | |
222 | + | ||
223 | + | let bB = { | |
224 | + | let bC = bA | |
225 | + | if ((base58'2W' == bC)) | |
219 | 226 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
220 | - | else if ((base58'2T' == | |
227 | + | else if ((base58'2T' == bC)) | |
221 | 228 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
222 | 229 | else throw("Unknown chain") | |
223 | 230 | } | |
224 | 231 | ||
225 | - | let | |
226 | - | let | |
227 | - | if ((base58'2W' == | |
232 | + | let bD = { | |
233 | + | let bC = bA | |
234 | + | if ((base58'2W' == bC)) | |
228 | 235 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
229 | - | else if ((base58'2T' == | |
236 | + | else if ((base58'2T' == bC)) | |
230 | 237 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
231 | 238 | else throw("Unknown chain") | |
232 | 239 | } | |
233 | 240 | ||
234 | - | let | |
235 | - | let | |
236 | - | if ((base58'2W' == | |
241 | + | let bE = { | |
242 | + | let bC = bA | |
243 | + | if ((base58'2W' == bC)) | |
237 | 244 | then 86400000 | |
238 | - | else if ((base58'2T' == | |
245 | + | else if ((base58'2T' == bC)) | |
239 | 246 | then 60000 | |
240 | 247 | else throw("Unknown chain") | |
241 | 248 | } | |
242 | 249 | ||
243 | - | let | |
250 | + | let bF = "__" | |
244 | 251 | ||
245 | - | let | |
252 | + | let bG = 1000000 | |
246 | 253 | ||
247 | - | let | |
254 | + | let bH = 100000000 | |
248 | 255 | ||
249 | - | let | |
256 | + | let bI = 100000 | |
250 | 257 | ||
251 | - | func | |
258 | + | func bJ (bK,bL) = valueOrErrorMessage(getString(bK, bL), makeString(["mandatory ", toString(bK), ".", bL, " is not defined"], "")) | |
252 | 259 | ||
253 | 260 | ||
254 | - | let | |
261 | + | let bM = 1 | |
255 | 262 | ||
256 | - | let | |
263 | + | let bN = 2 | |
257 | 264 | ||
258 | - | let | |
265 | + | let bO = 4 | |
259 | 266 | ||
260 | - | let | |
267 | + | let bP = 5 | |
261 | 268 | ||
262 | - | let | |
269 | + | let bQ = 6 | |
263 | 270 | ||
264 | - | let | |
271 | + | let bR = 8 | |
265 | 272 | ||
266 | - | func | |
273 | + | func bS () = "%s__restConfig" | |
267 | 274 | ||
268 | 275 | ||
269 | - | func | |
276 | + | func bT () = "%s__restAddr" | |
270 | 277 | ||
271 | 278 | ||
272 | - | func | |
279 | + | func bU (bV) = split_4C(bJ(bV, bS()), bF) | |
273 | 280 | ||
274 | 281 | ||
275 | - | func | |
282 | + | func bW (bX,bY) = valueOrErrorMessage(addressFromString(bX[bY]), ("Rest cfg doesn't contain address at index " + toString(bY))) | |
276 | 283 | ||
277 | 284 | ||
278 | - | let | |
285 | + | let bZ = addressFromStringValue(valueOrElse(getString(this, bT()), bD)) | |
279 | 286 | ||
280 | - | let | |
287 | + | let bX = bU(bZ) | |
281 | 288 | ||
282 | - | let | |
289 | + | let P = bW(bX, bM) | |
283 | 290 | ||
284 | - | let | |
291 | + | let ca = bW(bX, bN) | |
285 | 292 | ||
286 | - | let | |
293 | + | let cb = bW(bX, bO) | |
287 | 294 | ||
288 | - | let | |
295 | + | let cc = bW(bX, bP) | |
289 | 296 | ||
290 | - | let | |
297 | + | let av = bW(bX, bQ) | |
291 | 298 | ||
292 | - | let | |
299 | + | let Q = bW(bX, bR) | |
293 | 300 | ||
294 | - | let | |
301 | + | let cd = "wlg_assetId" | |
295 | 302 | ||
296 | - | let | |
303 | + | let ce = valueOrErrorMessage(getBinary(cb, cd), "WLGOLD is not issued yet") | |
297 | 304 | ||
298 | - | let | |
305 | + | let cf = 0 | |
299 | 306 | ||
300 | - | func cd () = "resTypesProportions" | |
307 | + | let cg = 1 | |
308 | + | ||
309 | + | let ch = 2 | |
310 | + | ||
311 | + | let ci = 7 | |
312 | + | ||
313 | + | let cj = 10 | |
314 | + | ||
315 | + | let ck = 11 | |
316 | + | ||
317 | + | let cl = 14 | |
318 | + | ||
319 | + | let cm = 15 | |
320 | + | ||
321 | + | let cn = 18 | |
322 | + | ||
323 | + | let co = 19 | |
324 | + | ||
325 | + | let cp = 22 | |
326 | + | ||
327 | + | let cq = 25 | |
328 | + | ||
329 | + | let cr = 28 | |
330 | + | ||
331 | + | let cs = 29 | |
332 | + | ||
333 | + | let ct = 1 | |
334 | + | ||
335 | + | func cu () = "resTypesProportions" | |
301 | 336 | ||
302 | 337 | ||
303 | - | func | |
338 | + | func cv (cw) = ("stakedPiecesByOwner_" + cw) | |
304 | 339 | ||
305 | 340 | ||
306 | - | func | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
341 | + | func cx (cy) = { | |
342 | + | let bC = cy | |
343 | + | if ($isInstanceOf(bC, "Int")) | |
309 | 344 | then { | |
310 | - | let | |
311 | - | | |
345 | + | let cz = bC | |
346 | + | cz | |
312 | 347 | } | |
313 | 348 | else throw("fail to cast into Int") | |
314 | 349 | } | |
315 | 350 | ||
316 | 351 | ||
317 | - | func | |
318 | - | let | |
319 | - | func | |
352 | + | func cA (O) = { | |
353 | + | let R = split(valueOrElse(getString(P, cu()), "0_0_0_0_0_0"), "_") | |
354 | + | func S (T,U) = (T + parseIntValue(U)) | |
320 | 355 | ||
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | func | |
326 | - | then | |
327 | - | else | |
356 | + | let cB = { | |
357 | + | let W = R | |
358 | + | let X = size(W) | |
359 | + | let Y = 0 | |
360 | + | func Z (aa,ab) = if ((ab >= X)) | |
361 | + | then aa | |
362 | + | else S(aa, W[ab]) | |
328 | 363 | ||
329 | - | func | |
330 | - | then | |
364 | + | func ac (aa,ab) = if ((ab >= X)) | |
365 | + | then aa | |
331 | 366 | else throw("List size exceeds 6") | |
332 | 367 | ||
333 | - | | |
368 | + | ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6) | |
334 | 369 | } | |
335 | - | let | |
336 | - | [ | |
370 | + | let cC = valueOrElse(getInteger(P, cv(O)), 0) | |
371 | + | [cB, cC] | |
337 | 372 | } | |
338 | 373 | ||
339 | 374 | ||
340 | - | func | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | (((toString(( | |
375 | + | func cD (cE,cF) = { | |
376 | + | let cG = pow(10, 0, cF, 0, 0, DOWN) | |
377 | + | let cH = toString((cE % cG)) | |
378 | + | let cI = drop(toString(cG), (1 + size(cH))) | |
379 | + | (((toString((cE / cG)) + ".") + cI) + cH) | |
345 | 380 | } | |
346 | 381 | ||
347 | 382 | ||
348 | - | let | |
383 | + | let cJ = "profitAddr" | |
349 | 384 | ||
350 | - | let | |
385 | + | let cK = "stakersAmountPaidTotal" | |
351 | 386 | ||
352 | - | func | |
387 | + | func cL (u) = ("stakersAmountPaidUser_" + u) | |
353 | 388 | ||
354 | 389 | ||
355 | - | func | |
390 | + | func cM () = cx(invoke(P, "saveLastTx", nil, nil)) | |
356 | 391 | ||
357 | 392 | ||
358 | - | func | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
362 | - | then throw((("Arbitrages are possible once a " + toString(( | |
393 | + | func cN (u) = { | |
394 | + | let cO = valueOrElse(getInteger(v(u)), 0) | |
395 | + | let az = lastBlock.timestamp | |
396 | + | if ((bE > (az - cO))) | |
397 | + | then throw((("Arbitrages are possible once a " + toString((bE / 60000))) + "min")) | |
363 | 398 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | (( | |
399 | + | let cP = cA(u)[ct] | |
400 | + | let cQ = valueOrElse(getInteger(Q, B(u)), 0) | |
401 | + | ((cP * bH) + cQ) | |
367 | 402 | } | |
368 | 403 | } | |
369 | 404 | ||
370 | 405 | ||
371 | - | func | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | if ((( | |
406 | + | func cR (u,cS) = { | |
407 | + | let cT = addressFromStringValue(u) | |
408 | + | let cU = ak(u, [bZ, P, ca, cb, cc, av, Q], bB, 0, cS) | |
409 | + | let az = lastBlock.timestamp | |
410 | + | let aA = cU[ci] | |
411 | + | let aC = cU[cj] | |
412 | + | let cV = cU[ck] | |
413 | + | let aI = cU[cl] | |
414 | + | let cW = cU[cm] | |
415 | + | let aO = cU[cn] | |
416 | + | let cX = cU[co] | |
417 | + | if (((az - aA) > i)) | |
383 | 418 | then throw("Please modify contract for next 1.5 years, according to stats") | |
384 | 419 | else { | |
385 | - | let | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), | |
420 | + | let bf = cU[cq] | |
421 | + | let cY = cL(u) | |
422 | + | let cZ = cU[cr] | |
423 | + | let da = cU[cs] | |
424 | + | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), cV, ce), ScriptTransfer(addressFromStringValue(value(getString(l))), cW, ce), ScriptTransfer(bZ, cX, ce), IntegerEntry(cY, (valueOrElse(getInteger(cY), 0) + bf)), IntegerEntry(cK, (valueOrElse(getInteger(cK), 0) + cZ)), IntegerEntry(s, (cU[cp] - cZ)), IntegerEntry(n, (aC - cV)), IntegerEntry(m, az), IntegerEntry(p, (aI - cW)), IntegerEntry(o, az), IntegerEntry(r, (aO - cX)), IntegerEntry(q, az), IntegerEntry(t(u), da)], $Tuple2(bf, cZ)) | |
390 | 425 | } | |
391 | 426 | } | |
392 | 427 | ||
393 | 428 | ||
394 | - | @Callable(cK) | |
395 | - | func constructorV1 (cL,aP,aV,cM) = if ((cK.caller != this)) | |
429 | + | func db (u,dc) = { | |
430 | + | let az = lastBlock.timestamp | |
431 | + | let dd = F(u) | |
432 | + | let de = D(u) | |
433 | + | let cO = valueOrElse(getInteger(dd), 0) | |
434 | + | let df = valueOrElse(getInteger(de), 0) | |
435 | + | let dg = valueOrElse(getInteger(E), 0) | |
436 | + | let bv = fraction(fraction(bt, df, bq), (cO - az), j) | |
437 | + | $Tuple3([IntegerEntry(dd, az), IntegerEntry(de, (df + dc)), IntegerEntry(E, (dg + dc))], bv, df) | |
438 | + | } | |
439 | + | ||
440 | + | ||
441 | + | @Callable(dh) | |
442 | + | func constructorV1 (di,aE,aK,dj) = if ((dh.caller != this)) | |
396 | 443 | then throw("Permission denied") | |
397 | - | else if (isDefined(getBinary( | |
444 | + | else if (isDefined(getBinary(cd))) | |
398 | 445 | then throw("Already initialized") | |
399 | 446 | else { | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | [ | |
447 | + | let aq = c | |
448 | + | let dk = Issue("WLGOLD", "WavesLands Gold investment token", aq, 8, true, unit, 0) | |
449 | + | let dl = calculateAssetId(dk) | |
450 | + | [dk, IntegerEntry(y, lastBlock.timestamp), IntegerEntry(z, aq), IntegerEntry(cK, 0), IntegerEntry(s, fraction(c, g, bG)), BinaryEntry(cd, dl), StringEntry(bT(), di), StringEntry(k, aE), StringEntry(l, aK), StringEntry(cJ, dj)] | |
404 | 451 | } | |
405 | 452 | ||
406 | 453 | ||
407 | 454 | ||
408 | - | @Callable( | |
409 | - | func buyWlg ( | |
410 | - | let | |
411 | - | if ((size( | |
455 | + | @Callable(dh) | |
456 | + | func buyWlg (dm) = { | |
457 | + | let dn = cM() | |
458 | + | if ((size(dh.payments) != 1)) | |
412 | 459 | then throw("exactly 1 payment must be attached") | |
413 | 460 | else { | |
414 | - | let cR = cK.payments[0] | |
415 | - | let cS = cR.amount | |
416 | - | let cT = valueOrErrorMessage(cR.assetId, "USDT payments only!") | |
417 | - | if ((cT != by)) | |
461 | + | let do = dh.payments[0] | |
462 | + | let dp = do.amount | |
463 | + | if (if (!(isDefined(do.assetId))) | |
464 | + | then true | |
465 | + | else (value(do.assetId) != bB)) | |
418 | 466 | then throw("USDT payments only!") | |
419 | 467 | else { | |
420 | - | let | |
421 | - | let u = toString( | |
422 | - | if (( | |
423 | - | then throw((("You can trade min " + | |
468 | + | let cT = dh.caller | |
469 | + | let u = toString(cT) | |
470 | + | if ((bI > dp)) | |
471 | + | then throw((("You can trade min " + cD(bI, 6)) + " USDT")) | |
424 | 472 | else { | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if (( | |
433 | - | then throw((("You can get max " + | |
434 | - | else if (( | |
473 | + | let cU = ak("", [bZ, P, ca, cb, cc, av, Q], bB, dp, bG) | |
474 | + | let dq = cU[cf] | |
475 | + | let dr = cU[ch] | |
476 | + | let ds = fraction(dr, bH, dq) | |
477 | + | let dt = fraction(ds, 6, 5) | |
478 | + | let du = fraction(dp, bH, dt) | |
479 | + | let dv = cN(u) | |
480 | + | if ((du > dv)) | |
481 | + | then throw((("You can get max " + cD(dv, 8)) + " WLGOLD")) | |
482 | + | else if ((dm > du)) | |
435 | 483 | then throw("Price changed during operation, please try again") | |
436 | 484 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | $Tuple2([Reissue( | |
485 | + | let dw = (dp / 6) | |
486 | + | let dx = (dp - dw) | |
487 | + | let dy = fraction(dq, dx, dr) | |
488 | + | $Tuple2([Reissue(ce, dy, true), IntegerEntry(z, (dq + dy)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cJ))), dw, bB), ScriptTransfer(cT, du, ce)], dn) | |
441 | 489 | } | |
442 | 490 | } | |
443 | 491 | } | |
446 | 494 | ||
447 | 495 | ||
448 | 496 | ||
449 | - | @Callable( | |
450 | - | func sellWlg ( | |
451 | - | let | |
452 | - | if ((size( | |
497 | + | @Callable(dh) | |
498 | + | func sellWlg (dm) = { | |
499 | + | let dn = cM() | |
500 | + | if ((size(dh.payments) != 1)) | |
453 | 501 | then throw("exactly 1 payment must be attached") | |
454 | 502 | else { | |
455 | - | let cR = cK.payments[0] | |
456 | - | let dd = cR.amount | |
457 | - | let cC = cK.caller | |
458 | - | let u = toString(cC) | |
459 | - | let cZ = cw(u) | |
460 | - | if ((dd > cZ)) | |
461 | - | then throw((("You can spend max " + cm(cZ, 8)) + " WLGOLD")) | |
503 | + | let do = dh.payments[0] | |
504 | + | let dz = do.amount | |
505 | + | let cT = dh.caller | |
506 | + | let u = toString(cT) | |
507 | + | let dv = cN(u) | |
508 | + | if ((dz > dv)) | |
509 | + | then throw((("You can spend max " + cD(dv, 8)) + " WLGOLD")) | |
510 | + | else if (if (!(isDefined(do.assetId))) | |
511 | + | then true | |
512 | + | else (value(do.assetId) != ce)) | |
513 | + | then throw("WLGOLD payments only!") | |
514 | + | else { | |
515 | + | let cU = ak("", [bZ, P, ca, cb, cc, av, Q], bB, 0, bG) | |
516 | + | let dq = cU[cf] | |
517 | + | let dA = fraction(cU[cg], 4, 5) | |
518 | + | let dp = fraction(dz, dA, bH) | |
519 | + | if ((bI > dp)) | |
520 | + | then throw((("You can trade min " + cD(bI, 6)) + " USDT")) | |
521 | + | else if ((dm > dp)) | |
522 | + | then throw("Price changed during operation, please try again") | |
523 | + | else { | |
524 | + | let dw = (dp / 4) | |
525 | + | let dB = fraction((dp + dw), dq, cU[ch]) | |
526 | + | $Tuple2([Burn(ce, dB), IntegerEntry(z, (dq - dB)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cJ))), dw, bB), ScriptTransfer(cT, dp, bB)], dn) | |
527 | + | } | |
528 | + | } | |
529 | + | } | |
530 | + | } | |
531 | + | ||
532 | + | ||
533 | + | ||
534 | + | @Callable(dh) | |
535 | + | func claim () = { | |
536 | + | let dn = cM() | |
537 | + | if ((size(dh.payments) != 0)) | |
538 | + | then throw("No payments required") | |
539 | + | else { | |
540 | + | let dC = cR(toString(dh.caller), bG) | |
541 | + | let dD = dC._1 | |
542 | + | $Tuple2((dD :+ ScriptTransfer(dh.caller, dC._2._1, ce)), dn) | |
543 | + | } | |
544 | + | } | |
545 | + | ||
546 | + | ||
547 | + | ||
548 | + | @Callable(dh) | |
549 | + | func onStakeUnstakeLand (u) = if (if ((dh.caller != P)) | |
550 | + | then (dh.caller != Q) | |
551 | + | else false) | |
552 | + | then throw("Permission denied") | |
553 | + | else { | |
554 | + | let dC = cR(u, bG) | |
555 | + | let dD = dC._1 | |
556 | + | $Tuple2((dD :+ ScriptTransfer(addressFromStringValue(u), dC._2._1, ce)), dC._2) | |
557 | + | } | |
558 | + | ||
559 | + | ||
560 | + | ||
561 | + | @Callable(dh) | |
562 | + | func claimRob (dE,dF,dG) = if ((dh.caller != P)) | |
563 | + | then throw("Permission denied") | |
564 | + | else { | |
565 | + | let dC = cR(dE, dG) | |
566 | + | $Tuple2((dC._1 :+ ScriptTransfer(addressFromStringValue(dF), (dC._2._2 - dC._2._1), ce)), dC._2) | |
567 | + | } | |
568 | + | ||
569 | + | ||
570 | + | ||
571 | + | @Callable(dh) | |
572 | + | func stakeWlgold () = { | |
573 | + | let dn = cM() | |
574 | + | if ((size(dh.payments) != 1)) | |
575 | + | then throw("exactly 1 payment must be attached") | |
576 | + | else { | |
577 | + | let do = dh.payments[0] | |
578 | + | let dH = do.amount | |
579 | + | let u = toString(dh.caller) | |
580 | + | if (if (!(isDefined(do.assetId))) | |
581 | + | then true | |
582 | + | else (value(do.assetId) != ce)) | |
583 | + | then throw("WLGOLD payments only!") | |
462 | 584 | else { | |
463 | - | let cT = valueOrErrorMessage(cR.assetId, "WLGOLD payments only!") | |
464 | - | if ((cT != cb)) | |
465 | - | then throw("WLGOLD payments only!") | |
466 | - | else { | |
467 | - | let cD = av("", [bW, aa, bX, bY, bZ, aG, ab], by, 0, bD) | |
468 | - | let cU = cD[D] | |
469 | - | let de = fraction(cD[E], 4, 5) | |
470 | - | let cS = fraction(dd, de, bE) | |
471 | - | if ((bF > cS)) | |
472 | - | then throw((("You can trade min " + cm(bF, 6)) + " USDT")) | |
473 | - | else if ((cP > cS)) | |
474 | - | then throw("Price changed during operation, please try again") | |
475 | - | else { | |
476 | - | let da = (cS / 4) | |
477 | - | let df = fraction((cS + da), cU, cD[F]) | |
478 | - | $Tuple2([Burn(cb, df), IntegerEntry(z, (cU - df)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cs))), da, by), ScriptTransfer(cC, cS, by)], cQ) | |
479 | - | } | |
480 | - | } | |
585 | + | let dI = db(u, dH) | |
586 | + | let dD = dI._1 | |
587 | + | let bv = dI._2 | |
588 | + | let dJ = cx(invoke(P, "updateAccStats", [u, bv], nil)) | |
589 | + | $Tuple2(dD, $Tuple2(dn, dJ)) | |
481 | 590 | } | |
482 | 591 | } | |
483 | 592 | } | |
484 | 593 | ||
485 | 594 | ||
486 | 595 | ||
487 | - | @Callable( | |
488 | - | func | |
489 | - | let | |
490 | - | if ((size( | |
596 | + | @Callable(dh) | |
597 | + | func unstakeWlgold (dK) = { | |
598 | + | let dn = cM() | |
599 | + | if ((size(dh.payments) != 0)) | |
491 | 600 | then throw("No payments required") | |
492 | - | else { | |
493 | - | let dg = cA(toString(cK.caller), bD) | |
494 | - | let dh = dg._1 | |
495 | - | $Tuple2((dh :+ ScriptTransfer(cK.caller, dg._2._1, cb)), cQ) | |
496 | - | } | |
601 | + | else if ((0 >= dK)) | |
602 | + | then throw("Amount should be positive") | |
603 | + | else { | |
604 | + | let u = toString(dh.caller) | |
605 | + | let dL = db(u, -(dK)) | |
606 | + | let dD = dL._1 | |
607 | + | let bv = dL._2 | |
608 | + | let df = dL._3 | |
609 | + | if ((dK > df)) | |
610 | + | then throw(((("You have only " + cD(df, 8)) + " WLGOLD staked, tried to unstake ") + cD(dK, 8))) | |
611 | + | else { | |
612 | + | let dJ = cx(invoke(P, "updateAccStats", [u, bv], nil)) | |
613 | + | $Tuple2(dD, $Tuple2(dn, dJ)) | |
614 | + | } | |
615 | + | } | |
497 | 616 | } | |
498 | 617 | ||
499 | 618 | ||
500 | 619 | ||
501 | - | @Callable(cK) | |
502 | - | func onStakeUnstakeLand (u) = if (if ((cK.caller != aa)) | |
503 | - | then (cK.caller != ab) | |
504 | - | else false) | |
620 | + | @Callable(dh) | |
621 | + | func takeWlgXp (u) = if ((dh.caller != P)) | |
505 | 622 | then throw("Permission denied") | |
506 | 623 | else { | |
507 | - | let dg = cA(u, bD) | |
508 | - | let dh = dg._1 | |
509 | - | $Tuple2((dh :+ ScriptTransfer(addressFromStringValue(u), dg._2._1, cb)), dg._2) | |
624 | + | let dM = db(u, 0) | |
625 | + | let dD = dM._1 | |
626 | + | let bv = dM._2 | |
627 | + | $Tuple2(dD, bv) | |
510 | 628 | } | |
511 | 629 | ||
512 | 630 | ||
513 | 631 | ||
514 | - | @Callable(cK) | |
515 | - | func claimRob (di,dj,dk) = if ((cK.caller != aa)) | |
516 | - | then throw("Permission denied") | |
517 | - | else { | |
518 | - | let dg = cA(di, dk) | |
519 | - | $Tuple2((dg._1 :+ ScriptTransfer(addressFromStringValue(dj), (dg._2._2 - dg._2._1), cb)), dg._2) | |
520 | - | } | |
632 | + | @Callable(dh) | |
633 | + | func checkWlgXpREADONLY (u) = { | |
634 | + | let dN = db(u, 0) | |
635 | + | let dO = dN._1 | |
636 | + | let dP = dN._2 | |
637 | + | let dQ = bs(u) | |
638 | + | let dR = br(u) | |
639 | + | let bv = valueOrElse(getInteger(P, dR), 0) | |
640 | + | let by = (bv + dP) | |
641 | + | let dS = bw(valueOrElse(getInteger(P, dQ), 0), by) | |
642 | + | $Tuple2(nil, dS) | |
643 | + | } | |
521 | 644 | ||
522 | 645 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000000 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = 100000000000000 | |
9 | 9 | ||
10 | 10 | let d = 100000 | |
11 | 11 | ||
12 | 12 | let e = 200000 | |
13 | 13 | ||
14 | 14 | let f = 100000 | |
15 | 15 | ||
16 | 16 | let g = 400000 | |
17 | 17 | ||
18 | 18 | let h = 31557600000 | |
19 | 19 | ||
20 | 20 | let i = 47336400000 | |
21 | 21 | ||
22 | 22 | let j = 86400000 | |
23 | 23 | ||
24 | 24 | let k = "marketingAddr" | |
25 | 25 | ||
26 | 26 | let l = "teamAddr" | |
27 | 27 | ||
28 | 28 | let m = "lastClaimedTime_marketing" | |
29 | 29 | ||
30 | 30 | let n = "marketingAmountLeft" | |
31 | 31 | ||
32 | 32 | let o = "lastClaimedTime_team" | |
33 | 33 | ||
34 | 34 | let p = "teamAmountLeft" | |
35 | 35 | ||
36 | 36 | let q = "lastClaimedTime_activities" | |
37 | 37 | ||
38 | 38 | let r = "activitiesAmountLeft" | |
39 | 39 | ||
40 | 40 | let s = "stakersAmountLeft" | |
41 | 41 | ||
42 | 42 | func t (u) = ("lastClaimedTimeUser_" + u) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func v (u) = ("lastArbTimeUser_" + u) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func w (x) = fraction(c, (g * (x + 1)), (6 * a)) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | let y = "wlg_issueTime" | |
52 | 52 | ||
53 | 53 | let z = "wlg_issuedAmount" | |
54 | 54 | ||
55 | 55 | let A = "zbill_issuedAmount" | |
56 | 56 | ||
57 | 57 | func B (u) = ("acresStakedAmountByUser_" + u) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let C = "acresStakedAmountTotal" | |
61 | 61 | ||
62 | - | ||
62 | + | func D (u) = ("wlgStakedAmountByUser_" + u) | |
63 | 63 | ||
64 | - | let E = 1 | |
65 | 64 | ||
66 | - | let | |
65 | + | let E = "wlgStakedAmountTotal" | |
67 | 66 | ||
68 | - | ||
67 | + | func F (u) = ("wlgStakedTimeByUser_" + u) | |
69 | 68 | ||
70 | - | let H = 10 | |
71 | 69 | ||
72 | - | let | |
70 | + | let G = 0 | |
73 | 71 | ||
74 | - | let | |
72 | + | let H = 1 | |
75 | 73 | ||
76 | - | let | |
74 | + | let I = 2 | |
77 | 75 | ||
78 | - | let | |
76 | + | let J = 3 | |
79 | 77 | ||
80 | - | let | |
78 | + | let K = 4 | |
81 | 79 | ||
82 | - | let | |
80 | + | let L = 5 | |
83 | 81 | ||
84 | - | let | |
82 | + | let M = 6 | |
85 | 83 | ||
86 | - | let P = 28 | |
84 | + | func N (O,P,Q) = { | |
85 | + | let R = split(valueOrElse(getString(P, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
86 | + | func S (T,U) = (T + parseIntValue(U)) | |
87 | 87 | ||
88 | - | let Q = 29 | |
88 | + | let V = { | |
89 | + | let W = R | |
90 | + | let X = size(W) | |
91 | + | let Y = 0 | |
92 | + | func Z (aa,ab) = if ((ab >= X)) | |
93 | + | then aa | |
94 | + | else S(aa, W[ab]) | |
89 | 95 | ||
90 | - | let R = 0 | |
91 | - | ||
92 | - | let S = 1 | |
93 | - | ||
94 | - | let T = 2 | |
95 | - | ||
96 | - | let U = 3 | |
97 | - | ||
98 | - | let V = 4 | |
99 | - | ||
100 | - | let W = 5 | |
101 | - | ||
102 | - | let X = 6 | |
103 | - | ||
104 | - | func Y (Z,aa,ab) = { | |
105 | - | let ac = split(valueOrElse(getString(aa, "resTypesProportions"), "0_0_0_0_0_0"), "_") | |
106 | - | func ad (ae,af) = (ae + parseIntValue(af)) | |
107 | - | ||
108 | - | let ag = { | |
109 | - | let ah = ac | |
110 | - | let ai = size(ah) | |
111 | - | let aj = 0 | |
112 | - | func ak (al,am) = if ((am >= ai)) | |
113 | - | then al | |
114 | - | else ad(al, ah[am]) | |
115 | - | ||
116 | - | func an (al,am) = if ((am >= ai)) | |
117 | - | then al | |
96 | + | func ac (aa,ab) = if ((ab >= X)) | |
97 | + | then aa | |
118 | 98 | else throw("List size exceeds 6") | |
119 | 99 | ||
120 | - | | |
100 | + | ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6) | |
121 | 101 | } | |
122 | - | let | |
123 | - | let | |
124 | - | let | |
125 | - | [ | |
102 | + | let ad = valueOrElse(getInteger(P, ("stakedPiecesByOwner_" + O)), 0) | |
103 | + | let ae = valueOrElse(getInteger(Q, C), 0) | |
104 | + | let af = valueOrElse(getInteger(Q, B(O)), 0) | |
105 | + | [V, ad, ae, af] | |
126 | 106 | } | |
127 | 107 | ||
128 | 108 | ||
129 | - | let | |
109 | + | let ag = 0 | |
130 | 110 | ||
131 | - | let | |
111 | + | let ah = 1 | |
132 | 112 | ||
133 | - | let | |
113 | + | let ai = 2 | |
134 | 114 | ||
135 | - | let | |
115 | + | let aj = 3 | |
136 | 116 | ||
137 | - | func | |
138 | - | let | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | let | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | let | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | let | |
117 | + | func ak (al,am,an,ao,ap) = { | |
118 | + | let aq = valueOrErrorMessage(getInteger(am[J], z), "WLGOLD is not issued yet") | |
119 | + | let ar = assetBalance(am[I], an) | |
120 | + | let as = assetBalance(am[G], an) | |
121 | + | let at = (assetBalance(am[J], an) - ao) | |
122 | + | let au = assetBalance(am[K], an) | |
123 | + | let av = am[L] | |
124 | + | let aw = (assetBalance(av, an) + valueOrElse(getInteger(av, A), 0)) | |
125 | + | let ax = ((ar + at) + aw) | |
126 | + | let ay = valueOrErrorMessage(getBinary(am[J], "wlg_assetId"), "Not initialized yet") | |
127 | + | let az = lastBlock.timestamp | |
128 | + | let aA = valueOrErrorMessage(getInteger(am[J], y), "Not initialized") | |
129 | + | let aB = fraction(c, d, a) | |
130 | + | let aC = valueOrElse(getInteger(am[J], n), aB) | |
131 | + | let aD = valueOrElse(getInteger(am[J], m), aA) | |
132 | + | let aE = addressFromStringValue(value(getString(am[J], k))) | |
133 | + | let aF = min([fraction(aB, (az - aD), h), aC]) | |
134 | + | let aG = assetBalance(aE, ay) | |
135 | + | let aH = fraction(c, e, a) | |
136 | + | let aI = valueOrElse(getInteger(am[J], p), aH) | |
137 | + | let aJ = valueOrElse(getInteger(am[J], o), aA) | |
138 | + | let aK = addressFromStringValue(value(getString(am[J], l))) | |
139 | + | let aL = min([fraction(aH, (az - aJ), (3 * h)), aI]) | |
140 | + | let aM = assetBalance(aK, ay) | |
141 | + | let aN = fraction(c, f, a) | |
142 | + | let aO = valueOrElse(getInteger(am[J], r), aN) | |
143 | + | let aP = valueOrElse(getInteger(am[J], q), aA) | |
144 | + | let aQ = min([fraction(aN, (az - aP), (3 * h)), aO]) | |
145 | + | let aR = assetBalance(am[G], ay) | |
146 | + | let aS = valueOrElse(getInteger(am[J], t(al)), aA) | |
147 | + | let aT = ((aS - aA) / h) | |
148 | + | let aU = min([az, (aA + (3 * h))]) | |
149 | + | let aV = min([((az - aA) / h), 2]) | |
150 | + | let aW = N(al, am[H], am[M]) | |
151 | + | let aX = w(aV) | |
152 | + | let aY = if ((aT == aV)) | |
173 | 153 | then { | |
174 | - | let | |
175 | - | let | |
176 | - | let | |
177 | - | $Tuple3( | |
154 | + | let aZ = fraction(aX, (aU - aS), h) | |
155 | + | let ba = fraction(aZ, ap, a) | |
156 | + | let bb = (aS + fraction((aU - aS), ap, a)) | |
157 | + | $Tuple3(ba, aZ, bb) | |
178 | 158 | } | |
179 | - | else if (( | |
159 | + | else if ((aT == (aV - 1))) | |
180 | 160 | then { | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | let | |
186 | - | then ( | |
187 | - | else (( | |
188 | - | $Tuple3( | |
161 | + | let bc = fraction(w((aV - 1)), ((aA + (h * aV)) - aS), h) | |
162 | + | let aZ = fraction(aX, (aU - (aA + (h * aV))), h) | |
163 | + | let bd = (bc + aZ) | |
164 | + | let ba = fraction(bd, ap, a) | |
165 | + | let bb = if ((bc >= ba)) | |
166 | + | then (aS + fraction(h, ba, w((aV - 1)))) | |
167 | + | else ((aA + (h * aV)) + fraction(h, (ba - bc), aX)) | |
168 | + | $Tuple3(ba, bd, bb) | |
189 | 169 | } | |
190 | 170 | else { | |
191 | - | let | |
192 | - | let | |
193 | - | let | |
194 | - | let | |
195 | - | let | |
196 | - | let | |
197 | - | then ( | |
198 | - | else if ((( | |
199 | - | then (( | |
200 | - | else (( | |
201 | - | $Tuple3( | |
171 | + | let be = fraction(w((aV - 2)), ((aA + (h * (aV - 1))) - aS), h) | |
172 | + | let bc = w((aV - 1)) | |
173 | + | let aZ = fraction(aX, (aU - (aA + (h * aV))), h) | |
174 | + | let bd = ((be + bc) + aZ) | |
175 | + | let ba = fraction(bd, ap, a) | |
176 | + | let bb = if ((be >= ba)) | |
177 | + | then (aS + fraction(h, ba, w((aV - 2)))) | |
178 | + | else if (((be + bc) >= ba)) | |
179 | + | then ((aA + (h * (aV - 1))) + fraction(h, (ba - be), w((aV - 1)))) | |
180 | + | else ((aA + (h * aV)) + fraction(h, ((ba - be) - bc), aX)) | |
181 | + | $Tuple3(ba, bd, bb) | |
202 | 182 | } | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | [ | |
183 | + | let bf = aY._1 | |
184 | + | let bg = aY._2 | |
185 | + | let bh = aY._3 | |
186 | + | let bi = fraction(fraction(aX, j, h), 25, aW[ag]) | |
187 | + | let bj = valueOrElse(getInteger(am[J], s), 0) | |
188 | + | let bk = fraction(bf, ((aW[ah] * b) + aW[aj]), ((aW[ag] * b) + aW[ai])) | |
189 | + | let bl = fraction(bg, ((aW[ah] * b) + aW[aj]), ((aW[ag] * b) + aW[ai])) | |
190 | + | [aq, fraction(ax, b, aq), ax, ar, as, at, au, aA, aD, aB, aC, aF, aG, aH, aI, aL, aM, aN, aO, aQ, aR, aV, bj, aX, aS, bk, bi, aw, bl, bh] | |
211 | 191 | } | |
212 | 192 | ||
213 | 193 | ||
214 | - | let | |
194 | + | let bm = 100000000 | |
215 | 195 | ||
216 | - | let by = { | |
217 | - | let bz = bx | |
218 | - | if ((base58'2W' == bz)) | |
196 | + | let bn = 3200 | |
197 | + | ||
198 | + | let bo = 4000 | |
199 | + | ||
200 | + | let bp = 3 | |
201 | + | ||
202 | + | let bq = 100000000000 | |
203 | + | ||
204 | + | func br (u) = ("userXP_" + u) | |
205 | + | ||
206 | + | ||
207 | + | func bs (u) = ("userLevel_" + u) | |
208 | + | ||
209 | + | ||
210 | + | let bt = 10000 | |
211 | + | ||
212 | + | func bu (bv) = fraction(bn, pow(bv, 4, bo, 4, 4, DOWN), bm) | |
213 | + | ||
214 | + | ||
215 | + | func bw (bx,by) = { | |
216 | + | let bz = bu(by) | |
217 | + | [bz, (bp * (bz - bx))] | |
218 | + | } | |
219 | + | ||
220 | + | ||
221 | + | let bA = take(drop(this.bytes, 1), 1) | |
222 | + | ||
223 | + | let bB = { | |
224 | + | let bC = bA | |
225 | + | if ((base58'2W' == bC)) | |
219 | 226 | then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi' | |
220 | - | else if ((base58'2T' == | |
227 | + | else if ((base58'2T' == bC)) | |
221 | 228 | then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63' | |
222 | 229 | else throw("Unknown chain") | |
223 | 230 | } | |
224 | 231 | ||
225 | - | let | |
226 | - | let | |
227 | - | if ((base58'2W' == | |
232 | + | let bD = { | |
233 | + | let bC = bA | |
234 | + | if ((base58'2W' == bC)) | |
228 | 235 | then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv" | |
229 | - | else if ((base58'2T' == | |
236 | + | else if ((base58'2T' == bC)) | |
230 | 237 | then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy" | |
231 | 238 | else throw("Unknown chain") | |
232 | 239 | } | |
233 | 240 | ||
234 | - | let | |
235 | - | let | |
236 | - | if ((base58'2W' == | |
241 | + | let bE = { | |
242 | + | let bC = bA | |
243 | + | if ((base58'2W' == bC)) | |
237 | 244 | then 86400000 | |
238 | - | else if ((base58'2T' == | |
245 | + | else if ((base58'2T' == bC)) | |
239 | 246 | then 60000 | |
240 | 247 | else throw("Unknown chain") | |
241 | 248 | } | |
242 | 249 | ||
243 | - | let | |
250 | + | let bF = "__" | |
244 | 251 | ||
245 | - | let | |
252 | + | let bG = 1000000 | |
246 | 253 | ||
247 | - | let | |
254 | + | let bH = 100000000 | |
248 | 255 | ||
249 | - | let | |
256 | + | let bI = 100000 | |
250 | 257 | ||
251 | - | func | |
258 | + | func bJ (bK,bL) = valueOrErrorMessage(getString(bK, bL), makeString(["mandatory ", toString(bK), ".", bL, " is not defined"], "")) | |
252 | 259 | ||
253 | 260 | ||
254 | - | let | |
261 | + | let bM = 1 | |
255 | 262 | ||
256 | - | let | |
263 | + | let bN = 2 | |
257 | 264 | ||
258 | - | let | |
265 | + | let bO = 4 | |
259 | 266 | ||
260 | - | let | |
267 | + | let bP = 5 | |
261 | 268 | ||
262 | - | let | |
269 | + | let bQ = 6 | |
263 | 270 | ||
264 | - | let | |
271 | + | let bR = 8 | |
265 | 272 | ||
266 | - | func | |
273 | + | func bS () = "%s__restConfig" | |
267 | 274 | ||
268 | 275 | ||
269 | - | func | |
276 | + | func bT () = "%s__restAddr" | |
270 | 277 | ||
271 | 278 | ||
272 | - | func | |
279 | + | func bU (bV) = split_4C(bJ(bV, bS()), bF) | |
273 | 280 | ||
274 | 281 | ||
275 | - | func | |
282 | + | func bW (bX,bY) = valueOrErrorMessage(addressFromString(bX[bY]), ("Rest cfg doesn't contain address at index " + toString(bY))) | |
276 | 283 | ||
277 | 284 | ||
278 | - | let | |
285 | + | let bZ = addressFromStringValue(valueOrElse(getString(this, bT()), bD)) | |
279 | 286 | ||
280 | - | let | |
287 | + | let bX = bU(bZ) | |
281 | 288 | ||
282 | - | let | |
289 | + | let P = bW(bX, bM) | |
283 | 290 | ||
284 | - | let | |
291 | + | let ca = bW(bX, bN) | |
285 | 292 | ||
286 | - | let | |
293 | + | let cb = bW(bX, bO) | |
287 | 294 | ||
288 | - | let | |
295 | + | let cc = bW(bX, bP) | |
289 | 296 | ||
290 | - | let | |
297 | + | let av = bW(bX, bQ) | |
291 | 298 | ||
292 | - | let | |
299 | + | let Q = bW(bX, bR) | |
293 | 300 | ||
294 | - | let | |
301 | + | let cd = "wlg_assetId" | |
295 | 302 | ||
296 | - | let | |
303 | + | let ce = valueOrErrorMessage(getBinary(cb, cd), "WLGOLD is not issued yet") | |
297 | 304 | ||
298 | - | let | |
305 | + | let cf = 0 | |
299 | 306 | ||
300 | - | func cd () = "resTypesProportions" | |
307 | + | let cg = 1 | |
308 | + | ||
309 | + | let ch = 2 | |
310 | + | ||
311 | + | let ci = 7 | |
312 | + | ||
313 | + | let cj = 10 | |
314 | + | ||
315 | + | let ck = 11 | |
316 | + | ||
317 | + | let cl = 14 | |
318 | + | ||
319 | + | let cm = 15 | |
320 | + | ||
321 | + | let cn = 18 | |
322 | + | ||
323 | + | let co = 19 | |
324 | + | ||
325 | + | let cp = 22 | |
326 | + | ||
327 | + | let cq = 25 | |
328 | + | ||
329 | + | let cr = 28 | |
330 | + | ||
331 | + | let cs = 29 | |
332 | + | ||
333 | + | let ct = 1 | |
334 | + | ||
335 | + | func cu () = "resTypesProportions" | |
301 | 336 | ||
302 | 337 | ||
303 | - | func | |
338 | + | func cv (cw) = ("stakedPiecesByOwner_" + cw) | |
304 | 339 | ||
305 | 340 | ||
306 | - | func | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
341 | + | func cx (cy) = { | |
342 | + | let bC = cy | |
343 | + | if ($isInstanceOf(bC, "Int")) | |
309 | 344 | then { | |
310 | - | let | |
311 | - | | |
345 | + | let cz = bC | |
346 | + | cz | |
312 | 347 | } | |
313 | 348 | else throw("fail to cast into Int") | |
314 | 349 | } | |
315 | 350 | ||
316 | 351 | ||
317 | - | func | |
318 | - | let | |
319 | - | func | |
352 | + | func cA (O) = { | |
353 | + | let R = split(valueOrElse(getString(P, cu()), "0_0_0_0_0_0"), "_") | |
354 | + | func S (T,U) = (T + parseIntValue(U)) | |
320 | 355 | ||
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | func | |
326 | - | then | |
327 | - | else | |
356 | + | let cB = { | |
357 | + | let W = R | |
358 | + | let X = size(W) | |
359 | + | let Y = 0 | |
360 | + | func Z (aa,ab) = if ((ab >= X)) | |
361 | + | then aa | |
362 | + | else S(aa, W[ab]) | |
328 | 363 | ||
329 | - | func | |
330 | - | then | |
364 | + | func ac (aa,ab) = if ((ab >= X)) | |
365 | + | then aa | |
331 | 366 | else throw("List size exceeds 6") | |
332 | 367 | ||
333 | - | | |
368 | + | ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6) | |
334 | 369 | } | |
335 | - | let | |
336 | - | [ | |
370 | + | let cC = valueOrElse(getInteger(P, cv(O)), 0) | |
371 | + | [cB, cC] | |
337 | 372 | } | |
338 | 373 | ||
339 | 374 | ||
340 | - | func | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | (((toString(( | |
375 | + | func cD (cE,cF) = { | |
376 | + | let cG = pow(10, 0, cF, 0, 0, DOWN) | |
377 | + | let cH = toString((cE % cG)) | |
378 | + | let cI = drop(toString(cG), (1 + size(cH))) | |
379 | + | (((toString((cE / cG)) + ".") + cI) + cH) | |
345 | 380 | } | |
346 | 381 | ||
347 | 382 | ||
348 | - | let | |
383 | + | let cJ = "profitAddr" | |
349 | 384 | ||
350 | - | let | |
385 | + | let cK = "stakersAmountPaidTotal" | |
351 | 386 | ||
352 | - | func | |
387 | + | func cL (u) = ("stakersAmountPaidUser_" + u) | |
353 | 388 | ||
354 | 389 | ||
355 | - | func | |
390 | + | func cM () = cx(invoke(P, "saveLastTx", nil, nil)) | |
356 | 391 | ||
357 | 392 | ||
358 | - | func | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
362 | - | then throw((("Arbitrages are possible once a " + toString(( | |
393 | + | func cN (u) = { | |
394 | + | let cO = valueOrElse(getInteger(v(u)), 0) | |
395 | + | let az = lastBlock.timestamp | |
396 | + | if ((bE > (az - cO))) | |
397 | + | then throw((("Arbitrages are possible once a " + toString((bE / 60000))) + "min")) | |
363 | 398 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | (( | |
399 | + | let cP = cA(u)[ct] | |
400 | + | let cQ = valueOrElse(getInteger(Q, B(u)), 0) | |
401 | + | ((cP * bH) + cQ) | |
367 | 402 | } | |
368 | 403 | } | |
369 | 404 | ||
370 | 405 | ||
371 | - | func | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | if ((( | |
406 | + | func cR (u,cS) = { | |
407 | + | let cT = addressFromStringValue(u) | |
408 | + | let cU = ak(u, [bZ, P, ca, cb, cc, av, Q], bB, 0, cS) | |
409 | + | let az = lastBlock.timestamp | |
410 | + | let aA = cU[ci] | |
411 | + | let aC = cU[cj] | |
412 | + | let cV = cU[ck] | |
413 | + | let aI = cU[cl] | |
414 | + | let cW = cU[cm] | |
415 | + | let aO = cU[cn] | |
416 | + | let cX = cU[co] | |
417 | + | if (((az - aA) > i)) | |
383 | 418 | then throw("Please modify contract for next 1.5 years, according to stats") | |
384 | 419 | else { | |
385 | - | let | |
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), | |
420 | + | let bf = cU[cq] | |
421 | + | let cY = cL(u) | |
422 | + | let cZ = cU[cr] | |
423 | + | let da = cU[cs] | |
424 | + | $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), cV, ce), ScriptTransfer(addressFromStringValue(value(getString(l))), cW, ce), ScriptTransfer(bZ, cX, ce), IntegerEntry(cY, (valueOrElse(getInteger(cY), 0) + bf)), IntegerEntry(cK, (valueOrElse(getInteger(cK), 0) + cZ)), IntegerEntry(s, (cU[cp] - cZ)), IntegerEntry(n, (aC - cV)), IntegerEntry(m, az), IntegerEntry(p, (aI - cW)), IntegerEntry(o, az), IntegerEntry(r, (aO - cX)), IntegerEntry(q, az), IntegerEntry(t(u), da)], $Tuple2(bf, cZ)) | |
390 | 425 | } | |
391 | 426 | } | |
392 | 427 | ||
393 | 428 | ||
394 | - | @Callable(cK) | |
395 | - | func constructorV1 (cL,aP,aV,cM) = if ((cK.caller != this)) | |
429 | + | func db (u,dc) = { | |
430 | + | let az = lastBlock.timestamp | |
431 | + | let dd = F(u) | |
432 | + | let de = D(u) | |
433 | + | let cO = valueOrElse(getInteger(dd), 0) | |
434 | + | let df = valueOrElse(getInteger(de), 0) | |
435 | + | let dg = valueOrElse(getInteger(E), 0) | |
436 | + | let bv = fraction(fraction(bt, df, bq), (cO - az), j) | |
437 | + | $Tuple3([IntegerEntry(dd, az), IntegerEntry(de, (df + dc)), IntegerEntry(E, (dg + dc))], bv, df) | |
438 | + | } | |
439 | + | ||
440 | + | ||
441 | + | @Callable(dh) | |
442 | + | func constructorV1 (di,aE,aK,dj) = if ((dh.caller != this)) | |
396 | 443 | then throw("Permission denied") | |
397 | - | else if (isDefined(getBinary( | |
444 | + | else if (isDefined(getBinary(cd))) | |
398 | 445 | then throw("Already initialized") | |
399 | 446 | else { | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | [ | |
447 | + | let aq = c | |
448 | + | let dk = Issue("WLGOLD", "WavesLands Gold investment token", aq, 8, true, unit, 0) | |
449 | + | let dl = calculateAssetId(dk) | |
450 | + | [dk, IntegerEntry(y, lastBlock.timestamp), IntegerEntry(z, aq), IntegerEntry(cK, 0), IntegerEntry(s, fraction(c, g, bG)), BinaryEntry(cd, dl), StringEntry(bT(), di), StringEntry(k, aE), StringEntry(l, aK), StringEntry(cJ, dj)] | |
404 | 451 | } | |
405 | 452 | ||
406 | 453 | ||
407 | 454 | ||
408 | - | @Callable( | |
409 | - | func buyWlg ( | |
410 | - | let | |
411 | - | if ((size( | |
455 | + | @Callable(dh) | |
456 | + | func buyWlg (dm) = { | |
457 | + | let dn = cM() | |
458 | + | if ((size(dh.payments) != 1)) | |
412 | 459 | then throw("exactly 1 payment must be attached") | |
413 | 460 | else { | |
414 | - | let cR = cK.payments[0] | |
415 | - | let cS = cR.amount | |
416 | - | let cT = valueOrErrorMessage(cR.assetId, "USDT payments only!") | |
417 | - | if ((cT != by)) | |
461 | + | let do = dh.payments[0] | |
462 | + | let dp = do.amount | |
463 | + | if (if (!(isDefined(do.assetId))) | |
464 | + | then true | |
465 | + | else (value(do.assetId) != bB)) | |
418 | 466 | then throw("USDT payments only!") | |
419 | 467 | else { | |
420 | - | let | |
421 | - | let u = toString( | |
422 | - | if (( | |
423 | - | then throw((("You can trade min " + | |
468 | + | let cT = dh.caller | |
469 | + | let u = toString(cT) | |
470 | + | if ((bI > dp)) | |
471 | + | then throw((("You can trade min " + cD(bI, 6)) + " USDT")) | |
424 | 472 | else { | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if (( | |
433 | - | then throw((("You can get max " + | |
434 | - | else if (( | |
473 | + | let cU = ak("", [bZ, P, ca, cb, cc, av, Q], bB, dp, bG) | |
474 | + | let dq = cU[cf] | |
475 | + | let dr = cU[ch] | |
476 | + | let ds = fraction(dr, bH, dq) | |
477 | + | let dt = fraction(ds, 6, 5) | |
478 | + | let du = fraction(dp, bH, dt) | |
479 | + | let dv = cN(u) | |
480 | + | if ((du > dv)) | |
481 | + | then throw((("You can get max " + cD(dv, 8)) + " WLGOLD")) | |
482 | + | else if ((dm > du)) | |
435 | 483 | then throw("Price changed during operation, please try again") | |
436 | 484 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | $Tuple2([Reissue( | |
485 | + | let dw = (dp / 6) | |
486 | + | let dx = (dp - dw) | |
487 | + | let dy = fraction(dq, dx, dr) | |
488 | + | $Tuple2([Reissue(ce, dy, true), IntegerEntry(z, (dq + dy)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cJ))), dw, bB), ScriptTransfer(cT, du, ce)], dn) | |
441 | 489 | } | |
442 | 490 | } | |
443 | 491 | } | |
444 | 492 | } | |
445 | 493 | } | |
446 | 494 | ||
447 | 495 | ||
448 | 496 | ||
449 | - | @Callable( | |
450 | - | func sellWlg ( | |
451 | - | let | |
452 | - | if ((size( | |
497 | + | @Callable(dh) | |
498 | + | func sellWlg (dm) = { | |
499 | + | let dn = cM() | |
500 | + | if ((size(dh.payments) != 1)) | |
453 | 501 | then throw("exactly 1 payment must be attached") | |
454 | 502 | else { | |
455 | - | let cR = cK.payments[0] | |
456 | - | let dd = cR.amount | |
457 | - | let cC = cK.caller | |
458 | - | let u = toString(cC) | |
459 | - | let cZ = cw(u) | |
460 | - | if ((dd > cZ)) | |
461 | - | then throw((("You can spend max " + cm(cZ, 8)) + " WLGOLD")) | |
503 | + | let do = dh.payments[0] | |
504 | + | let dz = do.amount | |
505 | + | let cT = dh.caller | |
506 | + | let u = toString(cT) | |
507 | + | let dv = cN(u) | |
508 | + | if ((dz > dv)) | |
509 | + | then throw((("You can spend max " + cD(dv, 8)) + " WLGOLD")) | |
510 | + | else if (if (!(isDefined(do.assetId))) | |
511 | + | then true | |
512 | + | else (value(do.assetId) != ce)) | |
513 | + | then throw("WLGOLD payments only!") | |
514 | + | else { | |
515 | + | let cU = ak("", [bZ, P, ca, cb, cc, av, Q], bB, 0, bG) | |
516 | + | let dq = cU[cf] | |
517 | + | let dA = fraction(cU[cg], 4, 5) | |
518 | + | let dp = fraction(dz, dA, bH) | |
519 | + | if ((bI > dp)) | |
520 | + | then throw((("You can trade min " + cD(bI, 6)) + " USDT")) | |
521 | + | else if ((dm > dp)) | |
522 | + | then throw("Price changed during operation, please try again") | |
523 | + | else { | |
524 | + | let dw = (dp / 4) | |
525 | + | let dB = fraction((dp + dw), dq, cU[ch]) | |
526 | + | $Tuple2([Burn(ce, dB), IntegerEntry(z, (dq - dB)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cJ))), dw, bB), ScriptTransfer(cT, dp, bB)], dn) | |
527 | + | } | |
528 | + | } | |
529 | + | } | |
530 | + | } | |
531 | + | ||
532 | + | ||
533 | + | ||
534 | + | @Callable(dh) | |
535 | + | func claim () = { | |
536 | + | let dn = cM() | |
537 | + | if ((size(dh.payments) != 0)) | |
538 | + | then throw("No payments required") | |
539 | + | else { | |
540 | + | let dC = cR(toString(dh.caller), bG) | |
541 | + | let dD = dC._1 | |
542 | + | $Tuple2((dD :+ ScriptTransfer(dh.caller, dC._2._1, ce)), dn) | |
543 | + | } | |
544 | + | } | |
545 | + | ||
546 | + | ||
547 | + | ||
548 | + | @Callable(dh) | |
549 | + | func onStakeUnstakeLand (u) = if (if ((dh.caller != P)) | |
550 | + | then (dh.caller != Q) | |
551 | + | else false) | |
552 | + | then throw("Permission denied") | |
553 | + | else { | |
554 | + | let dC = cR(u, bG) | |
555 | + | let dD = dC._1 | |
556 | + | $Tuple2((dD :+ ScriptTransfer(addressFromStringValue(u), dC._2._1, ce)), dC._2) | |
557 | + | } | |
558 | + | ||
559 | + | ||
560 | + | ||
561 | + | @Callable(dh) | |
562 | + | func claimRob (dE,dF,dG) = if ((dh.caller != P)) | |
563 | + | then throw("Permission denied") | |
564 | + | else { | |
565 | + | let dC = cR(dE, dG) | |
566 | + | $Tuple2((dC._1 :+ ScriptTransfer(addressFromStringValue(dF), (dC._2._2 - dC._2._1), ce)), dC._2) | |
567 | + | } | |
568 | + | ||
569 | + | ||
570 | + | ||
571 | + | @Callable(dh) | |
572 | + | func stakeWlgold () = { | |
573 | + | let dn = cM() | |
574 | + | if ((size(dh.payments) != 1)) | |
575 | + | then throw("exactly 1 payment must be attached") | |
576 | + | else { | |
577 | + | let do = dh.payments[0] | |
578 | + | let dH = do.amount | |
579 | + | let u = toString(dh.caller) | |
580 | + | if (if (!(isDefined(do.assetId))) | |
581 | + | then true | |
582 | + | else (value(do.assetId) != ce)) | |
583 | + | then throw("WLGOLD payments only!") | |
462 | 584 | else { | |
463 | - | let cT = valueOrErrorMessage(cR.assetId, "WLGOLD payments only!") | |
464 | - | if ((cT != cb)) | |
465 | - | then throw("WLGOLD payments only!") | |
466 | - | else { | |
467 | - | let cD = av("", [bW, aa, bX, bY, bZ, aG, ab], by, 0, bD) | |
468 | - | let cU = cD[D] | |
469 | - | let de = fraction(cD[E], 4, 5) | |
470 | - | let cS = fraction(dd, de, bE) | |
471 | - | if ((bF > cS)) | |
472 | - | then throw((("You can trade min " + cm(bF, 6)) + " USDT")) | |
473 | - | else if ((cP > cS)) | |
474 | - | then throw("Price changed during operation, please try again") | |
475 | - | else { | |
476 | - | let da = (cS / 4) | |
477 | - | let df = fraction((cS + da), cU, cD[F]) | |
478 | - | $Tuple2([Burn(cb, df), IntegerEntry(z, (cU - df)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cs))), da, by), ScriptTransfer(cC, cS, by)], cQ) | |
479 | - | } | |
480 | - | } | |
585 | + | let dI = db(u, dH) | |
586 | + | let dD = dI._1 | |
587 | + | let bv = dI._2 | |
588 | + | let dJ = cx(invoke(P, "updateAccStats", [u, bv], nil)) | |
589 | + | $Tuple2(dD, $Tuple2(dn, dJ)) | |
481 | 590 | } | |
482 | 591 | } | |
483 | 592 | } | |
484 | 593 | ||
485 | 594 | ||
486 | 595 | ||
487 | - | @Callable( | |
488 | - | func | |
489 | - | let | |
490 | - | if ((size( | |
596 | + | @Callable(dh) | |
597 | + | func unstakeWlgold (dK) = { | |
598 | + | let dn = cM() | |
599 | + | if ((size(dh.payments) != 0)) | |
491 | 600 | then throw("No payments required") | |
492 | - | else { | |
493 | - | let dg = cA(toString(cK.caller), bD) | |
494 | - | let dh = dg._1 | |
495 | - | $Tuple2((dh :+ ScriptTransfer(cK.caller, dg._2._1, cb)), cQ) | |
496 | - | } | |
601 | + | else if ((0 >= dK)) | |
602 | + | then throw("Amount should be positive") | |
603 | + | else { | |
604 | + | let u = toString(dh.caller) | |
605 | + | let dL = db(u, -(dK)) | |
606 | + | let dD = dL._1 | |
607 | + | let bv = dL._2 | |
608 | + | let df = dL._3 | |
609 | + | if ((dK > df)) | |
610 | + | then throw(((("You have only " + cD(df, 8)) + " WLGOLD staked, tried to unstake ") + cD(dK, 8))) | |
611 | + | else { | |
612 | + | let dJ = cx(invoke(P, "updateAccStats", [u, bv], nil)) | |
613 | + | $Tuple2(dD, $Tuple2(dn, dJ)) | |
614 | + | } | |
615 | + | } | |
497 | 616 | } | |
498 | 617 | ||
499 | 618 | ||
500 | 619 | ||
501 | - | @Callable(cK) | |
502 | - | func onStakeUnstakeLand (u) = if (if ((cK.caller != aa)) | |
503 | - | then (cK.caller != ab) | |
504 | - | else false) | |
620 | + | @Callable(dh) | |
621 | + | func takeWlgXp (u) = if ((dh.caller != P)) | |
505 | 622 | then throw("Permission denied") | |
506 | 623 | else { | |
507 | - | let dg = cA(u, bD) | |
508 | - | let dh = dg._1 | |
509 | - | $Tuple2((dh :+ ScriptTransfer(addressFromStringValue(u), dg._2._1, cb)), dg._2) | |
624 | + | let dM = db(u, 0) | |
625 | + | let dD = dM._1 | |
626 | + | let bv = dM._2 | |
627 | + | $Tuple2(dD, bv) | |
510 | 628 | } | |
511 | 629 | ||
512 | 630 | ||
513 | 631 | ||
514 | - | @Callable(cK) | |
515 | - | func claimRob (di,dj,dk) = if ((cK.caller != aa)) | |
516 | - | then throw("Permission denied") | |
517 | - | else { | |
518 | - | let dg = cA(di, dk) | |
519 | - | $Tuple2((dg._1 :+ ScriptTransfer(addressFromStringValue(dj), (dg._2._2 - dg._2._1), cb)), dg._2) | |
520 | - | } | |
632 | + | @Callable(dh) | |
633 | + | func checkWlgXpREADONLY (u) = { | |
634 | + | let dN = db(u, 0) | |
635 | + | let dO = dN._1 | |
636 | + | let dP = dN._2 | |
637 | + | let dQ = bs(u) | |
638 | + | let dR = br(u) | |
639 | + | let bv = valueOrElse(getInteger(P, dR), 0) | |
640 | + | let by = (bv + dP) | |
641 | + | let dS = bw(valueOrElse(getInteger(P, dQ), 0), by) | |
642 | + | $Tuple2(nil, dS) | |
643 | + | } | |
521 | 644 | ||
522 | 645 |
github/deemru/w8io/169f3d6 198.48 ms ◑