tx · 5ifMM8dPiZ7dWFGqw4TSnFr2dnkDQrVkRAbNxZVp7YsU

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2023.05.04 12:27 [2562830] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "5ifMM8dPiZ7dWFGqw4TSnFr2dnkDQrVkRAbNxZVp7YsU", "fee": 1400000, "feeAssetId": null, "timestamp": 1683192443064, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "5tY9s9z9SzdTxUnrK89LCqTbdKKrxH6dcEM2biLA2ftdwQNG4GyEUSjgvXeAhS1poJ5ihZL95tyd2ae1X4jyi2Xo" ], "script": "base64:BgLiEAgCEgkKBwgICBgBCAESABIAEggKBggICAgICBIDCgEYEgMKAQgSABIAEgQKAggIIhBjb250cmFjdEZpbGVuYW1lIgNTRVAiDHdhdmVzQXNzZXRJZCIHVkxUUE9PTCIIU1RCTFBPT0wiEWludmFsaWRQcmljZUFzc2V0Igd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgd0aHJvd1BEIhR0aHJvd0NyZWF0ZU5vdENhbGxlZCIRdGhyb3dZb3VOb3RJc3N1ZXIiD3Rocm93UG9vbEV4aXN0cyIVdGhyb3dBc3NldE5vdFZlcmlmaWVkIhZ0aHJvd0ludmFsaWRQcmljZUFzc2V0IhR0aHJvd0ludmFsaWRGZWVBc3NldCIXdGhyb3dJbnZhbGlkQW1vdW50QXNzZXQiEnRocm93SW52YWxpZFN0YXR1cyIfdGhyb3dDYW5BY3RpdmF0ZU9ubHlQZW5kaW5nUG9vbCIddGhyb3dGYWN0b3J5UmV0dXJuZWROb3RTdHJpbmciHHRocm93SW52YWxpZFByaWNlQXNzZXRBbW91bnQiD3Rocm93SW52YWxpZEZl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JEBQJiRAkAzAgCCQELU3RyaW5nRW50cnkCCQEBeAAJANgEAQkBBXZhbHVlAQUCYkIJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAXkABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4CYW8BE3ByaWNlQXNzZXRzUkVBRE9OTFkACQCUCgIFA25pbAkBAmFhAQkAoggBCQEBWAACYW8BDnN0YXR1c1JFQURPTkxZAgFCAUMEAmFBBAJhYwkAoggBCQEBQQIFAUIFAUMDCQABAgUCYWMCBlN0cmluZwQCYWQFAmFjBQJhZAUEdW5pdAkAlAoCBQNuaWwFAmFBAQJiRQECYkYABAJiRwQCYWMJAQJhbAADCQABAgUCYWMCCkJ5dGVWZWN0b3IEAmFwBQJhYwUCYXADCQABAgUCYWMCBFVuaXQIBQJiRQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYkUJYm9keUJ5dGVzCQCRAwIIBQJiRQZwcm9vZnMAAAUCYkecq8VI", "height": 2562830, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5LWRgKxspmWRZ5VApBsmk7A3vWPYYNiVPVnfrbFocqcg Next: EJLspSb7yyEbxUC9rjtAW6t767SsgtqZUCxaEKhJrV3e Diff:
OldNewDifferences
327327
328328
329329 @Callable(i)
330-func createStable () = _create(i, STBLPOOL)
330+func createStable () = {
331+ let checkCaller = mustManager(i)
332+ if ((checkCaller == checkCaller))
333+ then _create(i, STBLPOOL)
334+ else throw("Strict value is not equal to itself.")
335+ }
331336
332337
333338
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFilename = "user_pools.ride"
55
66 let SEP = "__"
77
88 let wavesAssetId = "WAVES"
99
1010 let VLTPOOL = "VLTPOOL"
1111
1212 let STBLPOOL = "STBLPOOL"
1313
1414 let invalidPriceAsset = "Invalid price asset"
1515
1616 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
1717
1818
1919 func throwErr (msg) = throw(wrapErr(msg))
2020
2121
2222 func throwPD () = throwErr("Permission denied")
2323
2424
2525 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
2626
2727
2828 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2929
3030
3131 func throwPoolExists () = throwErr("Pool with such assets already exists")
3232
3333
3434 func throwAssetNotVerified () = throwErr("Asset is not verified")
3535
3636
3737 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
3838
3939
4040 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
4141
4242
4343 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
4444
4545
4646 func throwInvalidStatus () = throwErr("Invalid status")
4747
4848
4949 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
5050
5151
5252 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
5353
5454
5555 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
5656
5757
5858 func throwInvalidFee () = throwErr("invalid fee")
5959
6060
6161 func throwInvalidAssetPair () = throwErr("invalid asset pair")
6262
6363
6464 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
6565
6666
6767 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
6868
6969
7070 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
7171
7272
7373 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
7474
7575
7676 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
7777
7878
7979 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
8080
8181
8282 func keyEmissionContract () = makeString(["%s", "emissionContract"], SEP)
8383
8484
8585 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
8686
8787
8888 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
8989
9090
9191 let indexSuffix = "u"
9292
9393 let statusPending = "pending"
9494
9595 let statusDeclined = "declined"
9696
9797 let statusActive = "active"
9898
9999 let statuses = [statusPending, statusDeclined, statusActive]
100100
101101 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
102102
103103
104104 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
105105
106106
107107 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
108108
109109
110110 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
111111
112112
113113 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
114114
115115
116116 func keyPoolType (amountAssetId,priceAssetId) = makeString(["%s%s%s", "poolType", amountAssetId, priceAssetId], SEP)
117117
118118
119119 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
120120
121121
122122 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
123123
124124
125125 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
126126
127127
128128 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
129129
130130
131131 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
132132
133133
134134 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
135135
136136
137137 func stringOptionToList (stringOrUnit) = match stringOrUnit {
138138 case s: String =>
139139 if ((size(s) == 0))
140140 then nil
141141 else split(s, SEP)
142142 case _: Unit =>
143143 nil
144144 case _ =>
145145 throw("Match error")
146146 }
147147
148148
149149 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
150150
151151 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
152152
153153 let votingEmissionContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyVotingEmissionContract), wrapErr("voting emission contract address is required")))
154154
155155 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], SEP)
156156
157157 let votingEmissionCandidateContract = addressFromStringValue(valueOrErrorMessage(getString(votingEmissionContract, keyVotingEmissionCandidateContract), wrapErr("voting emission candidate contract address is required")))
158158
159159 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
160160
161161
162162 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
163163 then true
164164 else throwCreateNotCalled()
165165
166166
167167 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
168168 case s: String =>
169169 fromBase58String(s)
170170 case _: Unit =>
171171 unit
172172 case _ =>
173173 throw("Match error")
174174 }
175175
176176
177177 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
178178 case s: String =>
179179 fromBase58String(s)
180180 case _: Unit =>
181181 unit
182182 case _ =>
183183 throw("Match error")
184184 }
185185
186186
187187 func isManager (i) = match managerPublicKeyOrUnit() {
188188 case pk: ByteVector =>
189189 (i.callerPublicKey == pk)
190190 case _: Unit =>
191191 (i.caller == this)
192192 case _ =>
193193 throw("Match error")
194194 }
195195
196196
197197 func mustManager (i) = if (isManager(i))
198198 then true
199199 else throwPD()
200200
201201
202202 func mustAdmin (i) = {
203203 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
204204 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
205205 then true
206206 else mustManager(i)
207207 }
208208
209209
210210 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
211211
212212
213213 func getIdAndInfo (payment) = match payment.assetId {
214214 case id: ByteVector =>
215215 let info = value(assetInfo(id))
216216 $Tuple2(toBase58String(id), info)
217217 case _: Unit =>
218218 $Tuple2(wavesAssetId, unit)
219219 case _ =>
220220 throw("Match error")
221221 }
222222
223223
224224 func validStatus (status) = containsElement(statuses, status)
225225
226226
227227 func _create (i,poolType) = {
228228 let asset1Payment = value(i.payments[0])
229229 let asset2Payment = value(i.payments[1])
230230 let feeAssetPayment = value(i.payments[2])
231231 let $t064076464 = getIdAndInfo(asset1Payment)
232232 let asset1Id = $t064076464._1
233233 let asset1Info = $t064076464._2
234234 let $t064676524 = getIdAndInfo(asset2Payment)
235235 let asset2Id = $t064676524._1
236236 let asset2Info = $t064676524._2
237237 let $t065276590 = getIdAndInfo(feeAssetPayment)
238238 let feeAssetId = $t065276590._1
239239 let feeAssetInfo = $t065276590._2
240240 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
241241 let checkAssetsNotEqual = if ((asset1Id != asset2Id))
242242 then true
243243 else throwInvalidAssetPair()
244244 if ((checkAssetsNotEqual == checkAssetsNotEqual))
245245 then {
246246 let $t067647225 = if (if (isManager(i))
247247 then true
248248 else if (containsElement(priceAssetsList, asset2Id))
249249 then isVerified(asset1Id)
250250 else false)
251251 then $Tuple4(asset1Id, asset1Payment.amount, asset2Id, asset2Payment.amount)
252252 else if (if (containsElement(priceAssetsList, asset1Id))
253253 then isVerified(asset2Id)
254254 else false)
255255 then $Tuple4(asset2Id, asset2Payment.amount, asset1Id, asset1Payment.amount)
256256 else throwInvalidAssetPair()
257257 let amountAssetId = $t067647225._1
258258 let amountAssetAmount = $t067647225._2
259259 let priceAssetId = $t067647225._3
260260 let priceAssetAmount = $t067647225._4
261261 let managerPriceAssetMinAmount = 1
262262 let priceAssetMinAmount = if (isManager(i))
263263 then managerPriceAssetMinAmount
264264 else {
265265 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
266266 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
267267 }
268268 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
269269 let curIndex = (lastIndex + 1)
270270 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
271271 let poolExists = {
272272 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
273273 if ($isInstanceOf(@, "Boolean"))
274274 then @
275275 else throw(($getType(@) + " couldn't be cast to Boolean"))
276276 }
277277 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
278278 then true
279279 else throwPoolExists(), if (!(poolExists))
280280 then true
281281 else throwPoolExists(), if (if (isManager(i))
282282 then true
283283 else (getString(keyFeeAssetId()) == feeAssetId))
284284 then true
285285 else throwInvalidFeeAsset(), if (if (isManager(i))
286286 then true
287287 else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
288288 then true
289289 else throwInvalidAmountAsset(), if (if (isManager(i))
290290 then true
291291 else (priceAssetAmount >= priceAssetMinAmount))
292292 then true
293293 else throwInvalidPriceAssetAmount(), if (if (isManager(i))
294294 then true
295295 else (feeAssetPayment.amount == getInteger(keyFeeAmount())))
296296 then true
297297 else throwInvalidFee()]
298298 if ((checks == checks))
299299 then {
300300 let paymentsWithFeeSize = 3
301301 let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
302302 then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
303303 else unit
304304 if ((burnEmissionInv == burnEmissionInv))
305305 then [BooleanEntry(keyCreateCalled(amountAssetId, priceAssetId), true), StringEntry(keyCreateCaller(amountAssetId, priceAssetId), toString(i.caller)), IntegerEntry(keyLastIndex(), curIndex), StringEntry(keySuffix(amountAssetId, priceAssetId), (toString(curIndex) + indexSuffix)), IntegerEntry(keyHeight(amountAssetId, priceAssetId), height), StringEntry(keyStatus(amountAssetId, priceAssetId), statusPending), IntegerEntry(keyAmountAssetAmount(amountAssetId, priceAssetId), amountAssetAmount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetAmount), StringEntry(keyPoolType(amountAssetId, priceAssetId), poolType)]
306306 else throw("Strict value is not equal to itself.")
307307 }
308308 else throw("Strict value is not equal to itself.")
309309 }
310310 else throw("Strict value is not equal to itself.")
311311 }
312312
313313
314314 @Callable(i)
315315 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
316316 let checkCaller = mustManager(i)
317317 if ((checkCaller == checkCaller))
318318 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
319319 else throw("Strict value is not equal to itself.")
320320 }
321321
322322
323323
324324 @Callable(i)
325325 func create () = _create(i, VLTPOOL)
326326
327327
328328
329329 @Callable(i)
330-func createStable () = _create(i, STBLPOOL)
330+func createStable () = {
331+ let checkCaller = mustManager(i)
332+ if ((checkCaller == checkCaller))
333+ then _create(i, STBLPOOL)
334+ else throw("Strict value is not equal to itself.")
335+ }
331336
332337
333338
334339 @Callable(i)
335340 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
336341 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
337342 then true
338343 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
339344 then true
340345 else throwCanActivateOnlyPendingPool()]
341346 if ((checks == checks))
342347 then {
343348 let poolTypeOption = getString(this, keyPoolType(amountAssetId, priceAssetId))
344349 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, if ((poolTypeOption == unit))
345350 then "VLTPOOL"
346351 else value(poolTypeOption), logo], nil)
347352 if ((activateNewPoolInv == activateNewPoolInv))
348353 then {
349354 let lpAssetId = match activateNewPoolInv {
350355 case id: String =>
351356 id
352357 case _ =>
353358 throwFactoryReturnedNotString()
354359 }
355360 if ((lpAssetId == lpAssetId))
356361 then {
357362 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
358363 if ((beforePut == beforePut))
359364 then {
360365 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
361366 then unit
362367 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
363368 then unit
364369 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
365370 if ((put == put))
366371 then {
367372 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
368373 if ((afterPut == afterPut))
369374 then {
370375 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
371376 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
372377 if ((res == res))
373378 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
374379 else throw("Strict value is not equal to itself.")
375380 }
376381 else throw("Strict value is not equal to itself.")
377382 }
378383 else throw("Strict value is not equal to itself.")
379384 }
380385 else throw("Strict value is not equal to itself.")
381386 }
382387 else throw("Strict value is not equal to itself.")
383388 }
384389 else throw("Strict value is not equal to itself.")
385390 }
386391 else throw("Strict value is not equal to itself.")
387392 }
388393
389394
390395
391396 @Callable(i)
392397 func setAdmins (adminPubKeys) = {
393398 let checkCaller = mustManager(i)
394399 if ((checkCaller == checkCaller))
395400 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
396401 else throw("Strict value is not equal to itself.")
397402 }
398403
399404
400405
401406 @Callable(i)
402407 func setManager (pendingManagerPublicKey) = {
403408 let checkCaller = mustManager(i)
404409 if ((checkCaller == checkCaller))
405410 then {
406411 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
407412 if ((checkManagerPublicKey == checkManagerPublicKey))
408413 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
409414 else throw("Strict value is not equal to itself.")
410415 }
411416 else throw("Strict value is not equal to itself.")
412417 }
413418
414419
415420
416421 @Callable(i)
417422 func confirmManager () = {
418423 let pm = pendingManagerPublicKeyOrUnit()
419424 let hasPM = if (isDefined(pm))
420425 then true
421426 else throw("No pending manager")
422427 if ((hasPM == hasPM))
423428 then {
424429 let checkPM = if ((i.callerPublicKey == value(pm)))
425430 then true
426431 else throw("You are not pending manager")
427432 if ((checkPM == checkPM))
428433 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
429434 else throw("Strict value is not equal to itself.")
430435 }
431436 else throw("Strict value is not equal to itself.")
432437 }
433438
434439
435440
436441 @Callable(i)
437442 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
438443
439444
440445
441446 @Callable(i)
442447 func statusREADONLY (amountAssetId,priceAssetId) = {
443448 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
444449 case s: String =>
445450 s
446451 case _ =>
447452 unit
448453 }
449454 $Tuple2(nil, status)
450455 }
451456
452457
453458 @Verifier(tx)
454459 func verify () = {
455460 let targetPublicKey = match managerPublicKeyOrUnit() {
456461 case pk: ByteVector =>
457462 pk
458463 case _: Unit =>
459464 tx.senderPublicKey
460465 case _ =>
461466 throw("Match error")
462467 }
463468 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
464469 }
465470

github/deemru/w8io/026f985 
84.39 ms