tx · 9B2mSCgSyfoMx7tRKhXxb4dnDJwzSTznqes1aUkbQkKi

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01400000 Waves

2022.04.18 16:44 [2014068] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "9B2mSCgSyfoMx7tRKhXxb4dnDJwzSTznqes1aUkbQkKi", "fee": 1400000, "feeAssetId": null, "timestamp": 1650289519546, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "5ihcqpumLi9iG8rUetVYGQtmPGhaQiS1y9RC9NtEH2Bgpd22NkiE7rEgVVxXGYkGvSD4ecUzXmqR44fTzduARqR1" ], "script": "base64:AAIFAAAAAAAAAFkIAhIECgIIGBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIFCgMICAQSBAoCCAgSBAoCCAQSAwoBGBIDCgEIEgASAwoBCAAAACUAAAAAA1NFUAIAAAACX18AAAAABUVNUFRZAgAAAAAAAAAADnN0YXR1c1ZlcmlmaWVkAAAAAAAAAAACAAAAABBzdGF0dXNVbnZlcmlmaWVkAAAAAAAAAAAAAAAAABZsYWJlbENvbW11bml0eVZlcmlmaWVkAgAAABJDT01NVU5JVFlfVkVSSUZJRUQAAAAADGxhYmVsUG9vbHNMcAIAAAAIUE9PTFNfTFAAAAAADWRlZmF1bHRMYWJlbHMJAARMAAAAAgUAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAkABEwAAAACBQAAAAxsYWJlbFBvb2xzTHAFAAAAA25pbAEAAAAHdGhyb3dQRAAAAAAJAAACAAAAAQIAAAARUGVybWlzc2lvbiBkZW5pZWQBAAAADHRocm93Tm9Bc3NldAAAAAAJAAACAAAAAQIAAAAUQXNzZXQgZG9lc24ndCBleGlzdHMBAAA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AAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAWkBAAAAEmlzVmVyaWZpZWRSRUFET05MWQAAAAEAAAAHYXNzZXRJZAkABRQAAAACBQAAAANuaWwJAQAAAAppc1ZlcmlmaWVkAAAAAQUAAAAHYXNzZXRJZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmG8ULi", "chainId": 84, "height": 2014068, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4yF8bE6CetRyZSLWkwneD7EetbHSwoTwc22TqPPNcN8m Next: 7NQzxXX6wEahkfqiLDiRaoqWAfoWkTyeH28MxhdNizHL Diff:
OldNewDifferences
332332 let checkCaller = mustAdmin(i)
333333 if ((checkCaller == checkCaller))
334334 then {
335- let checkAssetId = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Invalid asset ID")
336- if ((checkAssetId == checkAssetId))
335+ let isCreatedNow = !(isCreated(assetId))
336+ if ((isCreatedNow == isCreatedNow))
337337 then {
338- let isCreatedNow = !(isCreated(assetId))
339- if ((isCreatedNow == isCreatedNow))
340- then {
341- let setLogoActions = if ((logo == ""))
342- then nil
343- else [StringEntry(keyLogo(assetId), logo)]
344- $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
345- }
346- else throw("Strict value is not equal to itself.")
338+ let setLogoActions = if ((logo == ""))
339+ then nil
340+ else [StringEntry(keyLogo(assetId), logo)]
341+ $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
347342 }
348343 else throw("Strict value is not equal to itself.")
349344 }
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 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 isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
7070
7171
7272 func getLabels () = match getString(keyLabels()) {
7373 case s: String =>
7474 if ((size(s) == 0))
7575 then nil
7676 else split(s, SEP)
7777 case _ =>
7878 nil
7979 }
8080
8181
8282 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
8383 case s: String =>
8484 if ((size(s) == 0))
8585 then nil
8686 else split(s, SEP)
8787 case _ =>
8888 nil
8989 }
9090
9191
9292 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
9393 case s: String =>
9494 fromBase58String(s)
9595 case _: Unit =>
9696 unit
9797 case _ =>
9898 throw("Match error")
9999 }
100100
101101
102102 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
103103 case s: String =>
104104 fromBase58String(s)
105105 case _: Unit =>
106106 unit
107107 case _ =>
108108 throw("Match error")
109109 }
110110
111111
112112 func mustManager (i) = match managerPublicKeyOrUnit() {
113113 case pk: ByteVector =>
114114 if ((i.callerPublicKey == pk))
115115 then true
116116 else throwPD()
117117 case _: Unit =>
118118 if ((i.caller == this))
119119 then true
120120 else throwPD()
121121 case _ =>
122122 throw("Match error")
123123 }
124124
125125
126126 func mustAdmin (i) = {
127127 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
128128 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
129129 then true
130130 else {
131131 let isManager = mustManager(i)
132132 if ((isManager == isManager))
133133 then true
134134 else throw("Strict value is not equal to itself.")
135135 }
136136 }
137137
138138
139139 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
140140
141141
142142 func verifiedToStatus (verified) = if (verified)
143143 then statusVerified
144144 else statusUnverified
145145
146146
147147 func addLabelActions (assetId,label,throwOnError) = {
148148 let labels = getLabels()
149149 let assetLabels = getAssetLabels(assetId)
150150 let checkLabel = if (containsElement(labels, label))
151151 then true
152152 else throw("Label doesn't exist")
153153 if ((checkLabel == checkLabel))
154154 then {
155155 let newAssetLabels = if (containsElement(assetLabels, label))
156156 then if (throwOnError)
157157 then throw("Label has already been added")
158158 else assetLabels
159159 else (assetLabels :+ label)
160160 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
161161 }
162162 else throw("Strict value is not equal to itself.")
163163 }
164164
165165
166166 func deleteLabelActions (assetId,label,throwOnError) = {
167167 let assetLabels = getAssetLabels(assetId)
168168 let newAssetLabels = if (containsElement(assetLabels, label))
169169 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
170170 else if (throwOnError)
171171 then throw("Label wasn't added")
172172 else assetLabels
173173 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
174174 }
175175
176176
177177 func setVerifiedActions (assetId,verified) = {
178178 let labelCommunityVerifiedActions = if (verified)
179179 then addLabelActions(assetId, labelCommunityVerified, false)
180180 else deleteLabelActions(assetId, labelCommunityVerified, false)
181181 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
182182 }
183183
184184
185185 func updateTickerActions (assetId,ticker) = {
186186 let checkTicker = {
187187 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
188188 let tickerIsValid = if ((ticker != ""))
189189 then if ((linkedAssetIdOrUnit == unit))
190190 then true
191191 else (value(linkedAssetIdOrUnit) == assetId)
192192 else false
193193 if (tickerIsValid)
194194 then true
195195 else throw("Invalid ticker")
196196 }
197197 if ((checkTicker == checkTicker))
198198 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
199199 else throw("Strict value is not equal to itself.")
200200 }
201201
202202
203203 @Callable(i)
204204 func constructor (userPoolsContract,labels) = {
205205 let checkCaller = mustManager(i)
206206 if ((checkCaller == checkCaller))
207207 then {
208208 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
209209 if ((checksAddress == checksAddress))
210210 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
211211 else throw("Strict value is not equal to itself.")
212212 }
213213 else throw("Strict value is not equal to itself.")
214214 }
215215
216216
217217
218218 @Callable(i)
219219 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
220220 let checkCaller = mustAdmin(i)
221221 if ((checkCaller == checkCaller))
222222 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
223223 else throw("Strict value is not equal to itself.")
224224 }
225225
226226
227227
228228 @Callable(i)
229229 func increaseAssetPoolsNumber (assetId) = {
230230 let checkCaller = mustAdmin(i)
231231 if ((checkCaller == checkCaller))
232232 then {
233233 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
234234 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
235235 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239239
240240
241241
242242 @Callable(i)
243243 func createLabel (label) = {
244244 let labels = getLabels()
245245 let checkCaller = mustManager(i)
246246 if ((checkCaller == checkCaller))
247247 then {
248248 let checkLabel = [if (!(contains(label, SEP)))
249249 then true
250250 else throw("Invalid label name"), if (!(containsElement(labels, label)))
251251 then true
252252 else throw("Label exists")]
253253 if ((checkLabel == checkLabel))
254254 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
255255 else throw("Strict value is not equal to itself.")
256256 }
257257 else throw("Strict value is not equal to itself.")
258258 }
259259
260260
261261
262262 @Callable(i)
263263 func dropLabel (label) = {
264264 let labels = getLabels()
265265 let checkCaller = mustManager(i)
266266 if ((checkCaller == checkCaller))
267267 then {
268268 let checkLabel = if (containsElement(labels, label))
269269 then true
270270 else throw("Label doesn't exist")
271271 if ((checkLabel == checkLabel))
272272 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
273273 else throw("Strict value is not equal to itself.")
274274 }
275275 else throw("Strict value is not equal to itself.")
276276 }
277277
278278
279279
280280 @Callable(i)
281281 func addLabel (assetId,label) = {
282282 let checkCaller = mustAdmin(i)
283283 if ((checkCaller == checkCaller))
284284 then addLabelActions(assetId, label, true)
285285 else throw("Strict value is not equal to itself.")
286286 }
287287
288288
289289
290290 @Callable(i)
291291 func deleteLabel (assetId,label) = {
292292 let checkCaller = mustAdmin(i)
293293 if ((checkCaller == checkCaller))
294294 then deleteLabelActions(assetId, label, true)
295295 else throw("Strict value is not equal to itself.")
296296 }
297297
298298
299299
300300 @Callable(i)
301301 func updateTicker (assetId,ticker) = {
302302 let checkCaller = mustAdmin(i)
303303 if ((checkCaller == checkCaller))
304304 then {
305305 let checkAsset = if (isCreated(assetId))
306306 then true
307307 else throwNoAsset()
308308 if ((checkAsset == checkAsset))
309309 then updateTickerActions(assetId, ticker)
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 deleteTicker (assetId) = {
319319 let checkCaller = mustAdmin(i)
320320 if ((checkCaller == checkCaller))
321321 then {
322322 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
323323 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
324324 }
325325 else throw("Strict value is not equal to itself.")
326326 }
327327
328328
329329
330330 @Callable(i)
331331 func createOrUpdate (assetId,logo,verified) = {
332332 let checkCaller = mustAdmin(i)
333333 if ((checkCaller == checkCaller))
334334 then {
335- let checkAssetId = valueOrErrorMessage(assetInfo(fromBase58String(assetId)), "Invalid asset ID")
336- if ((checkAssetId == checkAssetId))
335+ let isCreatedNow = !(isCreated(assetId))
336+ if ((isCreatedNow == isCreatedNow))
337337 then {
338- let isCreatedNow = !(isCreated(assetId))
339- if ((isCreatedNow == isCreatedNow))
340- then {
341- let setLogoActions = if ((logo == ""))
342- then nil
343- else [StringEntry(keyLogo(assetId), logo)]
344- $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
345- }
346- else throw("Strict value is not equal to itself.")
338+ let setLogoActions = if ((logo == ""))
339+ then nil
340+ else [StringEntry(keyLogo(assetId), logo)]
341+ $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
347342 }
348343 else throw("Strict value is not equal to itself.")
349344 }
350345 else throw("Strict value is not equal to itself.")
351346 }
352347
353348
354349
355350 @Callable(i)
356351 func setLogo (assetId,logo) = {
357352 let checks = [mustAdmin(i), if (isCreated(assetId))
358353 then true
359354 else throwNoAsset()]
360355 if ((checks == checks))
361356 then [StringEntry(keyLogo(assetId), logo)]
362357 else throw("Strict value is not equal to itself.")
363358 }
364359
365360
366361
367362 @Callable(i)
368363 func setVerified (assetId,verified) = {
369364 let checks = [mustAdmin(i), if (isCreated(assetId))
370365 then true
371366 else throwNoAsset()]
372367 if ((checks == checks))
373368 then {
374369 let priceAssets = match invoke(addressFromStringValue(getStringValue(keyUserPoolsContract())), "priceAssetsREADONLY", nil, nil) {
375370 case assets: List[Any] =>
376371 let checkPriceAssetsSize = if ((size(assets) > 0))
377372 then true
378373 else throw("Invalid price assets")
379374 if ((checkPriceAssetsSize == checkPriceAssetsSize))
380375 then assets
381376 else throw("Strict value is not equal to itself.")
382377 case _ =>
383378 throw("Incorrect invoke result")
384379 }
385380 func cb (acc,item) = {
386381 let priceAssetId = match item {
387382 case s: String =>
388383 s
389384 case _ =>
390385 throw("Invalid price asset")
391386 }
392387 let lpAssetIdOrUnit = getString(keyAmountAndPriceAssetsToLpAsset(assetId, priceAssetId))
393388 let action = if ((lpAssetIdOrUnit == unit))
394389 then nil
395390 else setVerifiedActions(value(lpAssetIdOrUnit), verified)
396391 (acc ++ action)
397392 }
398393
399394 let tokensActions = {
400395 let $l = priceAssets
401396 let $s = size($l)
402397 let $acc0 = setVerifiedActions(assetId, verified)
403398 func $f0_1 ($a,$i) = if (($i >= $s))
404399 then $a
405400 else cb($a, $l[$i])
406401
407402 func $f0_2 ($a,$i) = if (($i >= $s))
408403 then $a
409404 else throw("List size exceeds 10")
410405
411406 $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)
412407 }
413408 $Tuple2(tokensActions, unit)
414409 }
415410 else throw("Strict value is not equal to itself.")
416411 }
417412
418413
419414
420415 @Callable(i)
421416 func setAdmins (adminPubKeys) = {
422417 let checkCaller = mustManager(i)
423418 if ((checkCaller == checkCaller))
424419 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
425420 else throw("Strict value is not equal to itself.")
426421 }
427422
428423
429424
430425 @Callable(i)
431426 func setManager (pendingManagerPublicKey) = {
432427 let checkCaller = mustManager(i)
433428 if ((checkCaller == checkCaller))
434429 then {
435430 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
436431 if ((checkManagerPublicKey == checkManagerPublicKey))
437432 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
438433 else throw("Strict value is not equal to itself.")
439434 }
440435 else throw("Strict value is not equal to itself.")
441436 }
442437
443438
444439
445440 @Callable(i)
446441 func confirmManager () = {
447442 let pm = pendingManagerPublicKeyOrUnit()
448443 let hasPM = if (isDefined(pm))
449444 then true
450445 else throw("No pending manager")
451446 if ((hasPM == hasPM))
452447 then {
453448 let checkPM = if ((i.callerPublicKey == value(pm)))
454449 then true
455450 else throw("You are not pending manager")
456451 if ((checkPM == checkPM))
457452 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
458453 else throw("Strict value is not equal to itself.")
459454 }
460455 else throw("Strict value is not equal to itself.")
461456 }
462457
463458
464459
465460 @Callable(i)
466461 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
467462
468463
469464 @Verifier(tx)
470465 func verify () = {
471466 let targetPublicKey = match managerPublicKeyOrUnit() {
472467 case pk: ByteVector =>
473468 pk
474469 case _: Unit =>
475470 tx.senderPublicKey
476471 case _ =>
477472 throw("Match error")
478473 }
479474 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
480475 }
481476

github/deemru/w8io/026f985 
59.04 ms