tx · ABZJApoav1djP3Q64dvmHhpTDBBHf38dSLwmbhoBPpAx

3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez:  -0.00700000 Waves

2023.11.08 11:43 [2834156] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves

{ "type": 13, "id": "ABZJApoav1djP3Q64dvmHhpTDBBHf38dSLwmbhoBPpAx", "fee": 700000, "feeAssetId": null, "timestamp": 1699433030531, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "wwNfaf5GR5GTYJqH7aF8aVE3o7iMFJgypRV3gMTtarz5CoR2m2qxNAuGT2vbpdpCrnAytbLU9LhV612AyPP6uu6" ], "script": "base64:BgIWCAISBAoCCAESAwoBCBIAEgMKAQgSAAkAAmxpCQDMCAICATEJAMwIAgIBMgkAzAgCAgEzCQDMCAICATQJAMwIAgIBNQkAzAgCAgE2CQDMCAICATcJAMwIAgIBOAkAzAgCAgE5CQDMCAICAjEwCQDMCAICAjExCQDMCAICAjEyCQDMCAICAjEzCQDMCAICAjE0CQDMCAICAjE1CQDMCAICAjE2CQDMCAICAjE3CQDMCAICAjE4CQDMCAICAjE5CQDMCAICAjIwCQDMCAICAjIxCQDMCAICAjIyCQDMCAICAjIzCQDMCAICAjI0CQDMCAICAjI1CQDMCAICAjI2CQDMCAICAjI3CQDMCAICAjI4CQDMCAICAjI5CQDMCAICAjMwCQDMCAICAjMxCQDMCAICAjMyCQDMCAICAjMzCQDMCAICAjM0CQDMCAICAjM1CQDMCAICAjM2CQDMCAICAjM3CQDMCAICAjM4CQDMCAICAjM5CQDMCAICAjQwCQDMCAICAjQxCQDMCAICAjQyCQDMCAICAjQzCQDMCAICAjQ0CQDMCAICAjQ1CQDMCAICAjQ2CQDMCAICAjQ3CQDMCAICAjQ4CQDMCAICAjQ5C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BfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIJAQUkZjBfMQIFBSRhY2MwAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgAGQAaABsAHAAdAB4AHwAgACEAIgAjACQAJQAmACcAKAApACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4AwkAAAIFA2VuZAUDZW5kCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgZoZWlnaHQFBmhlaWdodAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuALqOLDc=", "height": 2834156, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7wux38rZdW27DZqpVSCdLyUnKf1Vz96ST24zmTKrf1Cr Next: GKFECfCpKP3NdGxAgoJuUGPeoLHA7w3JPshyyukBbV5R Diff:
OldNewDifferences
8888 if ((height == d("height")))
8989 then throw("wait 1 minute")
9090 else {
91- let A = invoke(this, "entryEnded", nil, nil)
91+ let A = if ((size(h((("pool_" + x) + "_boostings"))) > 11))
92+ then throw("max 5 boosts per pool")
93+ else invoke(this, "entryEnded", nil, nil)
9294 if ((A == A))
9395 then {
94- let B = invoke(this, "firstEndedBoostingId", nil, nil)
95- if ((B == B))
96- then {
97- let n = h("first")
98- if ((addressFromString(x) == unit))
99- then throw("incorrect pool address")
100- 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) + ","))]
101- }
102- else throw("Strict value is not equal to itself.")
96+ let n = if ((take(h((("list ended " + toString(height)) + " boostingIds")), 1) == "0"))
97+ then throw("wait till other boosts are finished")
98+ else take(h((("list ended " + toString(height)) + " boostingIds")), 1)
99+ if ((addressFromString(x) == unit))
100+ 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) + ","))]
103102 }
104103 else throw("Strict value is not equal to itself.")
105104 }
115114
116115 @Callable(w)
117116 func payBoostings () = {
118- func C (D,E) = {
119- let F = invoke(this, "payBoosting", [E], nil)
120- if ((F == F))
121- then F
117+ func B (C,D) = {
118+ let E = invoke(this, "payBoosting", [D], nil)
119+ if ((E == E))
120+ then E
122121 else throw("Strict value is not equal to itself.")
123122 }
124123
125- let G = {
126- let H = a
127- let I = size(H)
128- let J = 0
129- func K (L,M) = if ((M >= I))
130- then L
131- else C(L, H[M])
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])
132131
133- func N (L,M) = if ((M >= I))
134- then L
132+ func M (K,L) = if ((L >= H))
133+ then K
135134 else throw("List size exceeds 56")
136135
137- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 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)
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)
138137 }
139- if ((G == G))
138+ if ((F == F))
140139 then nil
141140 else throw("Strict value is not equal to itself.")
142141 }
150149
151150 @Callable(w)
152151 func entryEnded () = {
153- func C (D,E) = {
154- let F = invoke(this, "endedBoostings", [E], nil)
155- if ((F == F))
156- then F
152+ func B (C,D) = {
153+ let E = invoke(this, "endedBoostings", [D], nil)
154+ if ((E == E))
155+ then E
157156 else throw("Strict value is not equal to itself.")
158157 }
159158
160- let O = {
161- let H = a
162- let I = size(H)
163- let J = 0
164- func K (L,M) = if ((M >= I))
165- then L
166- else C(L, H[M])
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])
167166
168- func N (L,M) = if ((M >= I))
169- then L
167+ func M (K,L) = if ((L >= H))
168+ then K
170169 else throw("List size exceeds 56")
171170
172- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 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)
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)
173172 }
174- if ((O == O))
173+ if ((N == N))
175174 then [IntegerEntry("height", height)]
176175 else throw("Strict value is not equal to itself.")
177- }
178-
179-
180-
181-@Callable(w)
182-func firstEndedBoostingId () = {
183- let P = take(h((("list ended " + toString(height)) + " boostingIds")), 1)
184-[StringEntry("first", P)]
185176 }
186177
187178
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"))
5252 let r = dropRight(h((("pool_" + q) + "_boostings")), 1)
5353 let s = value(indexOf(r, n))
5454 if (if ((o != 0))
5555 then (p > o)
5656 else false)
5757 then {
5858 let t = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
5959 let u = fraction((min([p, height]) - o), t, 1)
6060 [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)]
6161 }
6262 else nil
6363 }
6464
6565
6666 func v (n) = {
6767 let o = d((("boosting_" + n) + "_lastHeight"))
6868 let p = d((("boosting_" + n) + "_finishHeight"))
6969 if ((o >= p))
7070 then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((h((("list ended " + toString(height)) + " boostingIds")) + n) + ","))]
7171 else nil
7272 }
7373
7474
7575 @Callable(w)
7676 func addBoosting (x,y) = if ((1 > y))
7777 then throw("amount of days has to be between 1 and 365")
7878 else if ((y > 365))
7979 then throw("amount of days has to be between 1 and 365")
8080 else if (false)
8181 then throw("under maintenance until further notice")
8282 else {
8383 let z = w.payments[0].amount
8484 if ((1440 > (z / y)))
8585 then throw((("boosting amount too small, minimum is " + toString((1440 * y))) + " of the smallest unit of payment asset"))
8686 else {
8787 let j = i(w.payments[0].assetId)
8888 if ((height == d("height")))
8989 then throw("wait 1 minute")
9090 else {
91- let A = invoke(this, "entryEnded", nil, nil)
91+ let A = if ((size(h((("pool_" + x) + "_boostings"))) > 11))
92+ then throw("max 5 boosts per pool")
93+ else invoke(this, "entryEnded", nil, nil)
9294 if ((A == A))
9395 then {
94- let B = invoke(this, "firstEndedBoostingId", nil, nil)
95- if ((B == B))
96- then {
97- let n = h("first")
98- if ((addressFromString(x) == unit))
99- then throw("incorrect pool address")
100- 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) + ","))]
101- }
102- else throw("Strict value is not equal to itself.")
96+ let n = if ((take(h((("list ended " + toString(height)) + " boostingIds")), 1) == "0"))
97+ then throw("wait till other boosts are finished")
98+ else take(h((("list ended " + toString(height)) + " boostingIds")), 1)
99+ if ((addressFromString(x) == unit))
100+ 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) + ","))]
103102 }
104103 else throw("Strict value is not equal to itself.")
105104 }
106105 }
107106 }
108107
109108
110109
111110 @Callable(w)
112111 func payBoosting (n) = m(n)
113112
114113
115114
116115 @Callable(w)
117116 func payBoostings () = {
118- func C (D,E) = {
119- let F = invoke(this, "payBoosting", [E], nil)
120- if ((F == F))
121- then F
117+ func B (C,D) = {
118+ let E = invoke(this, "payBoosting", [D], nil)
119+ if ((E == E))
120+ then E
122121 else throw("Strict value is not equal to itself.")
123122 }
124123
125- let G = {
126- let H = a
127- let I = size(H)
128- let J = 0
129- func K (L,M) = if ((M >= I))
130- then L
131- else C(L, H[M])
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])
132131
133- func N (L,M) = if ((M >= I))
134- then L
132+ func M (K,L) = if ((L >= H))
133+ then K
135134 else throw("List size exceeds 56")
136135
137- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 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)
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)
138137 }
139- if ((G == G))
138+ if ((F == F))
140139 then nil
141140 else throw("Strict value is not equal to itself.")
142141 }
143142
144143
145144
146145 @Callable(w)
147146 func endedBoostings (n) = v(n)
148147
149148
150149
151150 @Callable(w)
152151 func entryEnded () = {
153- func C (D,E) = {
154- let F = invoke(this, "endedBoostings", [E], nil)
155- if ((F == F))
156- then F
152+ func B (C,D) = {
153+ let E = invoke(this, "endedBoostings", [D], nil)
154+ if ((E == E))
155+ then E
157156 else throw("Strict value is not equal to itself.")
158157 }
159158
160- let O = {
161- let H = a
162- let I = size(H)
163- let J = 0
164- func K (L,M) = if ((M >= I))
165- then L
166- else C(L, H[M])
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])
167166
168- func N (L,M) = if ((M >= I))
169- then L
167+ func M (K,L) = if ((L >= H))
168+ then K
170169 else throw("List size exceeds 56")
171170
172- N(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(K(J, 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)
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)
173172 }
174- if ((O == O))
173+ if ((N == N))
175174 then [IntegerEntry("height", height)]
176175 else throw("Strict value is not equal to itself.")
177- }
178-
179-
180-
181-@Callable(w)
182-func firstEndedBoostingId () = {
183- let P = take(h((("list ended " + toString(height)) + " boostingIds")), 1)
184-[StringEntry("first", P)]
185176 }
186177
187178

github/deemru/w8io/026f985 
76.10 ms