tx · 7APSBV9a9UhkRmaJaWf8hoSerauUG4NZQML86EhxMMEs 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr: -0.01400000 Waves 2022.05.06 11:34 [2039592] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves
{ "type": 13, "id": "7APSBV9a9UhkRmaJaWf8hoSerauUG4NZQML86EhxMMEs", "fee": 1400000, "feeAssetId": null, "timestamp": 1651826068988, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "5awr1NZbggprmB52J9QmoJQQ3kmUdMX5ywgyCwwg5Uq5JbMmavbKEboDNusZpJX2g2kvK6fZPAgghEdmECebm1d8" ], "script": "base64:AAIFAAAAAAAAAGUIAhIECgIIGBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIFCgMICAQSBAoCCAgSBAoCCAQSAwoBCBIDCgEYEgUKAwgICBIDCgEIEgASAwoBCAAAACgAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADnN0YXR1c1ZlcmlmaWVkAAAAAAAAAAACAAAAABBzdGF0dXNVbnZlcmlmaWVkAAAAAAAAAAAAAAAAABZsYWJlbENvbW11bml0eVZlcmlmaWVkAgAAABJDT01NVU5JVFlfVkVSSUZJRUQAAAAADGxhYmVsUG9vbHNMcAIAAAAIUE9PTFNfTFAAAAAADWRlZmF1bHRMYWJlbHMJAARMAAAAAgUAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAkABEwAAAACBQAAAAxsYWJlbFBvb2xzTHAFAAAAA25pbAAAAAATcG9vbExhYmVsV3hFbWlzc2lvbgIAAAALV1hfRU1JU1NJT04AAAAAD3ZhbGlkUG9vbExhYmVscwkABEwAAAACBQAAABNwb29sTGFiZWxXeEVtaXNzaW9uBQAAAANuaWwB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yUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V52jhyYQ==", "chainId": 84, "height": 2039592, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTwov71MDQVWWb5yG5ppVGDynw23CFJ3VtAyZhHMfPhs Next: 5sdHd8R5uGP8sGMX1wXq19bgGrzWsUFN34z4bQnN13GC Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let labelPoolsLp = "POOLS_LP" | |
15 | 15 | ||
16 | 16 | let defaultLabels = [labelCommunityVerified, labelPoolsLp] | |
17 | + | ||
18 | + | let poolLabelWxEmission = "WX_EMISSION" | |
19 | + | ||
20 | + | let validPoolLabels = [poolLabelWxEmission] | |
17 | 21 | ||
18 | 22 | func throwPD () = throw("Permission denied") | |
19 | 23 | ||
64 | 68 | ||
65 | 69 | ||
66 | 70 | func keyLabels () = makeString(["%s", "labels"], SEP) | |
71 | + | ||
72 | + | ||
73 | + | func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP) | |
67 | 74 | ||
68 | 75 | ||
69 | 76 | func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified) | |
393 | 400 | ||
394 | 401 | ||
395 | 402 | @Callable(i) | |
403 | + | func setPoolLabels (amountAssetId,priceAssetId,label) = { | |
404 | + | let checkCaller = mustAdmin(i) | |
405 | + | if ((checkCaller == checkCaller)) | |
406 | + | then { | |
407 | + | let isValidLabel = if (containsElement(validPoolLabels, label)) | |
408 | + | then true | |
409 | + | else throw("label is not valid") | |
410 | + | if ((isValidLabel == isValidLabel)) | |
411 | + | then $Tuple2([StringEntry(keyPoolLabels(amountAssetId, priceAssetId), label)], unit) | |
412 | + | else throw("Strict value is not equal to itself.") | |
413 | + | } | |
414 | + | else throw("Strict value is not equal to itself.") | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | @Callable(i) | |
396 | 420 | func setManager (pendingManagerPublicKey) = { | |
397 | 421 | let checkCaller = mustManager(i) | |
398 | 422 | if ((checkCaller == checkCaller)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let EMPTY = "" | |
7 | 7 | ||
8 | 8 | let statusVerified = 2 | |
9 | 9 | ||
10 | 10 | let statusUnverified = 0 | |
11 | 11 | ||
12 | 12 | let labelCommunityVerified = "COMMUNITY_VERIFIED" | |
13 | 13 | ||
14 | 14 | let labelPoolsLp = "POOLS_LP" | |
15 | 15 | ||
16 | 16 | let defaultLabels = [labelCommunityVerified, labelPoolsLp] | |
17 | + | ||
18 | + | let poolLabelWxEmission = "WX_EMISSION" | |
19 | + | ||
20 | + | let validPoolLabels = [poolLabelWxEmission] | |
17 | 21 | ||
18 | 22 | func throwPD () = throw("Permission denied") | |
19 | 23 | ||
20 | 24 | ||
21 | 25 | func throwNoAsset () = throw("Asset doesn't exists") | |
22 | 26 | ||
23 | 27 | ||
24 | 28 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
25 | 29 | ||
26 | 30 | ||
27 | 31 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
28 | 32 | ||
29 | 33 | ||
30 | 34 | func keyAdminPubKeys () = "%s__adminPubKeys" | |
31 | 35 | ||
32 | 36 | ||
33 | 37 | func keyUserPoolsContract () = "%s__userPoolsContract" | |
34 | 38 | ||
35 | 39 | ||
36 | 40 | func keyCreated (assetId) = (("created_<" + assetId) + ">") | |
37 | 41 | ||
38 | 42 | ||
39 | 43 | func keyLogo (assetId) = (("logo_<" + assetId) + ">") | |
40 | 44 | ||
41 | 45 | ||
42 | 46 | func keyTicker (assetId) = (("ticker_<" + assetId) + ">") | |
43 | 47 | ||
44 | 48 | ||
45 | 49 | func keyStatus (assetId) = (("status_<" + assetId) + ">") | |
46 | 50 | ||
47 | 51 | ||
48 | 52 | func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP) | |
49 | 53 | ||
50 | 54 | ||
51 | 55 | func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP) | |
52 | 56 | ||
53 | 57 | ||
54 | 58 | func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP) | |
55 | 59 | ||
56 | 60 | ||
57 | 61 | func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP) | |
58 | 62 | ||
59 | 63 | ||
60 | 64 | func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP) | |
61 | 65 | ||
62 | 66 | ||
63 | 67 | func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP) | |
64 | 68 | ||
65 | 69 | ||
66 | 70 | func keyLabels () = makeString(["%s", "labels"], SEP) | |
71 | + | ||
72 | + | ||
73 | + | func keyPoolLabels (amountAssetId,priceAssetId) = makeString(["%s%s%s", amountAssetId, priceAssetId], SEP) | |
67 | 74 | ||
68 | 75 | ||
69 | 76 | func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified) | |
70 | 77 | ||
71 | 78 | ||
72 | 79 | func getLabels () = match getString(keyLabels()) { | |
73 | 80 | case s: String => | |
74 | 81 | if ((size(s) == 0)) | |
75 | 82 | then nil | |
76 | 83 | else split(s, SEP) | |
77 | 84 | case _ => | |
78 | 85 | nil | |
79 | 86 | } | |
80 | 87 | ||
81 | 88 | ||
82 | 89 | func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) { | |
83 | 90 | case s: String => | |
84 | 91 | if ((size(s) == 0)) | |
85 | 92 | then nil | |
86 | 93 | else split(s, SEP) | |
87 | 94 | case _ => | |
88 | 95 | nil | |
89 | 96 | } | |
90 | 97 | ||
91 | 98 | ||
92 | 99 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
93 | 100 | case s: String => | |
94 | 101 | fromBase58String(s) | |
95 | 102 | case _: Unit => | |
96 | 103 | unit | |
97 | 104 | case _ => | |
98 | 105 | throw("Match error") | |
99 | 106 | } | |
100 | 107 | ||
101 | 108 | ||
102 | 109 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
103 | 110 | case s: String => | |
104 | 111 | fromBase58String(s) | |
105 | 112 | case _: Unit => | |
106 | 113 | unit | |
107 | 114 | case _ => | |
108 | 115 | throw("Match error") | |
109 | 116 | } | |
110 | 117 | ||
111 | 118 | ||
112 | 119 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
113 | 120 | case pk: ByteVector => | |
114 | 121 | if ((i.callerPublicKey == pk)) | |
115 | 122 | then true | |
116 | 123 | else throwPD() | |
117 | 124 | case _: Unit => | |
118 | 125 | if ((i.caller == this)) | |
119 | 126 | then true | |
120 | 127 | else throwPD() | |
121 | 128 | case _ => | |
122 | 129 | throw("Match error") | |
123 | 130 | } | |
124 | 131 | ||
125 | 132 | ||
126 | 133 | func mustAdmin (i) = { | |
127 | 134 | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
128 | 135 | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
129 | 136 | then true | |
130 | 137 | else { | |
131 | 138 | let isManager = mustManager(i) | |
132 | 139 | if ((isManager == isManager)) | |
133 | 140 | then true | |
134 | 141 | else throw("Strict value is not equal to itself.") | |
135 | 142 | } | |
136 | 143 | } | |
137 | 144 | ||
138 | 145 | ||
139 | 146 | func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false) | |
140 | 147 | ||
141 | 148 | ||
142 | 149 | func verifiedToStatus (verified) = if (verified) | |
143 | 150 | then statusVerified | |
144 | 151 | else statusUnverified | |
145 | 152 | ||
146 | 153 | ||
147 | 154 | func addLabelActions (assetId,label,throwOnError) = { | |
148 | 155 | let labels = getLabels() | |
149 | 156 | let assetLabels = getAssetLabels(assetId) | |
150 | 157 | let checkLabel = if (containsElement(labels, label)) | |
151 | 158 | then true | |
152 | 159 | else throw("Label doesn't exist") | |
153 | 160 | if ((checkLabel == checkLabel)) | |
154 | 161 | then { | |
155 | 162 | let newAssetLabels = if (containsElement(assetLabels, label)) | |
156 | 163 | then if (throwOnError) | |
157 | 164 | then throw("Label has already been added") | |
158 | 165 | else assetLabels | |
159 | 166 | else (assetLabels :+ label) | |
160 | 167 | [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))] | |
161 | 168 | } | |
162 | 169 | else throw("Strict value is not equal to itself.") | |
163 | 170 | } | |
164 | 171 | ||
165 | 172 | ||
166 | 173 | func deleteLabelActions (assetId,label,throwOnError) = { | |
167 | 174 | let assetLabels = getAssetLabels(assetId) | |
168 | 175 | let newAssetLabels = if (containsElement(assetLabels, label)) | |
169 | 176 | then removeByIndex(assetLabels, value(indexOf(assetLabels, label))) | |
170 | 177 | else if (throwOnError) | |
171 | 178 | then throw("Label wasn't added") | |
172 | 179 | else assetLabels | |
173 | 180 | [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))] | |
174 | 181 | } | |
175 | 182 | ||
176 | 183 | ||
177 | 184 | func setVerifiedActions (assetId,verified) = { | |
178 | 185 | let labelCommunityVerifiedActions = if (verified) | |
179 | 186 | then addLabelActions(assetId, labelCommunityVerified, false) | |
180 | 187 | else deleteLabelActions(assetId, labelCommunityVerified, false) | |
181 | 188 | ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions) | |
182 | 189 | } | |
183 | 190 | ||
184 | 191 | ||
185 | 192 | func updateTickerActions (assetId,ticker) = { | |
186 | 193 | let checkTicker = { | |
187 | 194 | let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker)) | |
188 | 195 | let tickerIsValid = if ((ticker != "")) | |
189 | 196 | then if ((linkedAssetIdOrUnit == unit)) | |
190 | 197 | then true | |
191 | 198 | else (value(linkedAssetIdOrUnit) == assetId) | |
192 | 199 | else false | |
193 | 200 | if (tickerIsValid) | |
194 | 201 | then true | |
195 | 202 | else throw("Invalid ticker") | |
196 | 203 | } | |
197 | 204 | if ((checkTicker == checkTicker)) | |
198 | 205 | then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)] | |
199 | 206 | else throw("Strict value is not equal to itself.") | |
200 | 207 | } | |
201 | 208 | ||
202 | 209 | ||
203 | 210 | @Callable(i) | |
204 | 211 | func constructor (userPoolsContract,labels) = { | |
205 | 212 | let checkCaller = mustManager(i) | |
206 | 213 | if ((checkCaller == checkCaller)) | |
207 | 214 | then { | |
208 | 215 | let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address") | |
209 | 216 | if ((checksAddress == checksAddress)) | |
210 | 217 | then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))] | |
211 | 218 | else throw("Strict value is not equal to itself.") | |
212 | 219 | } | |
213 | 220 | else throw("Strict value is not equal to itself.") | |
214 | 221 | } | |
215 | 222 | ||
216 | 223 | ||
217 | 224 | ||
218 | 225 | @Callable(i) | |
219 | 226 | func addAssetsLink (amountAsset,priceAsset,lpAsset) = { | |
220 | 227 | let checkCaller = mustAdmin(i) | |
221 | 228 | if ((checkCaller == checkCaller)) | |
222 | 229 | then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))] | |
223 | 230 | else throw("Strict value is not equal to itself.") | |
224 | 231 | } | |
225 | 232 | ||
226 | 233 | ||
227 | 234 | ||
228 | 235 | @Callable(i) | |
229 | 236 | func increaseAssetPoolsNumber (assetId) = { | |
230 | 237 | let checkCaller = mustAdmin(i) | |
231 | 238 | if ((checkCaller == checkCaller)) | |
232 | 239 | then { | |
233 | 240 | let assetPoolsNumberKey = keyAssetPoolsNumber(assetId) | |
234 | 241 | let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0) | |
235 | 242 | [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))] | |
236 | 243 | } | |
237 | 244 | else throw("Strict value is not equal to itself.") | |
238 | 245 | } | |
239 | 246 | ||
240 | 247 | ||
241 | 248 | ||
242 | 249 | @Callable(i) | |
243 | 250 | func createLabel (label) = { | |
244 | 251 | let labels = getLabels() | |
245 | 252 | let checkCaller = mustManager(i) | |
246 | 253 | if ((checkCaller == checkCaller)) | |
247 | 254 | then { | |
248 | 255 | let checkLabel = [if (!(contains(label, SEP))) | |
249 | 256 | then true | |
250 | 257 | else throw("Invalid label name"), if (!(containsElement(labels, label))) | |
251 | 258 | then true | |
252 | 259 | else throw("Label exists")] | |
253 | 260 | if ((checkLabel == checkLabel)) | |
254 | 261 | then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))] | |
255 | 262 | else throw("Strict value is not equal to itself.") | |
256 | 263 | } | |
257 | 264 | else throw("Strict value is not equal to itself.") | |
258 | 265 | } | |
259 | 266 | ||
260 | 267 | ||
261 | 268 | ||
262 | 269 | @Callable(i) | |
263 | 270 | func dropLabel (label) = { | |
264 | 271 | let labels = getLabels() | |
265 | 272 | let checkCaller = mustManager(i) | |
266 | 273 | if ((checkCaller == checkCaller)) | |
267 | 274 | then { | |
268 | 275 | let checkLabel = if (containsElement(labels, label)) | |
269 | 276 | then true | |
270 | 277 | else throw("Label doesn't exist") | |
271 | 278 | if ((checkLabel == checkLabel)) | |
272 | 279 | then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))] | |
273 | 280 | else throw("Strict value is not equal to itself.") | |
274 | 281 | } | |
275 | 282 | else throw("Strict value is not equal to itself.") | |
276 | 283 | } | |
277 | 284 | ||
278 | 285 | ||
279 | 286 | ||
280 | 287 | @Callable(i) | |
281 | 288 | func addLabel (assetId,label) = { | |
282 | 289 | let checkCaller = mustAdmin(i) | |
283 | 290 | if ((checkCaller == checkCaller)) | |
284 | 291 | then addLabelActions(assetId, label, true) | |
285 | 292 | else throw("Strict value is not equal to itself.") | |
286 | 293 | } | |
287 | 294 | ||
288 | 295 | ||
289 | 296 | ||
290 | 297 | @Callable(i) | |
291 | 298 | func deleteLabel (assetId,label) = { | |
292 | 299 | let checkCaller = mustAdmin(i) | |
293 | 300 | if ((checkCaller == checkCaller)) | |
294 | 301 | then deleteLabelActions(assetId, label, true) | |
295 | 302 | else throw("Strict value is not equal to itself.") | |
296 | 303 | } | |
297 | 304 | ||
298 | 305 | ||
299 | 306 | ||
300 | 307 | @Callable(i) | |
301 | 308 | func updateTicker (assetId,ticker) = { | |
302 | 309 | let checkCaller = mustAdmin(i) | |
303 | 310 | if ((checkCaller == checkCaller)) | |
304 | 311 | then { | |
305 | 312 | let checkAsset = if (isCreated(assetId)) | |
306 | 313 | then true | |
307 | 314 | else throwNoAsset() | |
308 | 315 | if ((checkAsset == checkAsset)) | |
309 | 316 | then updateTickerActions(assetId, ticker) | |
310 | 317 | else throw("Strict value is not equal to itself.") | |
311 | 318 | } | |
312 | 319 | else throw("Strict value is not equal to itself.") | |
313 | 320 | } | |
314 | 321 | ||
315 | 322 | ||
316 | 323 | ||
317 | 324 | @Callable(i) | |
318 | 325 | func deleteTicker (assetId) = { | |
319 | 326 | let checkCaller = mustAdmin(i) | |
320 | 327 | if ((checkCaller == checkCaller)) | |
321 | 328 | then { | |
322 | 329 | let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset") | |
323 | 330 | [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))] | |
324 | 331 | } | |
325 | 332 | else throw("Strict value is not equal to itself.") | |
326 | 333 | } | |
327 | 334 | ||
328 | 335 | ||
329 | 336 | ||
330 | 337 | @Callable(i) | |
331 | 338 | func createOrUpdate (assetId,logo,verified) = { | |
332 | 339 | let checkCaller = mustAdmin(i) | |
333 | 340 | if ((checkCaller == checkCaller)) | |
334 | 341 | then { | |
335 | 342 | let isCreatedNow = !(isCreated(assetId)) | |
336 | 343 | if ((isCreatedNow == isCreatedNow)) | |
337 | 344 | then { | |
338 | 345 | let setLogoActions = if ((logo == "")) | |
339 | 346 | then nil | |
340 | 347 | else [StringEntry(keyLogo(assetId), logo)] | |
341 | 348 | $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow) | |
342 | 349 | } | |
343 | 350 | else throw("Strict value is not equal to itself.") | |
344 | 351 | } | |
345 | 352 | else throw("Strict value is not equal to itself.") | |
346 | 353 | } | |
347 | 354 | ||
348 | 355 | ||
349 | 356 | ||
350 | 357 | @Callable(i) | |
351 | 358 | func setLogo (assetId,logo) = { | |
352 | 359 | let checks = [mustAdmin(i), if (isCreated(assetId)) | |
353 | 360 | then true | |
354 | 361 | else throwNoAsset()] | |
355 | 362 | if ((checks == checks)) | |
356 | 363 | then [StringEntry(keyLogo(assetId), logo)] | |
357 | 364 | else throw("Strict value is not equal to itself.") | |
358 | 365 | } | |
359 | 366 | ||
360 | 367 | ||
361 | 368 | ||
362 | 369 | @Callable(i) | |
363 | 370 | func setVerified (assetId,verified) = { | |
364 | 371 | let checks = [mustAdmin(i), if (isCreated(assetId)) | |
365 | 372 | then true | |
366 | 373 | else throwNoAsset()] | |
367 | 374 | if ((checks == checks)) | |
368 | 375 | then $Tuple2(setVerifiedActions(assetId, verified), unit) | |
369 | 376 | else throw("Strict value is not equal to itself.") | |
370 | 377 | } | |
371 | 378 | ||
372 | 379 | ||
373 | 380 | ||
374 | 381 | @Callable(i) | |
375 | 382 | func onEliminate (assetId) = { | |
376 | 383 | let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0) | |
377 | 384 | let actions = if ((poolsNumber > 0)) | |
378 | 385 | then nil | |
379 | 386 | else [DeleteEntry(keyLogo(assetId))] | |
380 | 387 | $Tuple2(actions, unit) | |
381 | 388 | } | |
382 | 389 | ||
383 | 390 | ||
384 | 391 | ||
385 | 392 | @Callable(i) | |
386 | 393 | func setAdmins (adminPubKeys) = { | |
387 | 394 | let checkCaller = mustManager(i) | |
388 | 395 | if ((checkCaller == checkCaller)) | |
389 | 396 | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
390 | 397 | else throw("Strict value is not equal to itself.") | |
391 | 398 | } | |
392 | 399 | ||
393 | 400 | ||
394 | 401 | ||
395 | 402 | @Callable(i) | |
403 | + | func setPoolLabels (amountAssetId,priceAssetId,label) = { | |
404 | + | let checkCaller = mustAdmin(i) | |
405 | + | if ((checkCaller == checkCaller)) | |
406 | + | then { | |
407 | + | let isValidLabel = if (containsElement(validPoolLabels, label)) | |
408 | + | then true | |
409 | + | else throw("label is not valid") | |
410 | + | if ((isValidLabel == isValidLabel)) | |
411 | + | then $Tuple2([StringEntry(keyPoolLabels(amountAssetId, priceAssetId), label)], unit) | |
412 | + | else throw("Strict value is not equal to itself.") | |
413 | + | } | |
414 | + | else throw("Strict value is not equal to itself.") | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | @Callable(i) | |
396 | 420 | func setManager (pendingManagerPublicKey) = { | |
397 | 421 | let checkCaller = mustManager(i) | |
398 | 422 | if ((checkCaller == checkCaller)) | |
399 | 423 | then { | |
400 | 424 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
401 | 425 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
402 | 426 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
403 | 427 | else throw("Strict value is not equal to itself.") | |
404 | 428 | } | |
405 | 429 | else throw("Strict value is not equal to itself.") | |
406 | 430 | } | |
407 | 431 | ||
408 | 432 | ||
409 | 433 | ||
410 | 434 | @Callable(i) | |
411 | 435 | func confirmManager () = { | |
412 | 436 | let pm = pendingManagerPublicKeyOrUnit() | |
413 | 437 | let hasPM = if (isDefined(pm)) | |
414 | 438 | then true | |
415 | 439 | else throw("No pending manager") | |
416 | 440 | if ((hasPM == hasPM)) | |
417 | 441 | then { | |
418 | 442 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
419 | 443 | then true | |
420 | 444 | else throw("You are not pending manager") | |
421 | 445 | if ((checkPM == checkPM)) | |
422 | 446 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
423 | 447 | else throw("Strict value is not equal to itself.") | |
424 | 448 | } | |
425 | 449 | else throw("Strict value is not equal to itself.") | |
426 | 450 | } | |
427 | 451 | ||
428 | 452 | ||
429 | 453 | ||
430 | 454 | @Callable(i) | |
431 | 455 | func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId)) | |
432 | 456 | ||
433 | 457 | ||
434 | 458 | @Verifier(tx) | |
435 | 459 | func verify () = { | |
436 | 460 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
437 | 461 | case pk: ByteVector => | |
438 | 462 | pk | |
439 | 463 | case _: Unit => | |
440 | 464 | tx.senderPublicKey | |
441 | 465 | case _ => | |
442 | 466 | throw("Match error") | |
443 | 467 | } | |
444 | 468 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
445 | 469 | } | |
446 | 470 |
github/deemru/w8io/026f985 63.84 ms ◑