tx · 8APS9VxBw6m1H6xQeAc3s8qDVJTJiCVearEBF6RY37dS 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T: -0.01400000 Waves 2022.05.11 16:56 [2047090] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves
{ "type": 13, "id": "8APS9VxBw6m1H6xQeAc3s8qDVJTJiCVearEBF6RY37dS", "fee": 1400000, "feeAssetId": null, "timestamp": 1652277432668, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "5FaTSBGWYAhkV66NbuB2NL4qNdjAntrJ15cT4mNsJRitgdBZgdmPh7fSvqpKDtzaHGeVvjJmjnGHe4BCbZ2kCh4u" ], "script": "base64:AAIFAAAAAAAAADQIAhILCgkICAgIAQgBCAESBAoCCAgSBQoDCAgEEgQKAggIEgMKAQESBAoCCAgSAwoBCBIAAAAAGwAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAEWtleVZvdGluZ0R1cmF0aW9uCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAMa2V5V3hBc3NldElkCQAE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NoMAkBAAAAFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAAAAAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAJwawUAAAAHJG1hdGNoMAUAAAACcGsDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmnfKNy", "chainId": 84, "height": 2047090, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6FAX2uLk4oBSHzCdLXJGbGf1Qc4zyNUgQt6zrwRSAz7u Next: EMY3noiCERkeoHPvN2aneYMCDo5RXpxNNbLDchkTnzxr Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | let keyVotingDuration = makeString(["%s", "epochLength"], separator) | |
11 | 11 | ||
12 | 12 | let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator) | |
13 | - | ||
14 | - | let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator) | |
15 | 13 | ||
16 | 14 | let keyWxAssetId = makeString(["%s", "wxAssetId"], separator) | |
17 | 15 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let keyFeeAmount = makeString(["%s", "fee"], separator) | |
7 | 7 | ||
8 | 8 | let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator) | |
9 | 9 | ||
10 | 10 | let keyVotingDuration = makeString(["%s", "epochLength"], separator) | |
11 | 11 | ||
12 | 12 | let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator) | |
13 | - | ||
14 | - | let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator) | |
15 | 13 | ||
16 | 14 | let keyWxAssetId = makeString(["%s", "wxAssetId"], separator) | |
17 | 15 | ||
18 | 16 | let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator) | |
19 | 17 | ||
20 | 18 | let keyuserPoolContract = makeString(["%s", "userPoolContract"], separator) | |
21 | 19 | ||
22 | 20 | let keyEmissionContract = makeString(["%s", "emissionContract"], separator) | |
23 | 21 | ||
24 | 22 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
25 | 23 | ||
26 | 24 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined")) | |
27 | 25 | ||
28 | 26 | ||
29 | 27 | func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
30 | 28 | ||
31 | 29 | ||
32 | 30 | func keyStartHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "startHeight", amountAssetId, priceAssetId], separator) | |
33 | 31 | ||
34 | 32 | ||
35 | 33 | func keyVotingResult (amountAssetId,priceAssetId) = makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator) | |
36 | 34 | ||
37 | 35 | ||
38 | 36 | func totalVotes (totalYes,totalNo) = makeString(["%d%d", totalYes, totalNo], separator) | |
39 | 37 | ||
40 | 38 | ||
41 | 39 | func keyVote (amountAssetId,priceAssetId,voterAddress) = makeString(["%s%s%s%s", "vote", amountAssetId, priceAssetId, voterAddress], separator) | |
42 | 40 | ||
43 | 41 | ||
44 | 42 | func keyVoteValue (gwxAmount,vote) = { | |
45 | 43 | let key = if (vote) | |
46 | 44 | then makeString(["%d%s", gwxAmount, "yes"], separator) | |
47 | 45 | else makeString(["%d%s", gwxAmount, "no"], separator) | |
48 | 46 | key | |
49 | 47 | } | |
50 | 48 | ||
51 | 49 | ||
52 | 50 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
53 | 51 | ||
54 | 52 | ||
55 | 53 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
56 | 54 | ||
57 | 55 | ||
58 | 56 | let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract)) | |
59 | 57 | ||
60 | 58 | let userPoolContract = addressFromStringValue(getStringOrFail(keyuserPoolContract)) | |
61 | 59 | ||
62 | 60 | let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract)) | |
63 | 61 | ||
64 | 62 | let assetStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract)) | |
65 | 63 | ||
66 | 64 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
67 | 65 | case s: String => | |
68 | 66 | fromBase58String(s) | |
69 | 67 | case _: Unit => | |
70 | 68 | unit | |
71 | 69 | case _ => | |
72 | 70 | throw("Match error") | |
73 | 71 | } | |
74 | 72 | ||
75 | 73 | ||
76 | 74 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
77 | 75 | case s: String => | |
78 | 76 | fromBase58String(s) | |
79 | 77 | case _: Unit => | |
80 | 78 | unit | |
81 | 79 | case _ => | |
82 | 80 | throw("Match error") | |
83 | 81 | } | |
84 | 82 | ||
85 | 83 | ||
86 | 84 | func mustManager (i) = { | |
87 | 85 | let pd = throw("permission denied") | |
88 | 86 | match managerPublicKeyOrUnit() { | |
89 | 87 | case pk: ByteVector => | |
90 | 88 | if ((i.callerPublicKey == pk)) | |
91 | 89 | then true | |
92 | 90 | else pd | |
93 | 91 | case _: Unit => | |
94 | 92 | if ((i.caller == this)) | |
95 | 93 | then true | |
96 | 94 | else pd | |
97 | 95 | case _ => | |
98 | 96 | throw("Match error") | |
99 | 97 | } | |
100 | 98 | } | |
101 | 99 | ||
102 | 100 | ||
103 | 101 | func asInt (val) = match val { | |
104 | 102 | case valInt: Int => | |
105 | 103 | valInt | |
106 | 104 | case _ => | |
107 | 105 | throw("failed to cast into Integer") | |
108 | 106 | } | |
109 | 107 | ||
110 | 108 | ||
111 | 109 | @Callable(i) | |
112 | 110 | func constructor (assetsStoreContractPrm,userPoolContractPrm,boostingContractPrm,emissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingDurationPrm,usdnAssetIdPrm,finalizeRewardPrm) = { | |
113 | 111 | let checks = [mustManager(i), if (isDefined(addressFromString(assetsStoreContractPrm))) | |
114 | 112 | then true | |
115 | 113 | else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm))) | |
116 | 114 | then true | |
117 | 115 | else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm))) | |
118 | 116 | then true | |
119 | 117 | else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm))) | |
120 | 118 | then true | |
121 | 119 | else throw("Invalid emission contract address"), if ((feeAmountPrm >= 0)) | |
122 | 120 | then true | |
123 | 121 | else throw("Invalid fee amount"), if ((votingDurationPrm > 0)) | |
124 | 122 | then true | |
125 | 123 | else throw("Invalid voting duration"), if ((finalizeRewardPrm > 0)) | |
126 | 124 | then true | |
127 | 125 | else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm)))) | |
128 | 126 | then true | |
129 | 127 | else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm)))) | |
130 | 128 | then true | |
131 | 129 | else throw("Invalid USDN asset ID")] | |
132 | 130 | if ((checks == checks)) | |
133 | 131 | 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) | |
134 | 132 | else throw("Strict value is not equal to itself.") | |
135 | 133 | } | |
136 | 134 | ||
137 | 135 | ||
138 | 136 | ||
139 | 137 | @Callable(i) | |
140 | 138 | func suggest (amountAssetId,priceAssetId) = { | |
141 | 139 | let payment = value(i.payments[0]) | |
142 | 140 | let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "invalid amountAssetId ID") | |
143 | 141 | let checks = [if ((info.issuer == i.caller)) | |
144 | 142 | then true | |
145 | 143 | else throw("asset can only be suggested by its issuer"), if ((info.scripted == false)) | |
146 | 144 | then true | |
147 | 145 | else throw("asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId)))) | |
148 | 146 | then true | |
149 | 147 | else throw("invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount)))) | |
150 | 148 | then true | |
151 | 149 | else throw("invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId)))) | |
152 | 150 | then true | |
153 | 151 | else throw("priceAssetId is not USDN"), if ((getBoolean(keyInListAssetId(amountAssetId, priceAssetId)) == unit)) | |
154 | 152 | then true | |
155 | 153 | else throw("already in voting list")] | |
156 | 154 | if ((checks == checks)) | |
157 | 155 | then { | |
158 | 156 | let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) { | |
159 | 157 | case s: String => | |
160 | 158 | if ((s == "active")) | |
161 | 159 | then true | |
162 | 160 | else throw("user pool is not active") | |
163 | 161 | case _ => | |
164 | 162 | throw("user pool is not active") | |
165 | 163 | } | |
166 | 164 | if ((ensureActive == ensureActive)) | |
167 | 165 | then { | |
168 | 166 | let ensureAmountAssetVerified = match invoke(assetStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) { | |
169 | 167 | case b: Boolean => | |
170 | 168 | b | |
171 | 169 | case _ => | |
172 | 170 | throw("asset is not verified") | |
173 | 171 | } | |
174 | 172 | if ((ensureAmountAssetVerified == ensureAmountAssetVerified)) | |
175 | 173 | then { | |
176 | 174 | let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)]) | |
177 | 175 | if ((burnFeeInv == burnFeeInv)) | |
178 | 176 | then [BooleanEntry(keyInListAssetId(amountAssetId, priceAssetId), true), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId), height), StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes("0", "0"))] | |
179 | 177 | else throw("Strict value is not equal to itself.") | |
180 | 178 | } | |
181 | 179 | else throw("Strict value is not equal to itself.") | |
182 | 180 | } | |
183 | 181 | else throw("Strict value is not equal to itself.") | |
184 | 182 | } | |
185 | 183 | else throw("Strict value is not equal to itself.") | |
186 | 184 | } | |
187 | 185 | ||
188 | 186 | ||
189 | 187 | ||
190 | 188 | @Callable(i) | |
191 | 189 | func vote (amountAssetId,priceAssetId,inFavor) = { | |
192 | 190 | let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration))) | |
193 | 191 | let checks = [if ((getString(keyVote(amountAssetId, priceAssetId, toString(i.caller))) != unit)) | |
194 | 192 | then true | |
195 | 193 | else throw("you already voted"), if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false)) | |
196 | 194 | then true | |
197 | 195 | else throw("the token isn't on the voting list"), if ((votingFinishHeight > height)) | |
198 | 196 | then true | |
199 | 197 | else throw("too late to vote")] | |
200 | 198 | if ((checks == checks)) | |
201 | 199 | then { | |
202 | 200 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator) | |
203 | 201 | let positiveVotes = votingResult[1] | |
204 | 202 | let negativeVotes = votingResult[2] | |
205 | 203 | let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil) | |
206 | 204 | let notZero = if ((asInt(gwxAmount) > 0)) | |
207 | 205 | then true | |
208 | 206 | else throw("you don't have gwx") | |
209 | 207 | if ((notZero == notZero)) | |
210 | 208 | then { | |
211 | 209 | let entries = if (inFavor) | |
212 | 210 | then { | |
213 | 211 | let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount)) | |
214 | 212 | let yesVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller)) | |
215 | 213 | let yesVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor) | |
216 | 214 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(toString(newPositiveVotes), negativeVotes)), StringEntry(yesVoteKey, yesVoteValue)], unit) | |
217 | 215 | } | |
218 | 216 | else { | |
219 | 217 | let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount)) | |
220 | 218 | let noVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller)) | |
221 | 219 | let noVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor) | |
222 | 220 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(positiveVotes, toString(newNegativeVotes))), StringEntry(noVoteKey, noVoteValue)], unit) | |
223 | 221 | } | |
224 | 222 | entries | |
225 | 223 | } | |
226 | 224 | else throw("Strict value is not equal to itself.") | |
227 | 225 | } | |
228 | 226 | else throw("Strict value is not equal to itself.") | |
229 | 227 | } | |
230 | 228 | ||
231 | 229 | ||
232 | 230 | ||
233 | 231 | @Callable(i) | |
234 | 232 | func cancelVote (amountAssetId,priceAssetId) = { | |
235 | 233 | let checks = [if (isDefined(getString(keyVotingResult(amountAssetId, priceAssetId)))) | |
236 | 234 | then true | |
237 | 235 | else throw("no vote for assets pair")] | |
238 | 236 | if ((checks == checks)) | |
239 | 237 | then { | |
240 | 238 | let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, toString(i.caller)))), separator) | |
241 | 239 | let voteValue = vote[1] | |
242 | 240 | let voteType = vote[2] | |
243 | 241 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator) | |
244 | 242 | let positiveVotes = votingResult[1] | |
245 | 243 | let negativeVotes = votingResult[2] | |
246 | 244 | let actions = if ((voteType == "yes")) | |
247 | 245 | then { | |
248 | 246 | let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue)) | |
249 | 247 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(toString(newPositiveVotes), negativeVotes)), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit) | |
250 | 248 | } | |
251 | 249 | else { | |
252 | 250 | let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue)) | |
253 | 251 | $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes(positiveVotes, toString(newNegativeVotes))), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit) | |
254 | 252 | } | |
255 | 253 | actions | |
256 | 254 | } | |
257 | 255 | else throw("Strict value is not equal to itself.") | |
258 | 256 | } | |
259 | 257 | ||
260 | 258 | ||
261 | 259 | ||
262 | 260 | @Callable(i) | |
263 | 261 | func setFee (newFee) = { | |
264 | 262 | let checks = [mustManager(i)] | |
265 | 263 | if ((checks == checks)) | |
266 | 264 | then [IntegerEntry(keyFeeAmount, newFee)] | |
267 | 265 | else throw("Strict value is not equal to itself.") | |
268 | 266 | } | |
269 | 267 | ||
270 | 268 | ||
271 | 269 | ||
272 | 270 | @Callable(i) | |
273 | 271 | func finalize (amountAssetId,priceAssetId) = { | |
274 | 272 | let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration))) | |
275 | 273 | let checks = [if (isDefined(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)))) | |
276 | 274 | then true | |
277 | 275 | else throw("no assets pair"), if ((height >= votingFinishHeight)) | |
278 | 276 | then true | |
279 | 277 | else throw("insufficient height for completion")] | |
280 | 278 | if ((checks == checks)) | |
281 | 279 | then { | |
282 | 280 | let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator) | |
283 | 281 | let positiveVotes = parseIntValue(votingResult[1]) | |
284 | 282 | let negativeVotes = parseIntValue(votingResult[2]) | |
285 | 283 | let actions = if ((positiveVotes > negativeVotes)) | |
286 | 284 | then { | |
287 | 285 | let res = invoke(assetStoreContract, "setPoolLabels", [amountAssetId, priceAssetId, "WX_EMISSION"], nil) | |
288 | 286 | if ((res == res)) | |
289 | 287 | then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit) | |
290 | 288 | else throw("Strict value is not equal to itself.") | |
291 | 289 | } | |
292 | 290 | else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit) | |
293 | 291 | actions | |
294 | 292 | } | |
295 | 293 | else throw("Strict value is not equal to itself.") | |
296 | 294 | } | |
297 | 295 | ||
298 | 296 | ||
299 | 297 | ||
300 | 298 | @Callable(i) | |
301 | 299 | func setManager (pendingManagerPublicKey) = { | |
302 | 300 | let checkCaller = mustManager(i) | |
303 | 301 | if ((checkCaller == checkCaller)) | |
304 | 302 | then { | |
305 | 303 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
306 | 304 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
307 | 305 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
308 | 306 | else throw("Strict value is not equal to itself.") | |
309 | 307 | } | |
310 | 308 | else throw("Strict value is not equal to itself.") | |
311 | 309 | } | |
312 | 310 | ||
313 | 311 | ||
314 | 312 | ||
315 | 313 | @Callable(i) | |
316 | 314 | func confirmManager () = { | |
317 | 315 | let pm = pendingManagerPublicKeyOrUnit() | |
318 | 316 | let hasPM = if (isDefined(pm)) | |
319 | 317 | then true | |
320 | 318 | else throw("no pending manager") | |
321 | 319 | if ((hasPM == hasPM)) | |
322 | 320 | then { | |
323 | 321 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
324 | 322 | then true | |
325 | 323 | else throw("you are not pending manager") | |
326 | 324 | if ((checkPM == checkPM)) | |
327 | 325 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
328 | 326 | else throw("Strict value is not equal to itself.") | |
329 | 327 | } | |
330 | 328 | else throw("Strict value is not equal to itself.") | |
331 | 329 | } | |
332 | 330 | ||
333 | 331 | ||
334 | 332 | @Verifier(tx) | |
335 | 333 | func verify () = { | |
336 | 334 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
337 | 335 | case pk: ByteVector => | |
338 | 336 | pk | |
339 | 337 | case _: Unit => | |
340 | 338 | tx.senderPublicKey | |
341 | 339 | case _ => | |
342 | 340 | throw("Match error") | |
343 | 341 | } | |
344 | 342 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
345 | 343 | } | |
346 | 344 |
github/deemru/w8io/169f3d6 45.19 ms ◑