tx · ErYRZHxSgKfhuhsdiMmRRjpNvLHw7xNxHKYyFjM5XHia

3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr:  -0.01700000 Waves

2023.04.06 17:35 [2522831] smart account 3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr > SELF 0.00000000 Waves

{ "type": 13, "id": "ErYRZHxSgKfhuhsdiMmRRjpNvLHw7xNxHKYyFjM5XHia", "fee": 1700000, "feeAssetId": null, "timestamp": 1680791796211, "version": 2, "chainId": 84, "sender": "3N5BB6iE58rujeTEkymeLNcdsYF4f6iKoxr", "senderPublicKey": "EtZZHS4uqNXY5WPneZ8jY2aA95peXwthJVLzAMxMp379", "proofs": [ "2jb7zrwREZq5FQX74Y2GjZ9pJM6oH6oTHYBjwZf6aGt7mBDs96cCDfooLQxX2cTVCXsKiEkAtYMPva3m3sT8dTsu" ], "script": "base64:AAIFAAAAAAAABdEIAhIECgIICBIECgIICBIECgIIGBIDCgEIEgUKAwgICBIDCgEIEgMKAQgSAwoBCBIECgIICBIECgIICBIECgIICBIDCgEIEgUKAwgIBBIECgIICBIECgIIBBIDCgEIEgMKARgSAwoBCBIAEgMKAQgiA1NFUCIFRU1QVFkiDnN0YXR1c1ZlcmlmaWVkIhBzdGF0dXNVbnZlcmlmaWVkIhZsYWJlbENvbW11bml0eVZlcmlmaWVkIgxsYWJlbFBvb2xzTHAiDWRlZmF1bHRMYWJlbHMiB3Rocm93UEQiDHRocm93Tm9Bc3NldCITa2V5TWFuYWdlclB1YmxpY0tleSIaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkiD2tleUFkbWluUHViS2V5cyIUa2V5VXNlclBvb2xzQ29udHJhY3QiEmtleUZhY3RvcnlDb250cmFjdCIKa2V5Q3JlYXRlZCIHYXNzZXRJZCIHa2V5TG9nbyIJa2V5VGlja2VyIglrZXlTdGF0dXMiE2tleUFzc2V0UG9vbHNOdW1iZXIiEmtleVRpY2tlclRvQXNzZXRJZCIGdGlja2VyIhJrZX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JpbmdFbnRyeQAAAAIJAQAAAAFqAAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJhUAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABawAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAVkBAAAAEmlzVmVyaWZpZWRSRUFET05MWQAAAAEAAAABcAkABRQAAAACBQAAAANuaWwJAQAAAAFSAAAAAQUAAAABcAAAAAEAAAACYVMBAAAAAmFUAAAAAAQAAAACYVUEAAAAAUwJAQAAAAFWAAAAAAMJAAABAAAAAgUAAAABTAIAAAAKQnl0ZVZlY3RvcgQAAAABWgUAAAABTAUAAAABWgMJAAABAAAAAgUAAAABTAIAAAAEVW5pdAgFAAAAAmFTAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYVMAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhUwAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFVOVpP1g==", "height": 2522831, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Cp18vEpvtLDpFCCX1jDoaVB319Y23dee28pask1uKhZ8 Next: 881rjhL5QAtMYSxpD9DXoLgQmoSXiDwLw7N2VAMacNZS Diff:
OldNewDifferences
1919
2020
2121 func throwNoAsset () = throw("Asset doesn't exists")
22-
23-
24-func throwInvalidTicker () = throw("Invalid ticker")
2522
2623
2724 func keyManagerPublicKey () = "%s__managerPublicKey"
223220 }
224221
225222
223+func updateTickerActions (assetId,ticker) = {
224+ let checkTicker = {
225+ let tickerIsValid = (ticker != "")
226+ if (tickerIsValid)
227+ then true
228+ else throw("Invalid ticker")
229+ }
230+ if ((checkTicker == checkTicker))
231+ then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
232+ else throw("Strict value is not equal to itself.")
233+ }
234+
235+
226236 @Callable(i)
227237 func setAssetName (assetID,assetName) = {
228238 let checkCaller = mustAdmin(i)
364374 then true
365375 else throwNoAsset()
366376 if ((checkAsset == checkAsset))
367- then {
368- let checkTicker = if ((ticker != ""))
369- then true
370- else throwInvalidTicker()
371- if ((checkTicker == checkTicker))
372- then {
373- let deleteActions = ( match getString(keyTickerToAssetId(ticker)) {
374- case assetIdOld: String =>
375-[DeleteEntry(keyAssetIdToTicker(assetIdOld))]
376- case _: Unit =>
377- nil
378- case _ =>
379- throw("Match error")
380- } ++ match getString(keyAssetIdToTicker(assetId)) {
381- case tickerOld: String =>
382-[DeleteEntry(keyTickerToAssetId(tickerOld))]
383- case _: Unit =>
384- nil
385- case _ =>
386- throw("Match error")
387- })
388- let updateActions = [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
389- (deleteActions ++ updateActions)
390- }
391- else throw("Strict value is not equal to itself.")
392- }
377+ then updateTickerActions(assetId, ticker)
393378 else throw("Strict value is not equal to itself.")
394379 }
395380 else throw("Strict value is not equal to itself.")
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")
22-
23-
24-func throwInvalidTicker () = throw("Invalid ticker")
2522
2623
2724 func keyManagerPublicKey () = "%s__managerPublicKey"
2825
2926
3027 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
3128
3229
3330 func keyAdminPubKeys () = "%s__adminPubKeys"
3431
3532
3633 func keyUserPoolsContract () = "%s__userPoolsContract"
3734
3835
3936 func keyFactoryContract () = "%s__factoryContract"
4037
4138
4239 func keyCreated (assetId) = (("created_<" + assetId) + ">")
4340
4441
4542 func keyLogo (assetId) = (("logo_<" + assetId) + ">")
4643
4744
4845 func keyTicker (assetId) = (("ticker_<" + assetId) + ">")
4946
5047
5148 func keyStatus (assetId) = (("status_<" + assetId) + ">")
5249
5350
5451 func keyAssetPoolsNumber (assetId) = makeString(["%s%s", "pools", assetId], SEP)
5552
5653
5754 func keyTickerToAssetId (ticker) = makeString(["%s%s", "ticker2assetId", ticker], SEP)
5855
5956
6057 func keyAssetIdToTicker (assetId) = makeString(["%s%s", "assetId2ticker", assetId], SEP)
6158
6259
6360 func keyAmountAndPriceAssetsToLpAsset (amountAsset,priceAsset) = makeString(["%s%s%s", "amountAndPriceAssetsToLpAsset", amountAsset, priceAsset], SEP)
6461
6562
6663 func keyLpAssetToAmountAndPriceAssets (lpAsset) = makeString(["%s%s", "lpAssetToAmountAndPriceAssets", lpAsset], SEP)
6764
6865
6966 func keyAssetLabels (assetId) = makeString(["%s%s", "labels", assetId], SEP)
7067
7168
7269 func keyLabels () = makeString(["%s", "labels"], SEP)
7370
7471
7572 func keyAssetName (assetId) = makeString(["%s%s", "assetName", assetId], SEP)
7673
7774
7875 func keyAssetDescription (assetId) = makeString(["%s%s", "assetDescription", assetId], SEP)
7976
8077
8178 func getValueOrFail (address,key,type) = {
8279 let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")
8380 valueOrErrorMessage( match type {
8481 case str: String =>
8582 getString(address, key)
8683 case int: Int =>
8784 getInteger(address, key)
8885 case _ =>
8986 throw("invalid entry type")
9087 }, error)
9188 }
9289
9390
9491 func getStrOrFail (address,key) = {
9592 let @ = getValueOrFail(address, key, "")
9693 if ($isInstanceOf(@, "String"))
9794 then @
9895 else throw("Couldn't cast Int|String to String")
9996 }
10097
10198
10299 func getIntOrFail (address,key) = {
103100 let @ = getValueOrFail(address, key, 0)
104101 if ($isInstanceOf(@, "Int"))
105102 then @
106103 else throw("Couldn't cast Int|String to Int")
107104 }
108105
109106
110107 func isVerified (assetId) = (valueOrElse(getInteger(keyStatus(assetId)), statusUnverified) == statusVerified)
111108
112109
113110 func getLabels () = match getString(keyLabels()) {
114111 case s: String =>
115112 if ((size(s) == 0))
116113 then nil
117114 else split(s, SEP)
118115 case _ =>
119116 nil
120117 }
121118
122119
123120 func getAssetLabels (assetId) = match getString(keyAssetLabels(assetId)) {
124121 case s: String =>
125122 if ((size(s) == 0))
126123 then nil
127124 else split(s, SEP)
128125 case _ =>
129126 nil
130127 }
131128
132129
133130 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
134131 case s: String =>
135132 fromBase58String(s)
136133 case _: Unit =>
137134 unit
138135 case _ =>
139136 throw("Match error")
140137 }
141138
142139
143140 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
144141 case s: String =>
145142 fromBase58String(s)
146143 case _: Unit =>
147144 unit
148145 case _ =>
149146 throw("Match error")
150147 }
151148
152149
153150 func mustManager (i) = match managerPublicKeyOrUnit() {
154151 case pk: ByteVector =>
155152 if ((i.callerPublicKey == pk))
156153 then true
157154 else throwPD()
158155 case _: Unit =>
159156 if ((i.caller == this))
160157 then true
161158 else throwPD()
162159 case _ =>
163160 throw("Match error")
164161 }
165162
166163
167164 func mustAdmin (i) = {
168165 let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP)
169166 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
170167 then true
171168 else {
172169 let isManager = mustManager(i)
173170 if ((isManager == isManager))
174171 then true
175172 else throw("Strict value is not equal to itself.")
176173 }
177174 }
178175
179176
180177 func isCreated (assetId) = valueOrElse(getBoolean(keyCreated(assetId)), false)
181178
182179
183180 func verifiedToStatus (verified) = if (verified)
184181 then statusVerified
185182 else statusUnverified
186183
187184
188185 func addLabelActions (assetId,label,throwOnError) = {
189186 let labels = getLabels()
190187 let assetLabels = getAssetLabels(assetId)
191188 let checkLabel = if (containsElement(labels, label))
192189 then true
193190 else throw("Label doesn't exist")
194191 if ((checkLabel == checkLabel))
195192 then {
196193 let newAssetLabels = if (containsElement(assetLabels, label))
197194 then if (throwOnError)
198195 then throw("Label has already been added")
199196 else assetLabels
200197 else (assetLabels :+ label)
201198 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
202199 }
203200 else throw("Strict value is not equal to itself.")
204201 }
205202
206203
207204 func deleteLabelActions (assetId,label,throwOnError) = {
208205 let assetLabels = getAssetLabels(assetId)
209206 let newAssetLabels = if (containsElement(assetLabels, label))
210207 then removeByIndex(assetLabels, value(indexOf(assetLabels, label)))
211208 else if (throwOnError)
212209 then throw("Label wasn't added")
213210 else assetLabels
214211 [StringEntry(keyAssetLabels(assetId), makeString(newAssetLabels, SEP))]
215212 }
216213
217214
218215 func setVerifiedActions (assetId,verified) = {
219216 let labelCommunityVerifiedActions = if (verified)
220217 then addLabelActions(assetId, labelCommunityVerified, false)
221218 else deleteLabelActions(assetId, labelCommunityVerified, false)
222219 ([IntegerEntry(keyStatus(assetId), verifiedToStatus(verified))] ++ labelCommunityVerifiedActions)
223220 }
224221
225222
223+func updateTickerActions (assetId,ticker) = {
224+ let checkTicker = {
225+ let tickerIsValid = (ticker != "")
226+ if (tickerIsValid)
227+ then true
228+ else throw("Invalid ticker")
229+ }
230+ if ((checkTicker == checkTicker))
231+ then [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
232+ else throw("Strict value is not equal to itself.")
233+ }
234+
235+
226236 @Callable(i)
227237 func setAssetName (assetID,assetName) = {
228238 let checkCaller = mustAdmin(i)
229239 if ((checkCaller == checkCaller))
230240 then [StringEntry(keyAssetName(assetID), assetName)]
231241 else throw("Strict value is not equal to itself.")
232242 }
233243
234244
235245
236246 @Callable(i)
237247 func setAssetDescription (assetID,assetDescription) = {
238248 let checkCaller = mustAdmin(i)
239249 if ((checkCaller == checkCaller))
240250 then [StringEntry(keyAssetDescription(assetID), assetDescription)]
241251 else throw("Strict value is not equal to itself.")
242252 }
243253
244254
245255
246256 @Callable(i)
247257 func constructor (userPoolsContract,labels) = {
248258 let checkCaller = mustManager(i)
249259 if ((checkCaller == checkCaller))
250260 then {
251261 let checksAddress = valueOrErrorMessage(addressFromString(userPoolsContract), "Invalid address")
252262 if ((checksAddress == checksAddress))
253263 then [StringEntry(keyUserPoolsContract(), userPoolsContract), StringEntry(keyLabels(), makeString((defaultLabels ++ labels), SEP))]
254264 else throw("Strict value is not equal to itself.")
255265 }
256266 else throw("Strict value is not equal to itself.")
257267 }
258268
259269
260270
261271 @Callable(i)
262272 func constructorV2 (factoryContract) = {
263273 let checkCaller = mustManager(i)
264274 if ((checkCaller == checkCaller))
265275 then {
266276 let checkAddress = valueOrErrorMessage(addressFromString(factoryContract), "invalid factory contract address")
267277 if ((checkAddress == checkAddress))
268278 then [StringEntry(keyFactoryContract(), factoryContract)]
269279 else throw("Strict value is not equal to itself.")
270280 }
271281 else throw("Strict value is not equal to itself.")
272282 }
273283
274284
275285
276286 @Callable(i)
277287 func addAssetsLink (amountAsset,priceAsset,lpAsset) = {
278288 let checkCaller = mustAdmin(i)
279289 if ((checkCaller == checkCaller))
280290 then [StringEntry(keyAmountAndPriceAssetsToLpAsset(amountAsset, priceAsset), lpAsset), StringEntry(keyLpAssetToAmountAndPriceAssets(lpAsset), makeString([amountAsset, priceAsset], SEP))]
281291 else throw("Strict value is not equal to itself.")
282292 }
283293
284294
285295
286296 @Callable(i)
287297 func increaseAssetPoolsNumber (assetId) = {
288298 let checkCaller = mustAdmin(i)
289299 if ((checkCaller == checkCaller))
290300 then {
291301 let assetPoolsNumberKey = keyAssetPoolsNumber(assetId)
292302 let assetPoolsNumber = valueOrElse(getInteger(assetPoolsNumberKey), 0)
293303 [IntegerEntry(assetPoolsNumberKey, (assetPoolsNumber + 1))]
294304 }
295305 else throw("Strict value is not equal to itself.")
296306 }
297307
298308
299309
300310 @Callable(i)
301311 func createLabel (label) = {
302312 let labels = getLabels()
303313 let checkCaller = mustAdmin(i)
304314 if ((checkCaller == checkCaller))
305315 then {
306316 let checkLabel = [if (!(contains(label, SEP)))
307317 then true
308318 else throw("Invalid label name"), if (!(containsElement(labels, label)))
309319 then true
310320 else throw("Label exists")]
311321 if ((checkLabel == checkLabel))
312322 then [StringEntry(keyLabels(), makeString((labels :+ label), SEP))]
313323 else throw("Strict value is not equal to itself.")
314324 }
315325 else throw("Strict value is not equal to itself.")
316326 }
317327
318328
319329
320330 @Callable(i)
321331 func dropLabel (label) = {
322332 let labels = getLabels()
323333 let checkCaller = mustManager(i)
324334 if ((checkCaller == checkCaller))
325335 then {
326336 let checkLabel = if (containsElement(labels, label))
327337 then true
328338 else throw("Label doesn't exist")
329339 if ((checkLabel == checkLabel))
330340 then [StringEntry(keyLabels(), makeString(removeByIndex(labels, value(indexOf(labels, label))), SEP))]
331341 else throw("Strict value is not equal to itself.")
332342 }
333343 else throw("Strict value is not equal to itself.")
334344 }
335345
336346
337347
338348 @Callable(i)
339349 func addLabel (assetId,label) = {
340350 let checkCaller = mustAdmin(i)
341351 if ((checkCaller == checkCaller))
342352 then addLabelActions(assetId, label, true)
343353 else throw("Strict value is not equal to itself.")
344354 }
345355
346356
347357
348358 @Callable(i)
349359 func deleteLabel (assetId,label) = {
350360 let checkCaller = mustAdmin(i)
351361 if ((checkCaller == checkCaller))
352362 then deleteLabelActions(assetId, label, true)
353363 else throw("Strict value is not equal to itself.")
354364 }
355365
356366
357367
358368 @Callable(i)
359369 func updateTicker (assetId,ticker) = {
360370 let checkCaller = mustAdmin(i)
361371 if ((checkCaller == checkCaller))
362372 then {
363373 let checkAsset = if (isCreated(assetId))
364374 then true
365375 else throwNoAsset()
366376 if ((checkAsset == checkAsset))
367- then {
368- let checkTicker = if ((ticker != ""))
369- then true
370- else throwInvalidTicker()
371- if ((checkTicker == checkTicker))
372- then {
373- let deleteActions = ( match getString(keyTickerToAssetId(ticker)) {
374- case assetIdOld: String =>
375-[DeleteEntry(keyAssetIdToTicker(assetIdOld))]
376- case _: Unit =>
377- nil
378- case _ =>
379- throw("Match error")
380- } ++ match getString(keyAssetIdToTicker(assetId)) {
381- case tickerOld: String =>
382-[DeleteEntry(keyTickerToAssetId(tickerOld))]
383- case _: Unit =>
384- nil
385- case _ =>
386- throw("Match error")
387- })
388- let updateActions = [StringEntry(keyAssetIdToTicker(assetId), ticker), StringEntry(keyTickerToAssetId(ticker), assetId)]
389- (deleteActions ++ updateActions)
390- }
391- else throw("Strict value is not equal to itself.")
392- }
377+ then updateTickerActions(assetId, ticker)
393378 else throw("Strict value is not equal to itself.")
394379 }
395380 else throw("Strict value is not equal to itself.")
396381 }
397382
398383
399384
400385 @Callable(i)
401386 func deleteTicker (assetId) = {
402387 let checkCaller = mustAdmin(i)
403388 if ((checkCaller == checkCaller))
404389 then {
405390 let ticker = valueOrErrorMessage(getString(keyAssetIdToTicker(assetId)), "Invalid asset")
406391 [DeleteEntry(keyAssetIdToTicker(assetId)), DeleteEntry(keyTickerToAssetId(ticker))]
407392 }
408393 else throw("Strict value is not equal to itself.")
409394 }
410395
411396
412397
413398 @Callable(i)
414399 func createOrUpdate (assetId,logo,verified) = {
415400 let checkCaller = mustAdmin(i)
416401 if ((checkCaller == checkCaller))
417402 then {
418403 let isCreatedNow = !(isCreated(assetId))
419404 if ((isCreatedNow == isCreatedNow))
420405 then {
421406 let setLogoActions = if ((logo == ""))
422407 then nil
423408 else [StringEntry(keyLogo(assetId), logo)]
424409 $Tuple2((([BooleanEntry(keyCreated(assetId), true)] ++ setLogoActions) ++ setVerifiedActions(assetId, verified)), isCreatedNow)
425410 }
426411 else throw("Strict value is not equal to itself.")
427412 }
428413 else throw("Strict value is not equal to itself.")
429414 }
430415
431416
432417
433418 @Callable(i)
434419 func setLogo (assetId,logo) = {
435420 let checks = [mustAdmin(i), if (isCreated(assetId))
436421 then true
437422 else throwNoAsset()]
438423 if ((checks == checks))
439424 then {
440425 let action = if ((logo == ""))
441426 then DeleteEntry(keyLogo(assetId))
442427 else StringEntry(keyLogo(assetId), logo)
443428 [action]
444429 }
445430 else throw("Strict value is not equal to itself.")
446431 }
447432
448433
449434
450435 @Callable(i)
451436 func setVerified (assetId,verified) = {
452437 let checks = [mustAdmin(i), if (isCreated(assetId))
453438 then true
454439 else throwNoAsset()]
455440 if ((checks == checks))
456441 then {
457442 let onVerificationLossInv = if (!(verified))
458443 then {
459444 let factoryContract = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyFactoryContract())), "invalid factory contract address")
460445 invoke(factoryContract, "onVerificationLoss", [assetId], nil)
461446 }
462447 else unit
463448 if ((onVerificationLossInv == onVerificationLossInv))
464449 then $Tuple2(setVerifiedActions(assetId, verified), unit)
465450 else throw("Strict value is not equal to itself.")
466451 }
467452 else throw("Strict value is not equal to itself.")
468453 }
469454
470455
471456
472457 @Callable(i)
473458 func onEliminate (assetId) = {
474459 let poolsNumber = valueOrElse(getInteger(keyAssetPoolsNumber(assetId)), 0)
475460 let actions = if ((poolsNumber > 0))
476461 then nil
477462 else [DeleteEntry(keyLogo(assetId))]
478463 $Tuple2(actions, unit)
479464 }
480465
481466
482467
483468 @Callable(i)
484469 func setAdmins (adminPubKeys) = {
485470 let checkCaller = mustManager(i)
486471 if ((checkCaller == checkCaller))
487472 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
488473 else throw("Strict value is not equal to itself.")
489474 }
490475
491476
492477
493478 @Callable(i)
494479 func setManager (pendingManagerPublicKey) = {
495480 let checkCaller = mustManager(i)
496481 if ((checkCaller == checkCaller))
497482 then {
498483 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
499484 if ((checkManagerPublicKey == checkManagerPublicKey))
500485 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
501486 else throw("Strict value is not equal to itself.")
502487 }
503488 else throw("Strict value is not equal to itself.")
504489 }
505490
506491
507492
508493 @Callable(i)
509494 func confirmManager () = {
510495 let pm = pendingManagerPublicKeyOrUnit()
511496 let hasPM = if (isDefined(pm))
512497 then true
513498 else throw("No pending manager")
514499 if ((hasPM == hasPM))
515500 then {
516501 let checkPM = if ((i.callerPublicKey == value(pm)))
517502 then true
518503 else throw("You are not pending manager")
519504 if ((checkPM == checkPM))
520505 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
521506 else throw("Strict value is not equal to itself.")
522507 }
523508 else throw("Strict value is not equal to itself.")
524509 }
525510
526511
527512
528513 @Callable(i)
529514 func isVerifiedREADONLY (assetId) = $Tuple2(nil, isVerified(assetId))
530515
531516
532517 @Verifier(tx)
533518 func verify () = {
534519 let targetPublicKey = match managerPublicKeyOrUnit() {
535520 case pk: ByteVector =>
536521 pk
537522 case _: Unit =>
538523 tx.senderPublicKey
539524 case _ =>
540525 throw("Match error")
541526 }
542527 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
543528 }
544529

github/deemru/w8io/026f985 
50.98 ms