tx · Gq3wnqz1kuA29QcKk11eXYWU9X7NFgExjmPDNWj5ptTA
3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ: -0.03400000 Waves
2023.03.03 22:58 [2474328] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves
{
"type": 13,
"id": "Gq3wnqz1kuA29QcKk11eXYWU9X7NFgExjmPDNWj5ptTA",
"fee": 3400000,
"feeAssetId": null,
"timestamp": 1677873543229,
"version": 2,
"chainId": 84,
"sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ",
"senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd",
"proofs": [
"2iXKowMtGcCLAtgogtwxE25TRUUsmFJk897B4BZGfpy63krY1SAULY4uZC3rAa8pjBqWvHdRFaLpLPK3o9PX82Md"
],
"script": "base64:BgJnCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBoAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAD2tfdmF1bHRfYWRkcmVzcwIPa192YXVsdF9hZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAOa19yZXdhcmRfYXNzZXQCDmtfcmV3YXJkX2Fzc2V0AA5rX3N3YXBfYWRkcmVzcwIOa19zd2FwX2FkZHJlc3MAEWtfc3Rha2luZ19hZGRyZXNzAhFrX3N0YWtpbmdfYWRkcmVzcwARa19mYXJtaW5nX2FkZHJlc3MCEWtfZmFybWluZ19hZGRyZXNzABBrX3ByaXplc19hZGRyZXNzAhBrX3ByaXplc19hZGRyZXNzABVrX2hvdXNla2VlcGVyX2FkZH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XRHb3Zlcm5hbmNlQXNzZXQBCF9hc3NldElkCQELdmFsdWVPckVsc2UCCQEHaXNBZG1pbgEFAWkECmFzc2V0Qnl0ZXMJANkEAQUIX2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUKYXNzZXRCeXRlcwMJAAECBQckbWF0Y2gwAgVBc3NldAQFYXNzZXQFByRtYXRjaDADCQECIT0CCAUFYXNzZXQIZGVjaW1hbHMACAkAAgECI0ludmFsaWQgYXNzZXQgZGVjaW1hbHMsIHNob3VsZCBiZSA4CQDMCAIJAQtTdHJpbmdFbnRyeQIFEmtfZ292ZXJuYW5jZV9hc3NldAUIX2Fzc2V0SWQFA25pbAkAAgECEENhbid0IGZpbmQgYXNzZXQBAnR4AQZ2ZXJpZnkABAckbWF0Y2gwCQCdCAIFBHRoaXMFD2tfYWRtaW5fYWRkcmVzcwMJAAECBQckbWF0Y2gwAgZTdHJpbmcECHZlcmlmaWVyBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCHZlcmlmaWVyCQCsAgIJAKwCAgkArAICAgdzdGF0dXNfCQClCAEFBHRoaXMCAV8JANgEAQgFAnR4AmlkBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleUWzxYc=",
"height": 2474328,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GKcv2oYdn8wCF25xBedSsBRTsuUioj6NnBDzBdMNYQDy
Next: A3mnHrz5EAHBdCBSS3ZV2Rm3q7dFFkrRjcNoV3M3NSkU
Diff:
Old | New | | Differences |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "k_quote_asset" |
---|
11 | 11 | | |
---|
12 | | - | let e = "k_quote_staking" |
---|
| 12 | + | let e = "k_reward_asset" |
---|
13 | 13 | | |
---|
14 | | - | let f = "k_staking_address" |
---|
| 14 | + | let f = "k_swap_address" |
---|
15 | 15 | | |
---|
16 | | - | let g = "k_farming_address" |
---|
| 16 | + | let g = "k_staking_address" |
---|
17 | 17 | | |
---|
18 | | - | let h = "k_prizes_address" |
---|
| 18 | + | let h = "k_farming_address" |
---|
19 | 19 | | |
---|
20 | | - | let i = "k_housekeeper_address" |
---|
| 20 | + | let i = "k_prizes_address" |
---|
21 | 21 | | |
---|
22 | | - | let j = "k_amm" |
---|
| 22 | + | let j = "k_housekeeper_address" |
---|
23 | 23 | | |
---|
24 | | - | let k = "k_amm_data" |
---|
| 24 | + | let k = "k_amm" |
---|
25 | 25 | | |
---|
26 | | - | let l = "k_gov_asset" |
---|
| 26 | + | let l = "k_amm_data" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_miner_address" |
---|
| 28 | + | let m = "k_gov_asset" |
---|
29 | 29 | | |
---|
30 | | - | let n = "k_orders_address" |
---|
| 30 | + | let n = "k_miner_address" |
---|
31 | 31 | | |
---|
32 | | - | let o = "k_referral_address" |
---|
| 32 | + | let o = "k_orders_address" |
---|
33 | 33 | | |
---|
34 | | - | let p = "k_manager_address" |
---|
| 34 | + | let p = "k_referral_address" |
---|
35 | 35 | | |
---|
36 | | - | let q = "k_nft_manager_address" |
---|
| 36 | + | let q = "k_manager_address" |
---|
37 | 37 | | |
---|
38 | | - | let r = "k_collateral_address" |
---|
| 38 | + | let r = "k_nft_manager_address" |
---|
39 | 39 | | |
---|
40 | | - | let s = "k_exchange_address" |
---|
| 40 | + | let s = "k_collateral_address" |
---|
41 | 41 | | |
---|
42 | | - | func t (u,v) = ((u + "_") + v) |
---|
| 42 | + | let t = "k_exchange_address" |
---|
| 43 | + | |
---|
| 44 | + | func u (v,w) = ((v + "_") + w) |
---|
43 | 45 | | |
---|
44 | 46 | | |
---|
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"))) |
---|
46 | 48 | | |
---|
47 | 49 | | |
---|
48 | | - | func y () = (getString(this, c) == unit) |
---|
| 50 | + | func z () = (getString(this, c) == unit) |
---|
49 | 51 | | |
---|
50 | 52 | | |
---|
51 | | - | func z () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined")) |
---|
| 53 | + | func A () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined")) |
---|
52 | 54 | | |
---|
53 | 55 | | |
---|
54 | | - | func A (B) = if (if (if (y()) |
---|
55 | | - | then (B.caller == this) |
---|
| 56 | + | func B (C) = if (if (if (z()) |
---|
| 57 | + | then (C.caller == this) |
---|
56 | 58 | | else false) |
---|
57 | 59 | | then true |
---|
58 | | - | else (B.caller == z())) |
---|
| 60 | + | else (C.caller == A())) |
---|
59 | 61 | | then unit |
---|
60 | 62 | | else throw("Only the Admin itself can invoke this function") |
---|
61 | 63 | | |
---|
62 | 64 | | |
---|
63 | | - | func C (B) = if ((B.caller == z())) |
---|
| 65 | + | func D (C) = if ((C.caller == A())) |
---|
64 | 66 | | then unit |
---|
65 | 67 | | else throw("Only the Admin itself can invoke this function") |
---|
66 | 68 | | |
---|
67 | 69 | | |
---|
68 | | - | @Callable(B) |
---|
69 | | - | func setAdmin (D) = valueOrElse(A(B), { |
---|
70 | | - | let x = addressFromStringValue(D) |
---|
71 | | - | [StringEntry(c, toString(x))] |
---|
| 70 | + | @Callable(C) |
---|
| 71 | + | func setAdmin (E) = valueOrElse(B(C), { |
---|
| 72 | + | let y = addressFromStringValue(E) |
---|
| 73 | + | [StringEntry(c, toString(y))] |
---|
72 | 74 | | }) |
---|
73 | 75 | | |
---|
74 | 76 | | |
---|
75 | 77 | | |
---|
76 | | - | @Callable(B) |
---|
77 | | - | func setInsuranceFund (E) = valueOrElse(C(B), { |
---|
78 | | - | let x = w(E) |
---|
79 | | - | [StringEntry(a, x)] |
---|
| 78 | + | @Callable(C) |
---|
| 79 | + | func setInsuranceFund (F) = valueOrElse(D(C), { |
---|
| 80 | + | let y = x(F) |
---|
| 81 | + | [StringEntry(a, y)] |
---|
80 | 82 | | }) |
---|
81 | 83 | | |
---|
82 | 84 | | |
---|
83 | 85 | | |
---|
84 | | - | @Callable(B) |
---|
85 | | - | func setLiquidityMiner (F) = valueOrElse(C(B), { |
---|
86 | | - | let x = w(F) |
---|
87 | | - | [StringEntry(m, x)] |
---|
| 86 | + | @Callable(C) |
---|
| 87 | + | func setLiquidityMiner (G) = valueOrElse(D(C), { |
---|
| 88 | + | let y = x(G) |
---|
| 89 | + | [StringEntry(n, y)] |
---|
88 | 90 | | }) |
---|
89 | 91 | | |
---|
90 | 92 | | |
---|
91 | 93 | | |
---|
92 | | - | @Callable(B) |
---|
93 | | - | func setOrders (G) = valueOrElse(C(B), { |
---|
94 | | - | let x = w(G) |
---|
95 | | - | [StringEntry(n, x)] |
---|
| 94 | + | @Callable(C) |
---|
| 95 | + | func setOrders (H) = valueOrElse(D(C), { |
---|
| 96 | + | let y = x(H) |
---|
| 97 | + | [StringEntry(o, y)] |
---|
96 | 98 | | }) |
---|
97 | 99 | | |
---|
98 | 100 | | |
---|
99 | 101 | | |
---|
100 | | - | @Callable(B) |
---|
101 | | - | func setReferral (H) = valueOrElse(C(B), { |
---|
102 | | - | let x = w(H) |
---|
103 | | - | [StringEntry(o, x)] |
---|
| 102 | + | @Callable(C) |
---|
| 103 | + | func setReferral (I) = valueOrElse(D(C), { |
---|
| 104 | + | let y = x(I) |
---|
| 105 | + | [StringEntry(p, y)] |
---|
104 | 106 | | }) |
---|
105 | 107 | | |
---|
106 | 108 | | |
---|
107 | 109 | | |
---|
108 | | - | @Callable(B) |
---|
109 | | - | func setFarming (I) = valueOrElse(C(B), { |
---|
110 | | - | let x = w(I) |
---|
111 | | - | [StringEntry(g, x)] |
---|
| 110 | + | @Callable(C) |
---|
| 111 | + | func setFarming (J) = valueOrElse(D(C), { |
---|
| 112 | + | let y = x(J) |
---|
| 113 | + | [StringEntry(h, y)] |
---|
112 | 114 | | }) |
---|
113 | 115 | | |
---|
114 | 116 | | |
---|
115 | 117 | | |
---|
116 | | - | @Callable(B) |
---|
117 | | - | func setManager (J) = valueOrElse(C(B), { |
---|
118 | | - | let x = w(J) |
---|
119 | | - | [StringEntry(p, x)] |
---|
| 118 | + | @Callable(C) |
---|
| 119 | + | func setManager (K) = valueOrElse(D(C), { |
---|
| 120 | + | let y = x(K) |
---|
| 121 | + | [StringEntry(q, y)] |
---|
120 | 122 | | }) |
---|
121 | 123 | | |
---|
122 | 124 | | |
---|
123 | 125 | | |
---|
124 | | - | @Callable(B) |
---|
125 | | - | func setHousekeeper (K) = valueOrElse(C(B), { |
---|
126 | | - | let x = w(K) |
---|
127 | | - | [StringEntry(i, x)] |
---|
| 126 | + | @Callable(C) |
---|
| 127 | + | func setHousekeeper (L) = valueOrElse(D(C), { |
---|
| 128 | + | let y = x(L) |
---|
| 129 | + | [StringEntry(j, y)] |
---|
128 | 130 | | }) |
---|
129 | 131 | | |
---|
130 | 132 | | |
---|
131 | 133 | | |
---|
132 | | - | @Callable(B) |
---|
133 | | - | func setPrizes (L) = valueOrElse(C(B), { |
---|
134 | | - | let x = w(L) |
---|
135 | | - | [StringEntry(h, x)] |
---|
| 134 | + | @Callable(C) |
---|
| 135 | + | func setPrizes (M) = valueOrElse(D(C), { |
---|
| 136 | + | let y = x(M) |
---|
| 137 | + | [StringEntry(i, y)] |
---|
136 | 138 | | }) |
---|
137 | 139 | | |
---|
138 | 140 | | |
---|
139 | 141 | | |
---|
140 | | - | @Callable(B) |
---|
141 | | - | func setNftManager (M) = valueOrElse(C(B), { |
---|
142 | | - | let x = w(M) |
---|
143 | | - | [StringEntry(q, x)] |
---|
| 142 | + | @Callable(C) |
---|
| 143 | + | func setNftManager (N) = valueOrElse(D(C), { |
---|
| 144 | + | let y = x(N) |
---|
| 145 | + | [StringEntry(r, y)] |
---|
144 | 146 | | }) |
---|
145 | 147 | | |
---|
146 | 148 | | |
---|
147 | 149 | | |
---|
148 | | - | @Callable(B) |
---|
149 | | - | func setQuoteAsset (N,O) = valueOrElse(C(B), { |
---|
150 | | - | let P = w(O) |
---|
151 | | - | [StringEntry(d, N), StringEntry(e, O)] |
---|
| 150 | + | @Callable(C) |
---|
| 151 | + | func setSwap (O) = valueOrElse(D(C), { |
---|
| 152 | + | let y = x(O) |
---|
| 153 | + | [StringEntry(f, y)] |
---|
152 | 154 | | }) |
---|
153 | 155 | | |
---|
154 | 156 | | |
---|
155 | 157 | | |
---|
156 | | - | @Callable(B) |
---|
157 | | - | func setStakingAddress (O) = valueOrElse(C(B), { |
---|
158 | | - | let P = w(O) |
---|
159 | | - | [StringEntry(f, O)] |
---|
| 158 | + | @Callable(C) |
---|
| 159 | + | func setQuoteAsset (P) = valueOrElse(D(C), [StringEntry(d, P)]) |
---|
| 160 | + | |
---|
| 161 | + | |
---|
| 162 | + | |
---|
| 163 | + | @Callable(C) |
---|
| 164 | + | func setRewardAsset (P) = valueOrElse(D(C), [StringEntry(e, P)]) |
---|
| 165 | + | |
---|
| 166 | + | |
---|
| 167 | + | |
---|
| 168 | + | @Callable(C) |
---|
| 169 | + | func setStakingAddress (Q) = valueOrElse(D(C), { |
---|
| 170 | + | let R = x(Q) |
---|
| 171 | + | [StringEntry(g, Q)] |
---|
160 | 172 | | }) |
---|
161 | 173 | | |
---|
162 | 174 | | |
---|
163 | 175 | | |
---|
164 | | - | @Callable(B) |
---|
165 | | - | func setCollateralAddress (Q) = valueOrElse(C(B), { |
---|
166 | | - | let R = w(Q) |
---|
167 | | - | [StringEntry(r, Q)] |
---|
168 | | - | }) |
---|
169 | | - | |
---|
170 | | - | |
---|
171 | | - | |
---|
172 | | - | @Callable(B) |
---|
173 | | - | func setExchangeAddress (S) = valueOrElse(C(B), { |
---|
174 | | - | let T = w(S) |
---|
| 176 | + | @Callable(C) |
---|
| 177 | + | func setCollateralAddress (S) = valueOrElse(D(C), { |
---|
| 178 | + | let T = x(S) |
---|
175 | 179 | | [StringEntry(s, S)] |
---|
176 | 180 | | }) |
---|
177 | 181 | | |
---|
178 | 182 | | |
---|
179 | 183 | | |
---|
180 | | - | @Callable(B) |
---|
181 | | - | func setVaultAddress (U) = valueOrElse(C(B), { |
---|
182 | | - | let T = w(U) |
---|
183 | | - | [StringEntry(b, U)] |
---|
| 184 | + | @Callable(C) |
---|
| 185 | + | func setExchangeAddress (U) = valueOrElse(D(C), { |
---|
| 186 | + | let V = x(U) |
---|
| 187 | + | [StringEntry(t, U)] |
---|
184 | 188 | | }) |
---|
185 | 189 | | |
---|
186 | 190 | | |
---|
187 | 191 | | |
---|
188 | | - | @Callable(B) |
---|
189 | | - | func addAmm (V,W) = valueOrElse(C(B), { |
---|
190 | | - | let X = w(V) |
---|
191 | | - | [BooleanEntry(t(j, V), true), StringEntry(t(k, V), W)] |
---|
| 192 | + | @Callable(C) |
---|
| 193 | + | func setVaultAddress (W) = valueOrElse(D(C), { |
---|
| 194 | + | let V = x(W) |
---|
| 195 | + | [StringEntry(b, W)] |
---|
192 | 196 | | }) |
---|
193 | 197 | | |
---|
194 | 198 | | |
---|
195 | 199 | | |
---|
196 | | - | @Callable(B) |
---|
197 | | - | func removeAmm (V) = valueOrElse(C(B), [DeleteEntry(t(j, V))]) |
---|
| 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 | 205 | | |
---|
199 | 206 | | |
---|
200 | 207 | | |
---|
201 | | - | @Callable(B) |
---|
202 | | - | func setGovernanceAsset (N) = valueOrElse(C(B), { |
---|
203 | | - | let Y = fromBase58String(N) |
---|
204 | | - | let Z = assetInfo(Y) |
---|
205 | | - | if ($isInstanceOf(Z, "Asset")) |
---|
| 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")) |
---|
206 | 218 | | then { |
---|
207 | | - | let aa = Z |
---|
208 | | - | if ((aa.decimals != 8)) |
---|
| 219 | + | let ac = ab |
---|
| 220 | + | if ((ac.decimals != 8)) |
---|
209 | 221 | | then throw("Invalid asset decimals, should be 8") |
---|
210 | | - | else [StringEntry(l, N)] |
---|
| 222 | + | else [StringEntry(m, P)] |
---|
211 | 223 | | } |
---|
212 | 224 | | else throw("Can't find asset") |
---|
213 | 225 | | }) |
---|
214 | 226 | | |
---|
215 | 227 | | |
---|
216 | | - | @Verifier(ab) |
---|
217 | | - | func ac () = { |
---|
218 | | - | let Z = getString(this, c) |
---|
219 | | - | if ($isInstanceOf(Z, "String")) |
---|
| 228 | + | @Verifier(ad) |
---|
| 229 | + | func ae () = { |
---|
| 230 | + | let ab = getString(this, c) |
---|
| 231 | + | if ($isInstanceOf(ab, "String")) |
---|
220 | 232 | | then { |
---|
221 | | - | let ad = Z |
---|
222 | | - | valueOrElse(getBoolean(addressFromStringValue(ad), ((("status_" + toString(this)) + "_") + toBase58String(ab.id))), false) |
---|
| 233 | + | let af = ab |
---|
| 234 | + | valueOrElse(getBoolean(addressFromStringValue(af), ((("status_" + toString(this)) + "_") + toBase58String(ad.id))), false) |
---|
223 | 235 | | } |
---|
224 | | - | else sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey) |
---|
| 236 | + | else sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey) |
---|
225 | 237 | | } |
---|
226 | 238 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "k_insurance_address" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "k_vault_address" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "k_admin_address" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "k_quote_asset" |
---|
11 | 11 | | |
---|
12 | | - | let e = "k_quote_staking" |
---|
| 12 | + | let e = "k_reward_asset" |
---|
13 | 13 | | |
---|
14 | | - | let f = "k_staking_address" |
---|
| 14 | + | let f = "k_swap_address" |
---|
15 | 15 | | |
---|
16 | | - | let g = "k_farming_address" |
---|
| 16 | + | let g = "k_staking_address" |
---|
17 | 17 | | |
---|
18 | | - | let h = "k_prizes_address" |
---|
| 18 | + | let h = "k_farming_address" |
---|
19 | 19 | | |
---|
20 | | - | let i = "k_housekeeper_address" |
---|
| 20 | + | let i = "k_prizes_address" |
---|
21 | 21 | | |
---|
22 | | - | let j = "k_amm" |
---|
| 22 | + | let j = "k_housekeeper_address" |
---|
23 | 23 | | |
---|
24 | | - | let k = "k_amm_data" |
---|
| 24 | + | let k = "k_amm" |
---|
25 | 25 | | |
---|
26 | | - | let l = "k_gov_asset" |
---|
| 26 | + | let l = "k_amm_data" |
---|
27 | 27 | | |
---|
28 | | - | let m = "k_miner_address" |
---|
| 28 | + | let m = "k_gov_asset" |
---|
29 | 29 | | |
---|
30 | | - | let n = "k_orders_address" |
---|
| 30 | + | let n = "k_miner_address" |
---|
31 | 31 | | |
---|
32 | | - | let o = "k_referral_address" |
---|
| 32 | + | let o = "k_orders_address" |
---|
33 | 33 | | |
---|
34 | | - | let p = "k_manager_address" |
---|
| 34 | + | let p = "k_referral_address" |
---|
35 | 35 | | |
---|
36 | | - | let q = "k_nft_manager_address" |
---|
| 36 | + | let q = "k_manager_address" |
---|
37 | 37 | | |
---|
38 | | - | let r = "k_collateral_address" |
---|
| 38 | + | let r = "k_nft_manager_address" |
---|
39 | 39 | | |
---|
40 | | - | let s = "k_exchange_address" |
---|
| 40 | + | let s = "k_collateral_address" |
---|
41 | 41 | | |
---|
42 | | - | func t (u,v) = ((u + "_") + v) |
---|
| 42 | + | let t = "k_exchange_address" |
---|
| 43 | + | |
---|
| 44 | + | func u (v,w) = ((v + "_") + w) |
---|
43 | 45 | | |
---|
44 | 46 | | |
---|
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"))) |
---|
46 | 48 | | |
---|
47 | 49 | | |
---|
48 | | - | func y () = (getString(this, c) == unit) |
---|
| 50 | + | func z () = (getString(this, c) == unit) |
---|
49 | 51 | | |
---|
50 | 52 | | |
---|
51 | | - | func z () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined")) |
---|
| 53 | + | func A () = addressFromStringValue(valueOrErrorMessage(getString(this, c), "Admin not defined")) |
---|
52 | 54 | | |
---|
53 | 55 | | |
---|
54 | | - | func A (B) = if (if (if (y()) |
---|
55 | | - | then (B.caller == this) |
---|
| 56 | + | func B (C) = if (if (if (z()) |
---|
| 57 | + | then (C.caller == this) |
---|
56 | 58 | | else false) |
---|
57 | 59 | | then true |
---|
58 | | - | else (B.caller == z())) |
---|
| 60 | + | else (C.caller == A())) |
---|
59 | 61 | | then unit |
---|
60 | 62 | | else throw("Only the Admin itself can invoke this function") |
---|
61 | 63 | | |
---|
62 | 64 | | |
---|
63 | | - | func C (B) = if ((B.caller == z())) |
---|
| 65 | + | func D (C) = if ((C.caller == A())) |
---|
64 | 66 | | then unit |
---|
65 | 67 | | else throw("Only the Admin itself can invoke this function") |
---|
66 | 68 | | |
---|
67 | 69 | | |
---|
68 | | - | @Callable(B) |
---|
69 | | - | func setAdmin (D) = valueOrElse(A(B), { |
---|
70 | | - | let x = addressFromStringValue(D) |
---|
71 | | - | [StringEntry(c, toString(x))] |
---|
| 70 | + | @Callable(C) |
---|
| 71 | + | func setAdmin (E) = valueOrElse(B(C), { |
---|
| 72 | + | let y = addressFromStringValue(E) |
---|
| 73 | + | [StringEntry(c, toString(y))] |
---|
72 | 74 | | }) |
---|
73 | 75 | | |
---|
74 | 76 | | |
---|
75 | 77 | | |
---|
76 | | - | @Callable(B) |
---|
77 | | - | func setInsuranceFund (E) = valueOrElse(C(B), { |
---|
78 | | - | let x = w(E) |
---|
79 | | - | [StringEntry(a, x)] |
---|
| 78 | + | @Callable(C) |
---|
| 79 | + | func setInsuranceFund (F) = valueOrElse(D(C), { |
---|
| 80 | + | let y = x(F) |
---|
| 81 | + | [StringEntry(a, y)] |
---|
80 | 82 | | }) |
---|
81 | 83 | | |
---|
82 | 84 | | |
---|
83 | 85 | | |
---|
84 | | - | @Callable(B) |
---|
85 | | - | func setLiquidityMiner (F) = valueOrElse(C(B), { |
---|
86 | | - | let x = w(F) |
---|
87 | | - | [StringEntry(m, x)] |
---|
| 86 | + | @Callable(C) |
---|
| 87 | + | func setLiquidityMiner (G) = valueOrElse(D(C), { |
---|
| 88 | + | let y = x(G) |
---|
| 89 | + | [StringEntry(n, y)] |
---|
88 | 90 | | }) |
---|
89 | 91 | | |
---|
90 | 92 | | |
---|
91 | 93 | | |
---|
92 | | - | @Callable(B) |
---|
93 | | - | func setOrders (G) = valueOrElse(C(B), { |
---|
94 | | - | let x = w(G) |
---|
95 | | - | [StringEntry(n, x)] |
---|
| 94 | + | @Callable(C) |
---|
| 95 | + | func setOrders (H) = valueOrElse(D(C), { |
---|
| 96 | + | let y = x(H) |
---|
| 97 | + | [StringEntry(o, y)] |
---|
96 | 98 | | }) |
---|
97 | 99 | | |
---|
98 | 100 | | |
---|
99 | 101 | | |
---|
100 | | - | @Callable(B) |
---|
101 | | - | func setReferral (H) = valueOrElse(C(B), { |
---|
102 | | - | let x = w(H) |
---|
103 | | - | [StringEntry(o, x)] |
---|
| 102 | + | @Callable(C) |
---|
| 103 | + | func setReferral (I) = valueOrElse(D(C), { |
---|
| 104 | + | let y = x(I) |
---|
| 105 | + | [StringEntry(p, y)] |
---|
104 | 106 | | }) |
---|
105 | 107 | | |
---|
106 | 108 | | |
---|
107 | 109 | | |
---|
108 | | - | @Callable(B) |
---|
109 | | - | func setFarming (I) = valueOrElse(C(B), { |
---|
110 | | - | let x = w(I) |
---|
111 | | - | [StringEntry(g, x)] |
---|
| 110 | + | @Callable(C) |
---|
| 111 | + | func setFarming (J) = valueOrElse(D(C), { |
---|
| 112 | + | let y = x(J) |
---|
| 113 | + | [StringEntry(h, y)] |
---|
112 | 114 | | }) |
---|
113 | 115 | | |
---|
114 | 116 | | |
---|
115 | 117 | | |
---|
116 | | - | @Callable(B) |
---|
117 | | - | func setManager (J) = valueOrElse(C(B), { |
---|
118 | | - | let x = w(J) |
---|
119 | | - | [StringEntry(p, x)] |
---|
| 118 | + | @Callable(C) |
---|
| 119 | + | func setManager (K) = valueOrElse(D(C), { |
---|
| 120 | + | let y = x(K) |
---|
| 121 | + | [StringEntry(q, y)] |
---|
120 | 122 | | }) |
---|
121 | 123 | | |
---|
122 | 124 | | |
---|
123 | 125 | | |
---|
124 | | - | @Callable(B) |
---|
125 | | - | func setHousekeeper (K) = valueOrElse(C(B), { |
---|
126 | | - | let x = w(K) |
---|
127 | | - | [StringEntry(i, x)] |
---|
| 126 | + | @Callable(C) |
---|
| 127 | + | func setHousekeeper (L) = valueOrElse(D(C), { |
---|
| 128 | + | let y = x(L) |
---|
| 129 | + | [StringEntry(j, y)] |
---|
128 | 130 | | }) |
---|
129 | 131 | | |
---|
130 | 132 | | |
---|
131 | 133 | | |
---|
132 | | - | @Callable(B) |
---|
133 | | - | func setPrizes (L) = valueOrElse(C(B), { |
---|
134 | | - | let x = w(L) |
---|
135 | | - | [StringEntry(h, x)] |
---|
| 134 | + | @Callable(C) |
---|
| 135 | + | func setPrizes (M) = valueOrElse(D(C), { |
---|
| 136 | + | let y = x(M) |
---|
| 137 | + | [StringEntry(i, y)] |
---|
136 | 138 | | }) |
---|
137 | 139 | | |
---|
138 | 140 | | |
---|
139 | 141 | | |
---|
140 | | - | @Callable(B) |
---|
141 | | - | func setNftManager (M) = valueOrElse(C(B), { |
---|
142 | | - | let x = w(M) |
---|
143 | | - | [StringEntry(q, x)] |
---|
| 142 | + | @Callable(C) |
---|
| 143 | + | func setNftManager (N) = valueOrElse(D(C), { |
---|
| 144 | + | let y = x(N) |
---|
| 145 | + | [StringEntry(r, y)] |
---|
144 | 146 | | }) |
---|
145 | 147 | | |
---|
146 | 148 | | |
---|
147 | 149 | | |
---|
148 | | - | @Callable(B) |
---|
149 | | - | func setQuoteAsset (N,O) = valueOrElse(C(B), { |
---|
150 | | - | let P = w(O) |
---|
151 | | - | [StringEntry(d, N), StringEntry(e, O)] |
---|
| 150 | + | @Callable(C) |
---|
| 151 | + | func setSwap (O) = valueOrElse(D(C), { |
---|
| 152 | + | let y = x(O) |
---|
| 153 | + | [StringEntry(f, y)] |
---|
152 | 154 | | }) |
---|
153 | 155 | | |
---|
154 | 156 | | |
---|
155 | 157 | | |
---|
156 | | - | @Callable(B) |
---|
157 | | - | func setStakingAddress (O) = valueOrElse(C(B), { |
---|
158 | | - | let P = w(O) |
---|
159 | | - | [StringEntry(f, O)] |
---|
| 158 | + | @Callable(C) |
---|
| 159 | + | func setQuoteAsset (P) = valueOrElse(D(C), [StringEntry(d, P)]) |
---|
| 160 | + | |
---|
| 161 | + | |
---|
| 162 | + | |
---|
| 163 | + | @Callable(C) |
---|
| 164 | + | func setRewardAsset (P) = valueOrElse(D(C), [StringEntry(e, P)]) |
---|
| 165 | + | |
---|
| 166 | + | |
---|
| 167 | + | |
---|
| 168 | + | @Callable(C) |
---|
| 169 | + | func setStakingAddress (Q) = valueOrElse(D(C), { |
---|
| 170 | + | let R = x(Q) |
---|
| 171 | + | [StringEntry(g, Q)] |
---|
160 | 172 | | }) |
---|
161 | 173 | | |
---|
162 | 174 | | |
---|
163 | 175 | | |
---|
164 | | - | @Callable(B) |
---|
165 | | - | func setCollateralAddress (Q) = valueOrElse(C(B), { |
---|
166 | | - | let R = w(Q) |
---|
167 | | - | [StringEntry(r, Q)] |
---|
168 | | - | }) |
---|
169 | | - | |
---|
170 | | - | |
---|
171 | | - | |
---|
172 | | - | @Callable(B) |
---|
173 | | - | func setExchangeAddress (S) = valueOrElse(C(B), { |
---|
174 | | - | let T = w(S) |
---|
| 176 | + | @Callable(C) |
---|
| 177 | + | func setCollateralAddress (S) = valueOrElse(D(C), { |
---|
| 178 | + | let T = x(S) |
---|
175 | 179 | | [StringEntry(s, S)] |
---|
176 | 180 | | }) |
---|
177 | 181 | | |
---|
178 | 182 | | |
---|
179 | 183 | | |
---|
180 | | - | @Callable(B) |
---|
181 | | - | func setVaultAddress (U) = valueOrElse(C(B), { |
---|
182 | | - | let T = w(U) |
---|
183 | | - | [StringEntry(b, U)] |
---|
| 184 | + | @Callable(C) |
---|
| 185 | + | func setExchangeAddress (U) = valueOrElse(D(C), { |
---|
| 186 | + | let V = x(U) |
---|
| 187 | + | [StringEntry(t, U)] |
---|
184 | 188 | | }) |
---|
185 | 189 | | |
---|
186 | 190 | | |
---|
187 | 191 | | |
---|
188 | | - | @Callable(B) |
---|
189 | | - | func addAmm (V,W) = valueOrElse(C(B), { |
---|
190 | | - | let X = w(V) |
---|
191 | | - | [BooleanEntry(t(j, V), true), StringEntry(t(k, V), W)] |
---|
| 192 | + | @Callable(C) |
---|
| 193 | + | func setVaultAddress (W) = valueOrElse(D(C), { |
---|
| 194 | + | let V = x(W) |
---|
| 195 | + | [StringEntry(b, W)] |
---|
192 | 196 | | }) |
---|
193 | 197 | | |
---|
194 | 198 | | |
---|
195 | 199 | | |
---|
196 | | - | @Callable(B) |
---|
197 | | - | func removeAmm (V) = valueOrElse(C(B), [DeleteEntry(t(j, V))]) |
---|
| 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 | 205 | | |
---|
199 | 206 | | |
---|
200 | 207 | | |
---|
201 | | - | @Callable(B) |
---|
202 | | - | func setGovernanceAsset (N) = valueOrElse(C(B), { |
---|
203 | | - | let Y = fromBase58String(N) |
---|
204 | | - | let Z = assetInfo(Y) |
---|
205 | | - | if ($isInstanceOf(Z, "Asset")) |
---|
| 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")) |
---|
206 | 218 | | then { |
---|
207 | | - | let aa = Z |
---|
208 | | - | if ((aa.decimals != 8)) |
---|
| 219 | + | let ac = ab |
---|
| 220 | + | if ((ac.decimals != 8)) |
---|
209 | 221 | | then throw("Invalid asset decimals, should be 8") |
---|
210 | | - | else [StringEntry(l, N)] |
---|
| 222 | + | else [StringEntry(m, P)] |
---|
211 | 223 | | } |
---|
212 | 224 | | else throw("Can't find asset") |
---|
213 | 225 | | }) |
---|
214 | 226 | | |
---|
215 | 227 | | |
---|
216 | | - | @Verifier(ab) |
---|
217 | | - | func ac () = { |
---|
218 | | - | let Z = getString(this, c) |
---|
219 | | - | if ($isInstanceOf(Z, "String")) |
---|
| 228 | + | @Verifier(ad) |
---|
| 229 | + | func ae () = { |
---|
| 230 | + | let ab = getString(this, c) |
---|
| 231 | + | if ($isInstanceOf(ab, "String")) |
---|
220 | 232 | | then { |
---|
221 | | - | let ad = Z |
---|
222 | | - | valueOrElse(getBoolean(addressFromStringValue(ad), ((("status_" + toString(this)) + "_") + toBase58String(ab.id))), false) |
---|
| 233 | + | let af = ab |
---|
| 234 | + | valueOrElse(getBoolean(addressFromStringValue(af), ((("status_" + toString(this)) + "_") + toBase58String(ad.id))), false) |
---|
223 | 235 | | } |
---|
224 | | - | else sigVerify(ab.bodyBytes, ab.proofs[0], ab.senderPublicKey) |
---|
| 236 | + | else sigVerify(ad.bodyBytes, ad.proofs[0], ad.senderPublicKey) |
---|
225 | 237 | | } |
---|
226 | 238 | | |
---|