tx · A3mnHrz5EAHBdCBSS3ZV2Rm3q7dFFkrRjcNoV3M3NSkU

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2023.03.06 22:41 [2478659] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "A3mnHrz5EAHBdCBSS3ZV2Rm3q7dFFkrRjcNoV3M3NSkU", "fee": 3400000, "feeAssetId": null, "timestamp": 1678131668686, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "4ATw6Cjy73U34Y6oCSTThrJCTJJr9gxtsZjji46QNCBRuU5BPmAGLGJQ4yB3uyUgg95PhSeDQA2YwtvXBHFJQTVb" ], "script": "base64:BgJiCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgZABNrX2luc3VyYW5jZV9hZGRyZXNzAhNrX2luc3VyYW5jZV9hZGRyZXNzAA9rX3ZhdWx0X2FkZHJlc3MCD2tfdmF1bHRfYWRkcmVzcwAPa19hZG1pbl9hZGRyZXNzAg9rX2FkbWluX2FkZHJlc3MADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQADmtfcmV3YXJkX2Fzc2V0Ag5rX3Jld2FyZF9hc3NldAAOa19zd2FwX2FkZHJlc3MCDmtfc3dhcF9hZGRyZXNzABFrX3N0YWtpbmdfYWRkcmVzcwIRa19zdGFraW5nX2FkZHJlc3MAEWtfZmFybWluZ19hZGRyZXNzAhFrX2Zhcm1pbmdfYWRkcmVzcwAQa19wcml6ZXNfYWRkcmVzcwIQa19wcml6ZXNfYWRkcmVzcwAVa19ob3VzZWtlZXBlc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NuaWwJAAIBAhBDYW4ndCBmaW5kIGFzc2V0AQJ0eAEGdmVyaWZ5AAQHJG1hdGNoMAkAnQgCBQR0aGlzBQ9rX2FkbWluX2FkZHJlc3MDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAh2ZXJpZmllcgUHJG1hdGNoMAkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQh2ZXJpZmllcgkArAICCQCsAgIJAKwCAgIHc3RhdHVzXwkApQgBBQR0aGlzAgFfCQDYBAEIBQJ0eAJpZAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmJcs8p", "height": 2478659, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gq3wnqz1kuA29QcKk11eXYWU9X7NFgExjmPDNWj5ptTA Next: BCFxDKf8SdvMJgTPVuQite3YhH73AJS2MbE1KdbVPjJV Diff:
OldNewDifferences
3737
3838 let r = "k_nft_manager_address"
3939
40-let s = "k_collateral_address"
40+let s = "k_child"
4141
42-let t = "k_exchange_address"
43-
44-func u (v,w) = ((v + "_") + w)
42+func t (u,v) = ((u + "_") + v)
4543
4644
47-func x (y) = toString(valueOrErrorMessage(addressFromString(y), (("Can't parse \"" + y) + "\" as address")))
45+func w (x) = toString(valueOrErrorMessage(addressFromString(x), (("Can't parse \"" + x) + "\" as address")))
4846
4947
50-func z () = (getString(this, c) == unit)
48+func y () = (getString(this, c) == unit)
5149
5250
53-func A () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
51+func z () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
5452
5553
56-func B (C) = if (if (if (z())
57- then (C.caller == this)
54+func A (B) = if (if (if (y())
55+ then (B.caller == this)
5856 else false)
5957 then true
60- else (C.caller == A()))
58+ else (B.caller == z()))
6159 then unit
6260 else throw("Only the Admin itself can invoke this function")
6361
6462
65-func D (C) = if ((C.caller == A()))
63+func C (B) = if ((B.caller == z()))
6664 then unit
6765 else throw("Only the Admin itself can invoke this function")
6866
6967
70-@Callable(C)
71-func setAdmin (E) = valueOrElse(B(C), {
72- let y = addressFromStringValue(E)
73-[StringEntry(c, toString(y))]
68+@Callable(B)
69+func setAdmin (D) = valueOrElse(A(B), {
70+ let x = addressFromStringValue(D)
71+[StringEntry(c, toString(x))]
7472 })
7573
7674
7775
78-@Callable(C)
79-func setInsuranceFund (F) = valueOrElse(D(C), {
80- let y = x(F)
81-[StringEntry(a, y)]
76+@Callable(B)
77+func setInsuranceFund (E) = valueOrElse(C(B), {
78+ let x = w(E)
79+[StringEntry(a, x)]
8280 })
8381
8482
8583
86-@Callable(C)
87-func setLiquidityMiner (G) = valueOrElse(D(C), {
88- let y = x(G)
89-[StringEntry(n, y)]
84+@Callable(B)
85+func setLiquidityMiner (F) = valueOrElse(C(B), {
86+ let x = w(F)
87+[StringEntry(n, x)]
9088 })
9189
9290
9391
94-@Callable(C)
95-func setOrders (H) = valueOrElse(D(C), {
96- let y = x(H)
97-[StringEntry(o, y)]
92+@Callable(B)
93+func setOrders (G) = valueOrElse(C(B), {
94+ let x = w(G)
95+[StringEntry(o, x)]
9896 })
9997
10098
10199
102-@Callable(C)
103-func setReferral (I) = valueOrElse(D(C), {
104- let y = x(I)
105-[StringEntry(p, y)]
100+@Callable(B)
101+func setReferral (H) = valueOrElse(C(B), {
102+ let x = w(H)
103+[StringEntry(p, x)]
106104 })
107105
108106
109107
110-@Callable(C)
111-func setFarming (J) = valueOrElse(D(C), {
112- let y = x(J)
113-[StringEntry(h, y)]
108+@Callable(B)
109+func setFarming (I) = valueOrElse(C(B), {
110+ let x = w(I)
111+[StringEntry(h, x)]
114112 })
115113
116114
117115
118-@Callable(C)
119-func setManager (K) = valueOrElse(D(C), {
120- let y = x(K)
121-[StringEntry(q, y)]
116+@Callable(B)
117+func setManager (J) = valueOrElse(C(B), {
118+ let x = w(J)
119+[StringEntry(q, x)]
122120 })
123121
124122
125123
126-@Callable(C)
127-func setHousekeeper (L) = valueOrElse(D(C), {
128- let y = x(L)
129-[StringEntry(j, y)]
124+@Callable(B)
125+func setHousekeeper (K) = valueOrElse(C(B), {
126+ let x = w(K)
127+[StringEntry(j, x)]
130128 })
131129
132130
133131
134-@Callable(C)
135-func setPrizes (M) = valueOrElse(D(C), {
136- let y = x(M)
137-[StringEntry(i, y)]
132+@Callable(B)
133+func setPrizes (L) = valueOrElse(C(B), {
134+ let x = w(L)
135+[StringEntry(i, x)]
138136 })
139137
140138
141139
142-@Callable(C)
143-func setNftManager (N) = valueOrElse(D(C), {
144- let y = x(N)
145-[StringEntry(r, y)]
140+@Callable(B)
141+func setNftManager (M) = valueOrElse(C(B), {
142+ let x = w(M)
143+[StringEntry(r, x)]
146144 })
147145
148146
149147
150-@Callable(C)
151-func setSwap (O) = valueOrElse(D(C), {
152- let y = x(O)
153-[StringEntry(f, y)]
148+@Callable(B)
149+func setSwap (N) = valueOrElse(C(B), {
150+ let x = w(N)
151+[StringEntry(f, x)]
154152 })
155153
156154
157155
158-@Callable(C)
159-func setQuoteAsset (P) = valueOrElse(D(C), [StringEntry(d, P)])
156+@Callable(B)
157+func setQuoteAsset (O) = valueOrElse(C(B), [StringEntry(d, O)])
160158
161159
162160
163-@Callable(C)
164-func setRewardAsset (P) = valueOrElse(D(C), [StringEntry(e, P)])
161+@Callable(B)
162+func setRewardAsset (O) = valueOrElse(C(B), [StringEntry(e, O)])
165163
166164
167165
168-@Callable(C)
169-func setStakingAddress (Q) = valueOrElse(D(C), {
170- let R = x(Q)
171-[StringEntry(g, Q)]
166+@Callable(B)
167+func setStakingAddress (P) = valueOrElse(C(B), {
168+ let Q = w(P)
169+[StringEntry(g, P)]
172170 })
173171
174172
175173
176-@Callable(C)
177-func setCollateralAddress (S) = valueOrElse(D(C), {
178- let T = x(S)
179-[StringEntry(s, S)]
174+@Callable(B)
175+func setVaultAddress (R) = valueOrElse(C(B), {
176+ let S = w(R)
177+[StringEntry(b, R)]
180178 })
181179
182180
183181
184-@Callable(C)
185-func setExchangeAddress (U) = valueOrElse(D(C), {
186- let V = x(U)
187-[StringEntry(t, U)]
182+@Callable(B)
183+func addChild (T) = valueOrElse(C(B), {
184+ let U = w(T)
185+[BooleanEntry(t(s, T), true)]
188186 })
189187
190188
191189
192-@Callable(C)
193-func setVaultAddress (W) = valueOrElse(D(C), {
194- let V = x(W)
195-[StringEntry(b, W)]
190+@Callable(B)
191+func addAmm (V,W) = valueOrElse(C(B), {
192+ let X = w(V)
193+[BooleanEntry(t(k, V), true), StringEntry(t(l, V), W)]
196194 })
197195
198196
199197
200-@Callable(C)
201-func addAmm (X,Y) = valueOrElse(D(C), {
202- let Z = x(X)
203-[BooleanEntry(u(k, X), true), StringEntry(u(l, X), Y)]
204- })
198+@Callable(B)
199+func removeAmm (V) = valueOrElse(C(B), [DeleteEntry(t(k, V))])
205200
206201
207202
208-@Callable(C)
209-func removeAmm (X) = valueOrElse(D(C), [DeleteEntry(u(k, X))])
210-
211-
212-
213-@Callable(C)
214-func setGovernanceAsset (P) = valueOrElse(D(C), {
215- let aa = fromBase58String(P)
216- let ab = assetInfo(aa)
217- if ($isInstanceOf(ab, "Asset"))
203+@Callable(B)
204+func setGovernanceAsset (O) = valueOrElse(C(B), {
205+ let Y = fromBase58String(O)
206+ let Z = assetInfo(Y)
207+ if ($isInstanceOf(Z, "Asset"))
218208 then {
219- let ac = ab
220- if ((ac.decimals != 8))
209+ let aa = Z
210+ if ((aa.decimals != 8))
221211 then throw("Invalid asset decimals, should be 8")
222- else [StringEntry(m, P)]
212+ else [StringEntry(m, O)]
223213 }
224214 else throw("Can't find asset")
225215 })
226216
227217
228-@Verifier(ad)
229-func ae () = {
230- let ab = getString(this, c)
231- if ($isInstanceOf(ab, "String"))
218+@Verifier(ab)
219+func ac () = {
220+ let Z = getString(this, c)
221+ if ($isInstanceOf(Z, "String"))
232222 then {
233- let af = ab
234- valueOrElse(getBoolean(addressFromStringValue(af), ((("status_" + toString(this)) + "_") + toBase58String(ad.id))), false)
223+ let ad = Z
224+ valueOrElse(getBoolean(addressFromStringValue(ad), ((("status_" + toString(this)) + "_") + toBase58String(ab.id))), false)
235225 }
236- else sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey)
226+ else sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey)
237227 }
238228
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_insurance_address"
55
66 let b = "k_vault_address"
77
88 let c = "k_admin_address"
99
1010 let d = "k_quote_asset"
1111
1212 let e = "k_reward_asset"
1313
1414 let f = "k_swap_address"
1515
1616 let g = "k_staking_address"
1717
1818 let h = "k_farming_address"
1919
2020 let i = "k_prizes_address"
2121
2222 let j = "k_housekeeper_address"
2323
2424 let k = "k_amm"
2525
2626 let l = "k_amm_data"
2727
2828 let m = "k_gov_asset"
2929
3030 let n = "k_miner_address"
3131
3232 let o = "k_orders_address"
3333
3434 let p = "k_referral_address"
3535
3636 let q = "k_manager_address"
3737
3838 let r = "k_nft_manager_address"
3939
40-let s = "k_collateral_address"
40+let s = "k_child"
4141
42-let t = "k_exchange_address"
43-
44-func u (v,w) = ((v + "_") + w)
42+func t (u,v) = ((u + "_") + v)
4543
4644
47-func x (y) = toString(valueOrErrorMessage(addressFromString(y), (("Can't parse \"" + y) + "\" as address")))
45+func w (x) = toString(valueOrErrorMessage(addressFromString(x), (("Can't parse \"" + x) + "\" as address")))
4846
4947
50-func z () = (getString(this, c) == unit)
48+func y () = (getString(this, c) == unit)
5149
5250
53-func A () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
51+func z () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
5452
5553
56-func B (C) = if (if (if (z())
57- then (C.caller == this)
54+func A (B) = if (if (if (y())
55+ then (B.caller == this)
5856 else false)
5957 then true
60- else (C.caller == A()))
58+ else (B.caller == z()))
6159 then unit
6260 else throw("Only the Admin itself can invoke this function")
6361
6462
65-func D (C) = if ((C.caller == A()))
63+func C (B) = if ((B.caller == z()))
6664 then unit
6765 else throw("Only the Admin itself can invoke this function")
6866
6967
70-@Callable(C)
71-func setAdmin (E) = valueOrElse(B(C), {
72- let y = addressFromStringValue(E)
73-[StringEntry(c, toString(y))]
68+@Callable(B)
69+func setAdmin (D) = valueOrElse(A(B), {
70+ let x = addressFromStringValue(D)
71+[StringEntry(c, toString(x))]
7472 })
7573
7674
7775
78-@Callable(C)
79-func setInsuranceFund (F) = valueOrElse(D(C), {
80- let y = x(F)
81-[StringEntry(a, y)]
76+@Callable(B)
77+func setInsuranceFund (E) = valueOrElse(C(B), {
78+ let x = w(E)
79+[StringEntry(a, x)]
8280 })
8381
8482
8583
86-@Callable(C)
87-func setLiquidityMiner (G) = valueOrElse(D(C), {
88- let y = x(G)
89-[StringEntry(n, y)]
84+@Callable(B)
85+func setLiquidityMiner (F) = valueOrElse(C(B), {
86+ let x = w(F)
87+[StringEntry(n, x)]
9088 })
9189
9290
9391
94-@Callable(C)
95-func setOrders (H) = valueOrElse(D(C), {
96- let y = x(H)
97-[StringEntry(o, y)]
92+@Callable(B)
93+func setOrders (G) = valueOrElse(C(B), {
94+ let x = w(G)
95+[StringEntry(o, x)]
9896 })
9997
10098
10199
102-@Callable(C)
103-func setReferral (I) = valueOrElse(D(C), {
104- let y = x(I)
105-[StringEntry(p, y)]
100+@Callable(B)
101+func setReferral (H) = valueOrElse(C(B), {
102+ let x = w(H)
103+[StringEntry(p, x)]
106104 })
107105
108106
109107
110-@Callable(C)
111-func setFarming (J) = valueOrElse(D(C), {
112- let y = x(J)
113-[StringEntry(h, y)]
108+@Callable(B)
109+func setFarming (I) = valueOrElse(C(B), {
110+ let x = w(I)
111+[StringEntry(h, x)]
114112 })
115113
116114
117115
118-@Callable(C)
119-func setManager (K) = valueOrElse(D(C), {
120- let y = x(K)
121-[StringEntry(q, y)]
116+@Callable(B)
117+func setManager (J) = valueOrElse(C(B), {
118+ let x = w(J)
119+[StringEntry(q, x)]
122120 })
123121
124122
125123
126-@Callable(C)
127-func setHousekeeper (L) = valueOrElse(D(C), {
128- let y = x(L)
129-[StringEntry(j, y)]
124+@Callable(B)
125+func setHousekeeper (K) = valueOrElse(C(B), {
126+ let x = w(K)
127+[StringEntry(j, x)]
130128 })
131129
132130
133131
134-@Callable(C)
135-func setPrizes (M) = valueOrElse(D(C), {
136- let y = x(M)
137-[StringEntry(i, y)]
132+@Callable(B)
133+func setPrizes (L) = valueOrElse(C(B), {
134+ let x = w(L)
135+[StringEntry(i, x)]
138136 })
139137
140138
141139
142-@Callable(C)
143-func setNftManager (N) = valueOrElse(D(C), {
144- let y = x(N)
145-[StringEntry(r, y)]
140+@Callable(B)
141+func setNftManager (M) = valueOrElse(C(B), {
142+ let x = w(M)
143+[StringEntry(r, x)]
146144 })
147145
148146
149147
150-@Callable(C)
151-func setSwap (O) = valueOrElse(D(C), {
152- let y = x(O)
153-[StringEntry(f, y)]
148+@Callable(B)
149+func setSwap (N) = valueOrElse(C(B), {
150+ let x = w(N)
151+[StringEntry(f, x)]
154152 })
155153
156154
157155
158-@Callable(C)
159-func setQuoteAsset (P) = valueOrElse(D(C), [StringEntry(d, P)])
156+@Callable(B)
157+func setQuoteAsset (O) = valueOrElse(C(B), [StringEntry(d, O)])
160158
161159
162160
163-@Callable(C)
164-func setRewardAsset (P) = valueOrElse(D(C), [StringEntry(e, P)])
161+@Callable(B)
162+func setRewardAsset (O) = valueOrElse(C(B), [StringEntry(e, O)])
165163
166164
167165
168-@Callable(C)
169-func setStakingAddress (Q) = valueOrElse(D(C), {
170- let R = x(Q)
171-[StringEntry(g, Q)]
166+@Callable(B)
167+func setStakingAddress (P) = valueOrElse(C(B), {
168+ let Q = w(P)
169+[StringEntry(g, P)]
172170 })
173171
174172
175173
176-@Callable(C)
177-func setCollateralAddress (S) = valueOrElse(D(C), {
178- let T = x(S)
179-[StringEntry(s, S)]
174+@Callable(B)
175+func setVaultAddress (R) = valueOrElse(C(B), {
176+ let S = w(R)
177+[StringEntry(b, R)]
180178 })
181179
182180
183181
184-@Callable(C)
185-func setExchangeAddress (U) = valueOrElse(D(C), {
186- let V = x(U)
187-[StringEntry(t, U)]
182+@Callable(B)
183+func addChild (T) = valueOrElse(C(B), {
184+ let U = w(T)
185+[BooleanEntry(t(s, T), true)]
188186 })
189187
190188
191189
192-@Callable(C)
193-func setVaultAddress (W) = valueOrElse(D(C), {
194- let V = x(W)
195-[StringEntry(b, W)]
190+@Callable(B)
191+func addAmm (V,W) = valueOrElse(C(B), {
192+ let X = w(V)
193+[BooleanEntry(t(k, V), true), StringEntry(t(l, V), W)]
196194 })
197195
198196
199197
200-@Callable(C)
201-func addAmm (X,Y) = valueOrElse(D(C), {
202- let Z = x(X)
203-[BooleanEntry(u(k, X), true), StringEntry(u(l, X), Y)]
204- })
198+@Callable(B)
199+func removeAmm (V) = valueOrElse(C(B), [DeleteEntry(t(k, V))])
205200
206201
207202
208-@Callable(C)
209-func removeAmm (X) = valueOrElse(D(C), [DeleteEntry(u(k, X))])
210-
211-
212-
213-@Callable(C)
214-func setGovernanceAsset (P) = valueOrElse(D(C), {
215- let aa = fromBase58String(P)
216- let ab = assetInfo(aa)
217- if ($isInstanceOf(ab, "Asset"))
203+@Callable(B)
204+func setGovernanceAsset (O) = valueOrElse(C(B), {
205+ let Y = fromBase58String(O)
206+ let Z = assetInfo(Y)
207+ if ($isInstanceOf(Z, "Asset"))
218208 then {
219- let ac = ab
220- if ((ac.decimals != 8))
209+ let aa = Z
210+ if ((aa.decimals != 8))
221211 then throw("Invalid asset decimals, should be 8")
222- else [StringEntry(m, P)]
212+ else [StringEntry(m, O)]
223213 }
224214 else throw("Can't find asset")
225215 })
226216
227217
228-@Verifier(ad)
229-func ae () = {
230- let ab = getString(this, c)
231- if ($isInstanceOf(ab, "String"))
218+@Verifier(ab)
219+func ac () = {
220+ let Z = getString(this, c)
221+ if ($isInstanceOf(Z, "String"))
232222 then {
233- let af = ab
234- valueOrElse(getBoolean(addressFromStringValue(af), ((("status_" + toString(this)) + "_") + toBase58String(ad.id))), false)
223+ let ad = Z
224+ valueOrElse(getBoolean(addressFromStringValue(ad), ((("status_" + toString(this)) + "_") + toBase58String(ab.id))), false)
235225 }
236- else sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey)
226+ else sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey)
237227 }
238228

github/deemru/w8io/169f3d6 
94.58 ms