tx · 6FAX2uLk4oBSHzCdLXJGbGf1Qc4zyNUgQt6zrwRSAz7u

3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T:  -0.01400000 Waves

2022.05.11 16:53 [2047088] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves

{ "type": 13, "id": "6FAX2uLk4oBSHzCdLXJGbGf1Qc4zyNUgQt6zrwRSAz7u", "fee": 1400000, "feeAssetId": null, "timestamp": 1652277279123, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "2Jp7nNKZyFXFr7GmA7e4h1Tx38GnQeM8ryaryBsmPFEnfUuMzQ4tiqhJ9FFssS1gZJi5rGusqCCnNZscrHZqtfSJ" ], "script": "base64:AAIFAAAAAAAAADQIAhILCgkICAgIAQgBCAESBAoCCAgSBQoDCAgEEgQKAggIEgMKAQESBAoCCAgSAwoBCBIAAAAAHAAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAEWtleVZvdGluZ0R1cmF0aW9uCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAASa2V5V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CQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAD3RhcmdldFB1YmxpY0tleQQAAAAHJG1hdGNoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXnUzlRI", "chainId": 84, "height": 2047088, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3CBpjNjfvuP7S7HCbJq4t8eDp72gGJeqUHU1mE8ivcai Next: 8APS9VxBw6m1H6xQeAc3s8qDVJTJiCVearEBF6RY37dS Diff:
OldNewDifferences
8484
8585
8686 func mustManager (i) = {
87- let pd = throw("Permission denied")
87+ let pd = throw("permission denied")
8888 match managerPublicKeyOrUnit() {
8989 case pk: ByteVector =>
9090 if ((i.callerPublicKey == pk))
104104 case valInt: Int =>
105105 valInt
106106 case _ =>
107- throw("Failed to cast into Integer")
107+ throw("failed to cast into Integer")
108108 }
109109
110110
139139 @Callable(i)
140140 func suggest (amountAssetId,priceAssetId) = {
141141 let payment = value(i.payments[0])
142- let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "Invalid amountAssetId ID")
142+ let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID")
143143 let checks = [if ((info.issuer == i.caller))
144144 then true
145- else throw("Asset can only be suggested by its issuer"), if ((info.scripted == false))
145+ else throw("asset can only be suggested by its issuer"), if ((info.scripted == false))
146146 then true
147- else throw("Asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
147+ else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
148148 then true
149- else throw("Invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
149+ else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
150150 then true
151- else throw("Invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
151+ else throw("invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
152152 then true
153153 else throw("priceAssetId is not USDN"), if ((getBoolean(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
154154 then true
155- else throw("Already in voting list")]
155+ else throw("already in voting list")]
156156 if ((checks == checks))
157157 then {
158158 let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) {
159159 case s: String =>
160160 if ((s == "active"))
161161 then true
162- else throw("User pool is not active")
162+ else throw("user pool is not active")
163163 case _ =>
164- throw("User pool is not active")
164+ throw("user pool is not active")
165165 }
166166 if ((ensureActive == ensureActive))
167167 then {
169169 case b: Boolean =>
170170 b
171171 case _ =>
172- throw("Asset is not verified")
172+ throw("asset is not verified")
173173 }
174174 if ((ensureAmountAssetVerified == ensureAmountAssetVerified))
175175 then {
190190 @Callable(i)
191191 func vote (amountAssetId,priceAssetId,inFavor) = {
192192 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
193- let checks = [if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
193+ let checks = [if ((getString(keyVote(amountAssetId, priceAssetId, toString(i.caller))) != unit))
194194 then true
195- else throw("The token isn't on the voting list"), if ((votingFinishHeight > height))
195+ else throw("you already voted"), if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
196+ then true
197+ else throw("the token isn't on the voting list"), if ((votingFinishHeight > height))
196198 then true
197199 else throw("too late to vote")]
198200 if ((checks == checks))
232234 func cancelVote (amountAssetId,priceAssetId) = {
233235 let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId))))
234236 then true
235- else throw("No vote for assets pair")]
237+ else throw("no vote for assets pair")]
236238 if ((checks == checks))
237239 then {
238240 let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, toString(i.caller)))), separator)
272274 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
273275 let checks = [if (isDefined(getBoolean(keyInListAssetId(amountAssetId, priceAssetId))))
274276 then true
275- else throw("No assets pair"), if ((height >= votingFinishHeight))
277+ else throw("no assets pair"), if ((height >= votingFinishHeight))
276278 then true
277279 else throw("insufficient height for completion")]
278280 if ((checks == checks))
315317 let pm = pendingManagerPublicKeyOrUnit()
316318 let hasPM = if (isDefined(pm))
317319 then true
318- else throw("No pending manager")
320+ else throw("no pending manager")
319321 if ((hasPM == hasPM))
320322 then {
321323 let checkPM = if ((i.callerPublicKey == value(pm)))
322324 then true
323- else throw("You are not pending manager")
325+ else throw("you are not pending manager")
324326 if ((checkPM == checkPM))
325327 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
326328 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 separator = "__"
55
66 let keyFeeAmount = makeString(["%s", "fee"], separator)
77
88 let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator)
99
1010 let keyVotingDuration = makeString(["%s", "epochLength"], separator)
1111
1212 let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator)
1313
1414 let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator)
1515
1616 let keyWxAssetId = makeString(["%s", "wxAssetId"], separator)
1717
1818 let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator)
1919
2020 let keyuserPoolContract = makeString(["%s", "userPoolContract"], separator)
2121
2222 let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
2323
2424 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
2525
2626 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
2727
2828
2929 func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
3030
3131
3232 func keyStartHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "startHeight", amountAssetId, priceAssetId], separator)
3333
3434
3535 func keyVotingResult (amountAssetId,priceAssetId) = makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator)
3636
3737
3838 func totalVotes (totalYes,totalNo) = makeString(["%d%d", totalYes, totalNo], separator)
3939
4040
4141 func keyVote (amountAssetId,priceAssetId,voterAddress) = makeString(["%s%s%s%s", "vote", amountAssetId, priceAssetId, voterAddress], separator)
4242
4343
4444 func keyVoteValue (gwxAmount,vote) = {
4545 let key = if (vote)
4646 then makeString(["%d%s", gwxAmount, "yes"], separator)
4747 else makeString(["%d%s", gwxAmount, "no"], separator)
4848 key
4949 }
5050
5151
5252 func keyManagerPublicKey () = "%s__managerPublicKey"
5353
5454
5555 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
5656
5757
5858 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
5959
6060 let userPoolContract = addressFromStringValue(getStringOrFail(keyuserPoolContract))
6161
6262 let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
6363
6464 let assetStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract))
6565
6666 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
6767 case s: String =>
6868 fromBase58String(s)
6969 case _: Unit =>
7070 unit
7171 case _ =>
7272 throw("Match error")
7373 }
7474
7575
7676 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
7777 case s: String =>
7878 fromBase58String(s)
7979 case _: Unit =>
8080 unit
8181 case _ =>
8282 throw("Match error")
8383 }
8484
8585
8686 func mustManager (i) = {
87- let pd = throw("Permission denied")
87+ let pd = throw("permission denied")
8888 match managerPublicKeyOrUnit() {
8989 case pk: ByteVector =>
9090 if ((i.callerPublicKey == pk))
9191 then true
9292 else pd
9393 case _: Unit =>
9494 if ((i.caller == this))
9595 then true
9696 else pd
9797 case _ =>
9898 throw("Match error")
9999 }
100100 }
101101
102102
103103 func asInt (val) = match val {
104104 case valInt: Int =>
105105 valInt
106106 case _ =>
107- throw("Failed to cast into Integer")
107+ throw("failed to cast into Integer")
108108 }
109109
110110
111111 @Callable(i)
112112 func constructor (assetsStoreContractPrm,userPoolContractPrm,boostingContractPrm,emissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingDurationPrm,usdnAssetIdPrm,finalizeRewardPrm) = {
113113 let checks = [mustManager(i), if (isDefined(addressFromString(assetsStoreContractPrm)))
114114 then true
115115 else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm)))
116116 then true
117117 else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm)))
118118 then true
119119 else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm)))
120120 then true
121121 else throw("Invalid emission contract address"), if ((feeAmountPrm >= 0))
122122 then true
123123 else throw("Invalid fee amount"), if ((votingDurationPrm > 0))
124124 then true
125125 else throw("Invalid voting duration"), if ((finalizeRewardPrm > 0))
126126 then true
127127 else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm))))
128128 then true
129129 else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm))))
130130 then true
131131 else throw("Invalid USDN asset ID")]
132132 if ((checks == checks))
133133 then $Tuple2([StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), StringEntry(keyuserPoolContract, userPoolContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), IntegerEntry(keyVotingDuration, votingDurationPrm), IntegerEntry(keyFinalizeReward, finalizeRewardPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), StringEntry(keyUsdnAssetId, usdnAssetIdPrm), StringEntry(keyBoostingContract, boostingContractPrm)], unit)
134134 else throw("Strict value is not equal to itself.")
135135 }
136136
137137
138138
139139 @Callable(i)
140140 func suggest (amountAssetId,priceAssetId) = {
141141 let payment = value(i.payments[0])
142- let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "Invalid amountAssetId ID")
142+ let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID")
143143 let checks = [if ((info.issuer == i.caller))
144144 then true
145- else throw("Asset can only be suggested by its issuer"), if ((info.scripted == false))
145+ else throw("asset can only be suggested by its issuer"), if ((info.scripted == false))
146146 then true
147- else throw("Asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
147+ else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
148148 then true
149- else throw("Invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
149+ else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
150150 then true
151- else throw("Invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
151+ else throw("invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
152152 then true
153153 else throw("priceAssetId is not USDN"), if ((getBoolean(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
154154 then true
155- else throw("Already in voting list")]
155+ else throw("already in voting list")]
156156 if ((checks == checks))
157157 then {
158158 let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) {
159159 case s: String =>
160160 if ((s == "active"))
161161 then true
162- else throw("User pool is not active")
162+ else throw("user pool is not active")
163163 case _ =>
164- throw("User pool is not active")
164+ throw("user pool is not active")
165165 }
166166 if ((ensureActive == ensureActive))
167167 then {
168168 let ensureAmountAssetVerified = match invoke(assetStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) {
169169 case b: Boolean =>
170170 b
171171 case _ =>
172- throw("Asset is not verified")
172+ throw("asset is not verified")
173173 }
174174 if ((ensureAmountAssetVerified == ensureAmountAssetVerified))
175175 then {
176176 let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)])
177177 if ((burnFeeInv == burnFeeInv))
178178 then [BooleanEntry(keyInListAssetId(amountAssetId, priceAssetId), true), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId), height), StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes("0", "0"))]
179179 else throw("Strict value is not equal to itself.")
180180 }
181181 else throw("Strict value is not equal to itself.")
182182 }
183183 else throw("Strict value is not equal to itself.")
184184 }
185185 else throw("Strict value is not equal to itself.")
186186 }
187187
188188
189189
190190 @Callable(i)
191191 func vote (amountAssetId,priceAssetId,inFavor) = {
192192 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
193- let checks = [if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
193+ let checks = [if ((getString(keyVote(amountAssetId, priceAssetId, toString(i.caller))) != unit))
194194 then true
195- else throw("The token isn't on the voting list"), if ((votingFinishHeight > height))
195+ else throw("you already voted"), if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
196+ then true
197+ else throw("the token isn't on the voting list"), if ((votingFinishHeight > height))
196198 then true
197199 else throw("too late to vote")]
198200 if ((checks == checks))
199201 then {
200202 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
201203 let positiveVotes = votingResult[1]
202204 let negativeVotes = votingResult[2]
203205 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
204206 let notZero = if ((asInt(gwxAmount) > 0))
205207 then true
206208 else throw("you don't have gwx")
207209 if ((notZero == notZero))
208210 then {
209211 let entries = if (inFavor)
210212 then {
211213 let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount))
212214 let yesVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
213215 let yesVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
214216 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(toString(newPositiveVotes), negativeVotes)), StringEntry(yesVoteKey, yesVoteValue)], unit)
215217 }
216218 else {
217219 let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount))
218220 let noVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
219221 let noVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
220222 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(positiveVotes, toString(newNegativeVotes))), StringEntry(noVoteKey, noVoteValue)], unit)
221223 }
222224 entries
223225 }
224226 else throw("Strict value is not equal to itself.")
225227 }
226228 else throw("Strict value is not equal to itself.")
227229 }
228230
229231
230232
231233 @Callable(i)
232234 func cancelVote (amountAssetId,priceAssetId) = {
233235 let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId))))
234236 then true
235- else throw("No vote for assets pair")]
237+ else throw("no vote for assets pair")]
236238 if ((checks == checks))
237239 then {
238240 let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, toString(i.caller)))), separator)
239241 let voteValue = vote[1]
240242 let voteType = vote[2]
241243 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
242244 let positiveVotes = votingResult[1]
243245 let negativeVotes = votingResult[2]
244246 let actions = if ((voteType == "yes"))
245247 then {
246248 let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue))
247249 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(toString(newPositiveVotes), negativeVotes)), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit)
248250 }
249251 else {
250252 let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue))
251253 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(positiveVotes, toString(newNegativeVotes))), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit)
252254 }
253255 actions
254256 }
255257 else throw("Strict value is not equal to itself.")
256258 }
257259
258260
259261
260262 @Callable(i)
261263 func setFee (newFee) = {
262264 let checks = [mustManager(i)]
263265 if ((checks == checks))
264266 then [IntegerEntry(keyFeeAmount, newFee)]
265267 else throw("Strict value is not equal to itself.")
266268 }
267269
268270
269271
270272 @Callable(i)
271273 func finalize (amountAssetId,priceAssetId) = {
272274 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
273275 let checks = [if (isDefined(getBoolean(keyInListAssetId(amountAssetId, priceAssetId))))
274276 then true
275- else throw("No assets pair"), if ((height >= votingFinishHeight))
277+ else throw("no assets pair"), if ((height >= votingFinishHeight))
276278 then true
277279 else throw("insufficient height for completion")]
278280 if ((checks == checks))
279281 then {
280282 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
281283 let positiveVotes = parseIntValue(votingResult[1])
282284 let negativeVotes = parseIntValue(votingResult[2])
283285 let actions = if ((positiveVotes > negativeVotes))
284286 then {
285287 let res = invoke(assetStoreContract, "setPoolLabels", [amountAssetId, priceAssetId, "WX_EMISSION"], nil)
286288 if ((res == res))
287289 then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
288290 else throw("Strict value is not equal to itself.")
289291 }
290292 else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
291293 actions
292294 }
293295 else throw("Strict value is not equal to itself.")
294296 }
295297
296298
297299
298300 @Callable(i)
299301 func setManager (pendingManagerPublicKey) = {
300302 let checkCaller = mustManager(i)
301303 if ((checkCaller == checkCaller))
302304 then {
303305 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
304306 if ((checkManagerPublicKey == checkManagerPublicKey))
305307 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
306308 else throw("Strict value is not equal to itself.")
307309 }
308310 else throw("Strict value is not equal to itself.")
309311 }
310312
311313
312314
313315 @Callable(i)
314316 func confirmManager () = {
315317 let pm = pendingManagerPublicKeyOrUnit()
316318 let hasPM = if (isDefined(pm))
317319 then true
318- else throw("No pending manager")
320+ else throw("no pending manager")
319321 if ((hasPM == hasPM))
320322 then {
321323 let checkPM = if ((i.callerPublicKey == value(pm)))
322324 then true
323- else throw("You are not pending manager")
325+ else throw("you are not pending manager")
324326 if ((checkPM == checkPM))
325327 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
326328 else throw("Strict value is not equal to itself.")
327329 }
328330 else throw("Strict value is not equal to itself.")
329331 }
330332
331333
332334 @Verifier(tx)
333335 func verify () = {
334336 let targetPublicKey = match managerPublicKeyOrUnit() {
335337 case pk: ByteVector =>
336338 pk
337339 case _: Unit =>
338340 tx.senderPublicKey
339341 case _ =>
340342 throw("Match error")
341343 }
342344 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
343345 }
344346

github/deemru/w8io/169f3d6 
51.28 ms