tx · 78DMTKstepS9rokuipqmH3VjPfjLEc2UyXbtyPCGWsXm

3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH:  -0.01700000 Waves

2022.06.30 08:51 [2118775] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves

{ "type": 13, "id": "78DMTKstepS9rokuipqmH3VjPfjLEc2UyXbtyPCGWsXm", "fee": 1700000, "feeAssetId": null, "timestamp": 1656568361407, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "4URKF6PobXbktUjCXipBMbJ6t3ZLbQB1p6uFCQwYkoZ6AqCJCvkTF6yKeyPgAnVDWREa1jVbYmXQLuCe1oEVJWDr" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAg202DNWRHG5bvnwwvoM991XmdkujhmzUPwT/MewJwKQsAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIAqBzantQGEdmEq4Oth6BGhTCCbAyZjxYcEpfvod3iryAAAAAAh3eFVzZG5MUAEAAAAgG7mhj3vOTKXN+s5HyQsWjk32W97C65PB1sWo0bGqCxwAAAAAC3d4VXNkbkxQVENJAQAAACC37N3mGwJ72rYTh/1V0NY8tseiNz1LiL3Be29IRACYLwAAAAALd2F2ZXNVc2RuTHABAAAAINUKknePcghEmMkNN/IegHNiilmrJ+abeEGdbsH03iJ2AAAAAA53YXZlc1VzZG5MUFRDSQEAAAAgxRp2zzmtZIv1fW7qZyCOpdLB08oGyQGtTSaCWHrWElkAAAAACWV0aFVzZG5MUAEAAAAgf0Ew/c/5+Zy9fq7UHSNMMuNJS4SB4kp3y/IQBPX7+eEAAAAADGV0aFVzZG5MUFRDSQEAAAAg4e0WyvKtIAu2EMEK2Ns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JhbQgFAAAAAnBtAAAABmFtb3VudAMJAQAAAAIhPQAAAAIIBQAAAAJwbQAAAAdhc3NldElkBQAAAAlidGNVc2RuTFAJAAACAAAAAQIAAAAQVW5leHBlY3RlZCB0b2tlbgQAAAABcwkAA/wAAAAECQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUWUAnk2tLKe6+saEO5txAuM+kjXoM67UPAgAAAAVzdGFrZQUAAAADbmlsCQAETAAAAAIFAAAAAnBtBQAAAANuaWwDCQAAAAAAAAIFAAAAAXMFAAAAAXMEAAAAA3VwZAkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAACmtleUJ0Y1VzZG4FAAAAAmFtBAAAAAR1cGRLCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAASa2V5QnRjVXNkbkNvbXBvdW5kAAAAAAAAAAAABAAAAAdMUElzc3VlCQEAAAAHUmVpc3N1ZQAAAAMFAAAADGJ0Y1VzZG5MUFRDSQUAAAACYW0GBAAAAAJ0cgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAJhbQUAAAAMYnRjVXNkbkxQVENJCQAETAAAAAIFAAAAA3VwZAkABEwAAAACBQAAAAR1cGRLCQAETAAAAAIFAAAAB0xQSXNzdWUJAARMAAAAAgUAAAACdHIFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecMrTK8=", "height": 2118775, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J3MwVi2C76swNX4PS5z7Xvno5qrDiL3YCAAozqzfbwaq Next: 4KURt3v4DFqtT6XELdzNdSsxrxBbaRo496ZRa1nUah7g Diff:
OldNewDifferences
9090 case _ =>
9191 throw("Can't find asset")
9292 }
93- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, wavesUsdnLPTCI)) / tkStaked))
93+ let toIssue = (pmtAmount * (totalIssued / tkStaked))
9494 let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount))
9595 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
9696 if ((LPstake == LPstake))
121121 case _ =>
122122 throw("Can't find asset")
123123 }
124- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, wxUsdnLPTCI)) / tkStaked))
124+ let toIssue = (pmtAmount * (totalIssued / tkStaked))
125125 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
126126 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
127127 if ((LPstake == LPstake))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnUsdt = base58'Fm4qczu6Pepz8KUhh3Heb6LeTVfpSMX5vvNgw3x764CS'
55
66 let usdnUsdtLPTCI = base58'i1snzKxSEZVokh9TWj8hTJQEDBsocnL2hRWsSbsMPK7'
77
88 let wxUsdnLP = base58'2sEBVcyDFK2LupCf7MeA4vzHhGK4DC1WjbKGQCLYDqib'
99
1010 let wxUsdnLPTCI = base58'DNy6WBfhPE4y82RonGdHhZEunNotEDzmNfrBomWnsyGi'
1111
1212 let wavesUsdnLp = base58'FLdC14nUVRyiSYjVrMo3X4g8rXQjLbNRaGAyQAm8V68V'
1313
1414 let wavesUsdnLPTCI = base58'EGQiqw8jLjg6SVLUeeqMLjk3EjhEVHtjkJ6w46HyFfep'
1515
1616 let ethUsdnLP = base58'9ZkS8GoUWn69QhgF1RsRtS9CFtc7ZbDNX5N238Jmqjdr'
1717
1818 let ethUsdnLPTCI = base58'GCvR4BmCSjncVEEwr9psvhN5mctdNTGPs8Xp4b2oQNFZ'
1919
2020 let btcUsdnLP = base58'2RmyyZ39ZoPoTWksM6urmjgx9mB8ksP8Ru6ba8u89mZm'
2121
2222 let btcUsdnLPTCI = base58'4jarprgmcev38EU5p2duJAznZSLUxZ831jCT2vf95Hey'
2323
2424 let isStopped = false
2525
2626 let keyUsdtUsdn = "STAKED_LP"
2727
2828 let keyUsdtUsdnCompound = "From_Compound"
2929
3030 let keywxUsdnCompound = "WX_USDN_compound"
3131
3232 let keyWXUSDN = "WX_USDN"
3333
3434 let keyWAVESUSDN = "WAVES_USDN"
3535
3636 let keyWavesCompound = "WAVES_USDN_COMPOUND"
3737
3838 let keyBtcUsdn = "BTC_USDN"
3939
4040 let keyBtcUsdnCompound = "BTC_USDN_COMPOUND"
4141
4242 let keyEthUsdn = "ETH_USDN"
4343
4444 let keyEthUsdnCompound = "ETH_USDN_COMPOUND"
4545
4646 @Callable(i)
4747 func depositBtcUsdnLP () = {
4848 let pmt = value(i.payments[0])
4949 let pmtAmount = pmt.amount
5050 if ((pmt.assetId != btcUsdnLP))
5151 then throw("attach BTCUSDNLP tokens only")
5252 else if (isStopped)
5353 then throw("smart contract is on lock")
5454 else {
5555 let tkStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
5656 let totalIssued = match assetInfo(btcUsdnLPTCI) {
5757 case asset: Asset =>
5858 asset.quantity
5959 case _ =>
6060 throw("Can't find asset")
6161 }
6262 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, btcUsdnLPTCI)) / tkStaked))
6363 let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount))
6464 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
6565 if ((LPstake == LPstake))
6666 then {
6767 let LPIssue = Reissue(btcUsdnLPTCI, toIssue, true)
6868 let transfer = ScriptTransfer(i.caller, toIssue, btcUsdnLPTCI)
6969 [LPIssue, transfer, updateState]
7070 }
7171 else throw("Strict value is not equal to itself.")
7272 }
7373 }
7474
7575
7676
7777 @Callable(i)
7878 func depositWavesUsdnLP () = {
7979 let pmt = value(i.payments[0])
8080 let pmtAmount = pmt.amount
8181 if ((pmt.assetId != wavesUsdnLp))
8282 then throw("attach WAVESUSDNLP tokens only")
8383 else if (isStopped)
8484 then throw("smart contract is on lock")
8585 else {
8686 let tkStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
8787 let totalIssued = match assetInfo(wavesUsdnLp) {
8888 case asset: Asset =>
8989 asset.quantity
9090 case _ =>
9191 throw("Can't find asset")
9292 }
93- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, wavesUsdnLPTCI)) / tkStaked))
93+ let toIssue = (pmtAmount * (totalIssued / tkStaked))
9494 let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount))
9595 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
9696 if ((LPstake == LPstake))
9797 then {
9898 let LPIssue = Reissue(wavesUsdnLPTCI, toIssue, true)
9999 let transfer = ScriptTransfer(i.caller, toIssue, wavesUsdnLPTCI)
100100 [LPIssue, transfer, updateState]
101101 }
102102 else throw("Strict value is not equal to itself.")
103103 }
104104 }
105105
106106
107107
108108 @Callable(i)
109109 func depositWxUsdnLP () = {
110110 let pmt = value(i.payments[0])
111111 let pmtAmount = pmt.amount
112112 if ((pmt.assetId != wxUsdnLP))
113113 then throw("attach WXUSDNLP tokens only")
114114 else if (isStopped)
115115 then throw("smart contract is on lock")
116116 else {
117117 let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
118118 let totalIssued = match assetInfo(wxUsdnLPTCI) {
119119 case asset: Asset =>
120120 asset.quantity
121121 case _ =>
122122 throw("Can't find asset")
123123 }
124- let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, wxUsdnLPTCI)) / tkStaked))
124+ let toIssue = (pmtAmount * (totalIssued / tkStaked))
125125 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
126126 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
127127 if ((LPstake == LPstake))
128128 then {
129129 let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true)
130130 let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI)
131131 [LPIssue, transfer, updateState]
132132 }
133133 else throw("Strict value is not equal to itself.")
134134 }
135135 }
136136
137137
138138
139139 @Callable(i)
140140 func depositUsdtUsdnLP () = {
141141 let pmt = value(i.payments[0])
142142 let pmtAmount = pmt.amount
143143 if ((pmt.assetId != usdnUsdt))
144144 then throw("attach USDTUSDNLP tokens only")
145145 else if (isStopped)
146146 then throw("smart contract is on lock")
147147 else {
148148 let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
149149 let totalIssued = match assetInfo(usdnUsdtLPTCI) {
150150 case asset: Asset =>
151151 asset.quantity
152152 case _ =>
153153 throw("Can't find asset")
154154 }
155155 let toIssue = (pmtAmount * (totalIssued / tkStaked))
156156 let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount))
157157 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
158158 if ((LPstake == LPstake))
159159 then {
160160 let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true)
161161 let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI)
162162 [LPIssue, transfer, updateState]
163163 }
164164 else throw("Strict value is not equal to itself.")
165165 }
166166 }
167167
168168
169169
170170 @Callable(i)
171171 func depositEthUsdnLP () = {
172172 let pmt = value(i.payments[0])
173173 let pmtAmount = pmt.amount
174174 if ((pmt.assetId != ethUsdnLP))
175175 then throw("attach ETHUSDNLP tokens only")
176176 else if (isStopped)
177177 then throw("smart contract is on lock")
178178 else {
179179 let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
180180 let totalIssued = match assetInfo(ethUsdnLPTCI) {
181181 case asset: Asset =>
182182 asset.quantity
183183 case _ =>
184184 throw("Can't find asset")
185185 }
186186 let toIssue = (pmtAmount * ((totalIssued - assetBalance(this, ethUsdnLPTCI)) / tkStaked))
187187 let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount))
188188 let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt])
189189 if ((LPstake == LPstake))
190190 then {
191191 let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true)
192192 let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI)
193193 [LPIssue, transfer, updateState]
194194 }
195195 else throw("Strict value is not equal to itself.")
196196 }
197197 }
198198
199199
200200
201201 @Callable(i)
202202 func compoundBTCUSDNLP () = {
203203 let compound = value(i.payments[0])
204204 let ca = compound.amount
205205 if ((compound.assetId != btcUsdnLP))
206206 then throw("attach BTCUSDNLP tokens only")
207207 else {
208208 let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0)
209209 let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0)
210210 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
211211 if ((stakeC == stakeC))
212212 then {
213213 let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca))
214214 let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca))
215215 [updateState, tc]
216216 }
217217 else throw("Strict value is not equal to itself.")
218218 }
219219 }
220220
221221
222222
223223 @Callable(i)
224224 func compoundETHUSDNLP () = {
225225 let compound = value(i.payments[0])
226226 let ca = compound.amount
227227 if ((compound.assetId != ethUsdnLP))
228228 then throw("attach ETHUSDNLP tokens only")
229229 else {
230230 let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0)
231231 let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0)
232232 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
233233 if ((stakeC == stakeC))
234234 then {
235235 let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca))
236236 let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca))
237237 [updateState, tc]
238238 }
239239 else throw("Strict value is not equal to itself.")
240240 }
241241 }
242242
243243
244244
245245 @Callable(i)
246246 func compoundWXUSDNLP () = {
247247 let compound = value(i.payments[0])
248248 let ca = compound.amount
249249 if ((compound.assetId != wxUsdnLP))
250250 then throw("attach WXUSDNLP tokens only")
251251 else {
252252 let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0)
253253 let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0)
254254 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
255255 if ((stakeC == stakeC))
256256 then {
257257 let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca))
258258 let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca))
259259 [updateState, tc]
260260 }
261261 else throw("Strict value is not equal to itself.")
262262 }
263263 }
264264
265265
266266
267267 @Callable(i)
268268 func compoundUSDTUSDNLP () = {
269269 let compound = value(i.payments[0])
270270 let ca = compound.amount
271271 if ((compound.assetId != usdnUsdt))
272272 then throw("attach USDTUSDNLP tokens only")
273273 else {
274274 let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0)
275275 let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0)
276276 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
277277 if ((stakeC == stakeC))
278278 then {
279279 let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca))
280280 let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca))
281281 [updateState, tc]
282282 }
283283 else throw("Strict value is not equal to itself.")
284284 }
285285 }
286286
287287
288288
289289 @Callable(i)
290290 func compoundWAVESUSDNLP () = {
291291 let compound = value(i.payments[0])
292292 let ca = compound.amount
293293 if ((compound.assetId != wavesUsdnLp))
294294 then throw("attach WAVESUSDNLP tokens only")
295295 else {
296296 let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0)
297297 let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0)
298298 let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound])
299299 if ((stakeC == stakeC))
300300 then {
301301 let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca))
302302 let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca))
303303 [updateState, tc]
304304 }
305305 else throw("Strict value is not equal to itself.")
306306 }
307307 }
308308
309309
310310
311311 @Callable(i)
312312 func initWX () = {
313313 let pm = value(i.payments[0])
314314 let am = pm.amount
315315 if ((pm.assetId != wxUsdnLP))
316316 then throw("Unexpected token")
317317 else {
318318 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
319319 if ((s == s))
320320 then {
321321 let upd = IntegerEntry(keyWXUSDN, am)
322322 let updK = IntegerEntry(keywxUsdnCompound, 0)
323323 let wxLPIssue = Reissue(wxUsdnLPTCI, am, true)
324324 let sendWXLPTCI = ScriptTransfer(i.caller, am, wxUsdnLPTCI)
325325 [upd, updK, wxLPIssue, sendWXLPTCI]
326326 }
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 }
330330
331331
332332
333333 @Callable(i)
334334 func initWAVES () = {
335335 let pm = value(i.payments[0])
336336 let am = pm.amount
337337 if ((pm.assetId != wavesUsdnLp))
338338 then throw("Unexpected token")
339339 else {
340340 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
341341 if ((s == s))
342342 then {
343343 let upd = IntegerEntry(keyWAVESUSDN, am)
344344 let updK = IntegerEntry(keyWavesCompound, 0)
345345 let LPIssue = Reissue(wavesUsdnLPTCI, am, true)
346346 let sendWAVESLPTCI = ScriptTransfer(i.caller, am, wavesUsdnLPTCI)
347347 [upd, updK, LPIssue, sendWAVESLPTCI]
348348 }
349349 else throw("Strict value is not equal to itself.")
350350 }
351351 }
352352
353353
354354
355355 @Callable(i)
356356 func initETH () = {
357357 let pm = value(i.payments[0])
358358 let am = pm.amount
359359 if ((pm.assetId != ethUsdnLP))
360360 then throw("Unexpected token")
361361 else {
362362 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
363363 if ((s == s))
364364 then {
365365 let upd = IntegerEntry(keyEthUsdn, am)
366366 let updK = IntegerEntry(keyEthUsdnCompound, 0)
367367 let issue = Reissue(ethUsdnLPTCI, am, true)
368368 let send = ScriptTransfer(i.caller, am, ethUsdnLPTCI)
369369 [upd, updK, issue, send]
370370 }
371371 else throw("Strict value is not equal to itself.")
372372 }
373373 }
374374
375375
376376
377377 @Callable(i)
378378 func initBTC () = {
379379 let pm = value(i.payments[0])
380380 let am = pm.amount
381381 if ((pm.assetId != btcUsdnLP))
382382 then throw("Unexpected token")
383383 else {
384384 let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm])
385385 if ((s == s))
386386 then {
387387 let upd = IntegerEntry(keyBtcUsdn, am)
388388 let updK = IntegerEntry(keyBtcUsdnCompound, 0)
389389 let LPIssue = Reissue(btcUsdnLPTCI, am, true)
390390 let tr = ScriptTransfer(i.caller, am, btcUsdnLPTCI)
391391 [upd, updK, LPIssue, tr]
392392 }
393393 else throw("Strict value is not equal to itself.")
394394 }
395395 }
396396
397397
398398 @Verifier(tx)
399399 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
400400

github/deemru/w8io/fabc49c 
44.90 ms