tx · GCWgDzrBFEqFBNMmL57vUrn5y7ow2tbAmFnFqcmRZJmU

3N11gzZic4yASFhatzjC8zvLnpNhDo2B1Rv:  -0.01000000 Waves

2023.10.08 22:46 [2790094] smart account 3N11gzZic4yASFhatzjC8zvLnpNhDo2B1Rv > SELF 0.00000000 Waves

{ "type": 13, "id": "GCWgDzrBFEqFBNMmL57vUrn5y7ow2tbAmFnFqcmRZJmU", "fee": 1000000, "feeAssetId": null, "timestamp": 1696794368927, "version": 2, "chainId": 84, "sender": "3N11gzZic4yASFhatzjC8zvLnpNhDo2B1Rv", "senderPublicKey": "EnUXxxhBK8wUfh1FveDYv9G5HBMXop6YwZWzVrBrLo2i", "proofs": [ "3wmzERFxyg8j2PPdS69XDNj6gtR9cc1pSdTKKSvPuVikRQB4HXVzArofr4CvvFaWXYQZk6m7J872uD2o9tK9FDf5" ], "script": "base64:BgIJCAISBQoDAQEYBwELd3JpdGVTdHJpbmcCA2tleQtzdHJpbmdWYWx1ZQkBC1N0cmluZ0VudHJ5AgUDa2V5BQtzdHJpbmdWYWx1ZQENc3BsaXRDZm1tSnNvbgEFZW50cnkJALUJAgUFZW50cnkCAS8BH2NhbGNFeGNlc3NBbW91bnRQZXJDZm1tUG9zaXRpdmUCCmRpZmZlcmVuY2ULbnVtYmVyQ2ZtbXMECHF1b3RpZW50CQBuBAUKZGlmZmVyZW5jZQABBQtudW1iZXJDZm1tcwUERE9XTgQWdG90YWxEaXN0cmlidXRlZEFtb3VudAkAaAIFCHF1b3RpZW50BQtudW1iZXJDZm1tcwQPcmVtYWluaW5nQW1vdW50CQBlAgUKZGlmZmVyZW5jZQUWdG90YWxEaXN0cmlidXRlZEFtb3VudAMJAGYCBQ9yZW1haW5pbmdBbW91bnQAAAkAlAoCBQhxdW90aWVudAUPcmVtYWluaW5nQW1vdW50CQCUCgIFCHF1b3RpZW50AAABH2NhbGNFeGNlc3NBbW91bnRQZXJDZm1tTmVnYXRpdmUCCmRpZmZlcmVuY2ULbnVtYmVy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VABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgEDWFkanVzdGVkU3dhcHMIBQskdDA0NTY5NDY2MAJfMQQOcmVtYWluaW5nRGlmZnMIBQskdDA0NTY5NDY2MAJfMgQLJHQwNDY2NDQ3NDQJARhkaXN0cmlidXRlUmVtYWluaW5nRGlmZnMCBQ5yZW1haW5pbmdEaWZmcwUNYWRqdXN0ZWRTd2FwcwQKZmluYWxTd2FwcwgFCyR0MDQ2NjQ0NzQ0Al8xBAVkaWZmcwgFCyR0MDQ2NjQ0NzQ0Al8yBQpmaW5hbFN3YXBzAQFpAQRjYWxsAxNwcmVkZXRlcm1pbmVkQW1vdW50D2F2YWlsYWJsZUFtb3VudAVzd2FwcwQEZGlmZgkAZQIFD2F2YWlsYWJsZUFtb3VudAUTcHJlZGV0ZXJtaW5lZEFtb3VudAQNYWRqdXN0ZWRTd2FwcwMJAGYCBQRkaWZmAAAICQEaZGlzdHJpYnV0ZUFkZGl0aW9uYWxUb2tlbnMCBQVzd2FwcwUEZGlmZgJfMQMJAGYCAAAFBGRpZmYJARhkaXN0cmlidXRlTmVnYXRpdmVUb2tlbnMCBQVzd2FwcwUEZGlmZgUFc3dhcHMJAMwIAgkBC3dyaXRlU3RyaW5nAgIFc3dhcHMJALkJAgUFc3dhcHMCASwJAMwIAgkBC3dyaXRlU3RyaW5nAgINYWRqdXN0ZWRTd2FwcwkAuQkCBQ1hZGp1c3RlZFN3YXBzAgEsBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5aZ0JyA==", "height": 2790094, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Ca66mpEXSrbvRDtuvEMVGJ2SQ3GRfcrBy7rJXboDTjtS Next: none Diff:
OldNewDifferences
88
99
1010 func f (g,h) = {
11- let i = (g / h)
11+ let i = fraction(g, 1, h, DOWN)
1212 let j = (i * h)
1313 let k = (g - j)
1414 if ((k > 0))
1717 }
1818
1919
20-func l (m,n) = {
21- let o = size(m)
22- let p = f(n, o)
23- let i = p._1
24- let k = p._2
25- func q (r,s) = {
26- let t = r
27- let u = t._1
28- let v = t._2
29- let w = d(s)
30- let x = parseInt(w[2])
31- let y = x
32- if ($isInstanceOf(y, "Int"))
20+func l (g,h) = {
21+ let i = fraction(g, 1, h, DOWN)
22+ let j = (i * h)
23+ let k = (g - j)
24+ if ((0 > k))
25+ then $Tuple2(i, k)
26+ else $Tuple2(i, 0)
27+ }
28+
29+
30+func m (n,o) = {
31+ let p = size(n)
32+ let q = f(o, p)
33+ let i = q._1
34+ let k = q._2
35+ func r (s,t) = {
36+ let u = s
37+ let v = u._1
38+ let w = u._2
39+ let x = d(t)
40+ let y = parseInt(x[2])
41+ let z = y
42+ if ($isInstanceOf(z, "Int"))
3343 then {
34- let z = y
35- let A = if ((v > 0))
36- then ((z + i) + 1)
37- else (z + i)
38- let B = ((((w[0] + "/") + w[1]) + "/") + toString(A))
39- let C = if ((v > 0))
40- then (v - 1)
41- else v
42- $Tuple2((u :+ B), C)
44+ let A = z
45+ let B = if ((w > 0))
46+ then ((A + i) + 1)
47+ else (A + i)
48+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
49+ let D = if ((w > 0))
50+ then (w - 1)
51+ else w
52+ $Tuple2((v :+ C), D)
4353 }
4454 else throw("Input has wrong datatype!")
4555 }
4656
47- let D = m
48- let E = size(D)
49- let F = $Tuple2(nil, k)
50- func G (H,I) = if ((I >= E))
51- then H
52- else q(H, D[I])
57+ let E = n
58+ let F = size(E)
59+ let G = $Tuple2(nil, k)
60+ func H (I,J) = if ((J >= F))
61+ then I
62+ else r(I, E[J])
5363
54- func J (H,I) = if ((I >= E))
55- then H
64+ func K (I,J) = if ((J >= F))
65+ then I
5666 else throw("List size exceeds 40")
5767
58- J(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(F, 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)
68+ 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(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)
5969 }
6070
6171
62-@Callable(K)
63-func call (L,M,m) = {
64- let n = (M - L)
65- let u = if ((n > 0))
66- then l(m, n)._1
67- else m
68-[a("swaps", makeString(m, ",")), a("adjustedSwaps", makeString(u, ","))]
72+func L (w,n) = {
73+ func M (s,t) = {
74+ let N = s
75+ let v = N._1
76+ let O = N._2
77+ let x = d(t)
78+ let y = parseInt(x[2])
79+ let P = {
80+ let z = y
81+ if ($isInstanceOf(z, "Int"))
82+ then {
83+ let A = z
84+ A
85+ }
86+ else throw("Input amount has the wrong data type")
87+ }
88+ let Q = if ((P > 4))
89+ then fraction(P, 3, 4)
90+ else 0
91+ let R = if (if ((O == 0))
92+ then true
93+ else (Q == 0))
94+ then $Tuple2(O, 0)
95+ else if (((O + Q) > 0))
96+ then {
97+ let S = (O + Q)
98+ $Tuple2(0, (Q - S))
99+ }
100+ else if ((0 > (O + Q)))
101+ then $Tuple2((O + Q), Q)
102+ else $Tuple2(0, Q)
103+ let D = R._1
104+ let T = R._2
105+ let B = (P - T)
106+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
107+ $Tuple2((v :+ C), D)
108+ }
109+
110+ let E = n
111+ let F = size(E)
112+ let G = $Tuple2(nil, w)
113+ func H (I,J) = if ((J >= F))
114+ then I
115+ else M(I, E[J])
116+
117+ func K (I,J) = if ((J >= F))
118+ then I
119+ else throw("List size exceeds 40")
120+
121+ 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(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)
69122 }
70123
71124
72-@Verifier(N)
73-func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
125+func U (n,o) = {
126+ let p = size(n)
127+ let V = l(o, p)
128+ let i = V._1
129+ let k = V._2
130+ func r (s,t) = {
131+ let W = s
132+ let v = W._1
133+ let w = W._2
134+ let x = d(t)
135+ let y = parseInt(x[2])
136+ let z = y
137+ if ($isInstanceOf(z, "Int"))
138+ then {
139+ let A = z
140+ let X = if (((A + i) >= 1))
141+ then if (if ((w > 0))
142+ then (((A + i) - 1) >= 1)
143+ else false)
144+ then $Tuple2(((A + i) - 1), (w - 1))
145+ else $Tuple2((A + i), w)
146+ else $Tuple2(A, (w + i))
147+ let B = X._1
148+ let D = X._2
149+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
150+ $Tuple2((v :+ C), D)
151+ }
152+ else throw("Input has wrong datatype!")
153+ }
154+
155+ let Y = {
156+ let E = n
157+ let F = size(E)
158+ let G = $Tuple2(nil, k)
159+ func H (I,J) = if ((J >= F))
160+ then I
161+ else r(I, E[J])
162+
163+ func K (I,J) = if ((J >= F))
164+ then I
165+ else throw("List size exceeds 40")
166+
167+ 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(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)
168+ }
169+ let v = Y._1
170+ let Z = Y._2
171+ let aa = L(Z, v)
172+ let ab = aa._1
173+ let ac = aa._2
174+ ab
175+ }
176+
177+
178+@Callable(ad)
179+func call (ae,af,n) = {
180+ let o = (af - ae)
181+ let v = if ((o > 0))
182+ then m(n, o)._1
183+ else if ((0 > o))
184+ then U(n, o)
185+ else n
186+[a("swaps", makeString(n, ",")), a("adjustedSwaps", makeString(v, ","))]
187+ }
188+
189+
190+@Verifier(ag)
191+func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey)
74192
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b,c) = StringEntry(b, c)
55
66
77 func d (e) = split(e, "/")
88
99
1010 func f (g,h) = {
11- let i = (g / h)
11+ let i = fraction(g, 1, h, DOWN)
1212 let j = (i * h)
1313 let k = (g - j)
1414 if ((k > 0))
1515 then $Tuple2(i, k)
1616 else $Tuple2(i, 0)
1717 }
1818
1919
20-func l (m,n) = {
21- let o = size(m)
22- let p = f(n, o)
23- let i = p._1
24- let k = p._2
25- func q (r,s) = {
26- let t = r
27- let u = t._1
28- let v = t._2
29- let w = d(s)
30- let x = parseInt(w[2])
31- let y = x
32- if ($isInstanceOf(y, "Int"))
20+func l (g,h) = {
21+ let i = fraction(g, 1, h, DOWN)
22+ let j = (i * h)
23+ let k = (g - j)
24+ if ((0 > k))
25+ then $Tuple2(i, k)
26+ else $Tuple2(i, 0)
27+ }
28+
29+
30+func m (n,o) = {
31+ let p = size(n)
32+ let q = f(o, p)
33+ let i = q._1
34+ let k = q._2
35+ func r (s,t) = {
36+ let u = s
37+ let v = u._1
38+ let w = u._2
39+ let x = d(t)
40+ let y = parseInt(x[2])
41+ let z = y
42+ if ($isInstanceOf(z, "Int"))
3343 then {
34- let z = y
35- let A = if ((v > 0))
36- then ((z + i) + 1)
37- else (z + i)
38- let B = ((((w[0] + "/") + w[1]) + "/") + toString(A))
39- let C = if ((v > 0))
40- then (v - 1)
41- else v
42- $Tuple2((u :+ B), C)
44+ let A = z
45+ let B = if ((w > 0))
46+ then ((A + i) + 1)
47+ else (A + i)
48+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
49+ let D = if ((w > 0))
50+ then (w - 1)
51+ else w
52+ $Tuple2((v :+ C), D)
4353 }
4454 else throw("Input has wrong datatype!")
4555 }
4656
47- let D = m
48- let E = size(D)
49- let F = $Tuple2(nil, k)
50- func G (H,I) = if ((I >= E))
51- then H
52- else q(H, D[I])
57+ let E = n
58+ let F = size(E)
59+ let G = $Tuple2(nil, k)
60+ func H (I,J) = if ((J >= F))
61+ then I
62+ else r(I, E[J])
5363
54- func J (H,I) = if ((I >= E))
55- then H
64+ func K (I,J) = if ((J >= F))
65+ then I
5666 else throw("List size exceeds 40")
5767
58- J(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(G(F, 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)
68+ 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(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)
5969 }
6070
6171
62-@Callable(K)
63-func call (L,M,m) = {
64- let n = (M - L)
65- let u = if ((n > 0))
66- then l(m, n)._1
67- else m
68-[a("swaps", makeString(m, ",")), a("adjustedSwaps", makeString(u, ","))]
72+func L (w,n) = {
73+ func M (s,t) = {
74+ let N = s
75+ let v = N._1
76+ let O = N._2
77+ let x = d(t)
78+ let y = parseInt(x[2])
79+ let P = {
80+ let z = y
81+ if ($isInstanceOf(z, "Int"))
82+ then {
83+ let A = z
84+ A
85+ }
86+ else throw("Input amount has the wrong data type")
87+ }
88+ let Q = if ((P > 4))
89+ then fraction(P, 3, 4)
90+ else 0
91+ let R = if (if ((O == 0))
92+ then true
93+ else (Q == 0))
94+ then $Tuple2(O, 0)
95+ else if (((O + Q) > 0))
96+ then {
97+ let S = (O + Q)
98+ $Tuple2(0, (Q - S))
99+ }
100+ else if ((0 > (O + Q)))
101+ then $Tuple2((O + Q), Q)
102+ else $Tuple2(0, Q)
103+ let D = R._1
104+ let T = R._2
105+ let B = (P - T)
106+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
107+ $Tuple2((v :+ C), D)
108+ }
109+
110+ let E = n
111+ let F = size(E)
112+ let G = $Tuple2(nil, w)
113+ func H (I,J) = if ((J >= F))
114+ then I
115+ else M(I, E[J])
116+
117+ func K (I,J) = if ((J >= F))
118+ then I
119+ else throw("List size exceeds 40")
120+
121+ 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(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)
69122 }
70123
71124
72-@Verifier(N)
73-func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
125+func U (n,o) = {
126+ let p = size(n)
127+ let V = l(o, p)
128+ let i = V._1
129+ let k = V._2
130+ func r (s,t) = {
131+ let W = s
132+ let v = W._1
133+ let w = W._2
134+ let x = d(t)
135+ let y = parseInt(x[2])
136+ let z = y
137+ if ($isInstanceOf(z, "Int"))
138+ then {
139+ let A = z
140+ let X = if (((A + i) >= 1))
141+ then if (if ((w > 0))
142+ then (((A + i) - 1) >= 1)
143+ else false)
144+ then $Tuple2(((A + i) - 1), (w - 1))
145+ else $Tuple2((A + i), w)
146+ else $Tuple2(A, (w + i))
147+ let B = X._1
148+ let D = X._2
149+ let C = ((((x[0] + "/") + x[1]) + "/") + toString(B))
150+ $Tuple2((v :+ C), D)
151+ }
152+ else throw("Input has wrong datatype!")
153+ }
154+
155+ let Y = {
156+ let E = n
157+ let F = size(E)
158+ let G = $Tuple2(nil, k)
159+ func H (I,J) = if ((J >= F))
160+ then I
161+ else r(I, E[J])
162+
163+ func K (I,J) = if ((J >= F))
164+ then I
165+ else throw("List size exceeds 40")
166+
167+ 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(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)
168+ }
169+ let v = Y._1
170+ let Z = Y._2
171+ let aa = L(Z, v)
172+ let ab = aa._1
173+ let ac = aa._2
174+ ab
175+ }
176+
177+
178+@Callable(ad)
179+func call (ae,af,n) = {
180+ let o = (af - ae)
181+ let v = if ((o > 0))
182+ then m(n, o)._1
183+ else if ((0 > o))
184+ then U(n, o)
185+ else n
186+[a("swaps", makeString(n, ",")), a("adjustedSwaps", makeString(v, ","))]
187+ }
188+
189+
190+@Verifier(ag)
191+func ah () = sigVerify(ag.bodyBytes, ag.proofs[0], ag.senderPublicKey)
74192

github/deemru/w8io/169f3d6 
41.63 ms