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:BgIzCAISBgoECAgICBIDCgEBEgMKAQESABIDCgEIEgUKAwgIARIAEgMKAQESAwoBCBIDCgEIbQACTTYAwIQ9AAJNOACAwtcvAAhNSUxMSU9ONgCAgOmDsd4WAA5NQVJLRVRJTkdTSEFSRQCgjQYACVRFQU1TSEFSRQDAmgwADUFDVElWSVRZU0hBUkUAoI0GAAtQTEFZRVJTSEFSRQCAtRgACllFQVJNSUxMSVMAgIbrx3UACUNIRUNLVElNRQCAyeCrsAEACURBWU1JTExJUwCAuJkpABBtYXJrZXRpbmdBZGRyS2V5Ag1tYXJrZXRpbmdBZGRyAAt0ZWFtQWRkcktleQIIdGVhbUFkZHIAFGxhc3RNYXJrZXRpbmdUaW1lS2V5AhlsYXN0Q2xhaW1lZFRpbWVfbWFya2V0aW5nABZtYXJrZXRpbmdBbW91bnRMZWZ0S2V5AhNtYXJrZXRpbmdBbW91bnRMZWZ0AA9sYXN0VGVhbVRpbWVLZXkCFGxhc3RDbGFpbWVkVGltZV90ZWFtABF0ZWFtQW1vdW50TGVmdEtleQIOdGVhbUFtb3VudExlZ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3VsdAkBBWFzSW50AQkA/AcEBQ9zdGFraW5nQ29udHJhY3QCDnVwZGF0ZUFjY1N0YXRzCQDMCAIFBGFkZHIJAMwIAgUCeHAFA25pbAUDbmlsCQCUCgIFB2FjdGlvbnMJAJQKAgUMcHJvbG9nUmVzdWx0BQ5hY2NTdGF0c1Jlc3VsdAFpAQl0YWtlV2xnWHABBGFkZHIDCQECIT0CCAUBaQZjYWxsZXIFD3N0YWtpbmdDb250cmFjdAkAAgECEVBlcm1pc3Npb24gZGVuaWVkBA0kdDAxMDk1NjEwOTk5CQEOdGFrZVhwSW50ZXJuYWwCBQRhZGRyAAAEB2FjdGlvbnMIBQ0kdDAxMDk1NjEwOTk5Al8xBAJ4cAgFDSR0MDEwOTU2MTA5OTkCXzIJAJQKAgUHYWN0aW9ucwUCeHABaQESY2hlY2tXbGdYcFJFQURPTkxZAQRhZGRyBA0kdDAxMTA3NjExMTI0CQEOdGFrZVhwSW50ZXJuYWwCBQRhZGRyAAAEB2lnbm9yZWQIBQ0kdDAxMTA3NjExMTI0Al8xBAdkZWx0YVhQCAUNJHQwMTEwNzYxMTEyNAJfMgQGbHZsS2V5CQEMa2V5VXNlckxldmVsAQUEYWRkcgQFeHBLZXkJAQlrZXlVc2VyWFABBQRhZGRyBAJ4cAkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QFBXhwS2V5AAAEBW5ld1hQCQBkAgUCeHAFB2RlbHRhWFAECWx2bFBvaW50cwkBB2xldmVsVXACCQELdmFsdWVPckVsc2UCCQCaCAIFD3N0YWtpbmdDb250cmFjdAUGbHZsS2V5AAAFBW5ld1hQCQCUCgIFA25pbAUJbHZsUG9pbnRzAF1ozNU=", "height": 2787403, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B5qhKauRHBTzKGVMBsvE3fnnNe6Gt15BH6kwyt863i7D Next: D4X9oU19yFxnnFszRKAoPbZ8eu6UWbxLLU1yshMNdVXx Diff:
OldNewDifferences
5959
6060 let C = "acresStakedAmountTotal"
6161
62-let D = 0
62+func D (u) = ("wlgStakedAmountByUser_" + u)
6363
64-let E = 1
6564
66-let F = 2
65+let E = "wlgStakedAmountTotal"
6766
68-let G = 7
67+func F (u) = ("wlgStakedTimeByUser_" + u)
6968
70-let H = 10
7169
72-let I = 11
70+let G = 0
7371
74-let J = 14
72+let H = 1
7573
76-let K = 15
74+let I = 2
7775
78-let L = 18
76+let J = 3
7977
80-let M = 19
78+let K = 4
8179
82-let N = 22
80+let L = 5
8381
84-let O = 25
82+let M = 6
8583
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))
8787
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])
8995
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
11898 else throw("List size exceeds 6")
11999
120- an(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6)
100+ ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6)
121101 }
122- let ao = valueOrElse(getInteger(aa, ("stakedPiecesByOwner_" + Z)), 0)
123- let ap = valueOrElse(getInteger(ab, C), 0)
124- let aq = valueOrElse(getInteger(ab, B(Z)), 0)
125-[ag, ao, ap, aq]
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]
126106 }
127107
128108
129-let ar = 0
109+let ag = 0
130110
131-let as = 1
111+let ah = 1
132112
133-let at = 2
113+let ai = 2
134114
135-let au = 3
115+let aj = 3
136116
137-func av (aw,ax,ay,az,aA) = {
138- let aB = valueOrErrorMessage(getInteger(ax[U], z), "WLGOLD is not issued yet")
139- let aC = assetBalance(ax[T], ay)
140- let aD = assetBalance(ax[R], ay)
141- let aE = (assetBalance(ax[U], ay) - az)
142- let aF = assetBalance(ax[V], ay)
143- let aG = ax[W]
144- let aH = (assetBalance(aG, ay) + valueOrElse(getInteger(aG, A), 0))
145- let aI = ((aC + aE) + aH)
146- let aJ = valueOrErrorMessage(getBinary(ax[U], "wlg_assetId"), "Not initialized yet")
147- let aK = lastBlock.timestamp
148- let aL = valueOrErrorMessage(getInteger(ax[U], y), "Not initialized")
149- let aM = fraction(c, d, a)
150- let aN = valueOrElse(getInteger(ax[U], n), aM)
151- let aO = valueOrElse(getInteger(ax[U], m), aL)
152- let aP = addressFromStringValue(value(getString(ax[U], k)))
153- let aQ = min([fraction(aM, (aK - aO), h), aN])
154- let aR = assetBalance(aP, aJ)
155- let aS = fraction(c, e, a)
156- let aT = valueOrElse(getInteger(ax[U], p), aS)
157- let aU = valueOrElse(getInteger(ax[U], o), aL)
158- let aV = addressFromStringValue(value(getString(ax[U], l)))
159- let aW = min([fraction(aS, (aK - aU), (3 * h)), aT])
160- let aX = assetBalance(aV, aJ)
161- let aY = fraction(c, f, a)
162- let aZ = valueOrElse(getInteger(ax[U], r), aY)
163- let ba = valueOrElse(getInteger(ax[U], q), aL)
164- let bb = min([fraction(aY, (aK - ba), (3 * h)), aZ])
165- let bc = assetBalance(ax[R], aJ)
166- let bd = valueOrElse(getInteger(ax[U], t(aw)), aL)
167- let be = ((bd - aL) / h)
168- let bf = min([aK, (aL + (3 * h))])
169- let bg = min([((aK - aL) / h), 2])
170- let bh = Y(aw, ax[S], ax[X])
171- let bi = w(bg)
172- let bj = if ((be == bg))
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))
173153 then {
174- let bk = fraction(bi, (bf - bd), h)
175- let bl = fraction(bk, aA, a)
176- let bm = (bd + fraction((bf - bd), aA, a))
177- $Tuple3(bl, bk, bm)
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)
178158 }
179- else if ((be == (bg - 1)))
159+ else if ((aT == (aV - 1)))
180160 then {
181- let bn = fraction(w((bg - 1)), ((aL + (h * bg)) - bd), h)
182- let bk = fraction(bi, (bf - (aL + (h * bg))), h)
183- let bo = (bn + bk)
184- let bl = fraction(bo, aA, a)
185- let bm = if ((bn >= bl))
186- then (bd + fraction(h, bl, w((bg - 1))))
187- else ((aL + (h * bg)) + fraction(h, (bl - bn), bi))
188- $Tuple3(bl, bo, bm)
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)
189169 }
190170 else {
191- let bp = fraction(w((bg - 2)), ((aL + (h * (bg - 1))) - bd), h)
192- let bn = w((bg - 1))
193- let bk = fraction(bi, (bf - (aL + (h * bg))), h)
194- let bo = ((bp + bn) + bk)
195- let bl = fraction(bo, aA, a)
196- let bm = if ((bp >= bl))
197- then (bd + fraction(h, bl, w((bg - 2))))
198- else if (((bp + bn) >= bl))
199- then ((aL + (h * (bg - 1))) + fraction(h, (bl - bp), w((bg - 1))))
200- else ((aL + (h * bg)) + fraction(h, ((bl - bp) - bn), bi))
201- $Tuple3(bl, bo, bm)
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)
202182 }
203- let bq = bj._1
204- let br = bj._2
205- let bs = bj._3
206- let bt = fraction(fraction(bi, j, h), 25, bh[ar])
207- let bu = valueOrElse(getInteger(ax[U], s), 0)
208- let bv = fraction(bq, ((bh[as] * b) + bh[au]), ((bh[ar] * b) + bh[at]))
209- let bw = fraction(br, ((bh[as] * b) + bh[au]), ((bh[ar] * b) + bh[at]))
210-[aB, fraction(aI, b, aB), aI, aC, aD, aE, aF, aL, aO, aM, aN, aQ, aR, aS, aT, aW, aX, aY, aZ, bb, bc, bg, bu, bi, bd, bv, bt, aH, bw, bs]
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]
211191 }
212192
213193
214-let bx = take(drop(this.bytes, 1), 1)
194+let bm = 100000000
215195
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))
219226 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
220- else if ((base58'2T' == bz))
227+ else if ((base58'2T' == bC))
221228 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
222229 else throw("Unknown chain")
223230 }
224231
225-let bA = {
226- let bz = bx
227- if ((base58'2W' == bz))
232+let bD = {
233+ let bC = bA
234+ if ((base58'2W' == bC))
228235 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
229- else if ((base58'2T' == bz))
236+ else if ((base58'2T' == bC))
230237 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
231238 else throw("Unknown chain")
232239 }
233240
234-let bB = {
235- let bz = bx
236- if ((base58'2W' == bz))
241+let bE = {
242+ let bC = bA
243+ if ((base58'2W' == bC))
237244 then 86400000
238- else if ((base58'2T' == bz))
245+ else if ((base58'2T' == bC))
239246 then 60000
240247 else throw("Unknown chain")
241248 }
242249
243-let bC = "__"
250+let bF = "__"
244251
245-let bD = 1000000
252+let bG = 1000000
246253
247-let bE = 100000000
254+let bH = 100000000
248255
249-let bF = 100000
256+let bI = 100000
250257
251-func bG (bH,bI) = valueOrErrorMessage(getString(bH, bI), makeString(["mandatory ", toString(bH), ".", bI, " is not defined"], ""))
258+func bJ (bK,bL) = valueOrErrorMessage(getString(bK, bL), makeString(["mandatory ", toString(bK), ".", bL, " is not defined"], ""))
252259
253260
254-let bJ = 1
261+let bM = 1
255262
256-let bK = 2
263+let bN = 2
257264
258-let bL = 4
265+let bO = 4
259266
260-let bM = 5
267+let bP = 5
261268
262-let bN = 6
269+let bQ = 6
263270
264-let bO = 8
271+let bR = 8
265272
266-func bP () = "%s__restConfig"
273+func bS () = "%s__restConfig"
267274
268275
269-func bQ () = "%s__restAddr"
276+func bT () = "%s__restAddr"
270277
271278
272-func bR (bS) = split_4C(bG(bS, bP()), bC)
279+func bU (bV) = split_4C(bJ(bV, bS()), bF)
273280
274281
275-func bT (bU,bV) = valueOrErrorMessage(addressFromString(bU[bV]), ("Rest cfg doesn't contain address at index " + toString(bV)))
282+func bW (bX,bY) = valueOrErrorMessage(addressFromString(bX[bY]), ("Rest cfg doesn't contain address at index " + toString(bY)))
276283
277284
278-let bW = addressFromStringValue(valueOrElse(getString(this, bQ()), bA))
285+let bZ = addressFromStringValue(valueOrElse(getString(this, bT()), bD))
279286
280-let bU = bR(bW)
287+let bX = bU(bZ)
281288
282-let aa = bT(bU, bJ)
289+let P = bW(bX, bM)
283290
284-let bX = bT(bU, bK)
291+let ca = bW(bX, bN)
285292
286-let bY = bT(bU, bL)
293+let cb = bW(bX, bO)
287294
288-let bZ = bT(bU, bM)
295+let cc = bW(bX, bP)
289296
290-let aG = bT(bU, bN)
297+let av = bW(bX, bQ)
291298
292-let ab = bT(bU, bO)
299+let Q = bW(bX, bR)
293300
294-let ca = "wlg_assetId"
301+let cd = "wlg_assetId"
295302
296-let cb = valueOrErrorMessage(getBinary(bY, ca), "WLGOLD is not issued yet")
303+let ce = valueOrErrorMessage(getBinary(cb, cd), "WLGOLD is not issued yet")
297304
298-let cc = 1
305+let cf = 0
299306
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"
301336
302337
303-func ce (cf) = ("stakedPiecesByOwner_" + cf)
338+func cv (cw) = ("stakedPiecesByOwner_" + cw)
304339
305340
306-func cg (ch) = {
307- let bz = ch
308- if ($isInstanceOf(bz, "Int"))
341+func cx (cy) = {
342+ let bC = cy
343+ if ($isInstanceOf(bC, "Int"))
309344 then {
310- let ci = bz
311- ci
345+ let cz = bC
346+ cz
312347 }
313348 else throw("fail to cast into Int")
314349 }
315350
316351
317-func cj (Z) = {
318- let ac = split(valueOrElse(getString(aa, cd()), "0_0_0_0_0_0"), "_")
319- func ad (ae,af) = (ae + parseIntValue(af))
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))
320355
321- let ck = {
322- let ah = ac
323- let ai = size(ah)
324- let aj = 0
325- func ak (al,am) = if ((am >= ai))
326- then al
327- else ad(al, ah[am])
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])
328363
329- func an (al,am) = if ((am >= ai))
330- then al
364+ func ac (aa,ab) = if ((ab >= X))
365+ then aa
331366 else throw("List size exceeds 6")
332367
333- an(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6)
368+ ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6)
334369 }
335- let cl = valueOrElse(getInteger(aa, ce(Z)), 0)
336-[ck, cl]
370+ let cC = valueOrElse(getInteger(P, cv(O)), 0)
371+[cB, cC]
337372 }
338373
339374
340-func cm (cn,co) = {
341- let cp = pow(10, 0, co, 0, 0, DOWN)
342- let cq = toString((cn % cp))
343- let cr = drop(toString(cp), (1 + size(cq)))
344- (((toString((cn / cp)) + ".") + cr) + cq)
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)
345380 }
346381
347382
348-let cs = "profitAddr"
383+let cJ = "profitAddr"
349384
350-let ct = "stakersAmountPaidTotal"
385+let cK = "stakersAmountPaidTotal"
351386
352-func cu (u) = ("stakersAmountPaidUser_" + u)
387+func cL (u) = ("stakersAmountPaidUser_" + u)
353388
354389
355-func cv () = cg(invoke(aa, "saveLastTx", nil, nil))
390+func cM () = cx(invoke(P, "saveLastTx", nil, nil))
356391
357392
358-func cw (u) = {
359- let cx = valueOrElse(getInteger(v(u)), 0)
360- let aK = lastBlock.timestamp
361- if ((bB > (aK - cx)))
362- then throw((("Arbitrages are possible once a " + toString((bB / 60000))) + "min"))
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"))
363398 else {
364- let cy = cj(u)[cc]
365- let cz = valueOrElse(getInteger(ab, B(u)), 0)
366- ((cy * bE) + cz)
399+ let cP = cA(u)[ct]
400+ let cQ = valueOrElse(getInteger(Q, B(u)), 0)
401+ ((cP * bH) + cQ)
367402 }
368403 }
369404
370405
371-func cA (u,cB) = {
372- let cC = addressFromStringValue(u)
373- let cD = av(u, [bW, aa, bX, bY, bZ, aG, ab], by, 0, cB)
374- let aK = lastBlock.timestamp
375- let aL = cD[G]
376- let aN = cD[H]
377- let cE = cD[I]
378- let aT = cD[J]
379- let cF = cD[K]
380- let aZ = cD[L]
381- let cG = cD[M]
382- if (((aK - aL) > i))
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))
383418 then throw("Please modify contract for next 1.5 years, according to stats")
384419 else {
385- let bq = cD[O]
386- let cH = cu(u)
387- let cI = cD[P]
388- let cJ = cD[Q]
389- $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), cE, cb), ScriptTransfer(addressFromStringValue(value(getString(l))), cF, cb), ScriptTransfer(bW, cG, cb), IntegerEntry(cH, (valueOrElse(getInteger(cH), 0) + bq)), IntegerEntry(ct, (valueOrElse(getInteger(ct), 0) + cI)), IntegerEntry(s, (cD[N] - cI)), IntegerEntry(n, (aN - cE)), IntegerEntry(m, aK), IntegerEntry(p, (aT - cF)), IntegerEntry(o, aK), IntegerEntry(r, (aZ - cG)), IntegerEntry(q, aK), IntegerEntry(t(u), cJ)], $Tuple2(bq, cI))
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))
390425 }
391426 }
392427
393428
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))
396443 then throw("Permission denied")
397- else if (isDefined(getBinary(ca)))
444+ else if (isDefined(getBinary(cd)))
398445 then throw("Already initialized")
399446 else {
400- let aB = c
401- let cN = Issue("WLGOLD", "WavesLands Gold investment token", aB, 8, true, unit, 0)
402- let cO = calculateAssetId(cN)
403-[cN, IntegerEntry(y, lastBlock.timestamp), IntegerEntry(z, aB), IntegerEntry(ct, 0), IntegerEntry(s, fraction(c, g, bD)), BinaryEntry(ca, cO), StringEntry(bQ(), cL), StringEntry(k, aP), StringEntry(l, aV), StringEntry(cs, cM)]
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)]
404451 }
405452
406453
407454
408-@Callable(cK)
409-func buyWlg (cP) = {
410- let cQ = cv()
411- if ((size(cK.payments) != 1))
455+@Callable(dh)
456+func buyWlg (dm) = {
457+ let dn = cM()
458+ if ((size(dh.payments) != 1))
412459 then throw("exactly 1 payment must be attached")
413460 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))
418466 then throw("USDT payments only!")
419467 else {
420- let cC = cK.caller
421- let u = toString(cC)
422- if ((bF > cS))
423- then throw((("You can trade min " + cm(bF, 6)) + " USDT"))
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"))
424472 else {
425- let cD = av("", [bW, aa, bX, bY, bZ, aG, ab], by, cS, bD)
426- let cU = cD[D]
427- let cV = cD[F]
428- let cW = fraction(cV, bE, cU)
429- let cX = fraction(cW, 6, 5)
430- let cY = fraction(cS, bE, cX)
431- let cZ = cw(u)
432- if ((cY > cZ))
433- then throw((("You can get max " + cm(cZ, 8)) + " WLGOLD"))
434- else if ((cP > cY))
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))
435483 then throw("Price changed during operation, please try again")
436484 else {
437- let da = (cS / 6)
438- let db = (cS - da)
439- let dc = fraction(cU, db, cV)
440- $Tuple2([Reissue(cb, dc, true), IntegerEntry(z, (cU + dc)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cs))), da, by), ScriptTransfer(cC, cY, cb)], cQ)
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)
441489 }
442490 }
443491 }
446494
447495
448496
449-@Callable(cK)
450-func sellWlg (cP) = {
451- let cQ = cv()
452- if ((size(cK.payments) != 1))
497+@Callable(dh)
498+func sellWlg (dm) = {
499+ let dn = cM()
500+ if ((size(dh.payments) != 1))
453501 then throw("exactly 1 payment must be attached")
454502 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!")
462584 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))
481590 }
482591 }
483592 }
484593
485594
486595
487-@Callable(cK)
488-func claim () = {
489- let cQ = cv()
490- if ((size(cK.payments) != 0))
596+@Callable(dh)
597+func unstakeWlgold (dK) = {
598+ let dn = cM()
599+ if ((size(dh.payments) != 0))
491600 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+ }
497616 }
498617
499618
500619
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))
505622 then throw("Permission denied")
506623 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)
510628 }
511629
512630
513631
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+ }
521644
522645
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1000000
55
66 let b = 100000000
77
88 let c = 100000000000000
99
1010 let d = 100000
1111
1212 let e = 200000
1313
1414 let f = 100000
1515
1616 let g = 400000
1717
1818 let h = 31557600000
1919
2020 let i = 47336400000
2121
2222 let j = 86400000
2323
2424 let k = "marketingAddr"
2525
2626 let l = "teamAddr"
2727
2828 let m = "lastClaimedTime_marketing"
2929
3030 let n = "marketingAmountLeft"
3131
3232 let o = "lastClaimedTime_team"
3333
3434 let p = "teamAmountLeft"
3535
3636 let q = "lastClaimedTime_activities"
3737
3838 let r = "activitiesAmountLeft"
3939
4040 let s = "stakersAmountLeft"
4141
4242 func t (u) = ("lastClaimedTimeUser_" + u)
4343
4444
4545 func v (u) = ("lastArbTimeUser_" + u)
4646
4747
4848 func w (x) = fraction(c, (g * (x + 1)), (6 * a))
4949
5050
5151 let y = "wlg_issueTime"
5252
5353 let z = "wlg_issuedAmount"
5454
5555 let A = "zbill_issuedAmount"
5656
5757 func B (u) = ("acresStakedAmountByUser_" + u)
5858
5959
6060 let C = "acresStakedAmountTotal"
6161
62-let D = 0
62+func D (u) = ("wlgStakedAmountByUser_" + u)
6363
64-let E = 1
6564
66-let F = 2
65+let E = "wlgStakedAmountTotal"
6766
68-let G = 7
67+func F (u) = ("wlgStakedTimeByUser_" + u)
6968
70-let H = 10
7169
72-let I = 11
70+let G = 0
7371
74-let J = 14
72+let H = 1
7573
76-let K = 15
74+let I = 2
7775
78-let L = 18
76+let J = 3
7977
80-let M = 19
78+let K = 4
8179
82-let N = 22
80+let L = 5
8381
84-let O = 25
82+let M = 6
8583
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))
8787
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])
8995
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
11898 else throw("List size exceeds 6")
11999
120- an(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6)
100+ ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6)
121101 }
122- let ao = valueOrElse(getInteger(aa, ("stakedPiecesByOwner_" + Z)), 0)
123- let ap = valueOrElse(getInteger(ab, C), 0)
124- let aq = valueOrElse(getInteger(ab, B(Z)), 0)
125-[ag, ao, ap, aq]
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]
126106 }
127107
128108
129-let ar = 0
109+let ag = 0
130110
131-let as = 1
111+let ah = 1
132112
133-let at = 2
113+let ai = 2
134114
135-let au = 3
115+let aj = 3
136116
137-func av (aw,ax,ay,az,aA) = {
138- let aB = valueOrErrorMessage(getInteger(ax[U], z), "WLGOLD is not issued yet")
139- let aC = assetBalance(ax[T], ay)
140- let aD = assetBalance(ax[R], ay)
141- let aE = (assetBalance(ax[U], ay) - az)
142- let aF = assetBalance(ax[V], ay)
143- let aG = ax[W]
144- let aH = (assetBalance(aG, ay) + valueOrElse(getInteger(aG, A), 0))
145- let aI = ((aC + aE) + aH)
146- let aJ = valueOrErrorMessage(getBinary(ax[U], "wlg_assetId"), "Not initialized yet")
147- let aK = lastBlock.timestamp
148- let aL = valueOrErrorMessage(getInteger(ax[U], y), "Not initialized")
149- let aM = fraction(c, d, a)
150- let aN = valueOrElse(getInteger(ax[U], n), aM)
151- let aO = valueOrElse(getInteger(ax[U], m), aL)
152- let aP = addressFromStringValue(value(getString(ax[U], k)))
153- let aQ = min([fraction(aM, (aK - aO), h), aN])
154- let aR = assetBalance(aP, aJ)
155- let aS = fraction(c, e, a)
156- let aT = valueOrElse(getInteger(ax[U], p), aS)
157- let aU = valueOrElse(getInteger(ax[U], o), aL)
158- let aV = addressFromStringValue(value(getString(ax[U], l)))
159- let aW = min([fraction(aS, (aK - aU), (3 * h)), aT])
160- let aX = assetBalance(aV, aJ)
161- let aY = fraction(c, f, a)
162- let aZ = valueOrElse(getInteger(ax[U], r), aY)
163- let ba = valueOrElse(getInteger(ax[U], q), aL)
164- let bb = min([fraction(aY, (aK - ba), (3 * h)), aZ])
165- let bc = assetBalance(ax[R], aJ)
166- let bd = valueOrElse(getInteger(ax[U], t(aw)), aL)
167- let be = ((bd - aL) / h)
168- let bf = min([aK, (aL + (3 * h))])
169- let bg = min([((aK - aL) / h), 2])
170- let bh = Y(aw, ax[S], ax[X])
171- let bi = w(bg)
172- let bj = if ((be == bg))
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))
173153 then {
174- let bk = fraction(bi, (bf - bd), h)
175- let bl = fraction(bk, aA, a)
176- let bm = (bd + fraction((bf - bd), aA, a))
177- $Tuple3(bl, bk, bm)
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)
178158 }
179- else if ((be == (bg - 1)))
159+ else if ((aT == (aV - 1)))
180160 then {
181- let bn = fraction(w((bg - 1)), ((aL + (h * bg)) - bd), h)
182- let bk = fraction(bi, (bf - (aL + (h * bg))), h)
183- let bo = (bn + bk)
184- let bl = fraction(bo, aA, a)
185- let bm = if ((bn >= bl))
186- then (bd + fraction(h, bl, w((bg - 1))))
187- else ((aL + (h * bg)) + fraction(h, (bl - bn), bi))
188- $Tuple3(bl, bo, bm)
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)
189169 }
190170 else {
191- let bp = fraction(w((bg - 2)), ((aL + (h * (bg - 1))) - bd), h)
192- let bn = w((bg - 1))
193- let bk = fraction(bi, (bf - (aL + (h * bg))), h)
194- let bo = ((bp + bn) + bk)
195- let bl = fraction(bo, aA, a)
196- let bm = if ((bp >= bl))
197- then (bd + fraction(h, bl, w((bg - 2))))
198- else if (((bp + bn) >= bl))
199- then ((aL + (h * (bg - 1))) + fraction(h, (bl - bp), w((bg - 1))))
200- else ((aL + (h * bg)) + fraction(h, ((bl - bp) - bn), bi))
201- $Tuple3(bl, bo, bm)
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)
202182 }
203- let bq = bj._1
204- let br = bj._2
205- let bs = bj._3
206- let bt = fraction(fraction(bi, j, h), 25, bh[ar])
207- let bu = valueOrElse(getInteger(ax[U], s), 0)
208- let bv = fraction(bq, ((bh[as] * b) + bh[au]), ((bh[ar] * b) + bh[at]))
209- let bw = fraction(br, ((bh[as] * b) + bh[au]), ((bh[ar] * b) + bh[at]))
210-[aB, fraction(aI, b, aB), aI, aC, aD, aE, aF, aL, aO, aM, aN, aQ, aR, aS, aT, aW, aX, aY, aZ, bb, bc, bg, bu, bi, bd, bv, bt, aH, bw, bs]
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]
211191 }
212192
213193
214-let bx = take(drop(this.bytes, 1), 1)
194+let bm = 100000000
215195
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))
219226 then base58'9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi'
220- else if ((base58'2T' == bz))
227+ else if ((base58'2T' == bC))
221228 then base58'6mWwf9mZBjVgkC54idpyaZLQfAosD914wT8fGf2iiY63'
222229 else throw("Unknown chain")
223230 }
224231
225-let bA = {
226- let bz = bx
227- if ((base58'2W' == bz))
232+let bD = {
233+ let bC = bA
234+ if ((base58'2W' == bC))
228235 then "3PQCuvFbvh4LkPUnrnU1z3jnbA1p9m3WNhv"
229- else if ((base58'2T' == bz))
236+ else if ((base58'2T' == bC))
230237 then "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy"
231238 else throw("Unknown chain")
232239 }
233240
234-let bB = {
235- let bz = bx
236- if ((base58'2W' == bz))
241+let bE = {
242+ let bC = bA
243+ if ((base58'2W' == bC))
237244 then 86400000
238- else if ((base58'2T' == bz))
245+ else if ((base58'2T' == bC))
239246 then 60000
240247 else throw("Unknown chain")
241248 }
242249
243-let bC = "__"
250+let bF = "__"
244251
245-let bD = 1000000
252+let bG = 1000000
246253
247-let bE = 100000000
254+let bH = 100000000
248255
249-let bF = 100000
256+let bI = 100000
250257
251-func bG (bH,bI) = valueOrErrorMessage(getString(bH, bI), makeString(["mandatory ", toString(bH), ".", bI, " is not defined"], ""))
258+func bJ (bK,bL) = valueOrErrorMessage(getString(bK, bL), makeString(["mandatory ", toString(bK), ".", bL, " is not defined"], ""))
252259
253260
254-let bJ = 1
261+let bM = 1
255262
256-let bK = 2
263+let bN = 2
257264
258-let bL = 4
265+let bO = 4
259266
260-let bM = 5
267+let bP = 5
261268
262-let bN = 6
269+let bQ = 6
263270
264-let bO = 8
271+let bR = 8
265272
266-func bP () = "%s__restConfig"
273+func bS () = "%s__restConfig"
267274
268275
269-func bQ () = "%s__restAddr"
276+func bT () = "%s__restAddr"
270277
271278
272-func bR (bS) = split_4C(bG(bS, bP()), bC)
279+func bU (bV) = split_4C(bJ(bV, bS()), bF)
273280
274281
275-func bT (bU,bV) = valueOrErrorMessage(addressFromString(bU[bV]), ("Rest cfg doesn't contain address at index " + toString(bV)))
282+func bW (bX,bY) = valueOrErrorMessage(addressFromString(bX[bY]), ("Rest cfg doesn't contain address at index " + toString(bY)))
276283
277284
278-let bW = addressFromStringValue(valueOrElse(getString(this, bQ()), bA))
285+let bZ = addressFromStringValue(valueOrElse(getString(this, bT()), bD))
279286
280-let bU = bR(bW)
287+let bX = bU(bZ)
281288
282-let aa = bT(bU, bJ)
289+let P = bW(bX, bM)
283290
284-let bX = bT(bU, bK)
291+let ca = bW(bX, bN)
285292
286-let bY = bT(bU, bL)
293+let cb = bW(bX, bO)
287294
288-let bZ = bT(bU, bM)
295+let cc = bW(bX, bP)
289296
290-let aG = bT(bU, bN)
297+let av = bW(bX, bQ)
291298
292-let ab = bT(bU, bO)
299+let Q = bW(bX, bR)
293300
294-let ca = "wlg_assetId"
301+let cd = "wlg_assetId"
295302
296-let cb = valueOrErrorMessage(getBinary(bY, ca), "WLGOLD is not issued yet")
303+let ce = valueOrErrorMessage(getBinary(cb, cd), "WLGOLD is not issued yet")
297304
298-let cc = 1
305+let cf = 0
299306
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"
301336
302337
303-func ce (cf) = ("stakedPiecesByOwner_" + cf)
338+func cv (cw) = ("stakedPiecesByOwner_" + cw)
304339
305340
306-func cg (ch) = {
307- let bz = ch
308- if ($isInstanceOf(bz, "Int"))
341+func cx (cy) = {
342+ let bC = cy
343+ if ($isInstanceOf(bC, "Int"))
309344 then {
310- let ci = bz
311- ci
345+ let cz = bC
346+ cz
312347 }
313348 else throw("fail to cast into Int")
314349 }
315350
316351
317-func cj (Z) = {
318- let ac = split(valueOrElse(getString(aa, cd()), "0_0_0_0_0_0"), "_")
319- func ad (ae,af) = (ae + parseIntValue(af))
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))
320355
321- let ck = {
322- let ah = ac
323- let ai = size(ah)
324- let aj = 0
325- func ak (al,am) = if ((am >= ai))
326- then al
327- else ad(al, ah[am])
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])
328363
329- func an (al,am) = if ((am >= ai))
330- then al
364+ func ac (aa,ab) = if ((ab >= X))
365+ then aa
331366 else throw("List size exceeds 6")
332367
333- an(ak(ak(ak(ak(ak(ak(aj, 0), 1), 2), 3), 4), 5), 6)
368+ ac(Z(Z(Z(Z(Z(Z(Y, 0), 1), 2), 3), 4), 5), 6)
334369 }
335- let cl = valueOrElse(getInteger(aa, ce(Z)), 0)
336-[ck, cl]
370+ let cC = valueOrElse(getInteger(P, cv(O)), 0)
371+[cB, cC]
337372 }
338373
339374
340-func cm (cn,co) = {
341- let cp = pow(10, 0, co, 0, 0, DOWN)
342- let cq = toString((cn % cp))
343- let cr = drop(toString(cp), (1 + size(cq)))
344- (((toString((cn / cp)) + ".") + cr) + cq)
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)
345380 }
346381
347382
348-let cs = "profitAddr"
383+let cJ = "profitAddr"
349384
350-let ct = "stakersAmountPaidTotal"
385+let cK = "stakersAmountPaidTotal"
351386
352-func cu (u) = ("stakersAmountPaidUser_" + u)
387+func cL (u) = ("stakersAmountPaidUser_" + u)
353388
354389
355-func cv () = cg(invoke(aa, "saveLastTx", nil, nil))
390+func cM () = cx(invoke(P, "saveLastTx", nil, nil))
356391
357392
358-func cw (u) = {
359- let cx = valueOrElse(getInteger(v(u)), 0)
360- let aK = lastBlock.timestamp
361- if ((bB > (aK - cx)))
362- then throw((("Arbitrages are possible once a " + toString((bB / 60000))) + "min"))
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"))
363398 else {
364- let cy = cj(u)[cc]
365- let cz = valueOrElse(getInteger(ab, B(u)), 0)
366- ((cy * bE) + cz)
399+ let cP = cA(u)[ct]
400+ let cQ = valueOrElse(getInteger(Q, B(u)), 0)
401+ ((cP * bH) + cQ)
367402 }
368403 }
369404
370405
371-func cA (u,cB) = {
372- let cC = addressFromStringValue(u)
373- let cD = av(u, [bW, aa, bX, bY, bZ, aG, ab], by, 0, cB)
374- let aK = lastBlock.timestamp
375- let aL = cD[G]
376- let aN = cD[H]
377- let cE = cD[I]
378- let aT = cD[J]
379- let cF = cD[K]
380- let aZ = cD[L]
381- let cG = cD[M]
382- if (((aK - aL) > i))
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))
383418 then throw("Please modify contract for next 1.5 years, according to stats")
384419 else {
385- let bq = cD[O]
386- let cH = cu(u)
387- let cI = cD[P]
388- let cJ = cD[Q]
389- $Tuple2([ScriptTransfer(addressFromStringValue(value(getString(k))), cE, cb), ScriptTransfer(addressFromStringValue(value(getString(l))), cF, cb), ScriptTransfer(bW, cG, cb), IntegerEntry(cH, (valueOrElse(getInteger(cH), 0) + bq)), IntegerEntry(ct, (valueOrElse(getInteger(ct), 0) + cI)), IntegerEntry(s, (cD[N] - cI)), IntegerEntry(n, (aN - cE)), IntegerEntry(m, aK), IntegerEntry(p, (aT - cF)), IntegerEntry(o, aK), IntegerEntry(r, (aZ - cG)), IntegerEntry(q, aK), IntegerEntry(t(u), cJ)], $Tuple2(bq, cI))
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))
390425 }
391426 }
392427
393428
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))
396443 then throw("Permission denied")
397- else if (isDefined(getBinary(ca)))
444+ else if (isDefined(getBinary(cd)))
398445 then throw("Already initialized")
399446 else {
400- let aB = c
401- let cN = Issue("WLGOLD", "WavesLands Gold investment token", aB, 8, true, unit, 0)
402- let cO = calculateAssetId(cN)
403-[cN, IntegerEntry(y, lastBlock.timestamp), IntegerEntry(z, aB), IntegerEntry(ct, 0), IntegerEntry(s, fraction(c, g, bD)), BinaryEntry(ca, cO), StringEntry(bQ(), cL), StringEntry(k, aP), StringEntry(l, aV), StringEntry(cs, cM)]
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)]
404451 }
405452
406453
407454
408-@Callable(cK)
409-func buyWlg (cP) = {
410- let cQ = cv()
411- if ((size(cK.payments) != 1))
455+@Callable(dh)
456+func buyWlg (dm) = {
457+ let dn = cM()
458+ if ((size(dh.payments) != 1))
412459 then throw("exactly 1 payment must be attached")
413460 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))
418466 then throw("USDT payments only!")
419467 else {
420- let cC = cK.caller
421- let u = toString(cC)
422- if ((bF > cS))
423- then throw((("You can trade min " + cm(bF, 6)) + " USDT"))
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"))
424472 else {
425- let cD = av("", [bW, aa, bX, bY, bZ, aG, ab], by, cS, bD)
426- let cU = cD[D]
427- let cV = cD[F]
428- let cW = fraction(cV, bE, cU)
429- let cX = fraction(cW, 6, 5)
430- let cY = fraction(cS, bE, cX)
431- let cZ = cw(u)
432- if ((cY > cZ))
433- then throw((("You can get max " + cm(cZ, 8)) + " WLGOLD"))
434- else if ((cP > cY))
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))
435483 then throw("Price changed during operation, please try again")
436484 else {
437- let da = (cS / 6)
438- let db = (cS - da)
439- let dc = fraction(cU, db, cV)
440- $Tuple2([Reissue(cb, dc, true), IntegerEntry(z, (cU + dc)), IntegerEntry(v(u), lastBlock.timestamp), ScriptTransfer(addressFromStringValue(value(getString(cs))), da, by), ScriptTransfer(cC, cY, cb)], cQ)
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)
441489 }
442490 }
443491 }
444492 }
445493 }
446494
447495
448496
449-@Callable(cK)
450-func sellWlg (cP) = {
451- let cQ = cv()
452- if ((size(cK.payments) != 1))
497+@Callable(dh)
498+func sellWlg (dm) = {
499+ let dn = cM()
500+ if ((size(dh.payments) != 1))
453501 then throw("exactly 1 payment must be attached")
454502 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!")
462584 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))
481590 }
482591 }
483592 }
484593
485594
486595
487-@Callable(cK)
488-func claim () = {
489- let cQ = cv()
490- if ((size(cK.payments) != 0))
596+@Callable(dh)
597+func unstakeWlgold (dK) = {
598+ let dn = cM()
599+ if ((size(dh.payments) != 0))
491600 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+ }
497616 }
498617
499618
500619
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))
505622 then throw("Permission denied")
506623 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)
510628 }
511629
512630
513631
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+ }
521644
522645

github/deemru/w8io/169f3d6 
198.48 ms