tx · B7yEE19TAd6yTd9M3zopFJVw72VEPFgcD5pds29FUUSC

3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG:  -0.01600000 Waves

2023.06.26 16:48 [2639694] smart account 3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG > SELF 0.00000000 Waves

{ "type": 13, "id": "B7yEE19TAd6yTd9M3zopFJVw72VEPFgcD5pds29FUUSC", "fee": 1600000, "feeAssetId": null, "timestamp": 1687787343210, "version": 2, "chainId": 84, "sender": "3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG", "senderPublicKey": "FLnBQATnBGWeMDB5MhixoEef8W61cnZUFXeCcwWAWQaR", "proofs": [ "2ANgyhXt2N7EdQzj3QEmAo3aHrduHbpUnidc1aQnyGbYbFUGRzKJBiWaXJUYEHjnKkkMtoo5rM2PijWPWyt5dd4E" ], "script": "base64:AAIFAAAAAAAABbsIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCCIDU0VQIgVFTVBUWSIOc3RhdHVzVmVyaWZpZWQiEHN0YXR1c1VudmVyaWZpZWQiFmxhYmVsQ29tbXVuaXR5VmVyaWZpZWQiDGxhYmVsUG9vbHNMcCINZGVmYXVsdExhYmVscyIHdGhyb3dQRCIMdGhyb3dOb0Fzc2V0IhJ0aHJvd0ludmFsaWRUaWNrZXIiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldElkVG9UaWNrZXIiIGtleUFtb3VudEFuZFBya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BQAAAAJhUgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFUaNIhdg==", "height": 2639694, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BwiQ1GEJ5pMv7AvQcCNJRPpouBtSHVvBtBMtpUaEJYwm Next: DUJFu44rNXR6kbE317ZEGGSqTzZmRKVD8XLbhgD1daBt Diff:
OldNewDifferences
445445
446446
447447 @Callable(i)
448-func getAssetLogoREADONLY (assetId) = {
449- let logo = valueOrElse(getString(keyLogo(assetId)), "")
450- $Tuple2(nil, logo)
451- }
452-
453-
454-
455-@Callable(i)
456448 func setVerified (assetId,verified) = {
457449 let checks = [mustAdmin(i), if (isCreated(assetId))
458450 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let EMPTY = ""
77
88 let statusVerified = 2
99
1010 let statusUnverified = 0
1111
1212 let labelCommunityVerified = "COMMUNITY_VERIFIED"
1313
1414 let labelPoolsLp = "POOLS_LP"
1515
1616 let defaultLabels = [labelCommunityVerified, labelPoolsLp]
1717
1818 func throwPD () = throw("Permission denied")
1919
2020
2121 func throwNoAsset () = throw("Asset doesn't exists")
2222
2323
2424 func throwInvalidTicker () = throw("Invalid ticker")
2525
2626
2727 func keyAdminPubKeys () = "%s__adminPubKeys"
2828
2929
3030 func keyUserPoolsContract () = "%s__userPoolsContract"
3131
3232
3333 func keyFactoryContract () = "%s__factoryContract"
3434
3535
3636 func keyCreated (assetId) = (("created_<" + assetId) + ">")
3737
3838
3939 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4040
4141
4242 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4343
4444
4545 func keyStatus (assetId) = (("status_<" + assetId) + ">")
4646
4747
4848 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
4949
5050
5151 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5252
5353
5454 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
5555
5656
5757 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
5858
5959
6060 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6161
6262
6363 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6464
6565
6666 func keyLabels () = makeString(["%s", "labels"], SEP)
6767
6868
6969 func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
7070
7171
7272 func keyManagerVaultAddress () = "%s__managerVaultAddress"
7373
7474
7575 func keyManagerPublicKey () = "%s__managerPublicKey"
7676
7777
7878 func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
7979
8080
8181 func getValueOrFail (address,key,type) = {
8282 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8383 valueOrErrorMessage( match type {
8484 case str: String =>
8585 getString(address, key)
8686 case int: Int =>
8787 getInteger(address, key)
8888 case _ =>
8989 throw("invalid entry type")
9090 }, error)
9191 }
9292
9393
9494 func getStrOrFail (address,key) = {
9595 let @ = getValueOrFail(address, key, "")
9696 if ($isInstanceOf(@, "String"))
9797 then @
9898 else throw("Couldn't cast Int|String to String")
9999 }
100100
101101
102102 func getIntOrFail (address,key) = {
103103 let @ = getValueOrFail(address, key, 0)
104104 if ($isInstanceOf(@, "Int"))
105105 then @
106106 else throw("Couldn't cast Int|String to Int")
107107 }
108108
109109
110110 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
111111
112112
113113 func getLabels () = match getString(keyLabels()) {
114114 case s: String =>
115115 if ((size(s) == 0))
116116 then nil
117117 else split(s, SEP)
118118 case _ =>
119119 nil
120120 }
121121
122122
123123 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
124124 case s: String =>
125125 if ((size(s) == 0))
126126 then nil
127127 else split(s, SEP)
128128 case _ =>
129129 nil
130130 }
131131
132132
133133 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
134134 case s: String =>
135135 addressFromStringValue(s)
136136 case _ =>
137137 this
138138 }
139139
140140
141141 func managerPublicKeyOrUnit () = {
142142 let managerVaultAddress = getManagerVaultAddressOrThis()
143143 match getString(managerVaultAddress, keyManagerPublicKey()) {
144144 case s: String =>
145145 fromBase58String(s)
146146 case _: Unit =>
147147 unit
148148 case _ =>
149149 throw("Match error")
150150 }
151151 }
152152
153153
154154 func isManager (i) = match managerPublicKeyOrUnit() {
155155 case pk: ByteVector =>
156156 (i.callerPublicKey == pk)
157157 case _: Unit =>
158158 (i.caller == this)
159159 case _ =>
160160 throw("Match error")
161161 }
162162
163163
164164 func mustManager (i) = if (isManager(i))
165165 then true
166166 else throw("permission denied")
167167
168168
169169 func mustAdmin (i) = {
170170 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
171171 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
172172 then true
173173 else mustManager(i)
174174 }
175175
176176
177177 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
178178
179179
180180 func verifiedToStatus (verified) = if (verified)
181181 then statusVerified
182182 else statusUnverified
183183
184184
185185 func addLabelActions (assetId,label,throwOnError) = {
186186 let labels = getLabels()
187187 let assetLabels = getAssetLabels(assetId)
188188 let checkLabel = if (containsElement(labels, label))
189189 then true
190190 else throw("Label doesn't exist")
191191 if ((checkLabel == checkLabel))
192192 then {
193193 let newAssetLabels = if (containsElement(assetLabels, label))
194194 then if (throwOnError)
195195 then throw("Label has already been added")
196196 else assetLabels
197197 else (assetLabels :+ label)
198198 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
199199 }
200200 else throw("Strict value is not equal to itself.")
201201 }
202202
203203
204204 func deleteLabelActions (assetId,label,throwOnError) = {
205205 let assetLabels = getAssetLabels(assetId)
206206 let newAssetLabels = if (containsElement(assetLabels, label))
207207 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
208208 else if (throwOnError)
209209 then throw("Label wasn't added")
210210 else assetLabels
211211 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
212212 }
213213
214214
215215 func setVerifiedActions (assetId,verified) = {
216216 let labelCommunityVerifiedActions = if (verified)
217217 then addLabelActions(assetId, labelCommunityVerified, false)
218218 else deleteLabelActions(assetId, labelCommunityVerified, false)
219219 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
220220 }
221221
222222
223223 @Callable(i)
224224 func setAssetName (assetID,assetName) = {
225225 let checkCaller = mustAdmin(i)
226226 if ((checkCaller == checkCaller))
227227 then [StringEntry(keyAssetName(assetID), assetName)]
228228 else throw("Strict value is not equal to itself.")
229229 }
230230
231231
232232
233233 @Callable(i)
234234 func setAssetDescription (assetID,assetDescription) = {
235235 let checkCaller = mustAdmin(i)
236236 if ((checkCaller == checkCaller))
237237 then [StringEntry(keyAssetDescription(assetID), assetDescription)]
238238 else throw("Strict value is not equal to itself.")
239239 }
240240
241241
242242
243243 @Callable(i)
244244 func constructor (userPoolsContract,labels) = {
245245 let checkCaller = mustManager(i)
246246 if ((checkCaller == checkCaller))
247247 then {
248248 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
249249 if ((checksAddress == checksAddress))
250250 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
251251 else throw("Strict value is not equal to itself.")
252252 }
253253 else throw("Strict value is not equal to itself.")
254254 }
255255
256256
257257
258258 @Callable(i)
259259 func constructorV2 (factoryContract) = {
260260 let checkCaller = mustManager(i)
261261 if ((checkCaller == checkCaller))
262262 then {
263263 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
264264 if ((checkAddress == checkAddress))
265265 then [StringEntry(keyFactoryContract(), factoryContract)]
266266 else throw("Strict value is not equal to itself.")
267267 }
268268 else throw("Strict value is not equal to itself.")
269269 }
270270
271271
272272
273273 @Callable(i)
274274 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
275275 let checkCaller = mustAdmin(i)
276276 if ((checkCaller == checkCaller))
277277 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
278278 else throw("Strict value is not equal to itself.")
279279 }
280280
281281
282282
283283 @Callable(i)
284284 func increaseAssetPoolsNumber (assetId) = {
285285 let checkCaller = mustAdmin(i)
286286 if ((checkCaller == checkCaller))
287287 then {
288288 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
289289 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
290290 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
291291 }
292292 else throw("Strict value is not equal to itself.")
293293 }
294294
295295
296296
297297 @Callable(i)
298298 func createLabel (label) = {
299299 let labels = getLabels()
300300 let checkCaller = mustAdmin(i)
301301 if ((checkCaller == checkCaller))
302302 then {
303303 let checkLabel = [if (!(contains(label, SEP)))
304304 then true
305305 else throw("Invalid label name"), if (!(containsElement(labels, label)))
306306 then true
307307 else throw("Label exists")]
308308 if ((checkLabel == checkLabel))
309309 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
310310 else throw("Strict value is not equal to itself.")
311311 }
312312 else throw("Strict value is not equal to itself.")
313313 }
314314
315315
316316
317317 @Callable(i)
318318 func dropLabel (label) = {
319319 let labels = getLabels()
320320 let checkCaller = mustManager(i)
321321 if ((checkCaller == checkCaller))
322322 then {
323323 let checkLabel = if (containsElement(labels, label))
324324 then true
325325 else throw("Label doesn't exist")
326326 if ((checkLabel == checkLabel))
327327 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
328328 else throw("Strict value is not equal to itself.")
329329 }
330330 else throw("Strict value is not equal to itself.")
331331 }
332332
333333
334334
335335 @Callable(i)
336336 func addLabel (assetId,label) = {
337337 let checkCaller = mustAdmin(i)
338338 if ((checkCaller == checkCaller))
339339 then addLabelActions(assetId, label, true)
340340 else throw("Strict value is not equal to itself.")
341341 }
342342
343343
344344
345345 @Callable(i)
346346 func deleteLabel (assetId,label) = {
347347 let checkCaller = mustAdmin(i)
348348 if ((checkCaller == checkCaller))
349349 then deleteLabelActions(assetId, label, true)
350350 else throw("Strict value is not equal to itself.")
351351 }
352352
353353
354354
355355 @Callable(i)
356356 func updateTicker (assetId,ticker) = {
357357 let checkCaller = mustAdmin(i)
358358 if ((checkCaller == checkCaller))
359359 then {
360360 let checkAsset = if (isCreated(assetId))
361361 then true
362362 else throwNoAsset()
363363 if ((checkAsset == checkAsset))
364364 then {
365365 let checkTicker = if ((ticker != ""))
366366 then true
367367 else throwInvalidTicker()
368368 if ((checkTicker == checkTicker))
369369 then {
370370 let deleteActions = ( match getString(keyTickerToAssetId(ticker)) {
371371 case assetIdOld: String =>
372372 [DeleteEntry(keyAssetIdToTicker(assetIdOld))]
373373 case _: Unit =>
374374 nil
375375 case _ =>
376376 throw("Match error")
377377 } ++ match getString(keyAssetIdToTicker(assetId)) {
378378 case tickerOld: String =>
379379 [DeleteEntry(keyTickerToAssetId(tickerOld))]
380380 case _: Unit =>
381381 nil
382382 case _ =>
383383 throw("Match error")
384384 })
385385 let updateActions = [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
386386 (deleteActions ++ updateActions)
387387 }
388388 else throw("Strict value is not equal to itself.")
389389 }
390390 else throw("Strict value is not equal to itself.")
391391 }
392392 else throw("Strict value is not equal to itself.")
393393 }
394394
395395
396396
397397 @Callable(i)
398398 func deleteTicker (assetId) = {
399399 let checkCaller = mustAdmin(i)
400400 if ((checkCaller == checkCaller))
401401 then {
402402 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
403403 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
404404 }
405405 else throw("Strict value is not equal to itself.")
406406 }
407407
408408
409409
410410 @Callable(i)
411411 func createOrUpdate (assetId,logo,verified) = {
412412 let checkCaller = mustAdmin(i)
413413 if ((checkCaller == checkCaller))
414414 then {
415415 let isCreatedNow = !(isCreated(assetId))
416416 if ((isCreatedNow == isCreatedNow))
417417 then {
418418 let setLogoActions = if ((logo == ""))
419419 then nil
420420 else [StringEntry(keyLogo(assetId), logo)]
421421 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
422422 }
423423 else throw("Strict value is not equal to itself.")
424424 }
425425 else throw("Strict value is not equal to itself.")
426426 }
427427
428428
429429
430430 @Callable(i)
431431 func setLogo (assetId,logo) = {
432432 let checks = [mustAdmin(i), if (isCreated(assetId))
433433 then true
434434 else throwNoAsset()]
435435 if ((checks == checks))
436436 then {
437437 let action = if ((logo == ""))
438438 then DeleteEntry(keyLogo(assetId))
439439 else StringEntry(keyLogo(assetId), logo)
440440 [action]
441441 }
442442 else throw("Strict value is not equal to itself.")
443443 }
444444
445445
446446
447447 @Callable(i)
448-func getAssetLogoREADONLY (assetId) = {
449- let logo = valueOrElse(getString(keyLogo(assetId)), "")
450- $Tuple2(nil, logo)
451- }
452-
453-
454-
455-@Callable(i)
456448 func setVerified (assetId,verified) = {
457449 let checks = [mustAdmin(i), if (isCreated(assetId))
458450 then true
459451 else throwNoAsset()]
460452 if ((checks == checks))
461453 then {
462454 let onVerificationLossInv = if (!(verified))
463455 then {
464456 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
465457 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
466458 }
467459 else unit
468460 if ((onVerificationLossInv == onVerificationLossInv))
469461 then $Tuple2(setVerifiedActions(assetId, verified), unit)
470462 else throw("Strict value is not equal to itself.")
471463 }
472464 else throw("Strict value is not equal to itself.")
473465 }
474466
475467
476468
477469 @Callable(i)
478470 func onEliminate (assetId) = {
479471 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
480472 let actions = if ((poolsNumber > 0))
481473 then nil
482474 else [DeleteEntry(keyLogo(assetId))]
483475 $Tuple2(actions, unit)
484476 }
485477
486478
487479
488480 @Callable(i)
489481 func setAdmins (adminPubKeys) = {
490482 let checkCaller = mustManager(i)
491483 if ((checkCaller == checkCaller))
492484 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
493485 else throw("Strict value is not equal to itself.")
494486 }
495487
496488
497489
498490 @Callable(i)
499491 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
500492
501493
502494 @Verifier(tx)
503495 func verify () = {
504496 let targetPublicKey = match managerPublicKeyOrUnit() {
505497 case pk: ByteVector =>
506498 pk
507499 case _: Unit =>
508500 tx.senderPublicKey
509501 case _ =>
510502 throw("Match error")
511503 }
512504 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
513505 }
514506

github/deemru/w8io/026f985 
55.27 ms