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