tx · FuaC1U4VjupdMfWMiQGhteWSsaWkTL26vgh4CRoi8TrA

3N4Fa58WBBWv5MP92u6pA2g7xNYMpPLMvLx:  -0.01000000 Waves

2024.12.06 11:49 [3402561] smart account 3N4Fa58WBBWv5MP92u6pA2g7xNYMpPLMvLx > SELF 0.00000000 Waves

{ "type": 13, "id": "FuaC1U4VjupdMfWMiQGhteWSsaWkTL26vgh4CRoi8TrA", "fee": 1000000, "feeAssetId": null, "timestamp": 1733475001054, "version": 2, "chainId": 84, "sender": "3N4Fa58WBBWv5MP92u6pA2g7xNYMpPLMvLx", "senderPublicKey": "9fRXUJPxTtF7P9bYTs5roJ4c5tzMiBmv93Kuf94JBnQQ", "proofs": [ "5uLwqnmjuz39SYWGWK9e2s9Vys5koCVdHSVj5oenCHUmaPkA8C7J1oaJPaC4beaR6B4spauYgo1Li5bq9EDLGSYr" ], "script": "base64:BgIUCAISBAoCAQESBAoCAQESBAoCAQEMAA13eFBvb2xBZGRyZXNzCQEHQWRkcmVzcwEBGgFXwpqB3QBHc5r208SLwRlX4Ff1uMp3pHChABBzaW1wbGVBbW1BZGRyZXNzCQEHQWRkcmVzcwEBGgFX8TVzade+uoR7uZWuq4RsHviU5ek6RsEUAAV3YXZlcwUEdW5pdAAEdXNkdAEg4Ab+M2BRGawNofT8uvzf4LqfJWpjiEPmNOUmlPCdXw8AAmxwASDCLiMHWN0a+0SIgd4uCXqKdtYFXXiXAxiczjOiag47FgEKZ2V0QmFsYW5jZQECaWQEByRtYXRjaDAFAmlkAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAWIFByRtYXRjaDAJAPAHAgUEdGhpcwUBYggJAO8HAQUEdGhpcwlhdmFpbGFibGUBDWFzc2V0VG9TdHJpbmcBAmlkBAckbWF0Y2gwBQJpZAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDYBAEFAWICBVdBVkVTAQxzd2FwT25XeFBvb2wCBWFzc2V0BmFtb3VudAQSc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WUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQECc3UCBmFtb3VudAltaW5Qcm9maXQEBWNoZWNrAwkAAAIIBQFpBmNhbGxlcgUEdGhpcwYJAAIBAhFwZXJtaXNzaW9uIGRlbmllZAMJAAACBQVjaGVjawUFY2hlY2sJAQlhcmJpdHJhZ2UDBQR1c2R0BQZhbW91bnQFCW1pblByb2ZpdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQNzdXUCBmFtb3VudAltaW5Qcm9maXQEBWNoZWNrAwkAAAIIBQFpBmNhbGxlcgUEdGhpcwYJAAIBAhFwZXJtaXNzaW9uIGRlbmllZAMJAAACBQVjaGVjawUFY2hlY2sEA3JlcwkA/AcEBRBzaW1wbGVBbW1BZGRyZXNzAgxzd2FwUkVBRE9OTFkJAMwIAgIFV0FWRVMJAMwIAgUGYW1vdW50BQNuaWwFA25pbAQJbmV3QW1vdW50BAckbWF0Y2gwBQNyZXMDCQABAgUHJG1hdGNoMAIWKEludCwgSW50LCBCeXRlVmVjdG9yKQQBcgUHJG1hdGNoMAgFAXICXzEJAAIBAg9zb21ldGhpbmcgd3JvbmcEDG5ld01pblByb2ZpdAkAawMFCW1pblByb2ZpdAUJbmV3QW1vdW50BQZhbW91bnQJAQlhcmJpdHJhZ2UDBQR1c2R0BQluZXdBbW91bnQFDG5ld01pblByb2ZpdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgCvzS7R", "height": 3402561, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7wjuwt5tsZ68Uysqtndt7STZ918DqssSBoHG7fwFjg4N Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = Address(base58'3PKfrupEydU2nZAghVjZAfvCwMBkzuR1F52')
5+
6+let b = Address(base58'3PPvHcJjESoUbf9LDpAxEhQKUnpqH1Ea29h')
7+
8+let c = unit
9+
10+let d = base58'G5WWWzzVsWRyzGf32xojbnfp7gXbWrgqJT8RcVWEfLmC'
11+
12+let e = base58'E4zu2YxX1Tq8Y2nBcXZhh9gG1jctZitisnt6pyQhUBYH'
13+
14+func f (g) = {
15+ let h = g
16+ if ($isInstanceOf(h, "ByteVector"))
17+ then {
18+ let i = h
19+ assetBalance(this, i)
20+ }
21+ else wavesBalance(this).available
22+ }
23+
24+
25+func j (g) = {
26+ let h = g
27+ if ($isInstanceOf(h, "ByteVector"))
28+ then {
29+ let i = h
30+ toBase58String(i)
31+ }
32+ else "WAVES"
33+ }
34+
35+
36+func k (l,m) = {
37+ let n = j(l)
38+ let o = f(e)
39+ if ((o == o))
40+ then {
41+ let p = invoke(a, "putOneTkn", [1, false], [AttachedPayment(l, m)])
42+ if ((p == p))
43+ then {
44+ let q = (f(e) - o)
45+ if ((q == q))
46+ then {
47+ let r = invoke(a, "getOneTkn", [n, 1], [AttachedPayment(e, q)])
48+ if ((r == r))
49+ then unit
50+ else throw("Strict value is not equal to itself.")
51+ }
52+ else throw("Strict value is not equal to itself.")
53+ }
54+ else throw("Strict value is not equal to itself.")
55+ }
56+ else throw("Strict value is not equal to itself.")
57+ }
58+
59+
60+func s (t,m,u) = {
61+ let v = if ((t == unit))
62+ then d
63+ else unit
64+ let w = f(t)
65+ if ((w == w))
66+ then {
67+ let x = f(v)
68+ if ((x == x))
69+ then {
70+ let p = invoke(b, "swap", nil, [AttachedPayment(t, m)])
71+ if ((p == p))
72+ then {
73+ let y = (f(v) - x)
74+ if ((y == y))
75+ then {
76+ let r = k(v, y)
77+ if ((r == r))
78+ then {
79+ let z = (f(t) - w)
80+ if ((z == z))
81+ then if ((z > u))
82+ then nil
83+ else throw(makeString(["no profit", j(t), toString(m), toString(u), toString(z)], " "))
84+ else throw("Strict value is not equal to itself.")
85+ }
86+ else throw("Strict value is not equal to itself.")
87+ }
88+ else throw("Strict value is not equal to itself.")
89+ }
90+ else throw("Strict value is not equal to itself.")
91+ }
92+ else throw("Strict value is not equal to itself.")
93+ }
94+ else throw("Strict value is not equal to itself.")
95+ }
96+
97+
98+func A () = {
99+ let B = makeString(["%s%s", "stakedBalance", "WAVES"], "__")
100+ let C = assetBalance(a, d)
101+ let D = (wavesBalance(a).available + valueOrElse(getInteger(a, B), 0))
102+ $Tuple2(d, D)
103+ }
104+
105+
106+func E () = {
107+ let C = assetBalance(b, d)
108+ let D = wavesBalance(b).available
109+ $Tuple2(C, D)
110+ }
111+
112+
113+func F (G,H,I,J) = {
114+ let K = ((G + I) * (G + I))
115+ let L = ((G * I) * H)
116+ let M = ((L * K) * J)
117+ let N = sqrt(M, 0, 0, DOWN)
118+ let O = (-(L) - ((I * I) * H))
119+ let P = (N + O)
120+ let Q = (P / K)
121+ Q
122+ }
123+
124+
125+@Callable(R)
126+func sw (m,u) = {
127+ let S = if ((R.caller == this))
128+ then true
129+ else throw("permission denied")
130+ if ((S == S))
131+ then s(c, m, u)
132+ else throw("Strict value is not equal to itself.")
133+ }
134+
135+
136+
137+@Callable(R)
138+func su (m,u) = {
139+ let S = if ((R.caller == this))
140+ then true
141+ else throw("permission denied")
142+ if ((S == S))
143+ then s(d, m, u)
144+ else throw("Strict value is not equal to itself.")
145+ }
146+
147+
148+
149+@Callable(R)
150+func suu (m,u) = {
151+ let S = if ((R.caller == this))
152+ then true
153+ else throw("permission denied")
154+ if ((S == S))
155+ then {
156+ let T = invoke(b, "swapREADONLY", ["WAVES", m], nil)
157+ let U = {
158+ let h = T
159+ if ($isInstanceOf(h, "(Int, Int, ByteVector)"))
160+ then {
161+ let V = h
162+ V._1
163+ }
164+ else throw("something wrong")
165+ }
166+ let W = fraction(u, U, m)
167+ s(d, U, W)
168+ }
169+ else throw("Strict value is not equal to itself.")
170+ }
171+
172+

github/deemru/w8io/026f985 
12.64 ms