tx · 28PS2AAawfpaE9goU5kHYXXoCK7zRkpFEo9htXFRo6sw

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01600000 Waves

2023.03.06 11:02 [2477962] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "28PS2AAawfpaE9goU5kHYXXoCK7zRkpFEo9htXFRo6sw", "fee": 1600000, "feeAssetId": null, "timestamp": 1678089777584, "version": 2, "chainId": 84, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "2e3nNJvdCEbwMXcxo7ZiV3Ykdun75tCrFdAehM98tGihxybNQ8Szd9KVwVXaESyhzajW5sE3oQsHT6xYV2nT57N" ], "script": "base64:AAIFAAAAAAAABZEIAhIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldElkVG9UaWNrZXIiI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AJhTAYJAAACAAAAAQIAAAASTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAJhTQUAAAACYU0EAAAAAmFOAwkAAAAAAAACCAUAAAABVwAAAA9jYWxsZXJQdWJsaWNLZXkJAQAAAAV2YWx1ZQAAAAEFAAAAAmFMBgkAAAIAAAABAgAAABtZb3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAAAAAAIFAAAAAmFOBQAAAAJhTgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAABagAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACYUwJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAWsAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFXAQAAABJpc1ZlcmlmaWVkUkVBRE9OTFkAAAABAAAAAXAJAAUUAAAAAgUAAAADbmlsCQEAAAABUAAAAAEFAAAAAXAAAAABAAAAAmFPAQAAAAJhUAAAAAAEAAAAAmFRBAAAAAFKCQEAAAABVAAAAAADCQAAAQAAAAIFAAAAAUoCAAAACkJ5dGVWZWN0b3IEAAAAAVgFAAAAAUoFAAAAAVgDCQAAAQAAAAIFAAAAAUoCAAAABFVuaXQIBQAAAAJhTwAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmFPAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYU8AAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhUbW1dnY=", "height": 2477962, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AcHrSbHqWkcjxQSuQ43M4E29e2AgU9rkh1dR5Uh7LJig Next: 9CgsGiZDnsRpsExX9PpD5W1iNS3BUEaEthznykry6GBN Diff:
OldNewDifferences
6767
6868
6969 func keyLabels () = makeString(["%s", "labels"], SEP)
70-
71-
72-func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
73-
74-
75-func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
7670
7771
7872 func getValueOrFail (address,key,type) = {
236230 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
237231 else throw("Strict value is not equal to itself.")
238232 }
239-
240-
241-@Callable(i)
242-func setAssetName (assetID,assetName) = {
243- let checkCaller = mustAdmin(i)
244- if ((checkCaller == checkCaller))
245- then [StringEntry(keyAssetName(assetID), assetName)]
246- else throw("Strict value is not equal to itself.")
247- }
248-
249-
250-
251-@Callable(i)
252-func setAssetDescription (assetID,assetDescription) = {
253- let checkCaller = mustAdmin(i)
254- if ((checkCaller == checkCaller))
255- then [StringEntry(keyAssetDescription(assetID), assetDescription)]
256- else throw("Strict value is not equal to itself.")
257- }
258-
259233
260234
261235 @Callable(i)
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)
70-
71-
72-func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
73-
74-
75-func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
7670
7771
7872 func getValueOrFail (address,key,type) = {
7973 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8074 valueOrErrorMessage( match type {
8175 case str: String =>
8276 getString(address, key)
8377 case int: Int =>
8478 getInteger(address, key)
8579 case _ =>
8680 throw("invalid entry type")
8781 }, error)
8882 }
8983
9084
9185 func getStrOrFail (address,key) = {
9286 let @ = getValueOrFail(address, key, "")
9387 if ($isInstanceOf(@, "String"))
9488 then @
9589 else throw("Couldn't cast Int|String to String")
9690 }
9791
9892
9993 func getIntOrFail (address,key) = {
10094 let @ = getValueOrFail(address, key, 0)
10195 if ($isInstanceOf(@, "Int"))
10296 then @
10397 else throw("Couldn't cast Int|String to Int")
10498 }
10599
106100
107101 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
108102
109103
110104 func getLabels () = match getString(keyLabels()) {
111105 case s: String =>
112106 if ((size(s) == 0))
113107 then nil
114108 else split(s, SEP)
115109 case _ =>
116110 nil
117111 }
118112
119113
120114 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
121115 case s: String =>
122116 if ((size(s) == 0))
123117 then nil
124118 else split(s, SEP)
125119 case _ =>
126120 nil
127121 }
128122
129123
130124 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
131125 case s: String =>
132126 fromBase58String(s)
133127 case _: Unit =>
134128 unit
135129 case _ =>
136130 throw("Match error")
137131 }
138132
139133
140134 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
141135 case s: String =>
142136 fromBase58String(s)
143137 case _: Unit =>
144138 unit
145139 case _ =>
146140 throw("Match error")
147141 }
148142
149143
150144 func mustManager (i) = match managerPublicKeyOrUnit() {
151145 case pk: ByteVector =>
152146 if ((i.callerPublicKey == pk))
153147 then true
154148 else throwPD()
155149 case _: Unit =>
156150 if ((i.caller == this))
157151 then true
158152 else throwPD()
159153 case _ =>
160154 throw("Match error")
161155 }
162156
163157
164158 func mustAdmin (i) = {
165159 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
166160 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
167161 then true
168162 else {
169163 let isManager = mustManager(i)
170164 if ((isManager == isManager))
171165 then true
172166 else throw("Strict value is not equal to itself.")
173167 }
174168 }
175169
176170
177171 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
178172
179173
180174 func verifiedToStatus (verified) = if (verified)
181175 then statusVerified
182176 else statusUnverified
183177
184178
185179 func addLabelActions (assetId,label,throwOnError) = {
186180 let labels = getLabels()
187181 let assetLabels = getAssetLabels(assetId)
188182 let checkLabel = if (containsElement(labels, label))
189183 then true
190184 else throw("Label doesn't exist")
191185 if ((checkLabel == checkLabel))
192186 then {
193187 let newAssetLabels = if (containsElement(assetLabels, label))
194188 then if (throwOnError)
195189 then throw("Label has already been added")
196190 else assetLabels
197191 else (assetLabels :+ label)
198192 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
199193 }
200194 else throw("Strict value is not equal to itself.")
201195 }
202196
203197
204198 func deleteLabelActions (assetId,label,throwOnError) = {
205199 let assetLabels = getAssetLabels(assetId)
206200 let newAssetLabels = if (containsElement(assetLabels, label))
207201 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
208202 else if (throwOnError)
209203 then throw("Label wasn't added")
210204 else assetLabels
211205 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
212206 }
213207
214208
215209 func setVerifiedActions (assetId,verified) = {
216210 let labelCommunityVerifiedActions = if (verified)
217211 then addLabelActions(assetId, labelCommunityVerified, false)
218212 else deleteLabelActions(assetId, labelCommunityVerified, false)
219213 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
220214 }
221215
222216
223217 func updateTickerActions (assetId,ticker) = {
224218 let checkTicker = {
225219 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
226220 let tickerIsValid = if ((ticker != ""))
227221 then if ((linkedAssetIdOrUnit == unit))
228222 then true
229223 else (value(linkedAssetIdOrUnit) == assetId)
230224 else false
231225 if (tickerIsValid)
232226 then true
233227 else throw("Invalid ticker")
234228 }
235229 if ((checkTicker == checkTicker))
236230 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
237231 else throw("Strict value is not equal to itself.")
238232 }
239-
240-
241-@Callable(i)
242-func setAssetName (assetID,assetName) = {
243- let checkCaller = mustAdmin(i)
244- if ((checkCaller == checkCaller))
245- then [StringEntry(keyAssetName(assetID), assetName)]
246- else throw("Strict value is not equal to itself.")
247- }
248-
249-
250-
251-@Callable(i)
252-func setAssetDescription (assetID,assetDescription) = {
253- let checkCaller = mustAdmin(i)
254- if ((checkCaller == checkCaller))
255- then [StringEntry(keyAssetDescription(assetID), assetDescription)]
256- else throw("Strict value is not equal to itself.")
257- }
258-
259233
260234
261235 @Callable(i)
262236 func constructor (userPoolsContract,labels) = {
263237 let checkCaller = mustManager(i)
264238 if ((checkCaller == checkCaller))
265239 then {
266240 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
267241 if ((checksAddress == checksAddress))
268242 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
269243 else throw("Strict value is not equal to itself.")
270244 }
271245 else throw("Strict value is not equal to itself.")
272246 }
273247
274248
275249
276250 @Callable(i)
277251 func constructorV2 (factoryContract) = {
278252 let checkCaller = mustManager(i)
279253 if ((checkCaller == checkCaller))
280254 then {
281255 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
282256 if ((checkAddress == checkAddress))
283257 then [StringEntry(keyFactoryContract(), factoryContract)]
284258 else throw("Strict value is not equal to itself.")
285259 }
286260 else throw("Strict value is not equal to itself.")
287261 }
288262
289263
290264
291265 @Callable(i)
292266 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
293267 let checkCaller = mustAdmin(i)
294268 if ((checkCaller == checkCaller))
295269 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
296270 else throw("Strict value is not equal to itself.")
297271 }
298272
299273
300274
301275 @Callable(i)
302276 func increaseAssetPoolsNumber (assetId) = {
303277 let checkCaller = mustAdmin(i)
304278 if ((checkCaller == checkCaller))
305279 then {
306280 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
307281 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
308282 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
309283 }
310284 else throw("Strict value is not equal to itself.")
311285 }
312286
313287
314288
315289 @Callable(i)
316290 func createLabel (label) = {
317291 let labels = getLabels()
318292 let checkCaller = mustAdmin(i)
319293 if ((checkCaller == checkCaller))
320294 then {
321295 let checkLabel = [if (!(contains(label, SEP)))
322296 then true
323297 else throw("Invalid label name"), if (!(containsElement(labels, label)))
324298 then true
325299 else throw("Label exists")]
326300 if ((checkLabel == checkLabel))
327301 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
328302 else throw("Strict value is not equal to itself.")
329303 }
330304 else throw("Strict value is not equal to itself.")
331305 }
332306
333307
334308
335309 @Callable(i)
336310 func dropLabel (label) = {
337311 let labels = getLabels()
338312 let checkCaller = mustManager(i)
339313 if ((checkCaller == checkCaller))
340314 then {
341315 let checkLabel = if (containsElement(labels, label))
342316 then true
343317 else throw("Label doesn't exist")
344318 if ((checkLabel == checkLabel))
345319 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
346320 else throw("Strict value is not equal to itself.")
347321 }
348322 else throw("Strict value is not equal to itself.")
349323 }
350324
351325
352326
353327 @Callable(i)
354328 func addLabel (assetId,label) = {
355329 let checkCaller = mustAdmin(i)
356330 if ((checkCaller == checkCaller))
357331 then addLabelActions(assetId, label, true)
358332 else throw("Strict value is not equal to itself.")
359333 }
360334
361335
362336
363337 @Callable(i)
364338 func deleteLabel (assetId,label) = {
365339 let checkCaller = mustAdmin(i)
366340 if ((checkCaller == checkCaller))
367341 then deleteLabelActions(assetId, label, true)
368342 else throw("Strict value is not equal to itself.")
369343 }
370344
371345
372346
373347 @Callable(i)
374348 func updateTicker (assetId,ticker) = {
375349 let checkCaller = mustAdmin(i)
376350 if ((checkCaller == checkCaller))
377351 then {
378352 let checkAsset = if (isCreated(assetId))
379353 then true
380354 else throwNoAsset()
381355 if ((checkAsset == checkAsset))
382356 then updateTickerActions(assetId, ticker)
383357 else throw("Strict value is not equal to itself.")
384358 }
385359 else throw("Strict value is not equal to itself.")
386360 }
387361
388362
389363
390364 @Callable(i)
391365 func deleteTicker (assetId) = {
392366 let checkCaller = mustAdmin(i)
393367 if ((checkCaller == checkCaller))
394368 then {
395369 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
396370 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
397371 }
398372 else throw("Strict value is not equal to itself.")
399373 }
400374
401375
402376
403377 @Callable(i)
404378 func createOrUpdate (assetId,logo,verified) = {
405379 let checkCaller = mustAdmin(i)
406380 if ((checkCaller == checkCaller))
407381 then {
408382 let isCreatedNow = !(isCreated(assetId))
409383 if ((isCreatedNow == isCreatedNow))
410384 then {
411385 let setLogoActions = if ((logo == ""))
412386 then nil
413387 else [StringEntry(keyLogo(assetId), logo)]
414388 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
415389 }
416390 else throw("Strict value is not equal to itself.")
417391 }
418392 else throw("Strict value is not equal to itself.")
419393 }
420394
421395
422396
423397 @Callable(i)
424398 func setLogo (assetId,logo) = {
425399 let checks = [mustAdmin(i), if (isCreated(assetId))
426400 then true
427401 else throwNoAsset()]
428402 if ((checks == checks))
429403 then {
430404 let action = if ((logo == ""))
431405 then DeleteEntry(keyLogo(assetId))
432406 else StringEntry(keyLogo(assetId), logo)
433407 [action]
434408 }
435409 else throw("Strict value is not equal to itself.")
436410 }
437411
438412
439413
440414 @Callable(i)
441415 func setVerified (assetId,verified) = {
442416 let checks = [mustAdmin(i), if (isCreated(assetId))
443417 then true
444418 else throwNoAsset()]
445419 if ((checks == checks))
446420 then {
447421 let onVerificationLossInv = if (!(verified))
448422 then {
449423 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
450424 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
451425 }
452426 else unit
453427 if ((onVerificationLossInv == onVerificationLossInv))
454428 then $Tuple2(setVerifiedActions(assetId, verified), unit)
455429 else throw("Strict value is not equal to itself.")
456430 }
457431 else throw("Strict value is not equal to itself.")
458432 }
459433
460434
461435
462436 @Callable(i)
463437 func onEliminate (assetId) = {
464438 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
465439 let actions = if ((poolsNumber > 0))
466440 then nil
467441 else [DeleteEntry(keyLogo(assetId))]
468442 $Tuple2(actions, unit)
469443 }
470444
471445
472446
473447 @Callable(i)
474448 func setAdmins (adminPubKeys) = {
475449 let checkCaller = mustManager(i)
476450 if ((checkCaller == checkCaller))
477451 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
478452 else throw("Strict value is not equal to itself.")
479453 }
480454
481455
482456
483457 @Callable(i)
484458 func setManager (pendingManagerPublicKey) = {
485459 let checkCaller = mustManager(i)
486460 if ((checkCaller == checkCaller))
487461 then {
488462 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
489463 if ((checkManagerPublicKey == checkManagerPublicKey))
490464 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
491465 else throw("Strict value is not equal to itself.")
492466 }
493467 else throw("Strict value is not equal to itself.")
494468 }
495469
496470
497471
498472 @Callable(i)
499473 func confirmManager () = {
500474 let pm = pendingManagerPublicKeyOrUnit()
501475 let hasPM = if (isDefined(pm))
502476 then true
503477 else throw("No pending manager")
504478 if ((hasPM == hasPM))
505479 then {
506480 let checkPM = if ((i.callerPublicKey == value(pm)))
507481 then true
508482 else throw("You are not pending manager")
509483 if ((checkPM == checkPM))
510484 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
511485 else throw("Strict value is not equal to itself.")
512486 }
513487 else throw("Strict value is not equal to itself.")
514488 }
515489
516490
517491
518492 @Callable(i)
519493 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
520494
521495
522496 @Verifier(tx)
523497 func verify () = {
524498 let targetPublicKey = match managerPublicKeyOrUnit() {
525499 case pk: ByteVector =>
526500 pk
527501 case _: Unit =>
528502 tx.senderPublicKey
529503 case _ =>
530504 throw("Match error")
531505 }
532506 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
533507 }
534508

github/deemru/w8io/169f3d6 
56.22 ms