tx · AG4uBoCjs4TNUi2No4zSUyZQKerKBRh1oJqUrV7fqZ8z

3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez:  -0.00700000 Waves

2023.11.08 12:19 [2834191] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves

{ "type": 13, "id": "AG4uBoCjs4TNUi2No4zSUyZQKerKBRh1oJqUrV7fqZ8z", "fee": 700000, "feeAssetId": null, "timestamp": 1699435175894, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "3AHXNZZJUSvkuznAhjPwwVgJi15UeeMo9fe9n2NzqAxipamFPyH86bJJgnchqgb2Ubdue3ryFEGWAgvvWT9xicN5" ], "script": "base64:BgIbCAISBAoCCAESAwoBCBIAEgMKAQgSABIDCgEICQACbGkJAMwIAgIBMQkAzAgCAgEyCQDMCAICATMJAMwIAgIBNAkAzAgCAgE1CQDMCAICATYJAMwIAgIBNwkAzAgCAgE4CQDMCAICATkJAMwIAgICMTAJAMwIAgICMTEJAMwIAgICMTIJAMwIAgICMTMJAMwIAgICMTQJAMwIAgICMTUJAMwIAgICMTYJAMwIAgICMTcJAMwIAgICMTgJAMwIAgICMTkJAMwIAgICMjAJAMwIAgICMjEJAMwIAgICMjIJAMwIAgICMjMJAMwIAgICMjQJAMwIAgICMjUJAMwIAgICMjYJAMwIAgICMjcJAMwIAgICMjgJAMwIAgICMjkJAMwIAgICMzAJAMwIAgICMzEJAMwIAgICMzIJAMwIAgICMzMJAMwIAgICMzQJAMwIAgICMzUJAMwIAgICMzYJAMwIAgICMzcJAMwIAgICMzgJAMwIAgICMzkJAMwIAgICNDAJAMwIAgICNDEJAMwIAgICNDIJAMwIAgICNDMJAMwIAgICNDQJAMwIAgICNDUJAMwIAgICNDYJAMwIAgICNDcJAMwIAgICNDgJAMwIAgIC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AQkArAICCQCsAgICBXBvb2xfBQZwb29sSWQCCl9ib29zdGluZ3MFA25pbADHVOIg", "height": 2834191, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GKFECfCpKP3NdGxAgoJuUGPeoLHA7w3JPshyyukBbV5R Next: 3EDoMavUgGSjtjUoh3YWjn6298Mjc6E92hgD6eR7RNL3 Diff:
OldNewDifferences
4949 let o = d((("boosting_" + n) + "_lastHeight"))
5050 let p = d((("boosting_" + n) + "_finishHeight"))
5151 let q = h((("boosting_" + n) + "_poolId"))
52- let r = dropRight(h((("pool_" + q) + "_boostings")), 1)
53- let s = value(indexOf(r, n))
52+ let r = h((("pool_" + q) + "_boostings"))
53+ let s = size(r)
54+ let t = value(indexOf(r, n))
55+ let u = (take(r, (s - (s - t))) + takeRight(r, (s - (t + 1))))
5456 if (if ((o != 0))
5557 then (p > o)
5658 else false)
5759 then {
58- let t = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
59- let u = fraction((min([p, height]) - o), t, 1)
60-[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), u, k(h((("boosting_" + n) + "_assetId")))), StringEntry("getFinishedPoolId", q), StringEntry("getPoolBoostings", r), IntegerEntry("findIndex", s)]
60+ let v = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
61+ let w = fraction((min([p, height]) - o), v, 1)
62+[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), w, k(h((("boosting_" + n) + "_assetId")))), StringEntry("getFinishedPoolId", q), StringEntry("getPoolBoostings", r), IntegerEntry("findIndex", t), IntegerEntry("sizeStr", s)]
6163 }
6264 else nil
6365 }
6466
6567
66-func v (n) = {
68+func x (n) = {
6769 let o = d((("boosting_" + n) + "_lastHeight"))
6870 let p = d((("boosting_" + n) + "_finishHeight"))
6971 if ((o >= p))
7072 then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((h((("list ended " + toString(height)) + " boostingIds")) + n) + ","))]
71- else nil
73+ else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((h((("list ongoing boosts " + toString(height)) + " boostingIds")) + n) + ","))]
7274 }
7375
7476
75-@Callable(w)
76-func addBoosting (x,y) = if ((1 > y))
77+@Callable(y)
78+func addBoosting (z,A) = if ((1 > A))
7779 then throw("amount of days has to be between 1 and 365")
78- else if ((y > 365))
80+ else if ((A > 365))
7981 then throw("amount of days has to be between 1 and 365")
8082 else if (false)
8183 then throw("under maintenance until further notice")
8284 else {
83- let z = w.payments[0].amount
84- if ((1440 > (z / y)))
85- then throw((("boosting amount too small, minimum is " + toString((1440 * y))) + " of the smallest unit of payment asset"))
85+ let B = y.payments[0].amount
86+ if ((1440 > (B / A)))
87+ then throw((("boosting amount too small, minimum is " + toString((1440 * A))) + " of the smallest unit of payment asset"))
8688 else {
87- let j = i(w.payments[0].assetId)
89+ let j = i(y.payments[0].assetId)
8890 if ((height == d("height")))
8991 then throw("wait 1 minute")
9092 else {
91- let A = if ((size(h((("pool_" + x) + "_boostings"))) > 11))
93+ let C = if ((size(h((("pool_" + z) + "_boostings"))) > 11))
9294 then throw("max 5 boosts per pool")
9395 else invoke(this, "entryEnded", nil, nil)
94- if ((A == A))
96+ if ((C == C))
9597 then {
96- let n = if ((take(h((("list ended " + toString(height)) + " boostingIds")), 1) == "0"))
98+ let n = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 3))
9799 then throw("wait till other boosts are finished")
98100 else take(h((("list ended " + toString(height)) + " boostingIds")), 1)
99- if ((addressFromString(x) == unit))
101+ if ((addressFromString(z) == unit))
100102 then throw("incorrect pool address")
101- else [IntegerEntry((("boosting_" + n) + "_days"), y), IntegerEntry((("boosting_" + n) + "_totalAmount"), z), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (z / y)), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((y * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((y * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(w.caller)), StringEntry((("boosting_" + n) + "_poolId"), x), StringEntry((("pool_" + x) + "_boostings"), ((h((("pool_" + x) + "_boostings")) + n) + ","))]
103+ else [IntegerEntry((("boosting_" + n) + "_days"), A), IntegerEntry((("boosting_" + n) + "_totalAmount"), B), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (B / A)), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((A * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((A * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(y.caller)), StringEntry((("boosting_" + n) + "_poolId"), z), StringEntry((("pool_" + z) + "_boostings"), ((h((("pool_" + z) + "_boostings")) + n) + ","))]
102104 }
103105 else throw("Strict value is not equal to itself.")
104106 }
107109
108110
109111
110-@Callable(w)
112+@Callable(y)
111113 func payBoosting (n) = m(n)
112114
113115
114116
115-@Callable(w)
117+@Callable(y)
116118 func payBoostings () = {
117- func B (C,D) = {
118- let E = invoke(this, "payBoosting", [D], nil)
119- if ((E == E))
120- then E
119+ func D (E,F) = {
120+ let G = invoke(this, "payBoosting", [F], nil)
121+ if ((G == G))
122+ then G
121123 else throw("Strict value is not equal to itself.")
122124 }
123125
124- let F = {
125- let G = a
126- let H = size(G)
127- let I = 0
128- func J (K,L) = if ((L >= H))
129- then K
130- else B(K, G[L])
126+ let H = {
127+ let I = a
128+ let J = size(I)
129+ let K = 0
130+ func L (M,N) = if ((N >= J))
131+ then M
132+ else D(M, I[N])
131133
132- func M (K,L) = if ((L >= H))
133- then K
134+ func O (M,N) = if ((N >= J))
135+ then M
134136 else throw("List size exceeds 56")
135137
136- M(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(I, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
138+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
137139 }
138- if ((F == F))
140+ if ((H == H))
139141 then nil
140142 else throw("Strict value is not equal to itself.")
141143 }
142144
143145
144146
145-@Callable(w)
146-func endedBoostings (n) = v(n)
147+@Callable(y)
148+func endedBoostings (n) = x(n)
147149
148150
149151
150-@Callable(w)
152+@Callable(y)
151153 func entryEnded () = {
152- func B (C,D) = {
153- let E = invoke(this, "endedBoostings", [D], nil)
154- if ((E == E))
155- then E
154+ func D (E,F) = {
155+ let G = invoke(this, "endedBoostings", [F], nil)
156+ if ((G == G))
157+ then G
156158 else throw("Strict value is not equal to itself.")
157159 }
158160
159- let N = {
160- let G = a
161- let H = size(G)
162- let I = 0
163- func J (K,L) = if ((L >= H))
164- then K
165- else B(K, G[L])
161+ let P = {
162+ let I = a
163+ let J = size(I)
164+ let K = 0
165+ func L (M,N) = if ((N >= J))
166+ then M
167+ else D(M, I[N])
166168
167- func M (K,L) = if ((L >= H))
168- then K
169+ func O (M,N) = if ((N >= J))
170+ then M
169171 else throw("List size exceeds 56")
170172
171- M(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(I, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
173+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
172174 }
173- if ((N == N))
175+ if ((P == P))
174176 then [IntegerEntry("height", height)]
175177 else throw("Strict value is not equal to itself.")
176178 }
177179
178180
179181
180-@Callable(w)
181-func deleteEntr (x) = [DeleteEntry((("pool_" + x) + "_boostings"))]
182+@Callable(y)
183+func deleteEntr (z) = [DeleteEntry((("pool_" + z) + "_boostings"))]
182184
183185
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "55", "56"]
55
66 let b = 1
77
88 let c = 10
99
1010 func d (e) = {
1111 let f = getInteger(this, e)
1212 if ($isInstanceOf(f, "Int"))
1313 then {
1414 let g = f
1515 g
1616 }
1717 else 0
1818 }
1919
2020
2121 func h (e) = {
2222 let f = getString(this, e)
2323 if ($isInstanceOf(f, "String"))
2424 then {
2525 let g = f
2626 g
2727 }
2828 else ""
2929 }
3030
3131
3232 func i (j) = {
3333 let f = j
3434 if ($isInstanceOf(f, "ByteVector"))
3535 then {
3636 let g = f
3737 toBase58String(g)
3838 }
3939 else "WAVES"
4040 }
4141
4242
4343 func k (l) = if ((l == "WAVES"))
4444 then unit
4545 else fromBase58String(l)
4646
4747
4848 func m (n) = {
4949 let o = d((("boosting_" + n) + "_lastHeight"))
5050 let p = d((("boosting_" + n) + "_finishHeight"))
5151 let q = h((("boosting_" + n) + "_poolId"))
52- let r = dropRight(h((("pool_" + q) + "_boostings")), 1)
53- let s = value(indexOf(r, n))
52+ let r = h((("pool_" + q) + "_boostings"))
53+ let s = size(r)
54+ let t = value(indexOf(r, n))
55+ let u = (take(r, (s - (s - t))) + takeRight(r, (s - (t + 1))))
5456 if (if ((o != 0))
5557 then (p > o)
5658 else false)
5759 then {
58- let t = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
59- let u = fraction((min([p, height]) - o), t, 1)
60-[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), u, k(h((("boosting_" + n) + "_assetId")))), StringEntry("getFinishedPoolId", q), StringEntry("getPoolBoostings", r), IntegerEntry("findIndex", s)]
60+ let v = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
61+ let w = fraction((min([p, height]) - o), v, 1)
62+[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), w, k(h((("boosting_" + n) + "_assetId")))), StringEntry("getFinishedPoolId", q), StringEntry("getPoolBoostings", r), IntegerEntry("findIndex", t), IntegerEntry("sizeStr", s)]
6163 }
6264 else nil
6365 }
6466
6567
66-func v (n) = {
68+func x (n) = {
6769 let o = d((("boosting_" + n) + "_lastHeight"))
6870 let p = d((("boosting_" + n) + "_finishHeight"))
6971 if ((o >= p))
7072 then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((h((("list ended " + toString(height)) + " boostingIds")) + n) + ","))]
71- else nil
73+ else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((h((("list ongoing boosts " + toString(height)) + " boostingIds")) + n) + ","))]
7274 }
7375
7476
75-@Callable(w)
76-func addBoosting (x,y) = if ((1 > y))
77+@Callable(y)
78+func addBoosting (z,A) = if ((1 > A))
7779 then throw("amount of days has to be between 1 and 365")
78- else if ((y > 365))
80+ else if ((A > 365))
7981 then throw("amount of days has to be between 1 and 365")
8082 else if (false)
8183 then throw("under maintenance until further notice")
8284 else {
83- let z = w.payments[0].amount
84- if ((1440 > (z / y)))
85- then throw((("boosting amount too small, minimum is " + toString((1440 * y))) + " of the smallest unit of payment asset"))
85+ let B = y.payments[0].amount
86+ if ((1440 > (B / A)))
87+ then throw((("boosting amount too small, minimum is " + toString((1440 * A))) + " of the smallest unit of payment asset"))
8688 else {
87- let j = i(w.payments[0].assetId)
89+ let j = i(y.payments[0].assetId)
8890 if ((height == d("height")))
8991 then throw("wait 1 minute")
9092 else {
91- let A = if ((size(h((("pool_" + x) + "_boostings"))) > 11))
93+ let C = if ((size(h((("pool_" + z) + "_boostings"))) > 11))
9294 then throw("max 5 boosts per pool")
9395 else invoke(this, "entryEnded", nil, nil)
94- if ((A == A))
96+ if ((C == C))
9597 then {
96- let n = if ((take(h((("list ended " + toString(height)) + " boostingIds")), 1) == "0"))
98+ let n = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 3))
9799 then throw("wait till other boosts are finished")
98100 else take(h((("list ended " + toString(height)) + " boostingIds")), 1)
99- if ((addressFromString(x) == unit))
101+ if ((addressFromString(z) == unit))
100102 then throw("incorrect pool address")
101- else [IntegerEntry((("boosting_" + n) + "_days"), y), IntegerEntry((("boosting_" + n) + "_totalAmount"), z), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (z / y)), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((y * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((y * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(w.caller)), StringEntry((("boosting_" + n) + "_poolId"), x), StringEntry((("pool_" + x) + "_boostings"), ((h((("pool_" + x) + "_boostings")) + n) + ","))]
103+ else [IntegerEntry((("boosting_" + n) + "_days"), A), IntegerEntry((("boosting_" + n) + "_totalAmount"), B), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (B / A)), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((A * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((A * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(y.caller)), StringEntry((("boosting_" + n) + "_poolId"), z), StringEntry((("pool_" + z) + "_boostings"), ((h((("pool_" + z) + "_boostings")) + n) + ","))]
102104 }
103105 else throw("Strict value is not equal to itself.")
104106 }
105107 }
106108 }
107109
108110
109111
110-@Callable(w)
112+@Callable(y)
111113 func payBoosting (n) = m(n)
112114
113115
114116
115-@Callable(w)
117+@Callable(y)
116118 func payBoostings () = {
117- func B (C,D) = {
118- let E = invoke(this, "payBoosting", [D], nil)
119- if ((E == E))
120- then E
119+ func D (E,F) = {
120+ let G = invoke(this, "payBoosting", [F], nil)
121+ if ((G == G))
122+ then G
121123 else throw("Strict value is not equal to itself.")
122124 }
123125
124- let F = {
125- let G = a
126- let H = size(G)
127- let I = 0
128- func J (K,L) = if ((L >= H))
129- then K
130- else B(K, G[L])
126+ let H = {
127+ let I = a
128+ let J = size(I)
129+ let K = 0
130+ func L (M,N) = if ((N >= J))
131+ then M
132+ else D(M, I[N])
131133
132- func M (K,L) = if ((L >= H))
133- then K
134+ func O (M,N) = if ((N >= J))
135+ then M
134136 else throw("List size exceeds 56")
135137
136- M(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(I, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
138+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
137139 }
138- if ((F == F))
140+ if ((H == H))
139141 then nil
140142 else throw("Strict value is not equal to itself.")
141143 }
142144
143145
144146
145-@Callable(w)
146-func endedBoostings (n) = v(n)
147+@Callable(y)
148+func endedBoostings (n) = x(n)
147149
148150
149151
150-@Callable(w)
152+@Callable(y)
151153 func entryEnded () = {
152- func B (C,D) = {
153- let E = invoke(this, "endedBoostings", [D], nil)
154- if ((E == E))
155- then E
154+ func D (E,F) = {
155+ let G = invoke(this, "endedBoostings", [F], nil)
156+ if ((G == G))
157+ then G
156158 else throw("Strict value is not equal to itself.")
157159 }
158160
159- let N = {
160- let G = a
161- let H = size(G)
162- let I = 0
163- func J (K,L) = if ((L >= H))
164- then K
165- else B(K, G[L])
161+ let P = {
162+ let I = a
163+ let J = size(I)
164+ let K = 0
165+ func L (M,N) = if ((N >= J))
166+ then M
167+ else D(M, I[N])
166168
167- func M (K,L) = if ((L >= H))
168- then K
169+ func O (M,N) = if ((N >= J))
170+ then M
169171 else throw("List size exceeds 56")
170172
171- M(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(J(I, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
173+ O(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(L(K, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56)
172174 }
173- if ((N == N))
175+ if ((P == P))
174176 then [IntegerEntry("height", height)]
175177 else throw("Strict value is not equal to itself.")
176178 }
177179
178180
179181
180-@Callable(w)
181-func deleteEntr (x) = [DeleteEntry((("pool_" + x) + "_boostings"))]
182+@Callable(y)
183+func deleteEntr (z) = [DeleteEntry((("pool_" + z) + "_boostings"))]
182184
183185

github/deemru/w8io/026f985 
116.75 ms