tx · C1mSM7UPgLTchbwPqSiz6MfkXEvBjZpgz1qey78z2tCC

3N4NLARGi3U3ZyWemzzQ9CqyNTG32iVg4zx:  -0.02300000 Waves

2023.02.20 14:26 [2457914] smart account 3N4NLARGi3U3ZyWemzzQ9CqyNTG32iVg4zx > SELF 0.00000000 Waves

{ "type": 13, "id": "C1mSM7UPgLTchbwPqSiz6MfkXEvBjZpgz1qey78z2tCC", "fee": 2300000, "feeAssetId": null, "timestamp": 1676892440912, "version": 1, "sender": "3N4NLARGi3U3ZyWemzzQ9CqyNTG32iVg4zx", "senderPublicKey": "HbDYb9QTX7KPaJKaKmXG4E7yF7YWpQbUegaqfrUf8WW2", "proofs": [ "4SAM6fiDD5kxtJT636mYGbqQWGKDkYjXF8JgK8t1twDfmhVRPpUXMyBJDxxpNfstZAgDYUNKnuMXnRaYCuDyMHxj" ], "script": "base64:AAIFAAAAAAAAAEAIAhINCgsICAgICAgBCAEIARIDCgEBEgQKAggIEgUKAwgIBBIECgIICBIDCgEBEgMKAQESBAoCCAgSAwoBCBIAAAAAJAAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAADmtleUVwb2NoTGVuZ3RoCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAMa2V5V3hB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luZyBtYW5hZ2VyAwkAAAAAAAACBQAAAAdjaGVja1BNBQAAAAdjaGVja1BNCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAkAAlgAAAABCQEAAAAFdmFsdWUAAAABBQAAAAJwbQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAABQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXlV7N8C", "chainId": 84, "height": 2457914, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CUZkKpQoaudn1PTLUD9px4U9ezi2EuMFZbu39m2At8tw Next: BMtqNu6tNaRdKutByxKt4PVWBLj7XTir8npDcGKvY1PX 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 $t025262566 = pool
6464 let amountAssetId = $t025262566._1
6565 let priceAssetId = $t025262566._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 checkAmountAsset = if ((amountAssetId == "WAVES"))
178178 then unit
179179 else {
180180 let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID")
181181 if ((info.scripted == false))
182182 then true
183183 else throw("asset is smart")
184184 }
185185 if ((checkAmountAsset == checkAmountAsset))
186186 then {
187187 let checks = [if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
188188 then true
189189 else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
190190 then true
191191 else throw("invalid fee amount"), if ((getInteger(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
192192 then true
193193 else throw("already in voting list"), if (!(valueOrElse(getBoolean(votingEmissionContract, keyInList(pool)), false)))
194194 then true
195195 else throw("pool is in emission voting list")]
196196 if ((checks == checks))
197197 then {
198198 let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) {
199199 case s: String =>
200200 if ((s == "active"))
201201 then true
202202 else throw("user pool is not active")
203203 case _ =>
204204 throw("user pool is not active")
205205 }
206206 if ((ensureActive == ensureActive))
207207 then {
208208 let ensureAmountAssetVerified = if (isManager(i))
209209 then unit
210210 else {
211211 let inv = match invoke(assetsStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) {
212212 case b: Boolean =>
213213 if (b)
214214 then true
215215 else throw("asset is not verified")
216216 case _ =>
217217 throw("asset is not verified")
218218 }
219219 if ((inv == inv))
220220 then unit
221221 else throw("Strict value is not equal to itself.")
222222 }
223223 if ((ensureAmountAssetVerified == ensureAmountAssetVerified))
224224 then {
225225 let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)])
226226 if ((burnFeeInv == burnFeeInv))
227227 then {
228228 let newSuggestIndex = match getInteger(keySuggestIndex(amountAssetId, priceAssetId)) {
229229 case int: Int =>
230230 (int + 1)
231231 case _ =>
232232 0
233233 }
234234 $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)
235235 }
236236 else throw("Strict value is not equal to itself.")
237237 }
238238 else throw("Strict value is not equal to itself.")
239239 }
240240 else throw("Strict value is not equal to itself.")
241241 }
242242 else throw("Strict value is not equal to itself.")
243243 }
244244 else throw("Strict value is not equal to itself.")
245245 }
246246
247247
248248
249249 @Callable(i)
250250 func vote (amountAssetId,priceAssetId,inFavor) = {
251251 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
252252 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength)))
253253 let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId))))
254254 then true
255255 else throw("the token isn't on the voting list"), if ((votingFinishHeight > height))
256256 then true
257257 else throw("too late to vote")]
258258 if ((checks == checks))
259259 then {
260260 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
261261 let notZero = if ((asInt(gwxAmount) > 0))
262262 then true
263263 else throw("you don't have gwx")
264264 if ((notZero == notZero))
265265 then {
266266 let vote = match getString(keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller))) {
267267 case s: String =>
268268 let vote = split(s, separator)
269269 let voteValue = vote[1]
270270 let voteType = vote[2]
271271 let isVoteTypeSimilar = if (if ((voteType == "yes"))
272272 then (inFavor == true)
273273 else false)
274274 then true
275275 else if ((voteType == "no"))
276276 then (inFavor == false)
277277 else false
278278 let isVoteValueSimilar = if (isVoteTypeSimilar)
279279 then (asInt(gwxAmount) == parseIntValue(voteValue))
280280 else false
281281 let isNewVoteSimilar = if (if (isVoteTypeSimilar)
282282 then isVoteValueSimilar
283283 else false)
284284 then throw("you already voted")
285285 else invoke(this, "cancelVote", [amountAssetId, priceAssetId], nil)
286286 isNewVoteSimilar
287287 case u: Unit =>
288288 u
289289 case _ =>
290290 throw("Match error")
291291 }
292292 if ((vote == vote))
293293 then {
294294 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
295295 let positiveVotes = votingResult[1]
296296 let negativeVotes = votingResult[2]
297297 let newPositiveAndNegativeVotes = if (inFavor)
298298 then {
299299 let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount))
300300 [toString(newPositiveVotes), negativeVotes]
301301 }
302302 else {
303303 let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount))
304304 [positiveVotes, toString(newNegativeVotes)]
305305 }
306306 let voteKey = keyVote(amountAssetId, priceAssetId, suggestIndex, toString(i.caller))
307307 let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
308308 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1])), StringEntry(voteKey, voteValue)], unit)
309309 }
310310 else throw("Strict value is not equal to itself.")
311311 }
312312 else throw("Strict value is not equal to itself.")
313313 }
314314 else throw("Strict value is not equal to itself.")
315315 }
316316
317317
318318
319319 @Callable(i)
320320 func cancelVote (amountAssetId,priceAssetId) = {
321321 let userAddress = if ((i.caller == this))
322322 then toString(i.originCaller)
323323 else toString(i.caller)
324324 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
325325 let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))))
326326 then true
327327 else throw("no vote for assets pair")]
328328 if ((checks == checks))
329329 then {
330330 let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))), separator)
331331 let voteValue = vote[1]
332332 let voteType = vote[2]
333333 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
334334 let positiveVotes = votingResult[1]
335335 let negativeVotes = votingResult[2]
336336 let actions = if ((voteType == "yes"))
337337 then {
338338 let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue))
339339 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(toString(newPositiveVotes), negativeVotes)), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit)
340340 }
341341 else {
342342 let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue))
343343 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId, suggestIndex), totalVotes(positiveVotes, toString(newNegativeVotes))), DeleteEntry(keyVote(amountAssetId, priceAssetId, suggestIndex, userAddress))], unit)
344344 }
345345 actions
346346 }
347347 else throw("Strict value is not equal to itself.")
348348 }
349349
350350
351351
352352 @Callable(i)
353353 func setFee (newFee) = {
354354 let checks = [mustManager(i)]
355355 if ((checks == checks))
356356 then [IntegerEntry(keyFeeAmount, newFee)]
357357 else throw("Strict value is not equal to itself.")
358358 }
359359
360360
361361
362362 @Callable(i)
363363 func setThreshold (newThreshold) = {
364364 let checks = [mustManager(i), if ((newThreshold > 0))
365365 then true
366366 else throw("invalid threshold")]
367367 if ((checks == checks))
368368 then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit)
369369 else throw("Strict value is not equal to itself.")
370370 }
371371
372372
373373
374374 @Callable(i)
375375 func finalize (amountAssetId,priceAssetId) = {
376376 let suggestIndex = value(getInteger(keyInListAssetId(amountAssetId, priceAssetId)))
377377 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId, suggestIndex))) + value(getInteger(keyEpochLength)))
378378 let checks = [if (isDefined(getInteger(keyInListAssetId(amountAssetId, priceAssetId))))
379379 then true
380380 else throw("no assets pair"), if ((height >= votingFinishHeight))
381381 then true
382382 else throw("insufficient height for completion")]
383383 if ((checks == checks))
384384 then {
385385 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId, suggestIndex))), separator)
386386 let positiveVotes = parseIntValue(votingResult[1])
387387 let negativeVotes = parseIntValue(votingResult[2])
388388 let allVotes = (positiveVotes + negativeVotes)
389389 let threshold = getIntOrFail(keyThreshold)
390390 let actions = if (if ((allVotes >= threshold))
391391 then (positiveVotes > negativeVotes)
392392 else false)
393393 then {
394394 let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
395395 if ((res == res))
396396 then {
397397 let votingEmissionInv = invoke(votingEmissionContract, "create", [amountAssetId, priceAssetId], nil)
398398 if ((votingEmissionInv == votingEmissionInv))
399399 then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
400400 else throw("Strict value is not equal to itself.")
401401 }
402402 else throw("Strict value is not equal to itself.")
403403 }
404404 else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
405405 actions
406406 }
407407 else throw("Strict value is not equal to itself.")
408408 }
409409
410410
411411
412412 @Callable(i)
413413 func setManager (pendingManagerPublicKey) = {
414414 let checkCaller = mustManager(i)
415415 if ((checkCaller == checkCaller))
416416 then {
417417 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
418418 if ((checkManagerPublicKey == checkManagerPublicKey))
419419 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
420420 else throw("Strict value is not equal to itself.")
421421 }
422422 else throw("Strict value is not equal to itself.")
423423 }
424424
425425
426426
427427 @Callable(i)
428428 func confirmManager () = {
429429 let pm = pendingManagerPublicKeyOrUnit()
430430 let hasPM = if (isDefined(pm))
431431 then true
432432 else throw("no pending manager")
433433 if ((hasPM == hasPM))
434434 then {
435435 let checkPM = if ((i.callerPublicKey == value(pm)))
436436 then true
437437 else throw("you are not pending manager")
438438 if ((checkPM == checkPM))
439439 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
440440 else throw("Strict value is not equal to itself.")
441441 }
442442 else throw("Strict value is not equal to itself.")
443443 }
444444
445445
446446 @Verifier(tx)
447447 func verify () = {
448448 let targetPublicKey = match managerPublicKeyOrUnit() {
449449 case pk: ByteVector =>
450450 pk
451451 case _: Unit =>
452452 tx.senderPublicKey
453453 case _ =>
454454 throw("Match error")
455455 }
456456 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
457457 }
458458

github/deemru/w8io/026f985 
52.33 ms