tx · CnVZxbDhBMtsKMKD37geGot4pXhAYqVpSKu3a7LwFZEb

3N33d7hDNrmKB3skVeWs2KDCDo3wwQbR1g5:  -0.01900000 Waves

2023.03.02 11:12 [2472181] smart account 3N33d7hDNrmKB3skVeWs2KDCDo3wwQbR1g5 > SELF 0.00000000 Waves

{ "type": 13, "id": "CnVZxbDhBMtsKMKD37geGot4pXhAYqVpSKu3a7LwFZEb", "fee": 1900000, "feeAssetId": null, "timestamp": 1677744781771, "version": 1, "sender": "3N33d7hDNrmKB3skVeWs2KDCDo3wwQbR1g5", "senderPublicKey": "4QaP5XBsUxUYx6e5ekvpixaQKtS8iyMQSvuboSNcwuu8", "proofs": [ "45f91xiJXYb5m12ixZaJAA393KmzCzYXr3dmo5caMj7d7HNS6aj4BwAPPQEvNB2ThrjdYN3BENdxHGptTNiBbPTu" ], "script": "base64:AAIFAAAAAAAAAGMIAhIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgAAAApAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAA5zdGF0dXNWZXJpZmllZAAAAAAAAAAAAgAAAAAQc3RhdHVzVW52ZXJpZmllZAAAAAAAAAAAAAAAAAAWbGFiZWxDb21tdW5pdHlWZXJpZmllZAIAAAASQ09NTVVOSVRZX1ZFUklGSUVEAAAAAAxsYWJlbFBvb2xzTHACAAAACFBPT0xTX0xQAAAAAA1kZWZhdWx0TGFiZWxzCQAETAAAAAIFAAAAFmxhYmVsQ29tbXVuaXR5VmVyaWZpZWQJAARMAAAAAgUAAAAMbGFiZWxQb29sc0xwBQAAAANuaWwBAAAAB3Rocm93UEQAAAAACQAAAgAAAAECAAAAEVBlcm1pc3Npb24gZGVuaWVkAQAAAAx0aHJvd05vQXNzZXQAAAAACQAAAgAAAAECAAAAFEFzc2V0IGRvZXNuJ3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MWQAAAAEAAAAHYXNzZXRJZAkABRQAAAACBQAAAANuaWwJAQAAAAppc1ZlcmlmaWVkAAAAAQUAAAAHYXNzZXRJZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXn97ltr", "chainId": 84, "height": 2472181, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HnASD5pp4UQMjizPNHrWuAwcEmB4hBUjT2LucumrUHG6 Next: none 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/169f3d6 
46.88 ms