tx · DFXagidqvtSvNB9NXPAufUXbiARjqbYWAzG5P5EGVEr5

3MwLW8P5yh5T2xML9QqFuVxkVkm9RXqnzXh:  -0.01000000 Waves

2022.12.07 02:15 [2349132] smart account 3MwLW8P5yh5T2xML9QqFuVxkVkm9RXqnzXh > SELF 0.00000000 Waves

{ "type": 13, "id": "DFXagidqvtSvNB9NXPAufUXbiARjqbYWAzG5P5EGVEr5", "fee": 1000000, "feeAssetId": null, "timestamp": 1670368515842, "version": 2, "chainId": 84, "sender": "3MwLW8P5yh5T2xML9QqFuVxkVkm9RXqnzXh", "senderPublicKey": "HscGVyJG5M3NMHWKfQbucCBsFLGPi8VmTxTAmcBbaWTa", "proofs": [ "4g7vNi655wbvPg1MN5ALWQ93WV7jsaBkCLqB8g7ki51jhNir2yHrZWpwDLgNmnR1fUZLmiUzznJDU3rTYxisr1nr" ], "script": "base64:BgITCAISAwoBCBIDCgEIEgASAwoBARcABlNjYWxlNgDAhD0ABlNjYWxlOACAwtcvAAdTY2FsZTE2CQBoAgUGU2NhbGU4BQZTY2FsZTgACnZhbGlkYXRvcnMJAMwIAgIjM05BbXFHanhSQlJQb1JIWlVVcXZoaU5TNmF4bkdwaW5MSEMFA25pbAAPbW9uZXlCb3hBZGRyZXNzCQEHQWRkcmVzcwEBGgFUZKnP467xWXotJQOt2k8QiNBvrQpHH8SpAAdhc3NldElkAixISG1hRlFwVW9id0t4emp6NEVDYUJQdG9GNjlrdWpLd1UyY296YVV6VHNndgALcHV6emxlUG9vbHMJAMwIAgIjM042U3RKZGdtVGZBUnNSTm45WHQ1ckRZRXMzcHI0S0d5MXYFA25pbAEKZ2V0QmFsYW5jZQEHYXNzZXRJZAQHJG1hdGNoMAUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgRVbml0BAF4BQckbWF0Y2gwCAkA7wcBBQR0aGlzCWF2YWlsYWJsZQkA8AcCBQR0aGlzCQEFdmFsdWUBBQdhc3NldElkAQl0cnlHZXRJbnQCB2FkZHJlc3MDa2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acted Prev: G27ZPgtsToTpCweFXxVRqoJHodazBMLqGLut2KGefwFv Next: GwJ2diYt1z551jVSUAc6byKiP5tgonYWVGtyF4AAmvvy Diff:
OldNewDifferences
134134
135135
136136 func P (r,F) = {
137- let Q = if ((F > a))
138- then throw(("1) Fee " + toString(F)))
139- else ""
137+ let Q = v(r, F)
140138 if ((Q == Q))
141- then {
142- let R = v(r, F)
143- if ((R == R))
144- then [ScriptTransfer(e, F, fromBase58String(f))]
145- else throw("Strict value is not equal to itself.")
146- }
139+ then [ScriptTransfer(e, F, fromBase58String(f))]
147140 else throw("Strict value is not equal to itself.")
148141 }
149142
150143
151-func S () = {
144+func R () = {
152145 let u = o(this, "currentPool")
153146 if ((u == ""))
154147 then throw(("Cannot find pool with id " + u))
155148 else {
156149 let w = q(u)
157- let T = v(u, w)
158- if ((T == T))
159- then T
150+ let S = v(u, w)
151+ if ((S == S))
152+ then S
160153 else throw("Strict value is not equal to itself.")
161154 }
162155 }
163156
164157
165-func U (V,w) = {
158+func T (U,w) = {
166159 let C = fraction(w, b, G())
167- (K(C) ++ [IntegerEntry((V + "_staked"), (k(this, (V + "_staked")) + C))])
160+ (K(C) ++ [IntegerEntry((U + "_staked"), (k(this, (U + "_staked")) + C))])
168161 }
169162
170163
171-func W (V,w) = {
164+func V (U,w) = {
172165 let C = fraction(w, b, G())
173- let X = k(this, (V + "_staked"))
174- let Y = if ((C > X))
175- then X
166+ let W = k(this, (U + "_staked"))
167+ let X = if ((C > W))
168+ then W
176169 else C
177- (K(-(Y)) ++ [IntegerEntry((V + "_staked"), (X - Y))])
170+ (K(-(X)) ++ [IntegerEntry((U + "_staked"), (W - X))])
178171 }
179172
180173
181-func Z (u,aa,w) = {
182- let T = v(u, w)
183- if ((T == T))
184- then [ScriptTransfer(aa, w, fromBase58String(f))]
174+func Y (u,Z,w) = {
175+ let S = v(u, w)
176+ if ((S == S))
177+ then [ScriptTransfer(Z, w, fromBase58String(f))]
185178 else throw("Strict value is not equal to itself.")
186179 }
187180
188181
189-@Callable(ab)
182+@Callable(aa)
190183 func init (r) = {
191184 let u = o(this, "currentPool")
192- if ((indexOf(d, toString(ab.caller)) == unit))
185+ if ((indexOf(d, toString(aa.caller)) == unit))
193186 then throw("Access denied")
194187 else if ((u == ""))
195188 then [StringEntry("currentPool", r)]
198191
199192
200193
201-@Callable(ab)
194+@Callable(aa)
202195 func rebalance (r) = {
203196 let u = o(this, "currentPool")
204- if ((indexOf(d, toString(ab.caller)) == unit))
197+ if ((indexOf(d, toString(aa.caller)) == unit))
205198 then throw("Access denied")
206199 else if ((u == r))
207200 then throw(("Already supplied to" + u))
208201 else {
209- let y = S()
202+ let y = R()
210203 if ((y == y))
211204 then M(r)
212205 else throw("Strict value is not equal to itself.")
215208
216209
217210
218-@Callable(ab)
211+@Callable(aa)
219212 func stake () = {
220- let V = toString(ab.caller)
221- let w = ab.payments[0].amount
213+ let U = toString(aa.caller)
214+ let w = aa.payments[0].amount
222215 let u = o(this, "currentPool")
223216 if (if ((0 >= w))
224217 then true
225- else (ab.payments[0].assetId != fromBase58String(f)))
218+ else (aa.payments[0].assetId != fromBase58String(f)))
226219 then throw("invalid token attached")
227220 else if ((u == ""))
228221 then throw("Pool not initialized")
229222 else {
230223 let F = z()
231- let Q = if ((F > a))
224+ let ab = if ((F > a))
232225 then ""
233226 else ""
234- if ((Q == Q))
235- then ((U(V, w) ++ M(u)) ++ P(u, F))
227+ if ((ab == ab))
228+ then ((T(U, w) ++ M(u)) ++ P(u, F))
236229 else throw("Strict value is not equal to itself.")
237230 }
238231 }
239232
240233
241234
242-@Callable(ab)
235+@Callable(aa)
243236 func unstake (w) = {
244- let V = toString(ab.caller)
237+ let U = toString(aa.caller)
245238 let u = o(this, "currentPool")
246239 let ac = fromBase58String(f)
247240 let F = z()
248- let Q = if ((F > a))
241+ let ab = if ((F > a))
249242 then ""
250243 else ""
251- if ((Q == Q))
252- then ((W(V, w) ++ Z(u, ab.caller, w)) ++ P(u, F))
244+ if ((ab == ab))
245+ then ((V(U, w) ++ Y(u, aa.caller, w)) ++ P(u, F))
253246 else throw("Strict value is not equal to itself.")
254247 }
255248
256249
257-@Verifier(T)
258-func ad () = sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
250+@Verifier(S)
251+func ad () = sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey)
259252
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1000000
55
66 let b = 100000000
77
88 let c = (b * b)
99
1010 let d = ["3NAmqGjxRBRPoRHZUUqvhiNS6axnGpinLHC"]
1111
1212 let e = Address(base58'3My6LmrRSRvJ73T14oT5k53SGPavGFoacWc')
1313
1414 let f = "HHmaFQpUobwKxzjz4ECaBPtoF69kujKwU2cozaUzTsgv"
1515
1616 let g = ["3N6StJdgmTfARsRNn9Xt5rDYEs3pr4KGy1v"]
1717
1818 func h (f) = {
1919 let i = f
2020 if ($isInstanceOf(i, "Unit"))
2121 then {
2222 let j = i
2323 wavesBalance(this).available
2424 }
2525 else assetBalance(this, value(f))
2626 }
2727
2828
2929 func k (l,m) = {
3030 let i = getInteger(l, m)
3131 if ($isInstanceOf(i, "Int"))
3232 then {
3333 let n = i
3434 n
3535 }
3636 else 0
3737 }
3838
3939
4040 func o (l,m) = {
4141 let i = getString(l, m)
4242 if ($isInstanceOf(i, "String"))
4343 then {
4444 let n = i
4545 n
4646 }
4747 else ""
4848 }
4949
5050
5151 func p (f) = {
5252 let i = f
5353 if ($isInstanceOf(i, "ByteVector"))
5454 then {
5555 let n = i
5656 toBase58String(n)
5757 }
5858 else "WAVES"
5959 }
6060
6161
6262 func q (r) = {
6363 let s = assetBalance(Address(fromBase58String(r)), fromBase58String(f))
6464 s
6565 }
6666
6767
6868 func t () = {
6969 let u = o(this, "currentPool")
7070 if ((u == ""))
7171 then throw(("Cannot find pool with id " + u))
7272 else q(u)
7373 }
7474
7575
7676 func v (r,w) = {
7777 let x = Address(fromBase58String(r))
7878 let y = if ((w > 0))
7979 then invoke(x, "withdraw", [f, w], nil)
8080 else ""
8181 if ((y == y))
8282 then y
8383 else throw("Strict value is not equal to itself.")
8484 }
8585
8686
8787 func z () = {
8888 let A = k(this, "global_staked")
8989 let B = k(this, "global_lastCheckSRate")
9090 let C = fraction(A, B, b)
9191 let D = t()
9292 let E = (D - C)
9393 let F = fraction(E, 5000000, b)
9494 if ((F > 0))
9595 then F
9696 else 0
9797 }
9898
9999
100100 func G () = {
101101 let H = k(this, "global_lastCheckSRate")
102102 let A = k(this, "global_staked")
103103 let I = fraction(A, H, b)
104104 if ((H == 0))
105105 then b
106106 else if ((I == 0))
107107 then H
108108 else {
109109 let J = fraction(H, (fraction((fraction(t(), a, I) - a), (b - 5000000), b) + a), a)
110110 if ((b > J))
111111 then H
112112 else J
113113 }
114114 }
115115
116116
117117 func K (L) = {
118118 let A = k(this, "global_staked")
119119 let J = G()
120120 [IntegerEntry("global_staked", (A + L)), IntegerEntry("global_lastCheckSRate", J)]
121121 }
122122
123123
124124 func M (r) = if ((indexOf(g, r) == unit))
125125 then throw(("Unknown poolId " + r))
126126 else {
127127 let N = fromBase58String(f)
128128 let s = h(N)
129129 let O = invoke(Address(fromBase58String(r)), "supply", nil, [AttachedPayment(N, s)])
130130 if ((O == O))
131131 then [StringEntry("currentPool", r)]
132132 else throw("Strict value is not equal to itself.")
133133 }
134134
135135
136136 func P (r,F) = {
137- let Q = if ((F > a))
138- then throw(("1) Fee " + toString(F)))
139- else ""
137+ let Q = v(r, F)
140138 if ((Q == Q))
141- then {
142- let R = v(r, F)
143- if ((R == R))
144- then [ScriptTransfer(e, F, fromBase58String(f))]
145- else throw("Strict value is not equal to itself.")
146- }
139+ then [ScriptTransfer(e, F, fromBase58String(f))]
147140 else throw("Strict value is not equal to itself.")
148141 }
149142
150143
151-func S () = {
144+func R () = {
152145 let u = o(this, "currentPool")
153146 if ((u == ""))
154147 then throw(("Cannot find pool with id " + u))
155148 else {
156149 let w = q(u)
157- let T = v(u, w)
158- if ((T == T))
159- then T
150+ let S = v(u, w)
151+ if ((S == S))
152+ then S
160153 else throw("Strict value is not equal to itself.")
161154 }
162155 }
163156
164157
165-func U (V,w) = {
158+func T (U,w) = {
166159 let C = fraction(w, b, G())
167- (K(C) ++ [IntegerEntry((V + "_staked"), (k(this, (V + "_staked")) + C))])
160+ (K(C) ++ [IntegerEntry((U + "_staked"), (k(this, (U + "_staked")) + C))])
168161 }
169162
170163
171-func W (V,w) = {
164+func V (U,w) = {
172165 let C = fraction(w, b, G())
173- let X = k(this, (V + "_staked"))
174- let Y = if ((C > X))
175- then X
166+ let W = k(this, (U + "_staked"))
167+ let X = if ((C > W))
168+ then W
176169 else C
177- (K(-(Y)) ++ [IntegerEntry((V + "_staked"), (X - Y))])
170+ (K(-(X)) ++ [IntegerEntry((U + "_staked"), (W - X))])
178171 }
179172
180173
181-func Z (u,aa,w) = {
182- let T = v(u, w)
183- if ((T == T))
184- then [ScriptTransfer(aa, w, fromBase58String(f))]
174+func Y (u,Z,w) = {
175+ let S = v(u, w)
176+ if ((S == S))
177+ then [ScriptTransfer(Z, w, fromBase58String(f))]
185178 else throw("Strict value is not equal to itself.")
186179 }
187180
188181
189-@Callable(ab)
182+@Callable(aa)
190183 func init (r) = {
191184 let u = o(this, "currentPool")
192- if ((indexOf(d, toString(ab.caller)) == unit))
185+ if ((indexOf(d, toString(aa.caller)) == unit))
193186 then throw("Access denied")
194187 else if ((u == ""))
195188 then [StringEntry("currentPool", r)]
196189 else nil
197190 }
198191
199192
200193
201-@Callable(ab)
194+@Callable(aa)
202195 func rebalance (r) = {
203196 let u = o(this, "currentPool")
204- if ((indexOf(d, toString(ab.caller)) == unit))
197+ if ((indexOf(d, toString(aa.caller)) == unit))
205198 then throw("Access denied")
206199 else if ((u == r))
207200 then throw(("Already supplied to" + u))
208201 else {
209- let y = S()
202+ let y = R()
210203 if ((y == y))
211204 then M(r)
212205 else throw("Strict value is not equal to itself.")
213206 }
214207 }
215208
216209
217210
218-@Callable(ab)
211+@Callable(aa)
219212 func stake () = {
220- let V = toString(ab.caller)
221- let w = ab.payments[0].amount
213+ let U = toString(aa.caller)
214+ let w = aa.payments[0].amount
222215 let u = o(this, "currentPool")
223216 if (if ((0 >= w))
224217 then true
225- else (ab.payments[0].assetId != fromBase58String(f)))
218+ else (aa.payments[0].assetId != fromBase58String(f)))
226219 then throw("invalid token attached")
227220 else if ((u == ""))
228221 then throw("Pool not initialized")
229222 else {
230223 let F = z()
231- let Q = if ((F > a))
224+ let ab = if ((F > a))
232225 then ""
233226 else ""
234- if ((Q == Q))
235- then ((U(V, w) ++ M(u)) ++ P(u, F))
227+ if ((ab == ab))
228+ then ((T(U, w) ++ M(u)) ++ P(u, F))
236229 else throw("Strict value is not equal to itself.")
237230 }
238231 }
239232
240233
241234
242-@Callable(ab)
235+@Callable(aa)
243236 func unstake (w) = {
244- let V = toString(ab.caller)
237+ let U = toString(aa.caller)
245238 let u = o(this, "currentPool")
246239 let ac = fromBase58String(f)
247240 let F = z()
248- let Q = if ((F > a))
241+ let ab = if ((F > a))
249242 then ""
250243 else ""
251- if ((Q == Q))
252- then ((W(V, w) ++ Z(u, ab.caller, w)) ++ P(u, F))
244+ if ((ab == ab))
245+ then ((V(U, w) ++ Y(u, aa.caller, w)) ++ P(u, F))
253246 else throw("Strict value is not equal to itself.")
254247 }
255248
256249
257-@Verifier(T)
258-func ad () = sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
250+@Verifier(S)
251+func ad () = sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey)
259252

github/deemru/w8io/026f985 
47.99 ms