tx · 6wt8HkEaoY6Jg2sUwNatpiX5v8cB8Q4XP9kRRXXQgq5j

3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez:  -0.00100000 Waves

2023.11.09 15:25 [2835806] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves

{ "type": 13, "id": "6wt8HkEaoY6Jg2sUwNatpiX5v8cB8Q4XP9kRRXXQgq5j", "fee": 100000, "feeAssetId": null, "timestamp": 1699532713148, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "3CpfLdj9PEosvWy3bgCsyWTarnbZJjXqzEZ72xxbGhkd8tmguLCwSZHSqbPwtjrDxMT6pEprZxZfLc1JFhaReTqS" ], "script": "base64:BgIECAISAAIBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAABDHRyeUdldFN0cmluZwEDa2V5BAckbWF0Y2gwCQCdCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAWIFByRtYXRjaDAFAWICAAEBaQEIcmVnaXN0ZXIACQDMCAIJAQxJbnRlZ2VyRW50cnkCAhFBbW91bnQgUmVnaXN0ZXJlZAkAZAIJAQ10cnlHZXRJbnRlZ2VyAQIRQW1vdW50IFJlZ2lzdGVyZWQAAQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgICEFJlZ2lzdGVyIGFkZHJlc3MJAKQDAQkAZAIJAQ10cnlHZXRJbnRlZ2VyAQIRQW1vdW50IFJlZ2lzdGVyZWQAAQkApQgBCAUBaQZjYWxsZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQClCAEIBQFpBmNhbGxlcgISQWRkcmVzcyByZWdpc3RlcmVkCQClCAEIBQFpBmNhbGxlcgUDbmlsAJgvjlM=", "height": 2835806, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H3Mm9JdSBucVBsB4ppr9rA1Ne1Nk2iGUBpoR7C5qxZpK Next: ArbuQpGVzN7qbX8C5Nfc2BmGyLHp6ZoFR1mfnjYHCngf Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-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"]
5-
6-let b = 1
7-
8-let c = 10
9-
10-func d (e) = {
11- let f = getInteger(this, e)
12- if ($isInstanceOf(f, "Int"))
4+func a (b) = {
5+ let c = getInteger(this, b)
6+ if ($isInstanceOf(c, "Int"))
137 then {
14- let g = f
15- g
8+ let d = c
9+ d
1610 }
1711 else 0
1812 }
1913
2014
21-func h (e) = {
22- let f = getString(this, e)
23- if ($isInstanceOf(f, "String"))
15+func e (b) = {
16+ let c = getString(this, b)
17+ if ($isInstanceOf(c, "String"))
2418 then {
25- let g = f
26- g
19+ let d = c
20+ d
2721 }
2822 else ""
2923 }
3024
3125
32-func i (j) = {
33- let f = j
34- if ($isInstanceOf(f, "ByteVector"))
35- then {
36- let g = f
37- toBase58String(g)
38- }
39- else "WAVES"
40- }
41-
42-
43-func k (l) = if ((l == "WAVES"))
44- then unit
45- else fromBase58String(l)
46-
47-
48-func m (n) = {
49- let o = d((("boosting_" + n) + "_lastHeight"))
50- let p = d((("boosting_" + n) + "_finishHeight"))
51- if (if ((o != 0))
52- then (p > o)
53- else false)
54- then {
55- let q = (d((("boosting_" + n) + "_totalAmount")) / ((d((("boosting_" + n) + "_days")) * b) * c))
56- let r = fraction((min([p, height]) - o), q, 1)
57- let s = h((("boosting_" + n) + "_poolId"))
58- let t = h((("pool_" + s) + "_boostings"))
59- let u = size(t)
60- let v = value(indexOf(t, n))
61- let w = (take(t, (u - (u - v))) + takeRight(t, (u - (v + 1))))
62-[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), r, k(h((("boosting_" + n) + "_assetId")))), StringEntry("getFinishedPoolId", s), StringEntry("getPoolBoostings", t), IntegerEntry("findIndex", v), IntegerEntry("sizeStr", u), StringEntry("left string", take(t, (u - (u - v)))), StringEntry("right string", takeRight(t, (u - (v + 1)))), StringEntry((("pool_" + s) + "_boostings"), w)]
63- }
64- else nil
65- }
66-
67-
68-func x (n) = {
69- let o = d((("boosting_" + n) + "_lastHeight"))
70- let p = d((("boosting_" + n) + "_finishHeight"))
71- if ((o >= p))
72- then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((h((("list ended " + toString(height)) + " boostingIds")) + n) + ","))]
73- else [StringEntry((("list ongoing boosts " + toString(height)) + " boostingIds"), ((h((("list ongoing boosts " + toString(height)) + " boostingIds")) + n) + ","))]
74- }
75-
76-
77-@Callable(y)
78-func addBoosting (z,A) = if ((1 > A))
79- then throw("amount of days has to be between 1 and 365")
80- else if ((A > 365))
81- then throw("amount of days has to be between 1 and 365")
82- else if (false)
83- then throw("under maintenance until further notice")
84- else {
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"))
88- else {
89- let j = i(y.payments[0].assetId)
90- if ((height == d("height")))
91- then throw("wait 1 minute")
92- else {
93- let C = if ((size(h((("pool_" + z) + "_boostings"))) > 11))
94- then throw("max 5 boosts per pool")
95- else invoke(this, "entryEnded", nil, nil)
96- if ((C == C))
97- then {
98- let n = if ((size((("list ongoing boosts " + toString(height)) + " boostingIds")) > 112))
99- then throw("wait till other boosts are finished")
100- else take(h((("list ended " + toString(height)) + " boostingIds")), 1)
101- if ((addressFromString(z) == unit))
102- then throw("incorrect pool address")
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) + ","))]
104- }
105- else throw("Strict value is not equal to itself.")
106- }
107- }
108- }
109-
110-
111-
112-@Callable(y)
113-func payBoosting (n) = m(n)
114-
115-
116-
117-@Callable(y)
118-func payBoostings () = {
119- func D (E,F) = {
120- let G = invoke(this, "payBoosting", [F], nil)
121- if ((G == G))
122- then G
123- else throw("Strict value is not equal to itself.")
124- }
125-
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])
133-
134- func O (M,N) = if ((N >= J))
135- then M
136- else throw("List size exceeds 56")
137-
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)
139- }
140- if ((H == H))
141- then nil
142- else throw("Strict value is not equal to itself.")
143- }
144-
145-
146-
147-@Callable(y)
148-func endedBoostings (n) = x(n)
149-
150-
151-
152-@Callable(y)
153-func entryEnded () = {
154- func D (E,F) = {
155- let G = invoke(this, "endedBoostings", [F], nil)
156- if ((G == G))
157- then G
158- else throw("Strict value is not equal to itself.")
159- }
160-
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])
168-
169- func O (M,N) = if ((N >= J))
170- then M
171- else throw("List size exceeds 56")
172-
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)
174- }
175- if ((P == P))
176- then [IntegerEntry("height", height)]
177- else throw("Strict value is not equal to itself.")
178- }
179-
180-
181-
182-@Callable(y)
183-func deleteEntr (z) = [DeleteEntry((("pool_" + z) + "_boostings"))]
184-
185-
186-
187-@Callable(y)
188-func checkStr (n) = {
189- let Q = h((("boosting_" + n) + "_poolId"))
190- let t = h((("pool_" + Q) + "_boostings"))
191- let u = size(t)
192- if ((indexOf(t, n) == unit))
193- then nil
194- else {
195- let v = value(indexOf(t, n))
196- let w = (take(t, (u - (u - v))) + takeRight(t, (u - (v + 1))))
197-[StringEntry("getFinishedPoolId", Q), StringEntry("getPoolBoostings", t), IntegerEntry("findIndex", v), IntegerEntry("sizeStr", u), StringEntry("left string", take(t, (u - (u - v)))), StringEntry("right string", takeRight(t, (u - (v + 2)))), StringEntry((("pool_" + Q) + "_boostings"), w)]
198- }
199- }
26+@Callable(f)
27+func register () = [IntegerEntry("Amount Registered", (a("Amount Registered") + 1)), StringEntry(("Register address" + toString((a("Amount Registered") + 1))), toString(f.caller)), StringEntry((toString(f.caller) + "Address registered"), toString(f.caller))]
20028
20129

github/deemru/w8io/169f3d6 
45.63 ms