tx · 8PNFMSFik4u3es5veAJi7nZdGpmqVvDmWR7C4TaGgmga

3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T:  -0.01900000 Waves

2022.10.20 11:14 [2280469] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves

{ "type": 13, "id": "8PNFMSFik4u3es5veAJi7nZdGpmqVvDmWR7C4TaGgmga", "fee": 1900000, "feeAssetId": null, "timestamp": 1666253781106, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "3h3Zdr88oRJnsHa7QLjRRPPiuKeG4T1KhA2WqYK85i5kZi28rpayFE9Y5cJDPesze24Qgpn694uSbqYAHbWPP9W" ], "script": "base64:AAIFAAAAAAAABkUIAhINCgsICAgICAgBCAEIARIDCgEBEgQKAggIEgUKAwgIBBIECgIICBIDCgEBEgMKAQESBAoCCAgSAwoBCBIAIglzZXBhcmF0b3IiDGtleUZlZUFtb3VudCIOa2V5VXNkbkFzc2V0SWQiDmtleUVwb2NoTGVuZ3RoIhFrZXlGaW5hbGl6ZVJld2FyZCIMa2V5V3hBc3NldElkIhZrZXlBc3NldHNTdG9yZUNvbnRyYWN0IhNrZXlVc2VyUG9vbENvbnRyYWN0IhNrZXlFbWlzc2lvbkNvbnRyYWN0IhNrZXlCb29zdGluZ0NvbnRyYWN0IhJrZXlGYWN0b3J5Q29udHJhY3QiGWtleVZvdGluZ0VtaXNzaW9uQ29udHJhY3QiDGtleVRocmVzaG9sZCIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiDGdldEludE9yRmFpbCIQa2V5SW5MaXN0QXNzZXRJZCINYW1vdW50QXNzZXRJZCIMcHJpY2VBc3NldElkIg9rZXlTdWdnZXN0SW5kZXgiDmtleVN0YXJ0SGVpZ2h0IgxzdWdnZXN0SW5kZXgiD2tleVZvdGluZ1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AAAAEAAAACYmEBAAAAAmJiAAAAAAQAAAACYmMEAAAAAVIJAQAAAAFRAAAAAAMJAAABAAAAAgUAAAABUgIAAAAKQnl0ZVZlY3RvcgQAAAABVwUAAAABUgUAAAABVwMJAAABAAAAAgUAAAABUgIAAAAEVW5pdAgFAAAAAmJhAAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACYmEAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJiYQAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmJjEOTm9g==", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8MKav2rn1NUcv3tZgZwrCg8bSPQ92ATYwMXDyyvTPTqM Next: 4wCuD9oHXA3f2BHoJSx8EK5dbCMhbi36Am9de4WuvX75 Diff:
OldNewDifferences
175175 let pool = $Tuple2(amountAssetId, priceAssetId)
176176 let payment = value(i.payments[0])
177177 let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID")
178- let checks = [if (if (isManager(i))
179- then true
180- else (info.issuer == i.caller))
181- then true
182- else throw("asset can only be suggested by its issuer"), if ((info.scripted == false))
178+ let checks = [if ((info.scripted == false))
183179 then true
184180 else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
185181 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let keyFeeAmount = makeString(["%s", "fee"], separator)
77
88 let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator)
99
1010 let keyEpochLength = makeString(["%s", "epochLength"], separator)
1111
1212 let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator)
1313
1414 let keyWxAssetId = makeString(["%s", "wxAssetId"], separator)
1515
1616 let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator)
1717
1818 let keyUserPoolContract = makeString(["%s", "userPoolContract"], separator)
1919
2020 let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
2121
2222 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
2323
2424 let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
2525
2626 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], separator)
2727
2828 let keyThreshold = makeString(["%s", "votingThreshold"], separator)
2929
3030 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
3131
3232
3333 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined"))
3434
3535
3636 func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
3737
3838
3939 func keySuggestIndex (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suggestIndex", amountAssetId, priceAssetId], separator)
4040
4141
4242 func keyStartHeight (amountAssetId,priceAssetId,suggestIndex) = makeString(["%s%s%s%d", "startHeight", amountAssetId, priceAssetId, toString(suggestIndex)], separator)
4343
4444
4545 func keyVotingResult (amountAssetId,priceAssetId,suggestIndex) = makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(suggestIndex)], separator)
4646
4747
4848 func totalVotes (totalYes,totalNo) = makeString(["%d%d", totalYes, totalNo], separator)
4949
5050
5151 func keyVote (amountAssetId,priceAssetId,suggestIndex,voterAddress) = makeString(["%s%s%s%d%s", "vote", amountAssetId, priceAssetId, toString(suggestIndex), voterAddress], separator)
5252
5353
5454 func keyVoteValue (gwxAmount,vote) = {
5555 let key = if (vote)
5656 then makeString(["%d%s", gwxAmount, "yes"], separator)
5757 else makeString(["%d%s", gwxAmount, "no"], separator)
5858 key
5959 }
6060
6161
6262 func keyInList (pool) = {
6363 let $t024632503 = pool
6464 let amountAssetId = $t024632503._1
6565 let priceAssetId = $t024632503._2
6666 makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
6767 }
6868
6969
7070 func keyManagerPublicKey () = "%s__managerPublicKey"
7171
7272
7373 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
7474
7575
7676 let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract))
7777
7878 let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
7979
8080 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
8181
8282 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract))
8383
8484 let userPoolContract = addressFromStringValue(getStringOrFail(keyUserPoolContract))
8585
8686 let votingEmissionContract = addressFromStringValue(getStringOrFail(keyVotingEmissionContract))
8787
8888 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
8989 case s: String =>
9090 fromBase58String(s)
9191 case _: Unit =>
9292 unit
9393 case _ =>
9494 throw("Match error")
9595 }
9696
9797
9898 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
9999 case s: String =>
100100 fromBase58String(s)
101101 case _: Unit =>
102102 unit
103103 case _ =>
104104 throw("Match error")
105105 }
106106
107107
108108 func isManager (i) = match managerPublicKeyOrUnit() {
109109 case pk: ByteVector =>
110110 (i.callerPublicKey == pk)
111111 case _: Unit =>
112112 (i.caller == this)
113113 case _ =>
114114 throw("Match error")
115115 }
116116
117117
118118 func mustManager (i) = if (isManager(i))
119119 then true
120120 else throw("permission denied")
121121
122122
123123 func asInt (val) = match val {
124124 case valInt: Int =>
125125 valInt
126126 case _ =>
127127 throw("failed to cast into Integer")
128128 }
129129
130130
131131 @Callable(i)
132132 func constructor (assetsStoreContractPrm,boostingContractPrm,emissionContractPrm,factoryContractPrm,userPoolContractPrm,votingEmissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingDurationPrm,usdnAssetIdPrm,finalizeRewardPrm) = {
133133 let checks = [mustManager(i), if (isDefined(addressFromString(assetsStoreContractPrm)))
134134 then true
135135 else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm)))
136136 then true
137137 else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm)))
138138 then true
139139 else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm)))
140140 then true
141141 else throw("Invalid emission contract address"), if (isDefined(addressFromString(factoryContractPrm)))
142142 then true
143143 else throw("Invalid factory contract address"), if ((feeAmountPrm >= 0))
144144 then true
145145 else throw("Invalid fee amount"), if ((votingDurationPrm > 0))
146146 then true
147147 else throw("Invalid voting duration"), if ((finalizeRewardPrm >= 0))
148148 then true
149149 else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm))))
150150 then true
151151 else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm))))
152152 then true
153153 else throw("Invalid USDN asset ID")]
154154 if ((checks == checks))
155155 then $Tuple2([StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), StringEntry(keyFactoryContract, factoryContractPrm), StringEntry(keyUserPoolContract, userPoolContractPrm), StringEntry(keyVotingEmissionContract, votingEmissionContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyFinalizeReward, finalizeRewardPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), StringEntry(keyUsdnAssetId, usdnAssetIdPrm)], unit)
156156 else throw("Strict value is not equal to itself.")
157157 }
158158
159159
160160
161161 @Callable(i)
162162 func constructorV2 (threshold) = {
163163 let checks = [mustManager(i), if ((threshold > 0))
164164 then true
165165 else throw("invalid threshold")]
166166 if ((checks == checks))
167167 then $Tuple2([IntegerEntry(keyThreshold, threshold)], unit)
168168 else throw("Strict value is not equal to itself.")
169169 }
170170
171171
172172
173173 @Callable(i)
174174 func suggest (amountAssetId,priceAssetId) = {
175175 let pool = $Tuple2(amountAssetId, priceAssetId)
176176 let payment = value(i.payments[0])
177177 let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID")
178- let checks = [if (if (isManager(i))
179- then true
180- else (info.issuer == i.caller))
181- then true
182- else throw("asset can only be suggested by its issuer"), if ((info.scripted == false))
178+ let checks = [if ((info.scripted == false))
183179 then true
184180 else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
185181 then true
186182 else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
187183 then true
188184 else throw("invalid fee amount"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
189185 then true
190186 else throw("already in voting list"), if (!(valueOrElse(getBoolean(votingEmissionContract, keyInList(pool)), false)))
191187 then true
192188 else throw("pool is in emission voting list")]
193189 if ((checks == checks))
194190 then {
195191 let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) {
196192 case s: String =>
197193 if ((s == "active"))
198194 then true
199195 else throw("user pool is not active")
200196 case _ =>
201197 throw("user pool is not active")
202198 }
203199 if ((ensureActive == ensureActive))
204200 then {
205201 let ensureAmountAssetVerified = if (isManager(i))
206202 then unit
207203 else {
208204 let inv = match invoke(assetsStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) {
209205 case b: Boolean =>
210206 if (b)
211207 then true
212208 else throw("asset is not verified")
213209 case _ =>
214210 throw("asset is not verified")
215211 }
216212 if ((inv == inv))
217213 then unit
218214 else throw("Strict value is not equal to itself.")
219215 }
220216 if ((ensureAmountAssetVerified == ensureAmountAssetVerified))
221217 then {
222218 let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)])
223219 if ((burnFeeInv == burnFeeInv))
224220 then {
225221 let newSuggestIndex = match getInteger(keySuggestIndex(amountAssetId, priceAssetId)) {
226222 case int: Int =>
227223 (int + 1)
228224 case _ =>
229225 0
230226 }
231227 $Tuple2([IntegerEntry(keyInListAssetId(amountAssetId, priceAssetId), newSuggestIndex), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId, newSuggestIndex), height), StringEntry(keyVotingResult(amountAssetId, priceAssetId, newSuggestIndex), totalVotes("0", "0")), IntegerEntry(keySuggestIndex(amountAssetId, priceAssetId), newSuggestIndex)], unit)
232228 }
233229 else throw("Strict value is not equal to itself.")
234230 }
235231 else throw("Strict value is not equal to itself.")
236232 }
237233 else throw("Strict value is not equal to itself.")
238234 }
239235 else throw("Strict value is not equal to itself.")
240236 }
241237
242238
243239
244240 @Callable(i)
245241 func vote (amountAssetId,priceAssetId,inFavor) = {
246242 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
247243 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength)))
248244 let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId))))
249245 then true
250246 else throw("the token isn't on the voting list"), if ((votingFinishHeight > height))
251247 then true
252248 else throw("too late to vote")]
253249 if ((checks == checks))
254250 then {
255251 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
256252 let notZero = if ((asInt(gwxAmount) > 0))
257253 then true
258254 else throw("you don't have gwx")
259255 if ((notZero == notZero))
260256 then {
261257 let vote = match getString(keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller))) {
262258 case s: String =>
263259 let vote = split(s, separator)
264260 let voteValue = vote[1]
265261 let voteType = vote[2]
266262 let isVoteTypeSimilar = if (if ((voteType == "yes"))
267263 then (inFavor == true)
268264 else false)
269265 then true
270266 else if ((voteType == "no"))
271267 then (inFavor == false)
272268 else false
273269 let isVoteValueSimilar = if (isVoteTypeSimilar)
274270 then (asInt(gwxAmount) == parseIntValue(voteValue))
275271 else false
276272 let isNewVoteSimilar = if (if (isVoteTypeSimilar)
277273 then isVoteValueSimilar
278274 else false)
279275 then throw("you already voted")
280276 else invoke(this, "cancelVote", [amountAssetId, priceAssetId], nil)
281277 isNewVoteSimilar
282278 case u: Unit =>
283279 u
284280 case _ =>
285281 throw("Match error")
286282 }
287283 if ((vote == vote))
288284 then {
289285 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
290286 let positiveVotes = votingResult[1]
291287 let negativeVotes = votingResult[2]
292288 let newPositiveAndNegativeVotes = if (inFavor)
293289 then {
294290 let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount))
295291 [toString(newPositiveVotes), negativeVotes]
296292 }
297293 else {
298294 let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount))
299295 [positiveVotes, toString(newNegativeVotes)]
300296 }
301297 let voteKey = keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller))
302298 let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
303299 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1])), StringEntry(voteKey, voteValue)], unit)
304300 }
305301 else throw("Strict value is not equal to itself.")
306302 }
307303 else throw("Strict value is not equal to itself.")
308304 }
309305 else throw("Strict value is not equal to itself.")
310306 }
311307
312308
313309
314310 @Callable(i)
315311 func cancelVote (amountAssetId,priceAssetId) = {
316312 let userAddress = if ((i.caller == this))
317313 then toString(i.originCaller)
318314 else toString(i.caller)
319315 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
320316 let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))))
321317 then true
322318 else throw("no vote for assets pair")]
323319 if ((checks == checks))
324320 then {
325321 let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))), separator)
326322 let voteValue = vote[1]
327323 let voteType = vote[2]
328324 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
329325 let positiveVotes = votingResult[1]
330326 let negativeVotes = votingResult[2]
331327 let actions = if ((voteType == "yes"))
332328 then {
333329 let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue))
334330 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(toString(newPositiveVotes), negativeVotes)), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit)
335331 }
336332 else {
337333 let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue))
338334 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(positiveVotes, toString(newNegativeVotes))), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit)
339335 }
340336 actions
341337 }
342338 else throw("Strict value is not equal to itself.")
343339 }
344340
345341
346342
347343 @Callable(i)
348344 func setFee (newFee) = {
349345 let checks = [mustManager(i)]
350346 if ((checks == checks))
351347 then [IntegerEntry(keyFeeAmount, newFee)]
352348 else throw("Strict value is not equal to itself.")
353349 }
354350
355351
356352
357353 @Callable(i)
358354 func setThreshold (newThreshold) = {
359355 let checks = [mustManager(i), if ((newThreshold > 0))
360356 then true
361357 else throw("invalid threshold")]
362358 if ((checks == checks))
363359 then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit)
364360 else throw("Strict value is not equal to itself.")
365361 }
366362
367363
368364
369365 @Callable(i)
370366 func finalize (amountAssetId,priceAssetId) = {
371367 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
372368 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength)))
373369 let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId))))
374370 then true
375371 else throw("no assets pair"), if ((height >= votingFinishHeight))
376372 then true
377373 else throw("insufficient height for completion")]
378374 if ((checks == checks))
379375 then {
380376 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
381377 let positiveVotes = parseIntValue(votingResult[1])
382378 let negativeVotes = parseIntValue(votingResult[2])
383379 let allVotes = (positiveVotes + negativeVotes)
384380 let threshold = getIntOrFail(keyThreshold)
385381 let actions = if (if ((allVotes >= threshold))
386382 then (positiveVotes > negativeVotes)
387383 else false)
388384 then {
389385 let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
390386 if ((res == res))
391387 then {
392388 let votingEmissionInv = invoke(votingEmissionContract, "create", [amountAssetId, priceAssetId], nil)
393389 if ((votingEmissionInv == votingEmissionInv))
394390 then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
395391 else throw("Strict value is not equal to itself.")
396392 }
397393 else throw("Strict value is not equal to itself.")
398394 }
399395 else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
400396 actions
401397 }
402398 else throw("Strict value is not equal to itself.")
403399 }
404400
405401
406402
407403 @Callable(i)
408404 func setManager (pendingManagerPublicKey) = {
409405 let checkCaller = mustManager(i)
410406 if ((checkCaller == checkCaller))
411407 then {
412408 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
413409 if ((checkManagerPublicKey == checkManagerPublicKey))
414410 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
415411 else throw("Strict value is not equal to itself.")
416412 }
417413 else throw("Strict value is not equal to itself.")
418414 }
419415
420416
421417
422418 @Callable(i)
423419 func confirmManager () = {
424420 let pm = pendingManagerPublicKeyOrUnit()
425421 let hasPM = if (isDefined(pm))
426422 then true
427423 else throw("no pending manager")
428424 if ((hasPM == hasPM))
429425 then {
430426 let checkPM = if ((i.callerPublicKey == value(pm)))
431427 then true
432428 else throw("you are not pending manager")
433429 if ((checkPM == checkPM))
434430 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
435431 else throw("Strict value is not equal to itself.")
436432 }
437433 else throw("Strict value is not equal to itself.")
438434 }
439435
440436
441437 @Verifier(tx)
442438 func verify () = {
443439 let targetPublicKey = match managerPublicKeyOrUnit() {
444440 case pk: ByteVector =>
445441 pk
446442 case _: Unit =>
447443 tx.senderPublicKey
448444 case _ =>
449445 throw("Match error")
450446 }
451447 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
452448 }
453449

github/deemru/w8io/fabc49c 
67.64 ms