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