tx · AcHrSbHqWkcjxQSuQ43M4E29e2AgU9rkh1dR5Uh7LJig

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01700000 Waves

2023.02.27 15:30 [2468123] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "AcHrSbHqWkcjxQSuQ43M4E29e2AgU9rkh1dR5Uh7LJig", "fee": 1700000, "feeAssetId": null, "timestamp": 1677501089166, "version": 2, "chainId": 84, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "4hbe9hePpmYprUecQrSkAq3KDHdsBhaF4x4arp9g1aFvbjAkgWm1jW6jEdBuZd47xfMxX11LCnM1RG63RrATZces" ], "script": "base64:AAIFAAAAAAAABeYIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZXlBc3NldEl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clB1YmxpY0tleQkBAAAABXZhbHVlAAAAAQUAAAACYVEGCQAAAgAAAAECAAAAG1lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAAAAAAAAgUAAAACYVMFAAAAAmFTCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAFqAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJhUQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABawAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAVkBAAAAEmlzVmVyaWZpZWRSRUFET05MWQAAAAEAAAABcAkABRQAAAACBQAAAANuaWwJAQAAAAFSAAAAAQUAAAABcAAAAAEAAAACYVQBAAAAAmFVAAAAAAQAAAACYVYEAAAAAUwJAQAAAAFWAAAAAAMJAAABAAAAAgUAAAABTAIAAAAKQnl0ZVZlY3RvcgQAAAABWgUAAAABTAUAAAABWgMJAAABAAAAAgUAAAABTAIAAAAEVW5pdAgFAAAAAmFUAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYVQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhVAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFWE1Y/Lw==", "height": 2468123, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 12qZSQ87cpnJVjUiEuQybYfXALQPRqrV38DkGZK5ans4 Next: 28PS2AAawfpaE9goU5kHYXXoCK7zRkpFEo9htXFRo6sw 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)
7076
7177
7278 func getValueOrFail (address,key,type) = {
230236 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
231237 else throw("Strict value is not equal to itself.")
232238 }
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+
233259
234260
235261 @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)
7076
7177
7278 func getValueOrFail (address,key,type) = {
7379 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
7480 valueOrErrorMessage( match type {
7581 case str: String =>
7682 getString(address, key)
7783 case int: Int =>
7884 getInteger(address, key)
7985 case _ =>
8086 throw("invalid entry type")
8187 }, error)
8288 }
8389
8490
8591 func getStrOrFail (address,key) = {
8692 let @ = getValueOrFail(address, key, "")
8793 if ($isInstanceOf(@, "String"))
8894 then @
8995 else throw("Couldn't cast Int|String to String")
9096 }
9197
9298
9399 func getIntOrFail (address,key) = {
94100 let @ = getValueOrFail(address, key, 0)
95101 if ($isInstanceOf(@, "Int"))
96102 then @
97103 else throw("Couldn't cast Int|String to Int")
98104 }
99105
100106
101107 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
102108
103109
104110 func getLabels () = match getString(keyLabels()) {
105111 case s: String =>
106112 if ((size(s) == 0))
107113 then nil
108114 else split(s, SEP)
109115 case _ =>
110116 nil
111117 }
112118
113119
114120 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
115121 case s: String =>
116122 if ((size(s) == 0))
117123 then nil
118124 else split(s, SEP)
119125 case _ =>
120126 nil
121127 }
122128
123129
124130 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
125131 case s: String =>
126132 fromBase58String(s)
127133 case _: Unit =>
128134 unit
129135 case _ =>
130136 throw("Match error")
131137 }
132138
133139
134140 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
135141 case s: String =>
136142 fromBase58String(s)
137143 case _: Unit =>
138144 unit
139145 case _ =>
140146 throw("Match error")
141147 }
142148
143149
144150 func mustManager (i) = match managerPublicKeyOrUnit() {
145151 case pk: ByteVector =>
146152 if ((i.callerPublicKey == pk))
147153 then true
148154 else throwPD()
149155 case _: Unit =>
150156 if ((i.caller == this))
151157 then true
152158 else throwPD()
153159 case _ =>
154160 throw("Match error")
155161 }
156162
157163
158164 func mustAdmin (i) = {
159165 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
160166 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
161167 then true
162168 else {
163169 let isManager = mustManager(i)
164170 if ((isManager == isManager))
165171 then true
166172 else throw("Strict value is not equal to itself.")
167173 }
168174 }
169175
170176
171177 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
172178
173179
174180 func verifiedToStatus (verified) = if (verified)
175181 then statusVerified
176182 else statusUnverified
177183
178184
179185 func addLabelActions (assetId,label,throwOnError) = {
180186 let labels = getLabels()
181187 let assetLabels = getAssetLabels(assetId)
182188 let checkLabel = if (containsElement(labels, label))
183189 then true
184190 else throw("Label doesn't exist")
185191 if ((checkLabel == checkLabel))
186192 then {
187193 let newAssetLabels = if (containsElement(assetLabels, label))
188194 then if (throwOnError)
189195 then throw("Label has already been added")
190196 else assetLabels
191197 else (assetLabels :+ label)
192198 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
193199 }
194200 else throw("Strict value is not equal to itself.")
195201 }
196202
197203
198204 func deleteLabelActions (assetId,label,throwOnError) = {
199205 let assetLabels = getAssetLabels(assetId)
200206 let newAssetLabels = if (containsElement(assetLabels, label))
201207 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
202208 else if (throwOnError)
203209 then throw("Label wasn't added")
204210 else assetLabels
205211 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
206212 }
207213
208214
209215 func setVerifiedActions (assetId,verified) = {
210216 let labelCommunityVerifiedActions = if (verified)
211217 then addLabelActions(assetId, labelCommunityVerified, false)
212218 else deleteLabelActions(assetId, labelCommunityVerified, false)
213219 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
214220 }
215221
216222
217223 func updateTickerActions (assetId,ticker) = {
218224 let checkTicker = {
219225 let linkedAssetIdOrUnit = getString(keyTickerToAssetId(ticker))
220226 let tickerIsValid = if ((ticker != ""))
221227 then if ((linkedAssetIdOrUnit == unit))
222228 then true
223229 else (value(linkedAssetIdOrUnit) == assetId)
224230 else false
225231 if (tickerIsValid)
226232 then true
227233 else throw("Invalid ticker")
228234 }
229235 if ((checkTicker == checkTicker))
230236 then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
231237 else throw("Strict value is not equal to itself.")
232238 }
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+
233259
234260
235261 @Callable(i)
236262 func constructor (userPoolsContract,labels) = {
237263 let checkCaller = mustManager(i)
238264 if ((checkCaller == checkCaller))
239265 then {
240266 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
241267 if ((checksAddress == checksAddress))
242268 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
243269 else throw("Strict value is not equal to itself.")
244270 }
245271 else throw("Strict value is not equal to itself.")
246272 }
247273
248274
249275
250276 @Callable(i)
251277 func constructorV2 (factoryContract) = {
252278 let checkCaller = mustManager(i)
253279 if ((checkCaller == checkCaller))
254280 then {
255281 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
256282 if ((checkAddress == checkAddress))
257283 then [StringEntry(keyFactoryContract(), factoryContract)]
258284 else throw("Strict value is not equal to itself.")
259285 }
260286 else throw("Strict value is not equal to itself.")
261287 }
262288
263289
264290
265291 @Callable(i)
266292 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
267293 let checkCaller = mustAdmin(i)
268294 if ((checkCaller == checkCaller))
269295 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
270296 else throw("Strict value is not equal to itself.")
271297 }
272298
273299
274300
275301 @Callable(i)
276302 func increaseAssetPoolsNumber (assetId) = {
277303 let checkCaller = mustAdmin(i)
278304 if ((checkCaller == checkCaller))
279305 then {
280306 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
281307 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
282308 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
283309 }
284310 else throw("Strict value is not equal to itself.")
285311 }
286312
287313
288314
289315 @Callable(i)
290316 func createLabel (label) = {
291317 let labels = getLabels()
292318 let checkCaller = mustAdmin(i)
293319 if ((checkCaller == checkCaller))
294320 then {
295321 let checkLabel = [if (!(contains(label, SEP)))
296322 then true
297323 else throw("Invalid label name"), if (!(containsElement(labels, label)))
298324 then true
299325 else throw("Label exists")]
300326 if ((checkLabel == checkLabel))
301327 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
302328 else throw("Strict value is not equal to itself.")
303329 }
304330 else throw("Strict value is not equal to itself.")
305331 }
306332
307333
308334
309335 @Callable(i)
310336 func dropLabel (label) = {
311337 let labels = getLabels()
312338 let checkCaller = mustManager(i)
313339 if ((checkCaller == checkCaller))
314340 then {
315341 let checkLabel = if (containsElement(labels, label))
316342 then true
317343 else throw("Label doesn't exist")
318344 if ((checkLabel == checkLabel))
319345 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
320346 else throw("Strict value is not equal to itself.")
321347 }
322348 else throw("Strict value is not equal to itself.")
323349 }
324350
325351
326352
327353 @Callable(i)
328354 func addLabel (assetId,label) = {
329355 let checkCaller = mustAdmin(i)
330356 if ((checkCaller == checkCaller))
331357 then addLabelActions(assetId, label, true)
332358 else throw("Strict value is not equal to itself.")
333359 }
334360
335361
336362
337363 @Callable(i)
338364 func deleteLabel (assetId,label) = {
339365 let checkCaller = mustAdmin(i)
340366 if ((checkCaller == checkCaller))
341367 then deleteLabelActions(assetId, label, true)
342368 else throw("Strict value is not equal to itself.")
343369 }
344370
345371
346372
347373 @Callable(i)
348374 func updateTicker (assetId,ticker) = {
349375 let checkCaller = mustAdmin(i)
350376 if ((checkCaller == checkCaller))
351377 then {
352378 let checkAsset = if (isCreated(assetId))
353379 then true
354380 else throwNoAsset()
355381 if ((checkAsset == checkAsset))
356382 then updateTickerActions(assetId, ticker)
357383 else throw("Strict value is not equal to itself.")
358384 }
359385 else throw("Strict value is not equal to itself.")
360386 }
361387
362388
363389
364390 @Callable(i)
365391 func deleteTicker (assetId) = {
366392 let checkCaller = mustAdmin(i)
367393 if ((checkCaller == checkCaller))
368394 then {
369395 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
370396 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
371397 }
372398 else throw("Strict value is not equal to itself.")
373399 }
374400
375401
376402
377403 @Callable(i)
378404 func createOrUpdate (assetId,logo,verified) = {
379405 let checkCaller = mustAdmin(i)
380406 if ((checkCaller == checkCaller))
381407 then {
382408 let isCreatedNow = !(isCreated(assetId))
383409 if ((isCreatedNow == isCreatedNow))
384410 then {
385411 let setLogoActions = if ((logo == ""))
386412 then nil
387413 else [StringEntry(keyLogo(assetId), logo)]
388414 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
389415 }
390416 else throw("Strict value is not equal to itself.")
391417 }
392418 else throw("Strict value is not equal to itself.")
393419 }
394420
395421
396422
397423 @Callable(i)
398424 func setLogo (assetId,logo) = {
399425 let checks = [mustAdmin(i), if (isCreated(assetId))
400426 then true
401427 else throwNoAsset()]
402428 if ((checks == checks))
403429 then {
404430 let action = if ((logo == ""))
405431 then DeleteEntry(keyLogo(assetId))
406432 else StringEntry(keyLogo(assetId), logo)
407433 [action]
408434 }
409435 else throw("Strict value is not equal to itself.")
410436 }
411437
412438
413439
414440 @Callable(i)
415441 func setVerified (assetId,verified) = {
416442 let checks = [mustAdmin(i), if (isCreated(assetId))
417443 then true
418444 else throwNoAsset()]
419445 if ((checks == checks))
420446 then {
421447 let onVerificationLossInv = if (!(verified))
422448 then {
423449 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
424450 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
425451 }
426452 else unit
427453 if ((onVerificationLossInv == onVerificationLossInv))
428454 then $Tuple2(setVerifiedActions(assetId, verified), unit)
429455 else throw("Strict value is not equal to itself.")
430456 }
431457 else throw("Strict value is not equal to itself.")
432458 }
433459
434460
435461
436462 @Callable(i)
437463 func onEliminate (assetId) = {
438464 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
439465 let actions = if ((poolsNumber > 0))
440466 then nil
441467 else [DeleteEntry(keyLogo(assetId))]
442468 $Tuple2(actions, unit)
443469 }
444470
445471
446472
447473 @Callable(i)
448474 func setAdmins (adminPubKeys) = {
449475 let checkCaller = mustManager(i)
450476 if ((checkCaller == checkCaller))
451477 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
452478 else throw("Strict value is not equal to itself.")
453479 }
454480
455481
456482
457483 @Callable(i)
458484 func setManager (pendingManagerPublicKey) = {
459485 let checkCaller = mustManager(i)
460486 if ((checkCaller == checkCaller))
461487 then {
462488 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
463489 if ((checkManagerPublicKey == checkManagerPublicKey))
464490 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
465491 else throw("Strict value is not equal to itself.")
466492 }
467493 else throw("Strict value is not equal to itself.")
468494 }
469495
470496
471497
472498 @Callable(i)
473499 func confirmManager () = {
474500 let pm = pendingManagerPublicKeyOrUnit()
475501 let hasPM = if (isDefined(pm))
476502 then true
477503 else throw("No pending manager")
478504 if ((hasPM == hasPM))
479505 then {
480506 let checkPM = if ((i.callerPublicKey == value(pm)))
481507 then true
482508 else throw("You are not pending manager")
483509 if ((checkPM == checkPM))
484510 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
485511 else throw("Strict value is not equal to itself.")
486512 }
487513 else throw("Strict value is not equal to itself.")
488514 }
489515
490516
491517
492518 @Callable(i)
493519 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
494520
495521
496522 @Verifier(tx)
497523 func verify () = {
498524 let targetPublicKey = match managerPublicKeyOrUnit() {
499525 case pk: ByteVector =>
500526 pk
501527 case _: Unit =>
502528 tx.senderPublicKey
503529 case _ =>
504530 throw("Match error")
505531 }
506532 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
507533 }
508534

github/deemru/w8io/169f3d6 
50.06 ms