tx · 41fKokXwTHvJ65Lw7ajxqmLAX9bnqN8BrUGS9wCz3ft7

3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez:  -0.00200000 Waves

2023.11.06 15:11 [2831465] smart account 3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez > SELF 0.00000000 Waves

{ "type": 13, "id": "41fKokXwTHvJ65Lw7ajxqmLAX9bnqN8BrUGS9wCz3ft7", "fee": 200000, "feeAssetId": null, "timestamp": 1699272734136, "version": 2, "chainId": 84, "sender": "3MqEAEVk1NcbRAuEPAX7nyzUqMHbhvRofez", "senderPublicKey": "Brp6cacBXyKUcZr5Uc6VDKsnFcaEeQ8nQzrZQyobDsuf", "proofs": [ "qzGEioVfmMcpZ8b1p8VuEeXpW4UyjjFGkZgJJJff9MFerDNxSVAuTtpK64P7hgt8aEhTMkwQbLB8YTJCrNx5H2T" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAgEAAAAKcmFuZG9taXplcgAAAAEAAAADaW52BAAAAAhsYXN0UGxheQQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzAgAAAAhsYXN0UGxheQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAEAAAAMV2F2ZXNMb3R0b1YyCQAAAgAAAAECAAAAC01hdGNoIGVycm9yBAAAAARyYW5kCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAAIbGFzdFBsYXkIBQAAAANpbnYAAAANdHJhbnNhY3Rpb25JZAgFAAAAA2ludgAAAA9jYWxsZXJQdWJsaWNLZXkIBQAAAAlsYXN0QmxvY2sAAAATZ2VuZXJhdGlvblNpZ25hdHVyZQkAAZoAAAABCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAkAAZoAAAABCAUAAAAJbGFzdEJsb2Nr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AQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAA13cml0ZUxhc3RQbGF5BQAAAAt3aW5UcmFuc2ZlcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAADXdyaXRlTGFzdFBsYXkJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAAAAAEAAAABaQEAAAAFbG90dG8AAAAACQEAAAAKc3RhcnRMb3R0bwAAAAEFAAAAAWkAAAAAWA2Nzg==", "height": 2831465, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Abx553A48RhWokDnYebkgZJYmo3BezxaS7ajyA5qbPp2 Next: 4MGF2L8p4r6Xqb6SH3B8jxrvErdFCno9qmR5LgQ4EEfh Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 3 #-}
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"))
13- then {
14- let g = f
15- g
16- }
17- else 0
4+func a (b) = {
5+ let c = {
6+ let d = getBinary(this, "lastPlay")
7+ if ($isInstanceOf(d, "ByteVector"))
8+ then {
9+ let e = d
10+ e
11+ }
12+ else if ($isInstanceOf(d, "Unit"))
13+ then base58'2ee4oFDYriWJ9EMeR'
14+ else throw("Match error")
15+ }
16+ let f = (((((c + b.transactionId) + b.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
17+ sha256(f)
1818 }
1919
2020
21-func h (e) = {
22- let f = getString(this, e)
23- if ($isInstanceOf(f, "String"))
24- then {
25- let g = f
26- g
27- }
28- else ""
21+func g (b) = {
22+ let h = (wavesBalance(this) / 100)
23+ let i = extract(b.payment)
24+ if (!(isDefined(b.payment)))
25+ then throw("Should be with Payment in Waves")
26+ else if (isDefined(i.assetId))
27+ then throw("Payment should be in Waves")
28+ else if ((i.amount > h))
29+ then throw(("Payment should be less than " + toString(h)))
30+ else {
31+ let j = a(b)
32+ let k = TransferSet([ScriptTransfer(b.caller, ((i.amount * 190) / 100), unit)])
33+ let l = WriteSet([DataEntry("lastPlay", j)])
34+ if ((500 > (toInt(j) % 1000)))
35+ then ScriptResult(l, k)
36+ else ScriptResult(l, TransferSet(nil))
37+ }
2938 }
3039
3140
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-[IntegerEntry((("boosting_" + n) + "_lastHeight"), height), ScriptTransfer(addressFromStringValue(h((("boosting_" + n) + "_poolId"))), r, k(h((("boosting_" + n) + "_assetId"))))]
58- }
59- else nil
60- }
61-
62-
63-func s (n) = {
64- let o = d((("boosting_" + n) + "_lastHeight"))
65- let p = d((("boosting_" + n) + "_finishHeight"))
66- if ((o >= p))
67- then [StringEntry((("list ended " + toString(height)) + " boostingIds"), ((h((("list ended " + toString(height)) + " boostingIds")) + n) + ","))]
68- else nil
69- }
70-
71-
72-@Callable(t)
73-func addBoosting (u,v) = if ((1 > v))
74- then throw("amount of days has to be between 1 and 365")
75- else if ((v > 365))
76- then throw("amount of days has to be between 1 and 365")
77- else if (if ((t.caller != this))
78- then (t.caller != Address(base58'3N3y7nQfqDc7rBUExjKQi5ZbspWRh9q8PYH'))
79- else false)
80- then throw("under maintenance until further notice")
81- else {
82- let w = t.payments[0].amount
83- if ((1440 > (w / v)))
84- then throw((("boosting amount too small, minimum is " + toString((1440 * v))) + " of the smallest unit of payment asset"))
85- else {
86- let j = i(t.payments[0].assetId)
87- if ((height == d("height")))
88- then throw("wait 1 minute")
89- else {
90- let x = invoke(this, "entryEnded", nil, nil)
91- if ((x == x))
92- then {
93- let y = invoke(this, "firstEndedBoostingId", nil, nil)
94- if ((y == y))
95- then {
96- let n = toString(d("first"))
97- if ((addressFromString(u) == unit))
98- then throw("incorrect pool address")
99- else [IntegerEntry((("boosting_" + n) + "_days"), v), IntegerEntry((("boosting_" + n) + "_totalAmount"), w), IntegerEntry((("boosting_" + n) + "_dailyAmount"), (w / v)), IntegerEntry((("boosting_" + n) + "_startHeight"), height), IntegerEntry((("boosting_" + n) + "_finishHeight"), (height + ((v * b) * c))), IntegerEntry((("boosting_" + n) + "_finishTimestamp"), (lastBlock.timestamp + ((((v * b) * c) * 60) * 1000))), IntegerEntry((("boosting_" + n) + "_lastHeight"), height), StringEntry((("boosting_" + n) + "_assetId"), j), StringEntry((("boosting_" + n) + "_owner"), toString(t.caller)), StringEntry((("boosting_" + n) + "_poolId"), u), StringEntry((("pool_" + u) + "_boostings"), ((h((("pool_" + u) + "_boostings")) + n) + ","))]
100- }
101- else throw("Strict value is not equal to itself.")
102- }
103- else throw("Strict value is not equal to itself.")
104- }
105- }
106- }
107-
108-
109-
110-@Callable(t)
111-func payBoosting (n) = m(n)
112-
113-
114-
115-@Callable(t)
116-func payBoostings () = {
117- func z (A,B) = {
118- let C = invoke(this, "payBoosting", [B], nil)
119- if ((C == C))
120- then C
121- else throw("Strict value is not equal to itself.")
122- }
123-
124- let D = {
125- let E = a
126- let F = size(E)
127- let G = 0
128- func H (I,J) = if ((J >= F))
129- then I
130- else z(I, E[J])
131-
132- func K (I,J) = if ((J >= F))
133- then I
134- else throw("List size exceeds 56")
135-
136- K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 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)
137- }
138- if ((D == D))
139- then nil
140- else throw("Strict value is not equal to itself.")
141- }
142-
143-
144-
145-@Callable(t)
146-func endedBoostings (n) = s(n)
147-
148-
149-
150-@Callable(t)
151-func entryEnded () = {
152- func z (A,B) = {
153- let C = invoke(this, "endedBoostings", [B], nil)
154- if ((C == C))
155- then C
156- else throw("Strict value is not equal to itself.")
157- }
158-
159- let L = {
160- let E = a
161- let F = size(E)
162- let G = 0
163- func H (I,J) = if ((J >= F))
164- then I
165- else z(I, E[J])
166-
167- func K (I,J) = if ((J >= F))
168- then I
169- else throw("List size exceeds 56")
170-
171- K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 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)
172- }
173- if ((L == L))
174- then [IntegerEntry("height", height)]
175- else throw("Strict value is not equal to itself.")
176- }
177-
178-
179-
180-@Callable(t)
181-func firstEndedBoostingId () = {
182- func M (A,B) = (A :+ parseIntValue(B))
183-
184- let N = dropRight(h((("list ended " + toString(height)) + " boostingIds")), 1)
185- let O = {
186- let E = split(N, ",")
187- let F = size(E)
188- let G = nil
189- func H (I,J) = if ((J >= F))
190- then I
191- else M(I, E[J])
192-
193- func K (I,J) = if ((J >= F))
194- then I
195- else throw("List size exceeds 56")
196-
197- K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 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)
198- }
199- let P = O[0]
200-[IntegerEntry("first", P)]
201- }
41+@Callable(m)
42+func lotto () = g(m)
20243
20344

github/deemru/w8io/c3f4982 
38.91 ms