tx · 3V18Ah8VfcL3jsdija7PcSaYeWDpdnwjD9f5pvLwqyCY

3N5DUGD1Pwp7PDbT95caYuGsZoX6r3zFLBN:  -0.01300000 Waves

2023.05.10 13:15 [2571655] smart account 3N5DUGD1Pwp7PDbT95caYuGsZoX6r3zFLBN > SELF 0.00000000 Waves

{ "type": 13, "id": "3V18Ah8VfcL3jsdija7PcSaYeWDpdnwjD9f5pvLwqyCY", "fee": 1300000, "feeAssetId": null, "timestamp": 1683713776942, "version": 2, "chainId": 84, "sender": "3N5DUGD1Pwp7PDbT95caYuGsZoX6r3zFLBN", "senderPublicKey": "2oPK8ZcQp2MAGDK7eL3Nd2PukBG1CWU3M2e3JqmC1m3g", "proofs": [ "CNJyh7KszJmc5VSVdQd5cVoC3pQmihDAJMbfwtEXcySsvpvGiechXFd8f5N4NgVPqdx7Jn1zTydvQptmzkKayyC" ], "script": "base64:BgKzBwgCEgoKCAgIAQEBAQEBEgMKAQgSAwoBCBIFCgMICAESBAoCCAgiA1NFUCITa2V5TWFuYWdlclB1YmxpY0tleSIWa2V5TWFuYWdlclZhdWx0QWRkcmVzcyIcZ2V0TWFuYWdlclZhdWx0QWRkcmVzc09yVGhpcyIHJG1hdGNoMCIBcyIQa2V5V2l0aGRyYXdEZWxheSIGYXNzZXRBIgZhc3NldEIiFWtleURlcG9zaXRGZWVQZXJtaWxsZSIWa2V5V2l0aGRyYXdGZWVQZXJtaWxsZSITa2V5TWluQW1vdW50RGVwb3NpdCITa2V5QXNzZXRzUGFpclN0YXR1cyIUa2V5TWluQW1vdW50V2l0aGRyYXciCmtleUJhbGFuY2UiC3VzZXJBZGRyZXNzIhtrZXlUb3RhbEZlZUNvbGxlY3RlZERlcG9zaXQiFGtleVByb2Nlc3NJblByb2dyZXNzIgtoZWlnaHRJbktleSIOa2V5UHJvY2Vzc0RvbmUiFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQiE21hbmFnZXJWYXVsdEFkZHJlc3MiC211c3RNYW5hZ2VyIgFpIg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Y2FsbGVyBQJhYQUBUgUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAXgBC3dpdGhkcmF3RmVlAgFoAWkEAUoJAQF3AQUBeAMJAAACBQFKBQFKBAJhZQkBC3ZhbHVlT3JFbHNlAgkAnwgBCQEBcQIFAWgFAWkAAAQCYWYJANkEAQkBBXZhbHVlAQUBaAkAzAgCCQEMSW50ZWdlckVudHJ5AgkBAXECBQFoBQFpAAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAXgGY2FsbGVyBQJhZQUCYWYFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECYWcBAmFoAAQCYWkEAWUJAQF1AAMJAAECBQFlAgpCeXRlVmVjdG9yBAF6BQFlBQF6AwkAAQIFAWUCBFVuaXQIBQJhZw9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYWcJYm9keUJ5dGVzCQCRAwIIBQJhZwZwcm9vZnMAAAUCYWlDMecp", "height": 2571655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J5PRGpthwVJyTMa4HWDbKujLuckEJaRDYF5fHtohXyNi Next: none Diff:
OldNewDifferences
99 func c () = "%s__managerVaultAddress"
1010
1111
12-func d () = addressFromStringValue(getStringValue(c()))
12+func d () = {
13+ let e = getString(c())
14+ if ($isInstanceOf(e, "String"))
15+ then {
16+ let f = e
17+ addressFromStringValue(f)
18+ }
19+ else this
20+ }
1321
1422
15-func e (f,g) = makeString(["%s%s%s", "withdrawDelay", f, g], a)
23+func g (h,i) = makeString(["%s%s%s", "withdrawDelay", h, i], a)
1624
1725
18-func h (f,g) = makeString(["%s%s%s", "depositFeePermille", f, g], a)
26+func j (h,i) = makeString(["%s%s%s", "depositFeePermille", h, i], a)
1927
2028
21-func i (f,g) = makeString(["%s%s%s", "withdrawFeePermille", f, g], a)
29+func k (h,i) = makeString(["%s%s%s", "withdrawFeePermille", h, i], a)
2230
2331
24-func j (f,g) = makeString(["%s%s%s", "minAmountDeposit", f, g], a)
32+func l (h,i) = makeString(["%s%s%s", "minAmountDeposit", h, i], a)
2533
2634
27-func k (f,g) = makeString(["%s%s%s", "assetsPairStatus", f, g], a)
35+func m (h,i) = makeString(["%s%s%s", "assetsPairStatus", h, i], a)
2836
2937
30-func l (f,g) = makeString(["%s%s%s", "minAmountWithdraw", f, g], a)
38+func n (h,i) = makeString(["%s%s%s", "minAmountWithdraw", h, i], a)
3139
3240
33-func m (f,g,n) = makeString(["%s%s%s%s", "balance", f, g, n], a)
41+func o (h,i,p) = makeString(["%s%s%s%s", "balance", h, i, p], a)
3442
3543
36-func o (f,g) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", f, g], a)
44+func q (h,i) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", h, i], a)
3745
3846
39-func p (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", n, f, g, toString(q)], a)
47+func r (p,h,i,s) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", p, h, i, toString(s)], a)
4048
4149
42-func r (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", n, f, g, toString(q)], a)
50+func t (p,h,i,s) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", p, h, i, toString(s)], a)
4351
4452
45-func s () = {
46- let t = d()
47- let u = getString(t, b())
48- if ($isInstanceOf(u, "String"))
53+func u () = {
54+ let v = d()
55+ let e = getString(v, b())
56+ if ($isInstanceOf(e, "String"))
4957 then {
50- let v = u
51- fromBase58String(v)
58+ let f = e
59+ fromBase58String(f)
5260 }
53- else if ($isInstanceOf(u, "Unit"))
61+ else if ($isInstanceOf(e, "Unit"))
5462 then unit
5563 else throw("Match error")
5664 }
5866
5967 func w (x) = {
6068 let y = throw("Permission denied.")
61- let u = s()
62- if ($isInstanceOf(u, "ByteVector"))
69+ let e = u()
70+ if ($isInstanceOf(e, "ByteVector"))
6371 then {
64- let z = u
72+ let z = e
6573 if ((x.callerPublicKey == z))
6674 then true
6775 else y
6876 }
69- else if ($isInstanceOf(u, "Unit"))
77+ else if ($isInstanceOf(e, "Unit"))
7078 then if ((x.caller == this))
7179 then true
7280 else y
8189
8290
8391 @Callable(x)
84-func registerAsset (f,g,D,E,F,G,H,I) = {
92+func registerAsset (h,i,D,E,F,G,H,I) = {
8593 let J = w(x)
8694 if ((J == J))
8795 then {
88- let K = e(f, g)
89- let L = h(f, g)
90- let M = i(f, g)
91- let N = j(f, g)
92- let O = l(f, g)
93- let P = k(f, g)
96+ let K = g(h, i)
97+ let L = j(h, i)
98+ let M = k(h, i)
99+ let N = l(h, i)
100+ let O = n(h, i)
101+ let P = m(h, i)
94102 [IntegerEntry(K, D), IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I)]
95103 }
96104 else throw("Strict value is not equal to itself.")
99107
100108
101109 @Callable(x)
102-func swapAssetsAToB (g) = {
110+func swapAssetsAToB (i) = {
103111 let Q = value(x.payments[0])
104- let f = toBase58String(value(Q.assetId))
105- let R = fromBase58String(value(g))
106- let n = toString(x.caller)
107- let G = valueOrErrorMessage(getInteger(j(f, g)), A("This asset pair does not exist."))
112+ let h = toBase58String(value(Q.assetId))
113+ let R = fromBase58String(value(i))
114+ let p = toString(x.caller)
115+ let G = valueOrErrorMessage(getInteger(l(h, i)), A("This asset pair does not exist."))
108116 let S = Q.amount
109- let E = valueOrErrorMessage(getInteger(h(f, g)), A("The deposit fee for this pair of assets is not set."))
117+ let E = valueOrErrorMessage(getInteger(j(h, i)), A("The deposit fee for this pair of assets is not set."))
110118 let T = ((S / 1000) * E)
111- let U = valueOrElse(getInteger(m(f, g, n)), 0)
112- let V = valueOrElse(getInteger(o(f, g)), 0)
113- let I = valueOrErrorMessage(getInteger(k(f, g)), A("The asset pair status for this pair of assets is not set."))
119+ let U = valueOrElse(getInteger(o(h, i, p)), 0)
120+ let V = valueOrElse(getInteger(q(h, i)), 0)
121+ let I = valueOrErrorMessage(getInteger(m(h, i)), A("The asset pair status for this pair of assets is not set."))
114122 let W = if ((I == 0))
115123 then true
116124 else C("The couple's deposit is blocked.")
126134 then true
127135 else C("The final balance is less than or equal to 0.")
128136 if ((Z == Z))
129- then [IntegerEntry(m(f, g, n), Y), IntegerEntry(o(f, g), (V + T)), ScriptTransfer(x.caller, (S - T), R)]
137+ then [IntegerEntry(o(h, i, p), Y), IntegerEntry(q(h, i), (V + T)), ScriptTransfer(x.caller, (S - T), R)]
130138 else throw("Strict value is not equal to itself.")
131139 }
132140 else throw("Strict value is not equal to itself.")
137145
138146
139147 @Callable(x)
140-func initializationSwapAssetsBToA (f) = {
148+func initializationSwapAssetsBToA (h) = {
141149 let Q = value(x.payments[0])
142150 let aa = Q.amount
143- let g = toBase58String(value(Q.assetId))
144- let n = toString(x.caller)
145- let H = valueOrErrorMessage(getInteger(l(f, g)), A("The minimum withdrawal amount for this pair of assets is not set."))
146- let ab = (height + valueOrErrorMessage(getInteger(e(f, g)), A("Withdrawal delay is not set for the specified pair.")))
147- let U = valueOrErrorMessage(getInteger(m(f, g, n)), A("This user balance does not exist."))
148- let V = valueOrElse(getInteger(o(f, g)), 0)
149- let M = i(f, g)
151+ let i = toBase58String(value(Q.assetId))
152+ let p = toString(x.caller)
153+ let H = valueOrErrorMessage(getInteger(n(h, i)), A("The minimum withdrawal amount for this pair of assets is not set."))
154+ let ab = (height + valueOrErrorMessage(getInteger(g(h, i)), A("Withdrawal delay is not set for the specified pair.")))
155+ let U = valueOrErrorMessage(getInteger(o(h, i, p)), A("This user balance does not exist."))
156+ let V = valueOrElse(getInteger(q(h, i)), 0)
157+ let M = k(h, i)
150158 let F = valueOrErrorMessage(getInteger(M), A("The withdrawal fee for this pair of assets is not set."))
151159 let T = ((aa / 1000) * F)
152160 let Y = (U - aa)
160168 else C("The withdraw amount is less than the minimum.")
161169 if ((X == X))
162170 then {
163- let ac = if ((getInteger(p(n, f, g, ab)) == unit))
171+ let ac = if ((getInteger(r(p, h, i, ab)) == unit))
164172 then true
165173 else C("At this height, there is already an exchange of this pair.")
166174 if ((ac == ac))
167- then [IntegerEntry(m(f, g, n), Y), IntegerEntry(p(n, f, g, ab), (aa - T)), IntegerEntry(o(f, g), (V + T))]
175+ then [IntegerEntry(o(h, i, p), Y), IntegerEntry(r(p, h, i, ab), (aa - T)), IntegerEntry(q(h, i), (V + T))]
168176 else throw("Strict value is not equal to itself.")
169177 }
170178 else throw("Strict value is not equal to itself.")
175183
176184
177185 @Callable(x)
178-func withdrawAsset (f,g,q) = {
179- let n = toString(x.caller)
180- let aa = valueOrErrorMessage(getInteger(p(n, f, g, q)), A("At this height, withdraw was not initialized with this pair of assets."))
181- let R = fromBase58String(value(f))
182- let ad = if ((height >= q))
186+func withdrawAsset (h,i,s) = {
187+ let p = toString(x.caller)
188+ let aa = valueOrErrorMessage(getInteger(r(p, h, i, s)), A("At this height, withdraw was not initialized with this pair of assets."))
189+ let R = fromBase58String(value(h))
190+ let ad = if ((height >= s))
183191 then true
184- else C((("Withdrawal is possible after " + toString(q)) + " height or you have already withdrawn."))
192+ else C((("Withdrawal is possible after " + toString(s)) + " height or you have already withdrawn."))
185193 if ((ad == ad))
186- then [DeleteEntry(p(n, f, g, q)), IntegerEntry(r(n, f, g, q), aa), ScriptTransfer(x.caller, aa, R)]
194+ then [DeleteEntry(r(p, h, i, s)), IntegerEntry(t(p, h, i, s), aa), ScriptTransfer(x.caller, aa, R)]
187195 else throw("Strict value is not equal to itself.")
188196 }
189197
190198
191199
192200 @Callable(x)
193-func withdrawFee (f,g) = {
201+func withdrawFee (h,i) = {
194202 let J = w(x)
195203 if ((J == J))
196204 then {
197- let ae = valueOrElse(getInteger(o(f, g)), 0)
198- let af = fromBase58String(value(f))
199-[IntegerEntry(o(f, g), 0), ScriptTransfer(x.caller, ae, af)]
205+ let ae = valueOrElse(getInteger(q(h, i)), 0)
206+ let af = fromBase58String(value(h))
207+[IntegerEntry(q(h, i), 0), ScriptTransfer(x.caller, ae, af)]
200208 }
201209 else throw("Strict value is not equal to itself.")
202210 }
205213 @Verifier(ag)
206214 func ah () = {
207215 let ai = {
208- let u = s()
209- if ($isInstanceOf(u, "ByteVector"))
216+ let e = u()
217+ if ($isInstanceOf(e, "ByteVector"))
210218 then {
211- let z = u
219+ let z = e
212220 z
213221 }
214- else if ($isInstanceOf(u, "Unit"))
222+ else if ($isInstanceOf(e, "Unit"))
215223 then ag.senderPublicKey
216224 else throw("Match error")
217225 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 func b () = "%s__managerPublicKey"
77
88
99 func c () = "%s__managerVaultAddress"
1010
1111
12-func d () = addressFromStringValue(getStringValue(c()))
12+func d () = {
13+ let e = getString(c())
14+ if ($isInstanceOf(e, "String"))
15+ then {
16+ let f = e
17+ addressFromStringValue(f)
18+ }
19+ else this
20+ }
1321
1422
15-func e (f,g) = makeString(["%s%s%s", "withdrawDelay", f, g], a)
23+func g (h,i) = makeString(["%s%s%s", "withdrawDelay", h, i], a)
1624
1725
18-func h (f,g) = makeString(["%s%s%s", "depositFeePermille", f, g], a)
26+func j (h,i) = makeString(["%s%s%s", "depositFeePermille", h, i], a)
1927
2028
21-func i (f,g) = makeString(["%s%s%s", "withdrawFeePermille", f, g], a)
29+func k (h,i) = makeString(["%s%s%s", "withdrawFeePermille", h, i], a)
2230
2331
24-func j (f,g) = makeString(["%s%s%s", "minAmountDeposit", f, g], a)
32+func l (h,i) = makeString(["%s%s%s", "minAmountDeposit", h, i], a)
2533
2634
27-func k (f,g) = makeString(["%s%s%s", "assetsPairStatus", f, g], a)
35+func m (h,i) = makeString(["%s%s%s", "assetsPairStatus", h, i], a)
2836
2937
30-func l (f,g) = makeString(["%s%s%s", "minAmountWithdraw", f, g], a)
38+func n (h,i) = makeString(["%s%s%s", "minAmountWithdraw", h, i], a)
3139
3240
33-func m (f,g,n) = makeString(["%s%s%s%s", "balance", f, g, n], a)
41+func o (h,i,p) = makeString(["%s%s%s%s", "balance", h, i, p], a)
3442
3543
36-func o (f,g) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", f, g], a)
44+func q (h,i) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", h, i], a)
3745
3846
39-func p (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", n, f, g, toString(q)], a)
47+func r (p,h,i,s) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", p, h, i, toString(s)], a)
4048
4149
42-func r (n,f,g,q) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", n, f, g, toString(q)], a)
50+func t (p,h,i,s) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", p, h, i, toString(s)], a)
4351
4452
45-func s () = {
46- let t = d()
47- let u = getString(t, b())
48- if ($isInstanceOf(u, "String"))
53+func u () = {
54+ let v = d()
55+ let e = getString(v, b())
56+ if ($isInstanceOf(e, "String"))
4957 then {
50- let v = u
51- fromBase58String(v)
58+ let f = e
59+ fromBase58String(f)
5260 }
53- else if ($isInstanceOf(u, "Unit"))
61+ else if ($isInstanceOf(e, "Unit"))
5462 then unit
5563 else throw("Match error")
5664 }
5765
5866
5967 func w (x) = {
6068 let y = throw("Permission denied.")
61- let u = s()
62- if ($isInstanceOf(u, "ByteVector"))
69+ let e = u()
70+ if ($isInstanceOf(e, "ByteVector"))
6371 then {
64- let z = u
72+ let z = e
6573 if ((x.callerPublicKey == z))
6674 then true
6775 else y
6876 }
69- else if ($isInstanceOf(u, "Unit"))
77+ else if ($isInstanceOf(e, "Unit"))
7078 then if ((x.caller == this))
7179 then true
7280 else y
7381 else throw("Match error")
7482 }
7583
7684
7785 func A (B) = makeString(["otc_multiasset.ride:", B], " ")
7886
7987
8088 func C (B) = throw(A(B))
8189
8290
8391 @Callable(x)
84-func registerAsset (f,g,D,E,F,G,H,I) = {
92+func registerAsset (h,i,D,E,F,G,H,I) = {
8593 let J = w(x)
8694 if ((J == J))
8795 then {
88- let K = e(f, g)
89- let L = h(f, g)
90- let M = i(f, g)
91- let N = j(f, g)
92- let O = l(f, g)
93- let P = k(f, g)
96+ let K = g(h, i)
97+ let L = j(h, i)
98+ let M = k(h, i)
99+ let N = l(h, i)
100+ let O = n(h, i)
101+ let P = m(h, i)
94102 [IntegerEntry(K, D), IntegerEntry(L, E), IntegerEntry(M, F), IntegerEntry(N, G), IntegerEntry(O, H), IntegerEntry(P, I)]
95103 }
96104 else throw("Strict value is not equal to itself.")
97105 }
98106
99107
100108
101109 @Callable(x)
102-func swapAssetsAToB (g) = {
110+func swapAssetsAToB (i) = {
103111 let Q = value(x.payments[0])
104- let f = toBase58String(value(Q.assetId))
105- let R = fromBase58String(value(g))
106- let n = toString(x.caller)
107- let G = valueOrErrorMessage(getInteger(j(f, g)), A("This asset pair does not exist."))
112+ let h = toBase58String(value(Q.assetId))
113+ let R = fromBase58String(value(i))
114+ let p = toString(x.caller)
115+ let G = valueOrErrorMessage(getInteger(l(h, i)), A("This asset pair does not exist."))
108116 let S = Q.amount
109- let E = valueOrErrorMessage(getInteger(h(f, g)), A("The deposit fee for this pair of assets is not set."))
117+ let E = valueOrErrorMessage(getInteger(j(h, i)), A("The deposit fee for this pair of assets is not set."))
110118 let T = ((S / 1000) * E)
111- let U = valueOrElse(getInteger(m(f, g, n)), 0)
112- let V = valueOrElse(getInteger(o(f, g)), 0)
113- let I = valueOrErrorMessage(getInteger(k(f, g)), A("The asset pair status for this pair of assets is not set."))
119+ let U = valueOrElse(getInteger(o(h, i, p)), 0)
120+ let V = valueOrElse(getInteger(q(h, i)), 0)
121+ let I = valueOrErrorMessage(getInteger(m(h, i)), A("The asset pair status for this pair of assets is not set."))
114122 let W = if ((I == 0))
115123 then true
116124 else C("The couple's deposit is blocked.")
117125 if ((W == W))
118126 then {
119127 let X = if ((S >= G))
120128 then true
121129 else C("The deposit amount is less than the minimum.")
122130 if ((X == X))
123131 then {
124132 let Y = ((U + S) - T)
125133 let Z = if ((Y > 0))
126134 then true
127135 else C("The final balance is less than or equal to 0.")
128136 if ((Z == Z))
129- then [IntegerEntry(m(f, g, n), Y), IntegerEntry(o(f, g), (V + T)), ScriptTransfer(x.caller, (S - T), R)]
137+ then [IntegerEntry(o(h, i, p), Y), IntegerEntry(q(h, i), (V + T)), ScriptTransfer(x.caller, (S - T), R)]
130138 else throw("Strict value is not equal to itself.")
131139 }
132140 else throw("Strict value is not equal to itself.")
133141 }
134142 else throw("Strict value is not equal to itself.")
135143 }
136144
137145
138146
139147 @Callable(x)
140-func initializationSwapAssetsBToA (f) = {
148+func initializationSwapAssetsBToA (h) = {
141149 let Q = value(x.payments[0])
142150 let aa = Q.amount
143- let g = toBase58String(value(Q.assetId))
144- let n = toString(x.caller)
145- let H = valueOrErrorMessage(getInteger(l(f, g)), A("The minimum withdrawal amount for this pair of assets is not set."))
146- let ab = (height + valueOrErrorMessage(getInteger(e(f, g)), A("Withdrawal delay is not set for the specified pair.")))
147- let U = valueOrErrorMessage(getInteger(m(f, g, n)), A("This user balance does not exist."))
148- let V = valueOrElse(getInteger(o(f, g)), 0)
149- let M = i(f, g)
151+ let i = toBase58String(value(Q.assetId))
152+ let p = toString(x.caller)
153+ let H = valueOrErrorMessage(getInteger(n(h, i)), A("The minimum withdrawal amount for this pair of assets is not set."))
154+ let ab = (height + valueOrErrorMessage(getInteger(g(h, i)), A("Withdrawal delay is not set for the specified pair.")))
155+ let U = valueOrErrorMessage(getInteger(o(h, i, p)), A("This user balance does not exist."))
156+ let V = valueOrElse(getInteger(q(h, i)), 0)
157+ let M = k(h, i)
150158 let F = valueOrErrorMessage(getInteger(M), A("The withdrawal fee for this pair of assets is not set."))
151159 let T = ((aa / 1000) * F)
152160 let Y = (U - aa)
153161 let Z = if ((Y >= 0))
154162 then true
155163 else C("Swap amount fail, amount is to small.")
156164 if ((Z == Z))
157165 then {
158166 let X = if ((aa >= H))
159167 then true
160168 else C("The withdraw amount is less than the minimum.")
161169 if ((X == X))
162170 then {
163- let ac = if ((getInteger(p(n, f, g, ab)) == unit))
171+ let ac = if ((getInteger(r(p, h, i, ab)) == unit))
164172 then true
165173 else C("At this height, there is already an exchange of this pair.")
166174 if ((ac == ac))
167- then [IntegerEntry(m(f, g, n), Y), IntegerEntry(p(n, f, g, ab), (aa - T)), IntegerEntry(o(f, g), (V + T))]
175+ then [IntegerEntry(o(h, i, p), Y), IntegerEntry(r(p, h, i, ab), (aa - T)), IntegerEntry(q(h, i), (V + T))]
168176 else throw("Strict value is not equal to itself.")
169177 }
170178 else throw("Strict value is not equal to itself.")
171179 }
172180 else throw("Strict value is not equal to itself.")
173181 }
174182
175183
176184
177185 @Callable(x)
178-func withdrawAsset (f,g,q) = {
179- let n = toString(x.caller)
180- let aa = valueOrErrorMessage(getInteger(p(n, f, g, q)), A("At this height, withdraw was not initialized with this pair of assets."))
181- let R = fromBase58String(value(f))
182- let ad = if ((height >= q))
186+func withdrawAsset (h,i,s) = {
187+ let p = toString(x.caller)
188+ let aa = valueOrErrorMessage(getInteger(r(p, h, i, s)), A("At this height, withdraw was not initialized with this pair of assets."))
189+ let R = fromBase58String(value(h))
190+ let ad = if ((height >= s))
183191 then true
184- else C((("Withdrawal is possible after " + toString(q)) + " height or you have already withdrawn."))
192+ else C((("Withdrawal is possible after " + toString(s)) + " height or you have already withdrawn."))
185193 if ((ad == ad))
186- then [DeleteEntry(p(n, f, g, q)), IntegerEntry(r(n, f, g, q), aa), ScriptTransfer(x.caller, aa, R)]
194+ then [DeleteEntry(r(p, h, i, s)), IntegerEntry(t(p, h, i, s), aa), ScriptTransfer(x.caller, aa, R)]
187195 else throw("Strict value is not equal to itself.")
188196 }
189197
190198
191199
192200 @Callable(x)
193-func withdrawFee (f,g) = {
201+func withdrawFee (h,i) = {
194202 let J = w(x)
195203 if ((J == J))
196204 then {
197- let ae = valueOrElse(getInteger(o(f, g)), 0)
198- let af = fromBase58String(value(f))
199-[IntegerEntry(o(f, g), 0), ScriptTransfer(x.caller, ae, af)]
205+ let ae = valueOrElse(getInteger(q(h, i)), 0)
206+ let af = fromBase58String(value(h))
207+[IntegerEntry(q(h, i), 0), ScriptTransfer(x.caller, ae, af)]
200208 }
201209 else throw("Strict value is not equal to itself.")
202210 }
203211
204212
205213 @Verifier(ag)
206214 func ah () = {
207215 let ai = {
208- let u = s()
209- if ($isInstanceOf(u, "ByteVector"))
216+ let e = u()
217+ if ($isInstanceOf(e, "ByteVector"))
210218 then {
211- let z = u
219+ let z = e
212220 z
213221 }
214- else if ($isInstanceOf(u, "Unit"))
222+ else if ($isInstanceOf(e, "Unit"))
215223 then ag.senderPublicKey
216224 else throw("Match error")
217225 }
218226 sigVerify(ag.bodyBytes, ag.proofs[0], ai)
219227 }
220228

github/deemru/w8io/169f3d6 
79.72 ms