tx · 3bMz9KkvDHmarDFZa9cLfjFv7tXbZVfq2qytNYrntFrc

3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG:  -0.01600000 Waves

2023.07.27 12:30 [2684076] smart account 3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG > SELF 0.00000000 Waves

{ "type": 13, "id": "3bMz9KkvDHmarDFZa9cLfjFv7tXbZVfq2qytNYrntFrc", "fee": 1600000, "feeAssetId": null, "timestamp": 1690450348243, "version": 2, "chainId": 84, "sender": "3Mpwh8Q1gGv6gwtzViR9mgruFyy6Jdm4GCG", "senderPublicKey": "FLnBQATnBGWeMDB5MhixoEef8W61cnZUFXeCcwWAWQaR", "proofs": [ "46TKkaaq3TU2yfxkqduw3mmD6p12TSVNnrF4151DQn8A9b4MfvhNXXZwJRXiR7EJhn7jWvh9RK1nfv8NzwfXyWCT" ], "script": "base64:AAIFAAAAAAAABcAIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIDCgEIEgQKAggEEgMKAQgSAwoBGBIDCgEIIgNTRVAiBUVNUFRZIg5zdGF0dXNWZXJpZmllZCIQc3RhdHVzVW52ZXJpZmllZCIWbGFiZWxDb21tdW5pdHlWZXJpZmllZCIMbGFiZWxQb29sc0xwIg1kZWZhdWx0TGFiZWxzIgd0aHJvd1BEIgx0aHJvd05vQXNzZXQiEnRocm93SW52YWxpZFRpY2tlciIPa2V5QWRtaW5QdWJLZXlzIhRrZXlVc2VyUG9vbHNDb250cmFjdCISa2V5RmFjdG9yeUNvbnRyYWN0IgprZXlDcmVhdGVkIgdhc3NldElkIgdrZXlMb2dvIglrZXlUaWNrZXIiCWtleVN0YXR1cyITa2V5QXNzZXRQb29sc051bWJlciISa2V5VGlja2VyVG9Bc3NldElkIgZ0aWNrZXIiEmtleUFzc2V0SWRUb1RpY2tlciIga2V5QW1vdW50QW5kU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AmFSAQAAAAJhUwAAAAAEAAAAAmFUBAAAAAFNCQEAAAABWAAAAAADCQAAAQAAAAIFAAAAAU0CAAAACkJ5dGVWZWN0b3IEAAAAAmFiBQAAAAFNBQAAAAJhYgMJAAABAAAAAgUAAAABTQIAAAAEVW5pdAgFAAAAAmFSAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYVIAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhUgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFUJ8p9dQ==", "height": 2684076, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3LawBvvWhk3eAmWGcE6UKaJed1dFcws8hPSyXAwFxNeB Next: 73ikuEeWgxYdou33Afud9GkKLeA5JEEHdAWxGfRnvEXD Diff:
OldNewDifferences
499499 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
500500
501501
502-
503-@Callable(i)
504-func deletePool (amountAssetId,priceAssetId) = {
505- let factoryContract = addressFromStringValue(getStringValue(keyFactoryContract()))
506- let checkCaller = if ((i.caller == factoryContract))
507- then true
508- else mustManager(i)
509- if ((checkCaller == checkCaller))
510- then {
511- let lpAssetId = valueOrElse(getString(keyAmountAndPriceAssetsToLpAsset(amountAssetId, priceAssetId)), "")
512- let poolKeysDeleteActions = if ((lpAssetId == ""))
513- then nil
514- else [DeleteEntry(keyLpAssetToAmountAndPriceAssets(lpAssetId)), DeleteEntry(keyAssetLabels(lpAssetId)), DeleteEntry(keyAssetName(lpAssetId)), DeleteEntry(keyAssetDescription(lpAssetId)), DeleteEntry(keyCreated(lpAssetId)), DeleteEntry(keyStatus(lpAssetId)), DeleteEntry(keyLogo(lpAssetId)), DeleteEntry(keyTicker(lpAssetId)), DeleteEntry(keyAmountAndPriceAssetsToLpAsset(amountAssetId, priceAssetId))]
515- poolKeysDeleteActions
516- }
517- else throw("Strict value is not equal to itself.")
518- }
519-
520-
521502 @Verifier(tx)
522503 func verify () = {
523504 let targetPublicKey = match managerPublicKeyOrUnit() {
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)
448448 func getAssetLogoREADONLY (assetId) = {
449449 let logo = valueOrElse(getString(keyLogo(assetId)), "")
450450 $Tuple2(nil, logo)
451451 }
452452
453453
454454
455455 @Callable(i)
456456 func setVerified (assetId,verified) = {
457457 let checks = [mustAdmin(i), if (isCreated(assetId))
458458 then true
459459 else throwNoAsset()]
460460 if ((checks == checks))
461461 then {
462462 let onVerificationLossInv = if (!(verified))
463463 then {
464464 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
465465 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
466466 }
467467 else unit
468468 if ((onVerificationLossInv == onVerificationLossInv))
469469 then $Tuple2(setVerifiedActions(assetId, verified), unit)
470470 else throw("Strict value is not equal to itself.")
471471 }
472472 else throw("Strict value is not equal to itself.")
473473 }
474474
475475
476476
477477 @Callable(i)
478478 func onEliminate (assetId) = {
479479 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
480480 let actions = if ((poolsNumber > 0))
481481 then nil
482482 else [DeleteEntry(keyLogo(assetId))]
483483 $Tuple2(actions, unit)
484484 }
485485
486486
487487
488488 @Callable(i)
489489 func setAdmins (adminPubKeys) = {
490490 let checkCaller = mustManager(i)
491491 if ((checkCaller == checkCaller))
492492 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
493493 else throw("Strict value is not equal to itself.")
494494 }
495495
496496
497497
498498 @Callable(i)
499499 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
500500
501501
502-
503-@Callable(i)
504-func deletePool (amountAssetId,priceAssetId) = {
505- let factoryContract = addressFromStringValue(getStringValue(keyFactoryContract()))
506- let checkCaller = if ((i.caller == factoryContract))
507- then true
508- else mustManager(i)
509- if ((checkCaller == checkCaller))
510- then {
511- let lpAssetId = valueOrElse(getString(keyAmountAndPriceAssetsToLpAsset(amountAssetId, priceAssetId)), "")
512- let poolKeysDeleteActions = if ((lpAssetId == ""))
513- then nil
514- else [DeleteEntry(keyLpAssetToAmountAndPriceAssets(lpAssetId)), DeleteEntry(keyAssetLabels(lpAssetId)), DeleteEntry(keyAssetName(lpAssetId)), DeleteEntry(keyAssetDescription(lpAssetId)), DeleteEntry(keyCreated(lpAssetId)), DeleteEntry(keyStatus(lpAssetId)), DeleteEntry(keyLogo(lpAssetId)), DeleteEntry(keyTicker(lpAssetId)), DeleteEntry(keyAmountAndPriceAssetsToLpAsset(amountAssetId, priceAssetId))]
515- poolKeysDeleteActions
516- }
517- else throw("Strict value is not equal to itself.")
518- }
519-
520-
521502 @Verifier(tx)
522503 func verify () = {
523504 let targetPublicKey = match managerPublicKeyOrUnit() {
524505 case pk: ByteVector =>
525506 pk
526507 case _: Unit =>
527508 tx.senderPublicKey
528509 case _ =>
529510 throw("Match error")
530511 }
531512 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
532513 }
533514

github/deemru/w8io/026f985 
45.20 ms