tx · FR9hkoL5DYtMkN9PmCmvHF2wymRKksghPECaUoje9zQS

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2023.01.09 11:30 [2397166] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "FR9hkoL5DYtMkN9PmCmvHF2wymRKksghPECaUoje9zQS", "fee": 3400000, "feeAssetId": null, "timestamp": 1673253069684, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "2gWp93xDhvLb8y6veTA5aypA4eTxEbZvN8jCnbJecPB15SKAJUKfE8chkGPoHf5s76MiNZHyP1d8tA3UCkGjpduW" ], "script": "base64:BgJeCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBsAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAD2tfdmF1bHRfYWRkcmVzcwIPa192YXVsdF9hZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwASa19hZG1pbl9wdWJsaWNfa2V5AhJrX2FkbWluX3B1YmxpY19rZXkADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQAD2tfcXVvdGVfc3Rha2luZwIPa19xdW90ZV9zdGFraW5nABFrX3N0YWtpbmdfYWRkcmVzcwIRa19zdGFraW5nX2FkZHJlc3MAEWtfZmFybWluZ19hZGRyZXNzAhFrX2Zhcm1pbmdfYWRkcmVzcwAQa19wcml6ZXNfYWRkcmVzcwIQa19wcml6ZXNfYWRkcmVzcwAVa19ob3VzZWtlZXBlcl9hZGRyZXNzAhVrX2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FsdWVPckVsc2UCCQEHaXNBZG1pbgEFAWkECmFzc2V0Qnl0ZXMJANkEAQUIX2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUKYXNzZXRCeXRlcwMJAAECBQckbWF0Y2gwAgVBc3NldAQFYXNzZXQFByRtYXRjaDADCQECIT0CCAUFYXNzZXQIZGVjaW1hbHMACAkAAgECI0ludmFsaWQgYXNzZXQgZGVjaW1hbHMsIHNob3VsZCBiZSA4CQDMCAIJAQtTdHJpbmdFbnRyeQIFEmtfZ292ZXJuYW5jZV9hc3NldAUIX2Fzc2V0SWQFA25pbAkAAgECEENhbid0IGZpbmQgYXNzZXQBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQDZBAEJAQ5hZG1pblB1YmxpY0tleQBp6u4k", "height": 2397166, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Atujbkv7E2XksrY1XPzZ2U3C5VrLfbh4EGrAjzoTCvbM Next: GKcv2oYdn8wCF25xBedSsBRTsuUioj6NnBDzBdMNYQDy Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_insurance_address"
55
6-let b = "k_admin_address"
6+let b = "k_vault_address"
77
8-let c = "k_admin_public_key"
8+let c = "k_admin_address"
99
10-let d = "k_quote_asset"
10+let d = "k_admin_public_key"
1111
12-let e = "k_quote_staking"
12+let e = "k_quote_asset"
1313
14-let f = "k_staking_address"
14+let f = "k_quote_staking"
1515
16-let g = "k_farming_address"
16+let g = "k_staking_address"
1717
18-let h = "k_prizes_address"
18+let h = "k_farming_address"
1919
20-let i = "k_housekeeper_address"
20+let i = "k_prizes_address"
2121
22-let j = "k_amm"
22+let j = "k_housekeeper_address"
2323
24-let k = "k_amm_data"
24+let k = "k_amm"
2525
26-let l = "k_gov_asset"
26+let l = "k_amm_data"
2727
28-let m = "k_miner_address"
28+let m = "k_gov_asset"
2929
30-let n = "k_orders_address"
30+let n = "k_miner_address"
3131
32-let o = "k_referral_address"
32+let o = "k_orders_address"
3333
34-let p = "k_manager_address"
34+let p = "k_referral_address"
3535
36-let q = "k_nft_manager_address"
36+let q = "k_manager_address"
3737
38-let r = "k_collateral_address"
38+let r = "k_nft_manager_address"
3939
40-let s = "k_exchange_address"
40+let s = "k_collateral_address"
4141
42-func t (u,v) = ((u + "_") + v)
42+let t = "k_exchange_address"
43+
44+func u (v,w) = ((v + "_") + w)
4345
4446
45-func w (x) = toString(valueOrErrorMessage(addressFromString(x), (("Can't parse \"" + x) + "\" as address")))
47+func x (y) = toString(valueOrErrorMessage(addressFromString(y), (("Can't parse \"" + y) + "\" as address")))
4648
4749
48-func y () = getStringValue(this, c)
50+func z () = getStringValue(this, d)
4951
5052
51-func z () = (getString(this, b) == unit)
53+func A () = (getString(this, c) == unit)
5254
5355
54-func A () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
56+func B () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
5557
5658
57-func B (C) = if (if (z())
59+func C (D) = if (if (A())
5860 then true
59- else (C.caller == A()))
61+ else (D.caller == B()))
6062 then unit
6163 else throw("Only the Admin itself can invoke this function")
6264
6365
64-func D (C) = if ((C.caller == A()))
66+func E (D) = if ((D.caller == B()))
6567 then unit
6668 else throw("Only the Admin itself can invoke this function")
6769
6870
69-@Callable(C)
70-func setAdmin (E) = valueOrElse(B(C), {
71- let F = fromBase58String(E)
72- let x = addressFromPublicKey(F)
73-[StringEntry(b, toString(x)), StringEntry(c, E)]
71+@Callable(D)
72+func setAdmin (F) = valueOrElse(C(D), {
73+ let G = fromBase58String(F)
74+ let y = addressFromPublicKey(G)
75+[StringEntry(c, toString(y)), StringEntry(d, F)]
7476 })
7577
7678
7779
78-@Callable(C)
79-func setInsuranceFund (G) = valueOrElse(D(C), {
80- let x = w(G)
81-[StringEntry(a, x)]
80+@Callable(D)
81+func setInsuranceFund (H) = valueOrElse(E(D), {
82+ let y = x(H)
83+[StringEntry(a, y)]
8284 })
8385
8486
8587
86-@Callable(C)
87-func setLiquidityMiner (H) = valueOrElse(D(C), {
88- let x = w(H)
89-[StringEntry(m, x)]
88+@Callable(D)
89+func setLiquidityMiner (I) = valueOrElse(E(D), {
90+ let y = x(I)
91+[StringEntry(n, y)]
9092 })
9193
9294
9395
94-@Callable(C)
95-func setOrders (I) = valueOrElse(D(C), {
96- let x = w(I)
97-[StringEntry(n, x)]
96+@Callable(D)
97+func setOrders (J) = valueOrElse(E(D), {
98+ let y = x(J)
99+[StringEntry(o, y)]
98100 })
99101
100102
101103
102-@Callable(C)
103-func setReferral (J) = valueOrElse(D(C), {
104- let x = w(J)
105-[StringEntry(o, x)]
104+@Callable(D)
105+func setReferral (K) = valueOrElse(E(D), {
106+ let y = x(K)
107+[StringEntry(p, y)]
106108 })
107109
108110
109111
110-@Callable(C)
111-func setFarming (K) = valueOrElse(D(C), {
112- let x = w(K)
113-[StringEntry(g, x)]
112+@Callable(D)
113+func setFarming (L) = valueOrElse(E(D), {
114+ let y = x(L)
115+[StringEntry(h, y)]
114116 })
115117
116118
117119
118-@Callable(C)
119-func setManager (L) = valueOrElse(D(C), {
120- let x = w(L)
121-[StringEntry(p, x)]
120+@Callable(D)
121+func setManager (M) = valueOrElse(E(D), {
122+ let y = x(M)
123+[StringEntry(q, y)]
122124 })
123125
124126
125127
126-@Callable(C)
127-func setHousekeeper (M) = valueOrElse(D(C), {
128- let x = w(M)
129-[StringEntry(i, x)]
128+@Callable(D)
129+func setHousekeeper (N) = valueOrElse(E(D), {
130+ let y = x(N)
131+[StringEntry(j, y)]
130132 })
131133
132134
133135
134-@Callable(C)
135-func setPrizes (N) = valueOrElse(D(C), {
136- let x = w(N)
137-[StringEntry(h, x)]
136+@Callable(D)
137+func setPrizes (O) = valueOrElse(E(D), {
138+ let y = x(O)
139+[StringEntry(i, y)]
138140 })
139141
140142
141143
142-@Callable(C)
143-func setNftManager (O) = valueOrElse(D(C), {
144- let x = w(O)
145-[StringEntry(q, x)]
144+@Callable(D)
145+func setNftManager (P) = valueOrElse(E(D), {
146+ let y = x(P)
147+[StringEntry(r, y)]
146148 })
147149
148150
149151
150-@Callable(C)
151-func setQuoteAsset (P,Q) = valueOrElse(D(C), {
152- let R = w(Q)
153-[StringEntry(d, P), StringEntry(e, Q)]
152+@Callable(D)
153+func setQuoteAsset (Q,R) = valueOrElse(E(D), {
154+ let S = x(R)
155+[StringEntry(e, Q), StringEntry(f, R)]
154156 })
155157
156158
157159
158-@Callable(C)
159-func setStakingAddress (Q) = valueOrElse(D(C), {
160- let R = w(Q)
161-[StringEntry(f, Q)]
160+@Callable(D)
161+func setStakingAddress (R) = valueOrElse(E(D), {
162+ let S = x(R)
163+[StringEntry(g, R)]
162164 })
163165
164166
165167
166-@Callable(C)
167-func setCollateralAddress (S) = valueOrElse(D(C), {
168- let T = w(S)
169-[StringEntry(r, S)]
168+@Callable(D)
169+func setCollateralAddress (T) = valueOrElse(E(D), {
170+ let U = x(T)
171+[StringEntry(s, T)]
170172 })
171173
172174
173175
174-@Callable(C)
175-func setExchangeAddress (U) = valueOrElse(D(C), {
176- let V = w(U)
177-[StringEntry(s, U)]
176+@Callable(D)
177+func setExchangeAddress (V) = valueOrElse(E(D), {
178+ let W = x(V)
179+[StringEntry(t, V)]
178180 })
179181
180182
181183
182-@Callable(C)
183-func addAmm (W,X) = valueOrElse(D(C), {
184- let Y = w(W)
185-[BooleanEntry(t(j, W), true), StringEntry(t(k, W), X)]
184+@Callable(D)
185+func setVaultAddress (X) = valueOrElse(E(D), {
186+ let W = x(X)
187+[StringEntry(b, X)]
186188 })
187189
188190
189191
190-@Callable(C)
191-func removeAmm (W) = valueOrElse(D(C), [DeleteEntry(t(j, W))])
192+@Callable(D)
193+func addAmm (Y,Z) = valueOrElse(E(D), {
194+ let aa = x(Y)
195+[BooleanEntry(u(k, Y), true), StringEntry(u(l, Y), Z)]
196+ })
192197
193198
194199
195-@Callable(C)
196-func setGovernanceAsset (P) = valueOrElse(D(C), {
197- let Z = fromBase58String(P)
198- let aa = assetInfo(Z)
199- if ($isInstanceOf(aa, "Asset"))
200+@Callable(D)
201+func removeAmm (Y) = valueOrElse(E(D), [DeleteEntry(u(k, Y))])
202+
203+
204+
205+@Callable(D)
206+func setGovernanceAsset (Q) = valueOrElse(E(D), {
207+ let ab = fromBase58String(Q)
208+ let ac = assetInfo(ab)
209+ if ($isInstanceOf(ac, "Asset"))
200210 then {
201- let ab = aa
202- if ((ab.decimals != 8))
211+ let ad = ac
212+ if ((ad.decimals != 8))
203213 then throw("Invalid asset decimals, should be 8")
204- else [StringEntry(l, P)]
214+ else [StringEntry(m, Q)]
205215 }
206216 else throw("Can't find asset")
207217 })
208218
209219
210-@Verifier(ac)
211-func ad () = sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(y()))
220+@Verifier(ae)
221+func af () = sigVerify(ae.bodyBytes, ae.proofs[0], fromBase58String(z()))
212222
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "k_insurance_address"
55
6-let b = "k_admin_address"
6+let b = "k_vault_address"
77
8-let c = "k_admin_public_key"
8+let c = "k_admin_address"
99
10-let d = "k_quote_asset"
10+let d = "k_admin_public_key"
1111
12-let e = "k_quote_staking"
12+let e = "k_quote_asset"
1313
14-let f = "k_staking_address"
14+let f = "k_quote_staking"
1515
16-let g = "k_farming_address"
16+let g = "k_staking_address"
1717
18-let h = "k_prizes_address"
18+let h = "k_farming_address"
1919
20-let i = "k_housekeeper_address"
20+let i = "k_prizes_address"
2121
22-let j = "k_amm"
22+let j = "k_housekeeper_address"
2323
24-let k = "k_amm_data"
24+let k = "k_amm"
2525
26-let l = "k_gov_asset"
26+let l = "k_amm_data"
2727
28-let m = "k_miner_address"
28+let m = "k_gov_asset"
2929
30-let n = "k_orders_address"
30+let n = "k_miner_address"
3131
32-let o = "k_referral_address"
32+let o = "k_orders_address"
3333
34-let p = "k_manager_address"
34+let p = "k_referral_address"
3535
36-let q = "k_nft_manager_address"
36+let q = "k_manager_address"
3737
38-let r = "k_collateral_address"
38+let r = "k_nft_manager_address"
3939
40-let s = "k_exchange_address"
40+let s = "k_collateral_address"
4141
42-func t (u,v) = ((u + "_") + v)
42+let t = "k_exchange_address"
43+
44+func u (v,w) = ((v + "_") + w)
4345
4446
45-func w (x) = toString(valueOrErrorMessage(addressFromString(x), (("Can't parse \"" + x) + "\" as address")))
47+func x (y) = toString(valueOrErrorMessage(addressFromString(y), (("Can't parse \"" + y) + "\" as address")))
4648
4749
48-func y () = getStringValue(this, c)
50+func z () = getStringValue(this, d)
4951
5052
51-func z () = (getString(this, b) == unit)
53+func A () = (getString(this, c) == unit)
5254
5355
54-func A () = addressFromStringValue(valueOrErrorMessage(getString(this, b), "Admin not defined"))
56+func B () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined"))
5557
5658
57-func B (C) = if (if (z())
59+func C (D) = if (if (A())
5860 then true
59- else (C.caller == A()))
61+ else (D.caller == B()))
6062 then unit
6163 else throw("Only the Admin itself can invoke this function")
6264
6365
64-func D (C) = if ((C.caller == A()))
66+func E (D) = if ((D.caller == B()))
6567 then unit
6668 else throw("Only the Admin itself can invoke this function")
6769
6870
69-@Callable(C)
70-func setAdmin (E) = valueOrElse(B(C), {
71- let F = fromBase58String(E)
72- let x = addressFromPublicKey(F)
73-[StringEntry(b, toString(x)), StringEntry(c, E)]
71+@Callable(D)
72+func setAdmin (F) = valueOrElse(C(D), {
73+ let G = fromBase58String(F)
74+ let y = addressFromPublicKey(G)
75+[StringEntry(c, toString(y)), StringEntry(d, F)]
7476 })
7577
7678
7779
78-@Callable(C)
79-func setInsuranceFund (G) = valueOrElse(D(C), {
80- let x = w(G)
81-[StringEntry(a, x)]
80+@Callable(D)
81+func setInsuranceFund (H) = valueOrElse(E(D), {
82+ let y = x(H)
83+[StringEntry(a, y)]
8284 })
8385
8486
8587
86-@Callable(C)
87-func setLiquidityMiner (H) = valueOrElse(D(C), {
88- let x = w(H)
89-[StringEntry(m, x)]
88+@Callable(D)
89+func setLiquidityMiner (I) = valueOrElse(E(D), {
90+ let y = x(I)
91+[StringEntry(n, y)]
9092 })
9193
9294
9395
94-@Callable(C)
95-func setOrders (I) = valueOrElse(D(C), {
96- let x = w(I)
97-[StringEntry(n, x)]
96+@Callable(D)
97+func setOrders (J) = valueOrElse(E(D), {
98+ let y = x(J)
99+[StringEntry(o, y)]
98100 })
99101
100102
101103
102-@Callable(C)
103-func setReferral (J) = valueOrElse(D(C), {
104- let x = w(J)
105-[StringEntry(o, x)]
104+@Callable(D)
105+func setReferral (K) = valueOrElse(E(D), {
106+ let y = x(K)
107+[StringEntry(p, y)]
106108 })
107109
108110
109111
110-@Callable(C)
111-func setFarming (K) = valueOrElse(D(C), {
112- let x = w(K)
113-[StringEntry(g, x)]
112+@Callable(D)
113+func setFarming (L) = valueOrElse(E(D), {
114+ let y = x(L)
115+[StringEntry(h, y)]
114116 })
115117
116118
117119
118-@Callable(C)
119-func setManager (L) = valueOrElse(D(C), {
120- let x = w(L)
121-[StringEntry(p, x)]
120+@Callable(D)
121+func setManager (M) = valueOrElse(E(D), {
122+ let y = x(M)
123+[StringEntry(q, y)]
122124 })
123125
124126
125127
126-@Callable(C)
127-func setHousekeeper (M) = valueOrElse(D(C), {
128- let x = w(M)
129-[StringEntry(i, x)]
128+@Callable(D)
129+func setHousekeeper (N) = valueOrElse(E(D), {
130+ let y = x(N)
131+[StringEntry(j, y)]
130132 })
131133
132134
133135
134-@Callable(C)
135-func setPrizes (N) = valueOrElse(D(C), {
136- let x = w(N)
137-[StringEntry(h, x)]
136+@Callable(D)
137+func setPrizes (O) = valueOrElse(E(D), {
138+ let y = x(O)
139+[StringEntry(i, y)]
138140 })
139141
140142
141143
142-@Callable(C)
143-func setNftManager (O) = valueOrElse(D(C), {
144- let x = w(O)
145-[StringEntry(q, x)]
144+@Callable(D)
145+func setNftManager (P) = valueOrElse(E(D), {
146+ let y = x(P)
147+[StringEntry(r, y)]
146148 })
147149
148150
149151
150-@Callable(C)
151-func setQuoteAsset (P,Q) = valueOrElse(D(C), {
152- let R = w(Q)
153-[StringEntry(d, P), StringEntry(e, Q)]
152+@Callable(D)
153+func setQuoteAsset (Q,R) = valueOrElse(E(D), {
154+ let S = x(R)
155+[StringEntry(e, Q), StringEntry(f, R)]
154156 })
155157
156158
157159
158-@Callable(C)
159-func setStakingAddress (Q) = valueOrElse(D(C), {
160- let R = w(Q)
161-[StringEntry(f, Q)]
160+@Callable(D)
161+func setStakingAddress (R) = valueOrElse(E(D), {
162+ let S = x(R)
163+[StringEntry(g, R)]
162164 })
163165
164166
165167
166-@Callable(C)
167-func setCollateralAddress (S) = valueOrElse(D(C), {
168- let T = w(S)
169-[StringEntry(r, S)]
168+@Callable(D)
169+func setCollateralAddress (T) = valueOrElse(E(D), {
170+ let U = x(T)
171+[StringEntry(s, T)]
170172 })
171173
172174
173175
174-@Callable(C)
175-func setExchangeAddress (U) = valueOrElse(D(C), {
176- let V = w(U)
177-[StringEntry(s, U)]
176+@Callable(D)
177+func setExchangeAddress (V) = valueOrElse(E(D), {
178+ let W = x(V)
179+[StringEntry(t, V)]
178180 })
179181
180182
181183
182-@Callable(C)
183-func addAmm (W,X) = valueOrElse(D(C), {
184- let Y = w(W)
185-[BooleanEntry(t(j, W), true), StringEntry(t(k, W), X)]
184+@Callable(D)
185+func setVaultAddress (X) = valueOrElse(E(D), {
186+ let W = x(X)
187+[StringEntry(b, X)]
186188 })
187189
188190
189191
190-@Callable(C)
191-func removeAmm (W) = valueOrElse(D(C), [DeleteEntry(t(j, W))])
192+@Callable(D)
193+func addAmm (Y,Z) = valueOrElse(E(D), {
194+ let aa = x(Y)
195+[BooleanEntry(u(k, Y), true), StringEntry(u(l, Y), Z)]
196+ })
192197
193198
194199
195-@Callable(C)
196-func setGovernanceAsset (P) = valueOrElse(D(C), {
197- let Z = fromBase58String(P)
198- let aa = assetInfo(Z)
199- if ($isInstanceOf(aa, "Asset"))
200+@Callable(D)
201+func removeAmm (Y) = valueOrElse(E(D), [DeleteEntry(u(k, Y))])
202+
203+
204+
205+@Callable(D)
206+func setGovernanceAsset (Q) = valueOrElse(E(D), {
207+ let ab = fromBase58String(Q)
208+ let ac = assetInfo(ab)
209+ if ($isInstanceOf(ac, "Asset"))
200210 then {
201- let ab = aa
202- if ((ab.decimals != 8))
211+ let ad = ac
212+ if ((ad.decimals != 8))
203213 then throw("Invalid asset decimals, should be 8")
204- else [StringEntry(l, P)]
214+ else [StringEntry(m, Q)]
205215 }
206216 else throw("Can't find asset")
207217 })
208218
209219
210-@Verifier(ac)
211-func ad () = sigVerify(ac.bodyBytes, ac.proofs[0], fromBase58String(y()))
220+@Verifier(ae)
221+func af () = sigVerify(ae.bodyBytes, ae.proofs[0], fromBase58String(z()))
212222

github/deemru/w8io/026f985 
65.29 ms