tx · DV6u3cDTorB2nZZuqPweARStef4t3zMZDKhex5PKo9Bb

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01600000 Waves

2022.12.09 09:31 [2352428] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "DV6u3cDTorB2nZZuqPweARStef4t3zMZDKhex5PKo9Bb", "fee": 1600000, "feeAssetId": null, "timestamp": 1670567511314, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "3dYsG9PKsxKVbNmMty9aGH2kLJae4Pn9X3U6kcpGabvWzFF4DnUiB9s7ZrLcd2EfPXY5PAm8poSqHvHqdjko1m7u" ], "script": "base64:AAIFAAAAAAAABZEIAhIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldElkVG9UaWNrZXIiIGtleUFtb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AAACAAAAAQIAAAASTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJhTQUAAAACYU0EAAAAAmFOAwkAAAAAAAACCAUAAAABVwAAAA9jYWxsZXJQdWJsaWNLZXkJAQAAAAV2YWx1ZQAAAAEFAAAAAmFMBgkAAAIAAAABAgAAABtZb3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAAAAAAIFAAAAAmFOBQAAAAJhTgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAABagAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACYUwJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAWsAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFXAQAAABJpc1ZlcmlmaWVkUkVBRE9OTFkAAAABAAAAAXAJAAUUAAAAAgUAAAADbmlsCQEAAAABUAAAAAEFAAAAAXAAAAABAAAAAmFPAQAAAAJhUAAAAAAEAAAAAmFRBAAAAAFKCQEAAAABVAAAAAADCQAAAQAAAAIFAAAAAUoCAAAACkJ5dGVWZWN0b3IEAAAAAVgFAAAAAUoFAAAAAVgDCQAAAQAAAAIFAAAAAUoCAAAABFVuaXQIBQAAAAJhTwAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmFPAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYU8AAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhUbW1dnY=", "chainId": 84, "height": 2352428, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7iYdVgqV9yzmRZpXCgNeAznnF4EyXrk2iwqT6Y3pfMqP Next: DTXAF8aV6UkwD6stebHC8GAFEsNubUUcv5gmGuGresbE Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let testdelll = 1
5-
64 let SEP = "__"
75
86 let EMPTY = ""
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let testdelll = 1
5-
64 let SEP = "__"
75
86 let EMPTY = ""
97
108 let statusVerified = 2
119
1210 let statusUnverified = 0
1311
1412 let labelCommunityVerified = "COMMUNITY_VERIFIED"
1513
1614 let labelPoolsLp = "POOLS_LP"
1715
1816 let defaultLabels = [labelCommunityVerified, labelPoolsLp]
1917
2018 func throwPD () = throw("Permission denied")
2119
2220
2321 func throwNoAsset () = throw("Asset doesn't exists")
2422
2523
2624 func keyManagerPublicKey () = "%s__managerPublicKey"
2725
2826
2927 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
3028
3129
3230 func keyAdminPubKeys () = "%s__adminPubKeys"
3331
3432
3533 func keyUserPoolsContract () = "%s__userPoolsContract"
3634
3735
3836 func keyFactoryContract () = "%s__factoryContract"
3937
4038
4139 func keyCreated (assetId) = (("created_<" + assetId) + ">")
4240
4341
4442 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4543
4644
4745 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4846
4947
5048 func keyStatus (assetId) = (("status_<" + assetId) + ">")
5149
5250
5351 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
5452
5553
5654 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5755
5856
5957 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
6058
6159
6260 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
6361
6462
6563 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6664
6765
6866 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6967
7068
7169 func keyLabels () = makeString(["%s", "labels"], SEP)
7270
7371
7472 func getValueOrFail (address,key,type) = {
7573 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
7674 valueOrErrorMessage( match type {
7775 case str: String =>
7876 getString(address, key)
7977 case int: Int =>
8078 getInteger(address, key)
8179 case _ =>
8280 throw("invalid entry type")
8381 }, error)
8482 }
8583
8684
8785 func getStrOrFail (address,key) = {
8886 let @ = getValueOrFail(address, key, "")
8987 if ($isInstanceOf(@, "String"))
9088 then @
9189 else throw("Couldn't cast Int|String to String")
9290 }
9391
9492
9593 func getIntOrFail (address,key) = {
9694 let @ = getValueOrFail(address, key, 0)
9795 if ($isInstanceOf(@, "Int"))
9896 then @
9997 else throw("Couldn't cast Int|String to Int")
10098 }
10199
102100
103101 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
104102
105103
106104 func getLabels () = match getString(keyLabels()) {
107105 case s: String =>
108106 if ((size(s) == 0))
109107 then nil
110108 else split(s, SEP)
111109 case _ =>
112110 nil
113111 }
114112
115113
116114 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
117115 case s: String =>
118116 if ((size(s) == 0))
119117 then nil
120118 else split(s, SEP)
121119 case _ =>
122120 nil
123121 }
124122
125123
126124 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
127125 case s: String =>
128126 fromBase58String(s)
129127 case _: Unit =>
130128 unit
131129 case _ =>
132130 throw("Match error")
133131 }
134132
135133
136134 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
137135 case s: String =>
138136 fromBase58String(s)
139137 case _: Unit =>
140138 unit
141139 case _ =>
142140 throw("Match error")
143141 }
144142
145143
146144 func mustManager (i) = match managerPublicKeyOrUnit() {
147145 case pk: ByteVector =>
148146 if ((i.callerPublicKey == pk))
149147 then true
150148 else throwPD()
151149 case _: Unit =>
152150 if ((i.caller == this))
153151 then true
154152 else throwPD()
155153 case _ =>
156154 throw("Match error")
157155 }
158156
159157
160158 func mustAdmin (i) = {
161159 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
162160 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
163161 then true
164162 else {
165163 let isManager = mustManager(i)
166164 if ((isManager == isManager))
167165 then true
168166 else throw("Strict value is not equal to itself.")
169167 }
170168 }
171169
172170
173171 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
174172
175173
176174 func verifiedToStatus (verified) = if (verified)
177175 then statusVerified
178176 else statusUnverified
179177
180178
181179 func addLabelActions (assetId,label,throwOnError) = {
182180 let labels = getLabels()
183181 let assetLabels = getAssetLabels(assetId)
184182 let checkLabel = if (containsElement(labels, label))
185183 then true
186184 else throw("Label doesn't exist")
187185 if ((checkLabel == checkLabel))
188186 then {
189187 let newAssetLabels = if (containsElement(assetLabels, label))
190188 then if (throwOnError)
191189 then throw("Label has already been added")
192190 else assetLabels
193191 else (assetLabels :+ label)
194192 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
195193 }
196194 else throw("Strict value is not equal to itself.")
197195 }
198196
199197
200198 func deleteLabelActions (assetId,label,throwOnError) = {
201199 let assetLabels = getAssetLabels(assetId)
202200 let newAssetLabels = if (containsElement(assetLabels, label))
203201 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
204202 else if (throwOnError)
205203 then throw("Label wasn't added")
206204 else assetLabels
207205 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
208206 }
209207
210208
211209 func setVerifiedActions (assetId,verified) = {
212210 let labelCommunityVerifiedActions = if (verified)
213211 then addLabelActions(assetId, labelCommunityVerified, false)
214212 else deleteLabelActions(assetId, labelCommunityVerified, false)
215213 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
216214 }
217215
218216
219217 func updateTickerActions (assetId,ticker) = {
220218 let checkTicker = {
221219 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
222220 let tickerIsValid = if ((ticker != ""))
223221 then if ((linkedAssetIdOrUnit == unit))
224222 then true
225223 else (value(linkedAssetIdOrUnit) == assetId)
226224 else false
227225 if (tickerIsValid)
228226 then true
229227 else throw("Invalid ticker")
230228 }
231229 if ((checkTicker == checkTicker))
232230 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
233231 else throw("Strict value is not equal to itself.")
234232 }
235233
236234
237235 @Callable(i)
238236 func constructor (userPoolsContract,labels) = {
239237 let checkCaller = mustManager(i)
240238 if ((checkCaller == checkCaller))
241239 then {
242240 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
243241 if ((checksAddress == checksAddress))
244242 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
245243 else throw("Strict value is not equal to itself.")
246244 }
247245 else throw("Strict value is not equal to itself.")
248246 }
249247
250248
251249
252250 @Callable(i)
253251 func constructorV2 (factoryContract) = {
254252 let checkCaller = mustManager(i)
255253 if ((checkCaller == checkCaller))
256254 then {
257255 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
258256 if ((checkAddress == checkAddress))
259257 then [StringEntry(keyFactoryContract(), factoryContract)]
260258 else throw("Strict value is not equal to itself.")
261259 }
262260 else throw("Strict value is not equal to itself.")
263261 }
264262
265263
266264
267265 @Callable(i)
268266 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
269267 let checkCaller = mustAdmin(i)
270268 if ((checkCaller == checkCaller))
271269 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
272270 else throw("Strict value is not equal to itself.")
273271 }
274272
275273
276274
277275 @Callable(i)
278276 func increaseAssetPoolsNumber (assetId) = {
279277 let checkCaller = mustAdmin(i)
280278 if ((checkCaller == checkCaller))
281279 then {
282280 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
283281 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
284282 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
285283 }
286284 else throw("Strict value is not equal to itself.")
287285 }
288286
289287
290288
291289 @Callable(i)
292290 func createLabel (label) = {
293291 let labels = getLabels()
294292 let checkCaller = mustAdmin(i)
295293 if ((checkCaller == checkCaller))
296294 then {
297295 let checkLabel = [if (!(contains(label, SEP)))
298296 then true
299297 else throw("Invalid label name"), if (!(containsElement(labels, label)))
300298 then true
301299 else throw("Label exists")]
302300 if ((checkLabel == checkLabel))
303301 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
304302 else throw("Strict value is not equal to itself.")
305303 }
306304 else throw("Strict value is not equal to itself.")
307305 }
308306
309307
310308
311309 @Callable(i)
312310 func dropLabel (label) = {
313311 let labels = getLabels()
314312 let checkCaller = mustManager(i)
315313 if ((checkCaller == checkCaller))
316314 then {
317315 let checkLabel = if (containsElement(labels, label))
318316 then true
319317 else throw("Label doesn't exist")
320318 if ((checkLabel == checkLabel))
321319 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
322320 else throw("Strict value is not equal to itself.")
323321 }
324322 else throw("Strict value is not equal to itself.")
325323 }
326324
327325
328326
329327 @Callable(i)
330328 func addLabel (assetId,label) = {
331329 let checkCaller = mustAdmin(i)
332330 if ((checkCaller == checkCaller))
333331 then addLabelActions(assetId, label, true)
334332 else throw("Strict value is not equal to itself.")
335333 }
336334
337335
338336
339337 @Callable(i)
340338 func deleteLabel (assetId,label) = {
341339 let checkCaller = mustAdmin(i)
342340 if ((checkCaller == checkCaller))
343341 then deleteLabelActions(assetId, label, true)
344342 else throw("Strict value is not equal to itself.")
345343 }
346344
347345
348346
349347 @Callable(i)
350348 func updateTicker (assetId,ticker) = {
351349 let checkCaller = mustAdmin(i)
352350 if ((checkCaller == checkCaller))
353351 then {
354352 let checkAsset = if (isCreated(assetId))
355353 then true
356354 else throwNoAsset()
357355 if ((checkAsset == checkAsset))
358356 then updateTickerActions(assetId, ticker)
359357 else throw("Strict value is not equal to itself.")
360358 }
361359 else throw("Strict value is not equal to itself.")
362360 }
363361
364362
365363
366364 @Callable(i)
367365 func deleteTicker (assetId) = {
368366 let checkCaller = mustAdmin(i)
369367 if ((checkCaller == checkCaller))
370368 then {
371369 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
372370 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
373371 }
374372 else throw("Strict value is not equal to itself.")
375373 }
376374
377375
378376
379377 @Callable(i)
380378 func createOrUpdate (assetId,logo,verified) = {
381379 let checkCaller = mustAdmin(i)
382380 if ((checkCaller == checkCaller))
383381 then {
384382 let isCreatedNow = !(isCreated(assetId))
385383 if ((isCreatedNow == isCreatedNow))
386384 then {
387385 let setLogoActions = if ((logo == ""))
388386 then nil
389387 else [StringEntry(keyLogo(assetId), logo)]
390388 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
391389 }
392390 else throw("Strict value is not equal to itself.")
393391 }
394392 else throw("Strict value is not equal to itself.")
395393 }
396394
397395
398396
399397 @Callable(i)
400398 func setLogo (assetId,logo) = {
401399 let checks = [mustAdmin(i), if (isCreated(assetId))
402400 then true
403401 else throwNoAsset()]
404402 if ((checks == checks))
405403 then {
406404 let action = if ((logo == ""))
407405 then DeleteEntry(keyLogo(assetId))
408406 else StringEntry(keyLogo(assetId), logo)
409407 [action]
410408 }
411409 else throw("Strict value is not equal to itself.")
412410 }
413411
414412
415413
416414 @Callable(i)
417415 func setVerified (assetId,verified) = {
418416 let checks = [mustAdmin(i), if (isCreated(assetId))
419417 then true
420418 else throwNoAsset()]
421419 if ((checks == checks))
422420 then {
423421 let onVerificationLossInv = if (!(verified))
424422 then {
425423 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
426424 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
427425 }
428426 else unit
429427 if ((onVerificationLossInv == onVerificationLossInv))
430428 then $Tuple2(setVerifiedActions(assetId, verified), unit)
431429 else throw("Strict value is not equal to itself.")
432430 }
433431 else throw("Strict value is not equal to itself.")
434432 }
435433
436434
437435
438436 @Callable(i)
439437 func onEliminate (assetId) = {
440438 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
441439 let actions = if ((poolsNumber > 0))
442440 then nil
443441 else [DeleteEntry(keyLogo(assetId))]
444442 $Tuple2(actions, unit)
445443 }
446444
447445
448446
449447 @Callable(i)
450448 func setAdmins (adminPubKeys) = {
451449 let checkCaller = mustManager(i)
452450 if ((checkCaller == checkCaller))
453451 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
454452 else throw("Strict value is not equal to itself.")
455453 }
456454
457455
458456
459457 @Callable(i)
460458 func setManager (pendingManagerPublicKey) = {
461459 let checkCaller = mustManager(i)
462460 if ((checkCaller == checkCaller))
463461 then {
464462 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
465463 if ((checkManagerPublicKey == checkManagerPublicKey))
466464 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
467465 else throw("Strict value is not equal to itself.")
468466 }
469467 else throw("Strict value is not equal to itself.")
470468 }
471469
472470
473471
474472 @Callable(i)
475473 func confirmManager () = {
476474 let pm = pendingManagerPublicKeyOrUnit()
477475 let hasPM = if (isDefined(pm))
478476 then true
479477 else throw("No pending manager")
480478 if ((hasPM == hasPM))
481479 then {
482480 let checkPM = if ((i.callerPublicKey == value(pm)))
483481 then true
484482 else throw("You are not pending manager")
485483 if ((checkPM == checkPM))
486484 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
487485 else throw("Strict value is not equal to itself.")
488486 }
489487 else throw("Strict value is not equal to itself.")
490488 }
491489
492490
493491
494492 @Callable(i)
495493 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
496494
497495
498496 @Verifier(tx)
499497 func verify () = {
500498 let targetPublicKey = match managerPublicKeyOrUnit() {
501499 case pk: ByteVector =>
502500 pk
503501 case _: Unit =>
504502 tx.senderPublicKey
505503 case _ =>
506504 throw("Match error")
507505 }
508506 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
509507 }
510508

github/deemru/w8io/fabc49c 
59.45 ms