tx · 2jEweJXuiYX5zdXrsxjPp6Y7ub6HcqHtev8tiaS7QgoR

3N7psESThHV5T7gjWF2DLjztWtrhTF6FR3b:  -0.03700000 Waves

2023.05.27 12:13 [2596170] smart account 3N7psESThHV5T7gjWF2DLjztWtrhTF6FR3b > SELF 0.00000000 Waves

{ "type": 13, "id": "2jEweJXuiYX5zdXrsxjPp6Y7ub6HcqHtev8tiaS7QgoR", "fee": 3700000, "feeAssetId": null, "timestamp": 1685178829999, "version": 2, "chainId": 84, "sender": "3N7psESThHV5T7gjWF2DLjztWtrhTF6FR3b", "senderPublicKey": "AgUKubvVDHDimcoQ6a6GnnzKdymyp2NYJRnjDFhiyM4e", "proofs": [ "3MWqZ3AfmNiGEmDz9fkP1zAYAi7cHPHxc8ZYGQXZwwWptdZD3C9qLfgNnVqwcozxq1gfZ98FgRjCjeNgHVgKeHv5" ], "script": "base64:BgIdCAISBgoECAgICBIECgIIARIFCgMICAgSBAoCCAgKAA1rX2luaXRpYWxpemVkAg1rX2luaXRpYWxpemVkABRrX2Nvb3JkaW5hdG9yQWRkcmVzcwIUa19jb29yZGluYXRvckFkZHJlc3MAD2tfYWRtaW5fYWRkcmVzcwIPa19hZG1pbl9hZGRyZXNzAAhrX21hcmtldAIIa19tYXJrZXQBDGdldE1hcmtldEtleQIFX2Zyb20DX3RvCQCsAgIJAKwCAgkArAICCQCsAgIFCGtfbWFya2V0AgFfBQVfZnJvbQIBXwUDX3RvAQtjb29yZGluYXRvcgAJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkApggBCQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUEdGhpcwUUa19jb29yZGluYXRvckFkZHJlc3MCGENvb3JkaW5hdG9yIG5vdCBzZXQgU3dhcAIbQ29vcmRpbmF0b3IgYWRkcmVzcyBpbnZhbGlkAQxhZG1pbkFkZHJlc3MACQCmCAEJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCCQELY29vcmRpbmF0b3IABQ9rX2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CAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQACAQIudW5hYmxlIHRvIHZlcmlmeTogYWRtaW4gbm90IHNldCBpbiBjb29yZGluYXRvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleVns/ug=", "height": 2596170, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DdEJRFzxpRx4tA46mbGapGbrcLHV3GEs8wYpADiackLa Next: none Diff:
OldNewDifferences
2121 func j () = valueOrElse(getBoolean(this, a), false)
2222
2323
24-func k (f,g) = {
25- let l = e(f, g)
26- let m = value(assetInfo(fromBase58String(f))).name
27- let n = value(assetInfo(fromBase58String(g))).name
28- let o = (((((((f + " [") + m) + "] -> ") + g) + " [") + n) + "]")
29- let p = valueOrErrorMessage(getString(this, l), ("No market for swap: " + o))
30- valueOrErrorMessage(addressFromString(p), ("Invalid market address for swap: " + o))
24+func k (l) = if ((l == "WAVES"))
25+ then "WAVES"
26+ else value(assetInfo(fromBase58String(l))).name
27+
28+
29+func m (f,g) = {
30+ let n = e(f, g)
31+ let o = k(f)
32+ let p = k(g)
33+ let q = (((((((f + " [") + o) + "] -> ") + g) + " [") + p) + "]")
34+ let r = valueOrErrorMessage(getString(this, n), ("No market for swap: " + q))
35+ valueOrErrorMessage(addressFromString(r), ("Invalid market address for swap: " + q))
3136 }
3237
3338
34-@Callable(q)
35-func initialize (r,s,t,u) = if (if (j())
39+@Callable(s)
40+func initialize (t,u,v,w) = if (if (j())
3641 then true
37- else (q.caller != this))
42+ else (s.caller != this))
3843 then throw("Unable to initialize")
3944 else {
40- let v = split(s, ",")
41- let w = split(t, ",")
4245 let x = split(u, ",")
43- if (if (if ((size(v) != size(w)))
46+ let y = split(v, ",")
47+ let z = split(w, ",")
48+ if (if (if ((size(x) != size(y)))
4449 then true
45- else (size(v) != size(x)))
50+ else (size(x) != size(z)))
4651 then true
47- else (size(v) > 5))
52+ else (size(x) > 5))
4853 then throw("Unable to initialize: invalid assets / markets")
4954 else {
50- func y (z,A) = if ((A >= size(v)))
51- then z
55+ func A (B,C) = if ((C >= size(x)))
56+ then B
5257 else {
53- let B = v[A]
54- let C = w[A]
55- let D = x[A]
56- if (if (if ((B == ""))
58+ let D = x[C]
59+ let E = y[C]
60+ let F = z[C]
61+ if (if (if ((D == ""))
5762 then true
58- else (C == ""))
63+ else (E == ""))
5964 then true
60- else !(isDefined(addressFromString(D))))
61- then throw(("Invalid market at index: " + toString(A)))
62- else (z ++ [StringEntry(e(B, C), D)])
65+ else !(isDefined(addressFromString(F))))
66+ then throw(("Invalid market at index: " + toString(C)))
67+ else (B ++ [StringEntry(e(D, E), F)])
6368 }
6469
65- let E = {
66- let F = [0, 1, 2, 3, 4]
67- let G = size(F)
68- let H = nil
69- func I (J,K) = if ((K >= G))
70- then J
71- else y(J, F[K])
70+ let G = {
71+ let H = [0, 1, 2, 3, 4]
72+ let I = size(H)
73+ let J = nil
74+ func K (L,M) = if ((M >= I))
75+ then L
76+ else A(L, H[M])
7277
73- func L (J,K) = if ((K >= G))
74- then J
78+ func N (L,M) = if ((M >= I))
79+ then L
7580 else throw("List size exceeds 5")
7681
77- L(I(I(I(I(I(H, 0), 1), 2), 3), 4), 5)
82+ N(K(K(K(K(K(J, 0), 1), 2), 3), 4), 5)
7883 }
79- ([StringEntry(b, toString(addressFromStringValue(r))), BooleanEntry(a, true)] ++ E)
84+ ([StringEntry(b, toString(addressFromStringValue(t))), BooleanEntry(a, true)] ++ G)
8085 }
8186 }
8287
8388
8489
85-@Callable(q)
86-func swap (g,M) = if (if (if (!(j()))
90+@Callable(s)
91+func swap (g,O) = if (if (if (!(j()))
8792 then true
88- else (size(q.payments) != 1))
93+ else (size(s.payments) != 1))
8994 then true
90- else (0 > M))
95+ else (0 > O))
9196 then throw("Invalid swap params: payment count")
9297 else {
93- let N = q.payments[0].assetId
94- let B = if (isDefined(N))
95- then toBase58String(value(N))
98+ let P = s.payments[0].assetId
99+ let D = if (isDefined(P))
100+ then toBase58String(value(P))
96101 else "WAVES"
97- let D = k(B, g)
98- let O = assetBalance(this, fromBase58String(g))
99- if ((O == O))
102+ let F = m(D, g)
103+ let Q = assetBalance(this, fromBase58String(g))
104+ if ((Q == Q))
100105 then {
101- let P = invoke(D, "swap", [g, M], q.payments)
102- if ((P == P))
106+ let R = invoke(F, "swap", [g, O], s.payments)
107+ if ((R == R))
103108 then {
104- let Q = assetBalance(this, fromBase58String(g))
105- if ((Q == Q))
109+ let S = assetBalance(this, fromBase58String(g))
110+ if ((S == S))
106111 then {
107- let R = (Q - O)
108- if ((R == R))
109- then $Tuple2([ScriptTransfer(q.caller, R, fromBase58String(g))], R)
112+ let T = (S - Q)
113+ if ((T == T))
114+ then $Tuple2([ScriptTransfer(s.caller, T, fromBase58String(g))], T)
110115 else throw("Strict value is not equal to itself.")
111116 }
112117 else throw("Strict value is not equal to itself.")
118123
119124
120125
121-@Callable(q)
122-func addMarket (f,g,S) = if (if (if (if (if (if ((q.caller != i()))
123- then (q.caller != this)
126+@Callable(s)
127+func addMarket (f,g,U) = if (if (if (if (if (if ((s.caller != i()))
128+ then (s.caller != this)
124129 else false)
125130 then true
126131 else !(j()))
129134 then true
130135 else (g == ""))
131136 then true
132- else !(isDefined(addressFromString(S))))
137+ else !(isDefined(addressFromString(U))))
133138 then throw("Invalid addMarket params")
134- else [StringEntry(e(f, g), S)]
139+ else [StringEntry(e(f, g), U)]
135140
136141
137142
138-@Callable(q)
139-func removeMarket (f,g) = if (if (if (if ((q.caller != i()))
143+@Callable(s)
144+func removeMarket (f,g) = if (if (if (if ((s.caller != i()))
140145 then true
141146 else !(j()))
142147 then true
147152 else [DeleteEntry(e(f, g))]
148153
149154
150-@Verifier(T)
151-func U () = {
152- let V = getString(this, b)
153- if (isDefined(V))
155+@Verifier(V)
156+func W () = {
157+ let X = getString(this, b)
158+ if (isDefined(X))
154159 then {
155- let W = getString(addressFromStringValue(value(V)), c)
156- if (isDefined(W))
157- then valueOrElse(getBoolean(addressFromStringValue(value(W)), ((("status_" + toString(this)) + "_") + toBase58String(T.id))), false)
160+ let Y = getString(addressFromStringValue(value(X)), c)
161+ if (isDefined(Y))
162+ then valueOrElse(getBoolean(addressFromStringValue(value(Y)), ((("status_" + toString(this)) + "_") + toBase58String(V.id))), false)
158163 else throw("unable to verify: admin not set in coordinator")
159164 }
160- else sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
165+ else sigVerify(V.bodyBytes, V.proofs[0], V.senderPublicKey)
161166 }
162167
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_initialized"
55
66 let b = "k_coordinatorAddress"
77
88 let c = "k_admin_address"
99
1010 let d = "k_market"
1111
1212 func e (f,g) = ((((d + "_") + f) + "_") + g)
1313
1414
1515 func h () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, b), "Coordinator not set Swap")), "Coordinator address invalid")
1616
1717
1818 func i () = addressFromString(valueOrErrorMessage(getString(h(), c), "Admin address not set"))
1919
2020
2121 func j () = valueOrElse(getBoolean(this, a), false)
2222
2323
24-func k (f,g) = {
25- let l = e(f, g)
26- let m = value(assetInfo(fromBase58String(f))).name
27- let n = value(assetInfo(fromBase58String(g))).name
28- let o = (((((((f + " [") + m) + "] -> ") + g) + " [") + n) + "]")
29- let p = valueOrErrorMessage(getString(this, l), ("No market for swap: " + o))
30- valueOrErrorMessage(addressFromString(p), ("Invalid market address for swap: " + o))
24+func k (l) = if ((l == "WAVES"))
25+ then "WAVES"
26+ else value(assetInfo(fromBase58String(l))).name
27+
28+
29+func m (f,g) = {
30+ let n = e(f, g)
31+ let o = k(f)
32+ let p = k(g)
33+ let q = (((((((f + " [") + o) + "] -> ") + g) + " [") + p) + "]")
34+ let r = valueOrErrorMessage(getString(this, n), ("No market for swap: " + q))
35+ valueOrErrorMessage(addressFromString(r), ("Invalid market address for swap: " + q))
3136 }
3237
3338
34-@Callable(q)
35-func initialize (r,s,t,u) = if (if (j())
39+@Callable(s)
40+func initialize (t,u,v,w) = if (if (j())
3641 then true
37- else (q.caller != this))
42+ else (s.caller != this))
3843 then throw("Unable to initialize")
3944 else {
40- let v = split(s, ",")
41- let w = split(t, ",")
4245 let x = split(u, ",")
43- if (if (if ((size(v) != size(w)))
46+ let y = split(v, ",")
47+ let z = split(w, ",")
48+ if (if (if ((size(x) != size(y)))
4449 then true
45- else (size(v) != size(x)))
50+ else (size(x) != size(z)))
4651 then true
47- else (size(v) > 5))
52+ else (size(x) > 5))
4853 then throw("Unable to initialize: invalid assets / markets")
4954 else {
50- func y (z,A) = if ((A >= size(v)))
51- then z
55+ func A (B,C) = if ((C >= size(x)))
56+ then B
5257 else {
53- let B = v[A]
54- let C = w[A]
55- let D = x[A]
56- if (if (if ((B == ""))
58+ let D = x[C]
59+ let E = y[C]
60+ let F = z[C]
61+ if (if (if ((D == ""))
5762 then true
58- else (C == ""))
63+ else (E == ""))
5964 then true
60- else !(isDefined(addressFromString(D))))
61- then throw(("Invalid market at index: " + toString(A)))
62- else (z ++ [StringEntry(e(B, C), D)])
65+ else !(isDefined(addressFromString(F))))
66+ then throw(("Invalid market at index: " + toString(C)))
67+ else (B ++ [StringEntry(e(D, E), F)])
6368 }
6469
65- let E = {
66- let F = [0, 1, 2, 3, 4]
67- let G = size(F)
68- let H = nil
69- func I (J,K) = if ((K >= G))
70- then J
71- else y(J, F[K])
70+ let G = {
71+ let H = [0, 1, 2, 3, 4]
72+ let I = size(H)
73+ let J = nil
74+ func K (L,M) = if ((M >= I))
75+ then L
76+ else A(L, H[M])
7277
73- func L (J,K) = if ((K >= G))
74- then J
78+ func N (L,M) = if ((M >= I))
79+ then L
7580 else throw("List size exceeds 5")
7681
77- L(I(I(I(I(I(H, 0), 1), 2), 3), 4), 5)
82+ N(K(K(K(K(K(J, 0), 1), 2), 3), 4), 5)
7883 }
79- ([StringEntry(b, toString(addressFromStringValue(r))), BooleanEntry(a, true)] ++ E)
84+ ([StringEntry(b, toString(addressFromStringValue(t))), BooleanEntry(a, true)] ++ G)
8085 }
8186 }
8287
8388
8489
85-@Callable(q)
86-func swap (g,M) = if (if (if (!(j()))
90+@Callable(s)
91+func swap (g,O) = if (if (if (!(j()))
8792 then true
88- else (size(q.payments) != 1))
93+ else (size(s.payments) != 1))
8994 then true
90- else (0 > M))
95+ else (0 > O))
9196 then throw("Invalid swap params: payment count")
9297 else {
93- let N = q.payments[0].assetId
94- let B = if (isDefined(N))
95- then toBase58String(value(N))
98+ let P = s.payments[0].assetId
99+ let D = if (isDefined(P))
100+ then toBase58String(value(P))
96101 else "WAVES"
97- let D = k(B, g)
98- let O = assetBalance(this, fromBase58String(g))
99- if ((O == O))
102+ let F = m(D, g)
103+ let Q = assetBalance(this, fromBase58String(g))
104+ if ((Q == Q))
100105 then {
101- let P = invoke(D, "swap", [g, M], q.payments)
102- if ((P == P))
106+ let R = invoke(F, "swap", [g, O], s.payments)
107+ if ((R == R))
103108 then {
104- let Q = assetBalance(this, fromBase58String(g))
105- if ((Q == Q))
109+ let S = assetBalance(this, fromBase58String(g))
110+ if ((S == S))
106111 then {
107- let R = (Q - O)
108- if ((R == R))
109- then $Tuple2([ScriptTransfer(q.caller, R, fromBase58String(g))], R)
112+ let T = (S - Q)
113+ if ((T == T))
114+ then $Tuple2([ScriptTransfer(s.caller, T, fromBase58String(g))], T)
110115 else throw("Strict value is not equal to itself.")
111116 }
112117 else throw("Strict value is not equal to itself.")
113118 }
114119 else throw("Strict value is not equal to itself.")
115120 }
116121 else throw("Strict value is not equal to itself.")
117122 }
118123
119124
120125
121-@Callable(q)
122-func addMarket (f,g,S) = if (if (if (if (if (if ((q.caller != i()))
123- then (q.caller != this)
126+@Callable(s)
127+func addMarket (f,g,U) = if (if (if (if (if (if ((s.caller != i()))
128+ then (s.caller != this)
124129 else false)
125130 then true
126131 else !(j()))
127132 then true
128133 else (f == ""))
129134 then true
130135 else (g == ""))
131136 then true
132- else !(isDefined(addressFromString(S))))
137+ else !(isDefined(addressFromString(U))))
133138 then throw("Invalid addMarket params")
134- else [StringEntry(e(f, g), S)]
139+ else [StringEntry(e(f, g), U)]
135140
136141
137142
138-@Callable(q)
139-func removeMarket (f,g) = if (if (if (if ((q.caller != i()))
143+@Callable(s)
144+func removeMarket (f,g) = if (if (if (if ((s.caller != i()))
140145 then true
141146 else !(j()))
142147 then true
143148 else (f == ""))
144149 then true
145150 else (g == ""))
146151 then throw("Invalid addMarket params")
147152 else [DeleteEntry(e(f, g))]
148153
149154
150-@Verifier(T)
151-func U () = {
152- let V = getString(this, b)
153- if (isDefined(V))
155+@Verifier(V)
156+func W () = {
157+ let X = getString(this, b)
158+ if (isDefined(X))
154159 then {
155- let W = getString(addressFromStringValue(value(V)), c)
156- if (isDefined(W))
157- then valueOrElse(getBoolean(addressFromStringValue(value(W)), ((("status_" + toString(this)) + "_") + toBase58String(T.id))), false)
160+ let Y = getString(addressFromStringValue(value(X)), c)
161+ if (isDefined(Y))
162+ then valueOrElse(getBoolean(addressFromStringValue(value(Y)), ((("status_" + toString(this)) + "_") + toBase58String(V.id))), false)
158163 else throw("unable to verify: admin not set in coordinator")
159164 }
160- else sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
165+ else sigVerify(V.bodyBytes, V.proofs[0], V.senderPublicKey)
161166 }
162167

github/deemru/w8io/026f985 
58.63 ms