tx · EUTibt4dLtBJJCJqVeJTeX3Ac13eNcnVShsXCEGBoZk2

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01600000 Waves

2022.12.16 16:26 [2362919] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "EUTibt4dLtBJJCJqVeJTeX3Ac13eNcnVShsXCEGBoZk2", "fee": 1600000, "feeAssetId": null, "timestamp": 1671197228635, "version": 1, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "5VbrJNocvv3iXgVJRG3Ryqf5S8LsR4gvZuN4MBPkFNYSGJwWYrfspZSnLGjTJWWxgL31419bqCBZDMB2kgZBgBWK" ], "script": "base64:AAIFAAAAAAAABZwIAhIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiCXRlc3RkZWxsbCIDU0VQIgVFTVBUWSIOc3RhdHVzVmVyaWZpZWQiEHN0YXR1c1VudmVyaWZpZWQiFmxhYmVsQ29tbXVuaXR5VmVyaWZpZWQiDGxhYmVsUG9vbHNMcCINZGVmYXVsdExhYmVscyIHdGhyb3dQRCIMdGhyb3dOb0Fzc2V0IhNrZXlNYW5hZ2VyUHVibGljS2V5IhprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleSIPa2V5QWRtaW5QdWJLZXlzIhRrZXlVc2VyUG9vbHNDb250cmFjdCISa2V5RmFjdG9yeUNvbnRyYWN0IgprZXlDcmVhdGVkIgdhc3NldElkIgdrZXlMb2dvIglrZXlUaWNrZXIiCWtleVN0YXR1cyITa2V5QXNzZXRQb29sc051bWJlciISa2V5VGlja2VyVG9Bc3NldElkIgZ0aWNrZXIiEmtleUFzc2V0SWR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Complexity": 0 } View: original | compacted Prev: F6ngZ9e2cnVQTbRX5DE2xsWSVAUKp1tXHn8YVVNdusE3 Next: HqyWTsBRYcHeiDqbboNVtsiR8MeEMS5DmRfiw1hoMCwu Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let testdelll = 1
5+
46 let SEP = "__"
57
68 let EMPTY = ""
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let testdelll = 1
5+
46 let SEP = "__"
57
68 let EMPTY = ""
79
810 let statusVerified = 2
911
1012 let statusUnverified = 0
1113
1214 let labelCommunityVerified = "COMMUNITY_VERIFIED"
1315
1416 let labelPoolsLp = "POOLS_LP"
1517
1618 let defaultLabels = [labelCommunityVerified, labelPoolsLp]
1719
1820 func throwPD () = throw("Permission denied")
1921
2022
2123 func throwNoAsset () = throw("Asset doesn't exists")
2224
2325
2426 func keyManagerPublicKey () = "%s__managerPublicKey"
2527
2628
2729 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2830
2931
3032 func keyAdminPubKeys () = "%s__adminPubKeys"
3133
3234
3335 func keyUserPoolsContract () = "%s__userPoolsContract"
3436
3537
3638 func keyFactoryContract () = "%s__factoryContract"
3739
3840
3941 func keyCreated (assetId) = (("created_<" + assetId) + ">")
4042
4143
4244 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4345
4446
4547 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4648
4749
4850 func keyStatus (assetId) = (("status_<" + assetId) + ">")
4951
5052
5153 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
5254
5355
5456 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5557
5658
5759 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
5860
5961
6062 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
6163
6264
6365 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6466
6567
6668 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
6769
6870
6971 func keyLabels () = makeString(["%s", "labels"], SEP)
7072
7173
7274 func getValueOrFail (address,key,type) = {
7375 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
7476 valueOrErrorMessage( match type {
7577 case str: String =>
7678 getString(address, key)
7779 case int: Int =>
7880 getInteger(address, key)
7981 case _ =>
8082 throw("invalid entry type")
8183 }, error)
8284 }
8385
8486
8587 func getStrOrFail (address,key) = {
8688 let @ = getValueOrFail(address, key, "")
8789 if ($isInstanceOf(@, "String"))
8890 then @
8991 else throw("Couldn't cast Int|String to String")
9092 }
9193
9294
9395 func getIntOrFail (address,key) = {
9496 let @ = getValueOrFail(address, key, 0)
9597 if ($isInstanceOf(@, "Int"))
9698 then @
9799 else throw("Couldn't cast Int|String to Int")
98100 }
99101
100102
101103 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
102104
103105
104106 func getLabels () = match getString(keyLabels()) {
105107 case s: String =>
106108 if ((size(s) == 0))
107109 then nil
108110 else split(s, SEP)
109111 case _ =>
110112 nil
111113 }
112114
113115
114116 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
115117 case s: String =>
116118 if ((size(s) == 0))
117119 then nil
118120 else split(s, SEP)
119121 case _ =>
120122 nil
121123 }
122124
123125
124126 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
125127 case s: String =>
126128 fromBase58String(s)
127129 case _: Unit =>
128130 unit
129131 case _ =>
130132 throw("Match error")
131133 }
132134
133135
134136 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
135137 case s: String =>
136138 fromBase58String(s)
137139 case _: Unit =>
138140 unit
139141 case _ =>
140142 throw("Match error")
141143 }
142144
143145
144146 func mustManager (i) = match managerPublicKeyOrUnit() {
145147 case pk: ByteVector =>
146148 if ((i.callerPublicKey == pk))
147149 then true
148150 else throwPD()
149151 case _: Unit =>
150152 if ((i.caller == this))
151153 then true
152154 else throwPD()
153155 case _ =>
154156 throw("Match error")
155157 }
156158
157159
158160 func mustAdmin (i) = {
159161 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
160162 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
161163 then true
162164 else {
163165 let isManager = mustManager(i)
164166 if ((isManager == isManager))
165167 then true
166168 else throw("Strict value is not equal to itself.")
167169 }
168170 }
169171
170172
171173 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
172174
173175
174176 func verifiedToStatus (verified) = if (verified)
175177 then statusVerified
176178 else statusUnverified
177179
178180
179181 func addLabelActions (assetId,label,throwOnError) = {
180182 let labels = getLabels()
181183 let assetLabels = getAssetLabels(assetId)
182184 let checkLabel = if (containsElement(labels, label))
183185 then true
184186 else throw("Label doesn't exist")
185187 if ((checkLabel == checkLabel))
186188 then {
187189 let newAssetLabels = if (containsElement(assetLabels, label))
188190 then if (throwOnError)
189191 then throw("Label has already been added")
190192 else assetLabels
191193 else (assetLabels :+ label)
192194 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
193195 }
194196 else throw("Strict value is not equal to itself.")
195197 }
196198
197199
198200 func deleteLabelActions (assetId,label,throwOnError) = {
199201 let assetLabels = getAssetLabels(assetId)
200202 let newAssetLabels = if (containsElement(assetLabels, label))
201203 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
202204 else if (throwOnError)
203205 then throw("Label wasn't added")
204206 else assetLabels
205207 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
206208 }
207209
208210
209211 func setVerifiedActions (assetId,verified) = {
210212 let labelCommunityVerifiedActions = if (verified)
211213 then addLabelActions(assetId, labelCommunityVerified, false)
212214 else deleteLabelActions(assetId, labelCommunityVerified, false)
213215 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
214216 }
215217
216218
217219 func updateTickerActions (assetId,ticker) = {
218220 let checkTicker = {
219221 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
220222 let tickerIsValid = if ((ticker != ""))
221223 then if ((linkedAssetIdOrUnit == unit))
222224 then true
223225 else (value(linkedAssetIdOrUnit) == assetId)
224226 else false
225227 if (tickerIsValid)
226228 then true
227229 else throw("Invalid ticker")
228230 }
229231 if ((checkTicker == checkTicker))
230232 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
231233 else throw("Strict value is not equal to itself.")
232234 }
233235
234236
235237 @Callable(i)
236238 func constructor (userPoolsContract,labels) = {
237239 let checkCaller = mustManager(i)
238240 if ((checkCaller == checkCaller))
239241 then {
240242 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
241243 if ((checksAddress == checksAddress))
242244 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
243245 else throw("Strict value is not equal to itself.")
244246 }
245247 else throw("Strict value is not equal to itself.")
246248 }
247249
248250
249251
250252 @Callable(i)
251253 func constructorV2 (factoryContract) = {
252254 let checkCaller = mustManager(i)
253255 if ((checkCaller == checkCaller))
254256 then {
255257 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
256258 if ((checkAddress == checkAddress))
257259 then [StringEntry(keyFactoryContract(), factoryContract)]
258260 else throw("Strict value is not equal to itself.")
259261 }
260262 else throw("Strict value is not equal to itself.")
261263 }
262264
263265
264266
265267 @Callable(i)
266268 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
267269 let checkCaller = mustAdmin(i)
268270 if ((checkCaller == checkCaller))
269271 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
270272 else throw("Strict value is not equal to itself.")
271273 }
272274
273275
274276
275277 @Callable(i)
276278 func increaseAssetPoolsNumber (assetId) = {
277279 let checkCaller = mustAdmin(i)
278280 if ((checkCaller == checkCaller))
279281 then {
280282 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
281283 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
282284 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
283285 }
284286 else throw("Strict value is not equal to itself.")
285287 }
286288
287289
288290
289291 @Callable(i)
290292 func createLabel (label) = {
291293 let labels = getLabels()
292294 let checkCaller = mustAdmin(i)
293295 if ((checkCaller == checkCaller))
294296 then {
295297 let checkLabel = [if (!(contains(label, SEP)))
296298 then true
297299 else throw("Invalid label name"), if (!(containsElement(labels, label)))
298300 then true
299301 else throw("Label exists")]
300302 if ((checkLabel == checkLabel))
301303 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
302304 else throw("Strict value is not equal to itself.")
303305 }
304306 else throw("Strict value is not equal to itself.")
305307 }
306308
307309
308310
309311 @Callable(i)
310312 func dropLabel (label) = {
311313 let labels = getLabels()
312314 let checkCaller = mustManager(i)
313315 if ((checkCaller == checkCaller))
314316 then {
315317 let checkLabel = if (containsElement(labels, label))
316318 then true
317319 else throw("Label doesn't exist")
318320 if ((checkLabel == checkLabel))
319321 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
320322 else throw("Strict value is not equal to itself.")
321323 }
322324 else throw("Strict value is not equal to itself.")
323325 }
324326
325327
326328
327329 @Callable(i)
328330 func addLabel (assetId,label) = {
329331 let checkCaller = mustAdmin(i)
330332 if ((checkCaller == checkCaller))
331333 then addLabelActions(assetId, label, true)
332334 else throw("Strict value is not equal to itself.")
333335 }
334336
335337
336338
337339 @Callable(i)
338340 func deleteLabel (assetId,label) = {
339341 let checkCaller = mustAdmin(i)
340342 if ((checkCaller == checkCaller))
341343 then deleteLabelActions(assetId, label, true)
342344 else throw("Strict value is not equal to itself.")
343345 }
344346
345347
346348
347349 @Callable(i)
348350 func updateTicker (assetId,ticker) = {
349351 let checkCaller = mustAdmin(i)
350352 if ((checkCaller == checkCaller))
351353 then {
352354 let checkAsset = if (isCreated(assetId))
353355 then true
354356 else throwNoAsset()
355357 if ((checkAsset == checkAsset))
356358 then updateTickerActions(assetId, ticker)
357359 else throw("Strict value is not equal to itself.")
358360 }
359361 else throw("Strict value is not equal to itself.")
360362 }
361363
362364
363365
364366 @Callable(i)
365367 func deleteTicker (assetId) = {
366368 let checkCaller = mustAdmin(i)
367369 if ((checkCaller == checkCaller))
368370 then {
369371 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
370372 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
371373 }
372374 else throw("Strict value is not equal to itself.")
373375 }
374376
375377
376378
377379 @Callable(i)
378380 func createOrUpdate (assetId,logo,verified) = {
379381 let checkCaller = mustAdmin(i)
380382 if ((checkCaller == checkCaller))
381383 then {
382384 let isCreatedNow = !(isCreated(assetId))
383385 if ((isCreatedNow == isCreatedNow))
384386 then {
385387 let setLogoActions = if ((logo == ""))
386388 then nil
387389 else [StringEntry(keyLogo(assetId), logo)]
388390 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
389391 }
390392 else throw("Strict value is not equal to itself.")
391393 }
392394 else throw("Strict value is not equal to itself.")
393395 }
394396
395397
396398
397399 @Callable(i)
398400 func setLogo (assetId,logo) = {
399401 let checks = [mustAdmin(i), if (isCreated(assetId))
400402 then true
401403 else throwNoAsset()]
402404 if ((checks == checks))
403405 then {
404406 let action = if ((logo == ""))
405407 then DeleteEntry(keyLogo(assetId))
406408 else StringEntry(keyLogo(assetId), logo)
407409 [action]
408410 }
409411 else throw("Strict value is not equal to itself.")
410412 }
411413
412414
413415
414416 @Callable(i)
415417 func setVerified (assetId,verified) = {
416418 let checks = [mustAdmin(i), if (isCreated(assetId))
417419 then true
418420 else throwNoAsset()]
419421 if ((checks == checks))
420422 then {
421423 let onVerificationLossInv = if (!(verified))
422424 then {
423425 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
424426 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
425427 }
426428 else unit
427429 if ((onVerificationLossInv == onVerificationLossInv))
428430 then $Tuple2(setVerifiedActions(assetId, verified), unit)
429431 else throw("Strict value is not equal to itself.")
430432 }
431433 else throw("Strict value is not equal to itself.")
432434 }
433435
434436
435437
436438 @Callable(i)
437439 func onEliminate (assetId) = {
438440 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
439441 let actions = if ((poolsNumber > 0))
440442 then nil
441443 else [DeleteEntry(keyLogo(assetId))]
442444 $Tuple2(actions, unit)
443445 }
444446
445447
446448
447449 @Callable(i)
448450 func setAdmins (adminPubKeys) = {
449451 let checkCaller = mustManager(i)
450452 if ((checkCaller == checkCaller))
451453 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
452454 else throw("Strict value is not equal to itself.")
453455 }
454456
455457
456458
457459 @Callable(i)
458460 func setManager (pendingManagerPublicKey) = {
459461 let checkCaller = mustManager(i)
460462 if ((checkCaller == checkCaller))
461463 then {
462464 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
463465 if ((checkManagerPublicKey == checkManagerPublicKey))
464466 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
465467 else throw("Strict value is not equal to itself.")
466468 }
467469 else throw("Strict value is not equal to itself.")
468470 }
469471
470472
471473
472474 @Callable(i)
473475 func confirmManager () = {
474476 let pm = pendingManagerPublicKeyOrUnit()
475477 let hasPM = if (isDefined(pm))
476478 then true
477479 else throw("No pending manager")
478480 if ((hasPM == hasPM))
479481 then {
480482 let checkPM = if ((i.callerPublicKey == value(pm)))
481483 then true
482484 else throw("You are not pending manager")
483485 if ((checkPM == checkPM))
484486 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
485487 else throw("Strict value is not equal to itself.")
486488 }
487489 else throw("Strict value is not equal to itself.")
488490 }
489491
490492
491493
492494 @Callable(i)
493495 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
494496
495497
496498 @Verifier(tx)
497499 func verify () = {
498500 let targetPublicKey = match managerPublicKeyOrUnit() {
499501 case pk: ByteVector =>
500502 pk
501503 case _: Unit =>
502504 tx.senderPublicKey
503505 case _ =>
504506 throw("Match error")
505507 }
506508 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
507509 }
508510

github/deemru/w8io/026f985 
73.25 ms