tx · 7aNd3A3TnchNwvXagYynRYZgsHYwD4JeqGfjrsYbmrWM

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01700000 Waves

2023.03.27 17:16 [2508478] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "7aNd3A3TnchNwvXagYynRYZgsHYwD4JeqGfjrsYbmrWM", "fee": 1700000, "feeAssetId": null, "timestamp": 1679926685374, "version": 2, "chainId": 84, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "4jRVt8RHpTXSArrD2mRfFpAq9jVQmo4A7ZF25Qh8abSRfUcxTyR5D3cnbiBsRFebBFfZwgaFFzeUgRxArzYGRYpu" ], "script": "base64:AAIFAAAAAAAABdEIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc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mdFbnRyeQAAAAIJAQAAAAFqAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJhUAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABawAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAVkBAAAAEmlzVmVyaWZpZWRSRUFET05MWQAAAAEAAAABcAkABRQAAAACBQAAAANuaWwJAQAAAAFSAAAAAQUAAAABcAAAAAEAAAACYVMBAAAAAmFUAAAAAAQAAAACYVUEAAAAAUwJAQAAAAFWAAAAAAMJAAABAAAAAgUAAAABTAIAAAAKQnl0ZVZlY3RvcgQAAAABWgUAAAABTAUAAAABWgMJAAABAAAAAgUAAAABTAIAAAAEVW5pdAgFAAAAAmFTAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYVMAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhUwAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFVOVpP1g==", "height": 2508478, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2cnYDqsmmwwDEDunk4E1WCSPnZswTsggJLGGeJMqwSyF Next: Cp18vEpvtLDpFCCX1jDoaVB319Y23dee28pask1uKhZ8 Diff:
OldNewDifferences
222222
223223 func updateTickerActions (assetId,ticker) = {
224224 let checkTicker = {
225- let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
226- let tickerIsValid = if ((ticker != ""))
227- then if ((linkedAssetIdOrUnit == unit))
228- then true
229- else (value(linkedAssetIdOrUnit) == assetId)
230- else false
225+ let tickerIsValid = (ticker != "")
231226 if (tickerIsValid)
232227 then true
233228 else throw("Invalid ticker")
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 keyManagerPublicKey () = "%s__managerPublicKey"
2525
2626
2727 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2828
2929
3030 func keyAdminPubKeys () = "%s__adminPubKeys"
3131
3232
3333 func keyUserPoolsContract () = "%s__userPoolsContract"
3434
3535
3636 func keyFactoryContract () = "%s__factoryContract"
3737
3838
3939 func keyCreated (assetId) = (("created_<" + assetId) + ">")
4040
4141
4242 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4343
4444
4545 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4646
4747
4848 func keyStatus (assetId) = (("status_<" + assetId) + ">")
4949
5050
5151 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
5252
5353
5454 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5555
5656
5757 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
5858
5959
6060 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
6161
6262
6363 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6464
6565
6666 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6767
6868
6969 func keyLabels () = makeString(["%s", "labels"], SEP)
7070
7171
7272 func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
7373
7474
7575 func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
7676
7777
7878 func getValueOrFail (address,key,type) = {
7979 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8080 valueOrErrorMessage( match type {
8181 case str: String =>
8282 getString(address, key)
8383 case int: Int =>
8484 getInteger(address, key)
8585 case _ =>
8686 throw("invalid entry type")
8787 }, error)
8888 }
8989
9090
9191 func getStrOrFail (address,key) = {
9292 let @ = getValueOrFail(address, key, "")
9393 if ($isInstanceOf(@, "String"))
9494 then @
9595 else throw("Couldn't cast Int|String to String")
9696 }
9797
9898
9999 func getIntOrFail (address,key) = {
100100 let @ = getValueOrFail(address, key, 0)
101101 if ($isInstanceOf(@, "Int"))
102102 then @
103103 else throw("Couldn't cast Int|String to Int")
104104 }
105105
106106
107107 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
108108
109109
110110 func getLabels () = match getString(keyLabels()) {
111111 case s: String =>
112112 if ((size(s) == 0))
113113 then nil
114114 else split(s, SEP)
115115 case _ =>
116116 nil
117117 }
118118
119119
120120 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
121121 case s: String =>
122122 if ((size(s) == 0))
123123 then nil
124124 else split(s, SEP)
125125 case _ =>
126126 nil
127127 }
128128
129129
130130 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
131131 case s: String =>
132132 fromBase58String(s)
133133 case _: Unit =>
134134 unit
135135 case _ =>
136136 throw("Match error")
137137 }
138138
139139
140140 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
141141 case s: String =>
142142 fromBase58String(s)
143143 case _: Unit =>
144144 unit
145145 case _ =>
146146 throw("Match error")
147147 }
148148
149149
150150 func mustManager (i) = match managerPublicKeyOrUnit() {
151151 case pk: ByteVector =>
152152 if ((i.callerPublicKey == pk))
153153 then true
154154 else throwPD()
155155 case _: Unit =>
156156 if ((i.caller == this))
157157 then true
158158 else throwPD()
159159 case _ =>
160160 throw("Match error")
161161 }
162162
163163
164164 func mustAdmin (i) = {
165165 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
166166 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
167167 then true
168168 else {
169169 let isManager = mustManager(i)
170170 if ((isManager == isManager))
171171 then true
172172 else throw("Strict value is not equal to itself.")
173173 }
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 func updateTickerActions (assetId,ticker) = {
224224 let checkTicker = {
225- let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
226- let tickerIsValid = if ((ticker != ""))
227- then if ((linkedAssetIdOrUnit == unit))
228- then true
229- else (value(linkedAssetIdOrUnit) == assetId)
230- else false
225+ let tickerIsValid = (ticker != "")
231226 if (tickerIsValid)
232227 then true
233228 else throw("Invalid ticker")
234229 }
235230 if ((checkTicker == checkTicker))
236231 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
237232 else throw("Strict value is not equal to itself.")
238233 }
239234
240235
241236 @Callable(i)
242237 func setAssetName (assetID,assetName) = {
243238 let checkCaller = mustAdmin(i)
244239 if ((checkCaller == checkCaller))
245240 then [StringEntry(keyAssetName(assetID), assetName)]
246241 else throw("Strict value is not equal to itself.")
247242 }
248243
249244
250245
251246 @Callable(i)
252247 func setAssetDescription (assetID,assetDescription) = {
253248 let checkCaller = mustAdmin(i)
254249 if ((checkCaller == checkCaller))
255250 then [StringEntry(keyAssetDescription(assetID), assetDescription)]
256251 else throw("Strict value is not equal to itself.")
257252 }
258253
259254
260255
261256 @Callable(i)
262257 func constructor (userPoolsContract,labels) = {
263258 let checkCaller = mustManager(i)
264259 if ((checkCaller == checkCaller))
265260 then {
266261 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
267262 if ((checksAddress == checksAddress))
268263 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
269264 else throw("Strict value is not equal to itself.")
270265 }
271266 else throw("Strict value is not equal to itself.")
272267 }
273268
274269
275270
276271 @Callable(i)
277272 func constructorV2 (factoryContract) = {
278273 let checkCaller = mustManager(i)
279274 if ((checkCaller == checkCaller))
280275 then {
281276 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
282277 if ((checkAddress == checkAddress))
283278 then [StringEntry(keyFactoryContract(), factoryContract)]
284279 else throw("Strict value is not equal to itself.")
285280 }
286281 else throw("Strict value is not equal to itself.")
287282 }
288283
289284
290285
291286 @Callable(i)
292287 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
293288 let checkCaller = mustAdmin(i)
294289 if ((checkCaller == checkCaller))
295290 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
296291 else throw("Strict value is not equal to itself.")
297292 }
298293
299294
300295
301296 @Callable(i)
302297 func increaseAssetPoolsNumber (assetId) = {
303298 let checkCaller = mustAdmin(i)
304299 if ((checkCaller == checkCaller))
305300 then {
306301 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
307302 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
308303 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
309304 }
310305 else throw("Strict value is not equal to itself.")
311306 }
312307
313308
314309
315310 @Callable(i)
316311 func createLabel (label) = {
317312 let labels = getLabels()
318313 let checkCaller = mustAdmin(i)
319314 if ((checkCaller == checkCaller))
320315 then {
321316 let checkLabel = [if (!(contains(label, SEP)))
322317 then true
323318 else throw("Invalid label name"), if (!(containsElement(labels, label)))
324319 then true
325320 else throw("Label exists")]
326321 if ((checkLabel == checkLabel))
327322 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
328323 else throw("Strict value is not equal to itself.")
329324 }
330325 else throw("Strict value is not equal to itself.")
331326 }
332327
333328
334329
335330 @Callable(i)
336331 func dropLabel (label) = {
337332 let labels = getLabels()
338333 let checkCaller = mustManager(i)
339334 if ((checkCaller == checkCaller))
340335 then {
341336 let checkLabel = if (containsElement(labels, label))
342337 then true
343338 else throw("Label doesn't exist")
344339 if ((checkLabel == checkLabel))
345340 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
346341 else throw("Strict value is not equal to itself.")
347342 }
348343 else throw("Strict value is not equal to itself.")
349344 }
350345
351346
352347
353348 @Callable(i)
354349 func addLabel (assetId,label) = {
355350 let checkCaller = mustAdmin(i)
356351 if ((checkCaller == checkCaller))
357352 then addLabelActions(assetId, label, true)
358353 else throw("Strict value is not equal to itself.")
359354 }
360355
361356
362357
363358 @Callable(i)
364359 func deleteLabel (assetId,label) = {
365360 let checkCaller = mustAdmin(i)
366361 if ((checkCaller == checkCaller))
367362 then deleteLabelActions(assetId, label, true)
368363 else throw("Strict value is not equal to itself.")
369364 }
370365
371366
372367
373368 @Callable(i)
374369 func updateTicker (assetId,ticker) = {
375370 let checkCaller = mustAdmin(i)
376371 if ((checkCaller == checkCaller))
377372 then {
378373 let checkAsset = if (isCreated(assetId))
379374 then true
380375 else throwNoAsset()
381376 if ((checkAsset == checkAsset))
382377 then updateTickerActions(assetId, ticker)
383378 else throw("Strict value is not equal to itself.")
384379 }
385380 else throw("Strict value is not equal to itself.")
386381 }
387382
388383
389384
390385 @Callable(i)
391386 func deleteTicker (assetId) = {
392387 let checkCaller = mustAdmin(i)
393388 if ((checkCaller == checkCaller))
394389 then {
395390 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
396391 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
397392 }
398393 else throw("Strict value is not equal to itself.")
399394 }
400395
401396
402397
403398 @Callable(i)
404399 func createOrUpdate (assetId,logo,verified) = {
405400 let checkCaller = mustAdmin(i)
406401 if ((checkCaller == checkCaller))
407402 then {
408403 let isCreatedNow = !(isCreated(assetId))
409404 if ((isCreatedNow == isCreatedNow))
410405 then {
411406 let setLogoActions = if ((logo == ""))
412407 then nil
413408 else [StringEntry(keyLogo(assetId), logo)]
414409 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
415410 }
416411 else throw("Strict value is not equal to itself.")
417412 }
418413 else throw("Strict value is not equal to itself.")
419414 }
420415
421416
422417
423418 @Callable(i)
424419 func setLogo (assetId,logo) = {
425420 let checks = [mustAdmin(i), if (isCreated(assetId))
426421 then true
427422 else throwNoAsset()]
428423 if ((checks == checks))
429424 then {
430425 let action = if ((logo == ""))
431426 then DeleteEntry(keyLogo(assetId))
432427 else StringEntry(keyLogo(assetId), logo)
433428 [action]
434429 }
435430 else throw("Strict value is not equal to itself.")
436431 }
437432
438433
439434
440435 @Callable(i)
441436 func setVerified (assetId,verified) = {
442437 let checks = [mustAdmin(i), if (isCreated(assetId))
443438 then true
444439 else throwNoAsset()]
445440 if ((checks == checks))
446441 then {
447442 let onVerificationLossInv = if (!(verified))
448443 then {
449444 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
450445 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
451446 }
452447 else unit
453448 if ((onVerificationLossInv == onVerificationLossInv))
454449 then $Tuple2(setVerifiedActions(assetId, verified), unit)
455450 else throw("Strict value is not equal to itself.")
456451 }
457452 else throw("Strict value is not equal to itself.")
458453 }
459454
460455
461456
462457 @Callable(i)
463458 func onEliminate (assetId) = {
464459 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
465460 let actions = if ((poolsNumber > 0))
466461 then nil
467462 else [DeleteEntry(keyLogo(assetId))]
468463 $Tuple2(actions, unit)
469464 }
470465
471466
472467
473468 @Callable(i)
474469 func setAdmins (adminPubKeys) = {
475470 let checkCaller = mustManager(i)
476471 if ((checkCaller == checkCaller))
477472 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
478473 else throw("Strict value is not equal to itself.")
479474 }
480475
481476
482477
483478 @Callable(i)
484479 func setManager (pendingManagerPublicKey) = {
485480 let checkCaller = mustManager(i)
486481 if ((checkCaller == checkCaller))
487482 then {
488483 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
489484 if ((checkManagerPublicKey == checkManagerPublicKey))
490485 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
491486 else throw("Strict value is not equal to itself.")
492487 }
493488 else throw("Strict value is not equal to itself.")
494489 }
495490
496491
497492
498493 @Callable(i)
499494 func confirmManager () = {
500495 let pm = pendingManagerPublicKeyOrUnit()
501496 let hasPM = if (isDefined(pm))
502497 then true
503498 else throw("No pending manager")
504499 if ((hasPM == hasPM))
505500 then {
506501 let checkPM = if ((i.callerPublicKey == value(pm)))
507502 then true
508503 else throw("You are not pending manager")
509504 if ((checkPM == checkPM))
510505 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
511506 else throw("Strict value is not equal to itself.")
512507 }
513508 else throw("Strict value is not equal to itself.")
514509 }
515510
516511
517512
518513 @Callable(i)
519514 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
520515
521516
522517 @Verifier(tx)
523518 func verify () = {
524519 let targetPublicKey = match managerPublicKeyOrUnit() {
525520 case pk: ByteVector =>
526521 pk
527522 case _: Unit =>
528523 tx.senderPublicKey
529524 case _ =>
530525 throw("Match error")
531526 }
532527 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
533528 }
534529

github/deemru/w8io/026f985 
50.24 ms