tx · 7nsMDap3kVpZJVw5eppKdJu6US7WVVsQmqWmrxNBibqe

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01600000 Waves

2022.10.20 11:14 [2280469] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "7nsMDap3kVpZJVw5eppKdJu6US7WVVsQmqWmrxNBibqe", "fee": 1600000, "feeAssetId": null, "timestamp": 1666253671713, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "44Y2mvyBJGW2gNMxViqBQAijo3URU2qCkkd9AFE6dCPfT7x86SqbSoWrM6AL8zHexFvbYj8VZw89EuTEQ58cxCg" ], "script": "base64:AAIFAAAAAAAABZEIAhIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldElkVG9UaWNrZXIiIGtleUFtb3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AACAAAAAQIAAAASTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJhTQUAAAACYU0EAAAAAmFOAwkAAAAAAAACCAUAAAABVwAAAA9jYWxsZXJQdWJsaWNLZXkJAQAAAAV2YWx1ZQAAAAEFAAAAAmFMBgkAAAIAAAABAgAAABtZb3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAAAAAAIFAAAAAmFOBQAAAAJhTgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAABagAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACYUwJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAWsAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFXAQAAABJpc1ZlcmlmaWVkUkVBRE9OTFkAAAABAAAAAXAJAAUUAAAAAgUAAAADbmlsCQEAAAABUAAAAAEFAAAAAXAAAAABAAAAAmFPAQAAAAJhUAAAAAAEAAAAAmFRBAAAAAFKCQEAAAABVAAAAAADCQAAAQAAAAIFAAAAAUoCAAAACkJ5dGVWZWN0b3IEAAAAAVgFAAAAAUoFAAAAAVgDCQAAAQAAAAIFAAAAAUoCAAAABFVuaXQIBQAAAAJhTwAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmFPAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYU8AAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhUbW1dnY=", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: cDe1DfGkibyyYprsk4RiSJxsuUYgt5M5ADNGTFQMJh1 Next: 7iYdVgqV9yzmRZpXCgNeAznnF4EyXrk2iwqT6Y3pfMqP 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 getValueOrFail (address,key,type) = {
7373 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
7474 valueOrErrorMessage( match type {
7575 case str: String =>
7676 getString(address, key)
7777 case int: Int =>
7878 getInteger(address, key)
7979 case _ =>
8080 throw("invalid entry type")
8181 }, error)
8282 }
8383
8484
8585 func getStrOrFail (address,key) = {
8686 let @ = getValueOrFail(address, key, "")
8787 if ($isInstanceOf(@, "String"))
8888 then @
8989 else throw("Couldn't cast Int|String to String")
9090 }
9191
9292
9393 func getIntOrFail (address,key) = {
9494 let @ = getValueOrFail(address, key, 0)
9595 if ($isInstanceOf(@, "Int"))
9696 then @
9797 else throw("Couldn't cast Int|String to Int")
9898 }
9999
100100
101101 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
102102
103103
104104 func getLabels () = match getString(keyLabels()) {
105105 case s: String =>
106106 if ((size(s) == 0))
107107 then nil
108108 else split(s, SEP)
109109 case _ =>
110110 nil
111111 }
112112
113113
114114 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
115115 case s: String =>
116116 if ((size(s) == 0))
117117 then nil
118118 else split(s, SEP)
119119 case _ =>
120120 nil
121121 }
122122
123123
124124 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
125125 case s: String =>
126126 fromBase58String(s)
127127 case _: Unit =>
128128 unit
129129 case _ =>
130130 throw("Match error")
131131 }
132132
133133
134134 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
135135 case s: String =>
136136 fromBase58String(s)
137137 case _: Unit =>
138138 unit
139139 case _ =>
140140 throw("Match error")
141141 }
142142
143143
144144 func mustManager (i) = match managerPublicKeyOrUnit() {
145145 case pk: ByteVector =>
146146 if ((i.callerPublicKey == pk))
147147 then true
148148 else throwPD()
149149 case _: Unit =>
150150 if ((i.caller == this))
151151 then true
152152 else throwPD()
153153 case _ =>
154154 throw("Match error")
155155 }
156156
157157
158158 func mustAdmin (i) = {
159159 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
160160 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
161161 then true
162162 else {
163163 let isManager = mustManager(i)
164164 if ((isManager == isManager))
165165 then true
166166 else throw("Strict value is not equal to itself.")
167167 }
168168 }
169169
170170
171171 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
172172
173173
174174 func verifiedToStatus (verified) = if (verified)
175175 then statusVerified
176176 else statusUnverified
177177
178178
179179 func addLabelActions (assetId,label,throwOnError) = {
180180 let labels = getLabels()
181181 let assetLabels = getAssetLabels(assetId)
182182 let checkLabel = if (containsElement(labels, label))
183183 then true
184184 else throw("Label doesn't exist")
185185 if ((checkLabel == checkLabel))
186186 then {
187187 let newAssetLabels = if (containsElement(assetLabels, label))
188188 then if (throwOnError)
189189 then throw("Label has already been added")
190190 else assetLabels
191191 else (assetLabels :+ label)
192192 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
193193 }
194194 else throw("Strict value is not equal to itself.")
195195 }
196196
197197
198198 func deleteLabelActions (assetId,label,throwOnError) = {
199199 let assetLabels = getAssetLabels(assetId)
200200 let newAssetLabels = if (containsElement(assetLabels, label))
201201 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
202202 else if (throwOnError)
203203 then throw("Label wasn't added")
204204 else assetLabels
205205 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
206206 }
207207
208208
209209 func setVerifiedActions (assetId,verified) = {
210210 let labelCommunityVerifiedActions = if (verified)
211211 then addLabelActions(assetId, labelCommunityVerified, false)
212212 else deleteLabelActions(assetId, labelCommunityVerified, false)
213213 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
214214 }
215215
216216
217217 func updateTickerActions (assetId,ticker) = {
218218 let checkTicker = {
219219 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
220220 let tickerIsValid = if ((ticker != ""))
221221 then if ((linkedAssetIdOrUnit == unit))
222222 then true
223223 else (value(linkedAssetIdOrUnit) == assetId)
224224 else false
225225 if (tickerIsValid)
226226 then true
227227 else throw("Invalid ticker")
228228 }
229229 if ((checkTicker == checkTicker))
230230 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
231231 else throw("Strict value is not equal to itself.")
232232 }
233233
234234
235235 @Callable(i)
236236 func constructor (userPoolsContract,labels) = {
237237 let checkCaller = mustManager(i)
238238 if ((checkCaller == checkCaller))
239239 then {
240240 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
241241 if ((checksAddress == checksAddress))
242242 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
243243 else throw("Strict value is not equal to itself.")
244244 }
245245 else throw("Strict value is not equal to itself.")
246246 }
247247
248248
249249
250250 @Callable(i)
251251 func constructorV2 (factoryContract) = {
252252 let checkCaller = mustManager(i)
253253 if ((checkCaller == checkCaller))
254254 then {
255255 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
256256 if ((checkAddress == checkAddress))
257257 then [StringEntry(keyFactoryContract(), factoryContract)]
258258 else throw("Strict value is not equal to itself.")
259259 }
260260 else throw("Strict value is not equal to itself.")
261261 }
262262
263263
264264
265265 @Callable(i)
266266 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
267267 let checkCaller = mustAdmin(i)
268268 if ((checkCaller == checkCaller))
269269 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
270270 else throw("Strict value is not equal to itself.")
271271 }
272272
273273
274274
275275 @Callable(i)
276276 func increaseAssetPoolsNumber (assetId) = {
277277 let checkCaller = mustAdmin(i)
278278 if ((checkCaller == checkCaller))
279279 then {
280280 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
281281 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
282282 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
283283 }
284284 else throw("Strict value is not equal to itself.")
285285 }
286286
287287
288288
289289 @Callable(i)
290290 func createLabel (label) = {
291291 let labels = getLabels()
292292 let checkCaller = mustAdmin(i)
293293 if ((checkCaller == checkCaller))
294294 then {
295295 let checkLabel = [if (!(contains(label, SEP)))
296296 then true
297297 else throw("Invalid label name"), if (!(containsElement(labels, label)))
298298 then true
299299 else throw("Label exists")]
300300 if ((checkLabel == checkLabel))
301301 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
302302 else throw("Strict value is not equal to itself.")
303303 }
304304 else throw("Strict value is not equal to itself.")
305305 }
306306
307307
308308
309309 @Callable(i)
310310 func dropLabel (label) = {
311311 let labels = getLabels()
312312 let checkCaller = mustManager(i)
313313 if ((checkCaller == checkCaller))
314314 then {
315315 let checkLabel = if (containsElement(labels, label))
316316 then true
317317 else throw("Label doesn't exist")
318318 if ((checkLabel == checkLabel))
319319 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
320320 else throw("Strict value is not equal to itself.")
321321 }
322322 else throw("Strict value is not equal to itself.")
323323 }
324324
325325
326326
327327 @Callable(i)
328328 func addLabel (assetId,label) = {
329329 let checkCaller = mustAdmin(i)
330330 if ((checkCaller == checkCaller))
331331 then addLabelActions(assetId, label, true)
332332 else throw("Strict value is not equal to itself.")
333333 }
334334
335335
336336
337337 @Callable(i)
338338 func deleteLabel (assetId,label) = {
339339 let checkCaller = mustAdmin(i)
340340 if ((checkCaller == checkCaller))
341341 then deleteLabelActions(assetId, label, true)
342342 else throw("Strict value is not equal to itself.")
343343 }
344344
345345
346346
347347 @Callable(i)
348348 func updateTicker (assetId,ticker) = {
349349 let checkCaller = mustAdmin(i)
350350 if ((checkCaller == checkCaller))
351351 then {
352352 let checkAsset = if (isCreated(assetId))
353353 then true
354354 else throwNoAsset()
355355 if ((checkAsset == checkAsset))
356356 then updateTickerActions(assetId, ticker)
357357 else throw("Strict value is not equal to itself.")
358358 }
359359 else throw("Strict value is not equal to itself.")
360360 }
361361
362362
363363
364364 @Callable(i)
365365 func deleteTicker (assetId) = {
366366 let checkCaller = mustAdmin(i)
367367 if ((checkCaller == checkCaller))
368368 then {
369369 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
370370 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
371371 }
372372 else throw("Strict value is not equal to itself.")
373373 }
374374
375375
376376
377377 @Callable(i)
378378 func createOrUpdate (assetId,logo,verified) = {
379379 let checkCaller = mustAdmin(i)
380380 if ((checkCaller == checkCaller))
381381 then {
382382 let isCreatedNow = !(isCreated(assetId))
383383 if ((isCreatedNow == isCreatedNow))
384384 then {
385385 let setLogoActions = if ((logo == ""))
386386 then nil
387387 else [StringEntry(keyLogo(assetId), logo)]
388388 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
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 setLogo (assetId,logo) = {
399399 let checks = [mustAdmin(i), if (isCreated(assetId))
400400 then true
401401 else throwNoAsset()]
402402 if ((checks == checks))
403403 then {
404404 let action = if ((logo == ""))
405405 then DeleteEntry(keyLogo(assetId))
406406 else StringEntry(keyLogo(assetId), logo)
407407 [action]
408408 }
409409 else throw("Strict value is not equal to itself.")
410410 }
411411
412412
413413
414414 @Callable(i)
415415 func setVerified (assetId,verified) = {
416416 let checks = [mustAdmin(i), if (isCreated(assetId))
417417 then true
418418 else throwNoAsset()]
419419 if ((checks == checks))
420420 then {
421421 let onVerificationLossInv = if (!(verified))
422422 then {
423423 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
424424 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
425425 }
426426 else unit
427427 if ((onVerificationLossInv == onVerificationLossInv))
428428 then $Tuple2(setVerifiedActions(assetId, verified), unit)
429429 else throw("Strict value is not equal to itself.")
430430 }
431431 else throw("Strict value is not equal to itself.")
432432 }
433433
434434
435435
436436 @Callable(i)
437437 func onEliminate (assetId) = {
438438 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
439439 let actions = if ((poolsNumber > 0))
440440 then nil
441441 else [DeleteEntry(keyLogo(assetId))]
442442 $Tuple2(actions, unit)
443443 }
444444
445445
446446
447447 @Callable(i)
448448 func setAdmins (adminPubKeys) = {
449449 let checkCaller = mustManager(i)
450450 if ((checkCaller == checkCaller))
451451 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
452452 else throw("Strict value is not equal to itself.")
453453 }
454454
455455
456456
457457 @Callable(i)
458458 func setManager (pendingManagerPublicKey) = {
459459 let checkCaller = mustManager(i)
460460 if ((checkCaller == checkCaller))
461461 then {
462462 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
463463 if ((checkManagerPublicKey == checkManagerPublicKey))
464464 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
465465 else throw("Strict value is not equal to itself.")
466466 }
467467 else throw("Strict value is not equal to itself.")
468468 }
469469
470470
471471
472472 @Callable(i)
473473 func confirmManager () = {
474474 let pm = pendingManagerPublicKeyOrUnit()
475475 let hasPM = if (isDefined(pm))
476476 then true
477477 else throw("No pending manager")
478478 if ((hasPM == hasPM))
479479 then {
480480 let checkPM = if ((i.callerPublicKey == value(pm)))
481481 then true
482482 else throw("You are not pending manager")
483483 if ((checkPM == checkPM))
484484 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
485485 else throw("Strict value is not equal to itself.")
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489
490490
491491
492492 @Callable(i)
493493 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
494494
495495
496496 @Verifier(tx)
497497 func verify () = {
498498 let targetPublicKey = match managerPublicKeyOrUnit() {
499499 case pk: ByteVector =>
500500 pk
501501 case _: Unit =>
502502 tx.senderPublicKey
503503 case _ =>
504504 throw("Match error")
505505 }
506506 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
507507 }
508508

github/deemru/w8io/fabc49c 
53.62 ms