tx · GDHqE3iBHEtz66rPZ1smEGuCiAXra4v3GiZ9Aqzv7M7d 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH: -0.01200000 Waves 2022.06.28 15:27 [2116285] smart account 3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH > SELF 0.00000000 Waves
{ "type": 13, "id": "GDHqE3iBHEtz66rPZ1smEGuCiAXra4v3GiZ9Aqzv7M7d", "fee": 1200000, "feeAssetId": null, "timestamp": 1656419270697, "version": 2, "chainId": 84, "sender": "3N8n6BtTBKRZBoPuMzaPBH9FyJhfv9xDFJH", "senderPublicKey": "4hcnYaYoB2XaCzyJ7wfePpG7EfTd6st6aCAhkskJ9cQ5", "proofs": [ "4rz6roxT9GwjgizkgswksxaCJAX1tptJV87QpXoP3d7tasLvgu2C2mEkw2rcskDonpgdZLgAKj3Yq3Cik3h4oTm" ], "script": "base64:AAIFAAAAAAAAAB4IAhIAEgASABIAEgASABIAEgASABIAEgASABIAEgAAAAAVAAAAAAh1c2RuVXNkdAEAAAAgeKe/TORdN+2VIdfWflWy/q4Ef+gR/VrWL/1DGC+Wt8AAAAAADXVzZG5Vc2R0TFBUQ0kBAAAAIBG6tC/qJMhI0cdjddgUOO1bmK5/To9FHcuj/RydMcYtAAAAAAh3eFVzZG5MUAEAAAAAAAAAAAt3eFVzZG5MUFRDSQEAAAAAAAAAAAt3YXZlc1VzZG5McAEAAAAAAAAAAA53YXZlc1VzZG5MUFRDSQEAAAAAAAAAAAlldGhVc2RuTFABAAAAAAAAAAAMZXRoVXNkbkxQVENJAQAAAAAAAAAACWJ0Y1VzZG5MUAEAAAAAAAAAAAxidGNVc2RuTFBUQ0kBAAAAAAAAAAAJaXNTdG9wcGVkBwAAAAALa2V5VXNkdFVzZG4CAAAACVNUQUtFRF9MUAAAAAATa2V5VXNkdFVzZG5Db21wb3VuZAIAAAANRnJvbV9Db21wb3VuZAAAAAARa2V5d3hVc2RuQ29tcG91bmQCAAAAEFdYX1VTRE5fY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gAAABBVbmV4cGVjdGVkIHRva2VuBAAAAAFzCQAD/AAAAAQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRZQCeTa0sp7r6xoQ7m3EC4z6SNegzrtQ8CAAAABXN0YWtlBQAAAANuaWwJAARMAAAAAgUAAAACcG0FAAAAA25pbAMJAAAAAAAAAgUAAAABcwUAAAABcwQAAAADdXBkCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAKa2V5QnRjVXNkbgUAAAACYW0EAAAABHVwZEsJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAABJrZXlCdGNVc2RuQ29tcG91bmQAAAAAAAAAAAAJAARMAAAAAgUAAAADdXBkCQAETAAAAAIFAAAABHVwZEsFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleW+bXao=", "height": 2116285, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9BB8HgnBv5ewAX7Rsh4Vb51eXcqezmdQWM7p748Sx5d2 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let usdnUsdt = base58'97zHFp1C3cB7qfvx8Xv5f2rWp9nUSG5UnAamfPcW6txf' | |
5 | + | ||
6 | + | let usdnUsdtLPTCI = base58'2CD44HANZzsdU7yqRsmz7L9eA2Foh4YYMC4azMbaZEj6' | |
7 | + | ||
8 | + | let wxUsdnLP = base58'' | |
9 | + | ||
10 | + | let wxUsdnLPTCI = base58'' | |
11 | + | ||
12 | + | let wavesUsdnLp = base58'' | |
13 | + | ||
14 | + | let wavesUsdnLPTCI = base58'' | |
15 | + | ||
16 | + | let ethUsdnLP = base58'' | |
17 | + | ||
18 | + | let ethUsdnLPTCI = base58'' | |
19 | + | ||
20 | + | let btcUsdnLP = base58'' | |
21 | + | ||
22 | + | let btcUsdnLPTCI = base58'' | |
23 | + | ||
24 | + | let isStopped = false | |
25 | + | ||
26 | + | let keyUsdtUsdn = "STAKED_LP" | |
27 | + | ||
28 | + | let keyUsdtUsdnCompound = "From_Compound" | |
29 | + | ||
30 | + | let keywxUsdnCompound = "WX_USDN_compound" | |
31 | + | ||
32 | + | let keyWXUSDN = "WX_USDN" | |
33 | + | ||
34 | + | let keyWAVESUSDN = "WAVES_USDN" | |
35 | + | ||
36 | + | let keyWavesCompound = "WAVES_USDN_COMPOUND" | |
37 | + | ||
38 | + | let keyBtcUsdn = "BTC_USDN" | |
39 | + | ||
40 | + | let keyBtcUsdnCompound = "BTC_USDN_COMPOUND" | |
41 | + | ||
42 | + | let keyEthUsdn = "ETH_USDN" | |
43 | + | ||
44 | + | let keyEthUsdnCompound = "ETH_USDN_COMPOUND" | |
45 | + | ||
46 | + | @Callable(i) | |
47 | + | func depositBtcUsdnLP () = { | |
48 | + | let pmt = value(i.payments[0]) | |
49 | + | let pmtAmount = pmt.amount | |
50 | + | if ((pmt.assetId != btcUsdnLP)) | |
51 | + | then throw("attach BTCUSDNLP tokens only") | |
52 | + | else if (isStopped) | |
53 | + | then throw("smart contract is on lock") | |
54 | + | else { | |
55 | + | let tkStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0) | |
56 | + | let totalIssued = match assetInfo(btcUsdnLPTCI) { | |
57 | + | case asset: Asset => | |
58 | + | asset.quantity | |
59 | + | case _ => | |
60 | + | throw("Can't find asset") | |
61 | + | } | |
62 | + | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
63 | + | let updateState = IntegerEntry(keyBtcUsdn, (tkStaked + pmtAmount)) | |
64 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
65 | + | if ((LPstake == LPstake)) | |
66 | + | then { | |
67 | + | let LPIssue = Reissue(btcUsdnLPTCI, toIssue, true) | |
68 | + | let transfer = ScriptTransfer(i.caller, toIssue, btcUsdnLPTCI) | |
69 | + | [LPIssue, transfer, updateState] | |
70 | + | } | |
71 | + | else throw("Strict value is not equal to itself.") | |
72 | + | } | |
73 | + | } | |
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | @Callable(i) | |
78 | + | func depositWavesUsdnLP () = { | |
79 | + | let pmt = value(i.payments[0]) | |
80 | + | let pmtAmount = pmt.amount | |
81 | + | if ((pmt.assetId != wavesUsdnLp)) | |
82 | + | then throw("attach WAVESUSDNLP tokens only") | |
83 | + | else if (isStopped) | |
84 | + | then throw("smart contract is on lock") | |
85 | + | else { | |
86 | + | let tkStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0) | |
87 | + | let totalIssued = match assetInfo(wavesUsdnLp) { | |
88 | + | case asset: Asset => | |
89 | + | asset.quantity | |
90 | + | case _ => | |
91 | + | throw("Can't find asset") | |
92 | + | } | |
93 | + | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
94 | + | let updateState = IntegerEntry(keyWAVESUSDN, (tkStaked + pmtAmount)) | |
95 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
96 | + | if ((LPstake == LPstake)) | |
97 | + | then { | |
98 | + | let LPIssue = Reissue(wavesUsdnLPTCI, toIssue, true) | |
99 | + | let transfer = ScriptTransfer(i.caller, toIssue, wavesUsdnLPTCI) | |
100 | + | [LPIssue, transfer, updateState] | |
101 | + | } | |
102 | + | else throw("Strict value is not equal to itself.") | |
103 | + | } | |
104 | + | } | |
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | @Callable(i) | |
109 | + | func depositWxUsdnLP () = { | |
110 | + | let pmt = value(i.payments[0]) | |
111 | + | let pmtAmount = pmt.amount | |
112 | + | if ((pmt.assetId != wxUsdnLP)) | |
113 | + | then throw("attach WXUSDNLP tokens only") | |
114 | + | else if (isStopped) | |
115 | + | then throw("smart contract is on lock") | |
116 | + | else { | |
117 | + | let tkStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
118 | + | let totalIssued = match assetInfo(wxUsdnLPTCI) { | |
119 | + | case asset: Asset => | |
120 | + | asset.quantity | |
121 | + | case _ => | |
122 | + | throw("Can't find asset") | |
123 | + | } | |
124 | + | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
125 | + | let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount)) | |
126 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
127 | + | if ((LPstake == LPstake)) | |
128 | + | then { | |
129 | + | let LPIssue = Reissue(wxUsdnLPTCI, toIssue, true) | |
130 | + | let transfer = ScriptTransfer(i.caller, toIssue, wxUsdnLPTCI) | |
131 | + | [LPIssue, transfer, updateState] | |
132 | + | } | |
133 | + | else throw("Strict value is not equal to itself.") | |
134 | + | } | |
135 | + | } | |
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | @Callable(i) | |
140 | + | func depositUsdtUsdnLP () = { | |
141 | + | let pmt = value(i.payments[0]) | |
142 | + | let pmtAmount = pmt.amount | |
143 | + | if ((pmt.assetId != usdnUsdt)) | |
144 | + | then throw("attach USDTUSDNLP tokens only") | |
145 | + | else if (isStopped) | |
146 | + | then throw("smart contract is on lock") | |
147 | + | else { | |
148 | + | let tkStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0) | |
149 | + | let totalIssued = match assetInfo(usdnUsdtLPTCI) { | |
150 | + | case asset: Asset => | |
151 | + | asset.quantity | |
152 | + | case _ => | |
153 | + | throw("Can't find asset") | |
154 | + | } | |
155 | + | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
156 | + | let updateState = IntegerEntry(keyUsdtUsdn, (tkStaked + pmtAmount)) | |
157 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
158 | + | if ((LPstake == LPstake)) | |
159 | + | then { | |
160 | + | let LPIssue = Reissue(usdnUsdtLPTCI, toIssue, true) | |
161 | + | let transfer = ScriptTransfer(i.caller, toIssue, usdnUsdtLPTCI) | |
162 | + | [LPIssue, transfer, updateState] | |
163 | + | } | |
164 | + | else throw("Strict value is not equal to itself.") | |
165 | + | } | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(i) | |
171 | + | func depositEthUsdnLP () = { | |
172 | + | let pmt = value(i.payments[0]) | |
173 | + | let pmtAmount = pmt.amount | |
174 | + | if ((pmt.assetId != ethUsdnLP)) | |
175 | + | then throw("attach ETHUSDNLP tokens only") | |
176 | + | else if (isStopped) | |
177 | + | then throw("smart contract is on lock") | |
178 | + | else { | |
179 | + | let tkStaked = valueOrElse(getInteger(this, keyEthUsdn), 0) | |
180 | + | let totalIssued = match assetInfo(ethUsdnLPTCI) { | |
181 | + | case asset: Asset => | |
182 | + | asset.quantity | |
183 | + | case _ => | |
184 | + | throw("Can't find asset") | |
185 | + | } | |
186 | + | let toIssue = (pmtAmount * (totalIssued / tkStaked)) | |
187 | + | let updateState = IntegerEntry(keyEthUsdn, (tkStaked + pmtAmount)) | |
188 | + | let LPstake = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pmt]) | |
189 | + | if ((LPstake == LPstake)) | |
190 | + | then { | |
191 | + | let LPIssue = Reissue(ethUsdnLPTCI, toIssue, true) | |
192 | + | let transfer = ScriptTransfer(i.caller, toIssue, ethUsdnLPTCI) | |
193 | + | [LPIssue, transfer, updateState] | |
194 | + | } | |
195 | + | else throw("Strict value is not equal to itself.") | |
196 | + | } | |
197 | + | } | |
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | @Callable(i) | |
202 | + | func compoundBTCUSDNLP () = { | |
203 | + | let compound = value(i.payments[0]) | |
204 | + | let ca = compound.amount | |
205 | + | if ((compound.assetId != btcUsdnLP)) | |
206 | + | then throw("attach BTCUSDNLP tokens only") | |
207 | + | else { | |
208 | + | let fromCompound = valueOrElse(getInteger(this, keyBtcUsdnCompound), 0) | |
209 | + | let totalStaked = valueOrElse(getInteger(this, keyBtcUsdn), 0) | |
210 | + | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
211 | + | if ((stakeC == stakeC)) | |
212 | + | then { | |
213 | + | let updateState = IntegerEntry(keyBtcUsdn, (totalStaked + ca)) | |
214 | + | let tc = IntegerEntry(keyBtcUsdnCompound, (fromCompound + ca)) | |
215 | + | [updateState, tc] | |
216 | + | } | |
217 | + | else throw("Strict value is not equal to itself.") | |
218 | + | } | |
219 | + | } | |
220 | + | ||
221 | + | ||
222 | + | ||
223 | + | @Callable(i) | |
224 | + | func compoundETHUSDNLP () = { | |
225 | + | let compound = value(i.payments[0]) | |
226 | + | let ca = compound.amount | |
227 | + | if ((compound.assetId != ethUsdnLP)) | |
228 | + | then throw("attach ETHUSDNLP tokens only") | |
229 | + | else { | |
230 | + | let fromCompound = valueOrElse(getInteger(this, keyEthUsdnCompound), 0) | |
231 | + | let totalStaked = valueOrElse(getInteger(this, keyEthUsdn), 0) | |
232 | + | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
233 | + | if ((stakeC == stakeC)) | |
234 | + | then { | |
235 | + | let updateState = IntegerEntry(keyEthUsdn, (totalStaked + ca)) | |
236 | + | let tc = IntegerEntry(keyEthUsdnCompound, (fromCompound + ca)) | |
237 | + | [updateState, tc] | |
238 | + | } | |
239 | + | else throw("Strict value is not equal to itself.") | |
240 | + | } | |
241 | + | } | |
242 | + | ||
243 | + | ||
244 | + | ||
245 | + | @Callable(i) | |
246 | + | func compoundWXUSDNLP () = { | |
247 | + | let compound = value(i.payments[0]) | |
248 | + | let ca = compound.amount | |
249 | + | if ((compound.assetId != wxUsdnLP)) | |
250 | + | then throw("attach WXUSDNLP tokens only") | |
251 | + | else { | |
252 | + | let fromCompound = valueOrElse(getInteger(this, keywxUsdnCompound), 0) | |
253 | + | let totalStaked = valueOrElse(getInteger(this, keyWXUSDN), 0) | |
254 | + | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
255 | + | if ((stakeC == stakeC)) | |
256 | + | then { | |
257 | + | let updateState = IntegerEntry(keyWXUSDN, (totalStaked + ca)) | |
258 | + | let tc = IntegerEntry(keywxUsdnCompound, (fromCompound + ca)) | |
259 | + | [updateState, tc] | |
260 | + | } | |
261 | + | else throw("Strict value is not equal to itself.") | |
262 | + | } | |
263 | + | } | |
264 | + | ||
265 | + | ||
266 | + | ||
267 | + | @Callable(i) | |
268 | + | func compoundUSDTUSDNLP () = { | |
269 | + | let compound = value(i.payments[0]) | |
270 | + | let ca = compound.amount | |
271 | + | if ((compound.assetId != usdnUsdt)) | |
272 | + | then throw("attach USDTUSDNLP tokens only") | |
273 | + | else { | |
274 | + | let fromCompound = valueOrElse(getInteger(this, keyUsdtUsdnCompound), 0) | |
275 | + | let totalStaked = valueOrElse(getInteger(this, keyUsdtUsdn), 0) | |
276 | + | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
277 | + | if ((stakeC == stakeC)) | |
278 | + | then { | |
279 | + | let updateState = IntegerEntry(keyUsdtUsdn, (totalStaked + ca)) | |
280 | + | let tc = IntegerEntry(keyUsdtUsdnCompound, (fromCompound + ca)) | |
281 | + | [updateState, tc] | |
282 | + | } | |
283 | + | else throw("Strict value is not equal to itself.") | |
284 | + | } | |
285 | + | } | |
286 | + | ||
287 | + | ||
288 | + | ||
289 | + | @Callable(i) | |
290 | + | func compoundWAVESUSDNLP () = { | |
291 | + | let compound = value(i.payments[0]) | |
292 | + | let ca = compound.amount | |
293 | + | if ((compound.assetId != wavesUsdnLp)) | |
294 | + | then throw("attach WAVESUSDNLP tokens only") | |
295 | + | else { | |
296 | + | let fromCompound = valueOrElse(getInteger(this, keyWavesCompound), 0) | |
297 | + | let totalStaked = valueOrElse(getInteger(this, keyWAVESUSDN), 0) | |
298 | + | let stakeC = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [compound]) | |
299 | + | if ((stakeC == stakeC)) | |
300 | + | then { | |
301 | + | let updateState = IntegerEntry(keyWAVESUSDN, (totalStaked + ca)) | |
302 | + | let tc = IntegerEntry(keyWavesCompound, (fromCompound + ca)) | |
303 | + | [updateState, tc] | |
304 | + | } | |
305 | + | else throw("Strict value is not equal to itself.") | |
306 | + | } | |
307 | + | } | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(i) | |
312 | + | func initWX () = { | |
313 | + | let pm = value(i.payments[0]) | |
314 | + | let am = pm.amount | |
315 | + | if ((pm.assetId != wxUsdnLP)) | |
316 | + | then throw("Unexpected token") | |
317 | + | else { | |
318 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
319 | + | if ((s == s)) | |
320 | + | then { | |
321 | + | let upd = IntegerEntry(keyWXUSDN, am) | |
322 | + | let updK = IntegerEntry(keywxUsdnCompound, 0) | |
323 | + | [upd, updK] | |
324 | + | } | |
325 | + | else throw("Strict value is not equal to itself.") | |
326 | + | } | |
327 | + | } | |
328 | + | ||
329 | + | ||
330 | + | ||
331 | + | @Callable(i) | |
332 | + | func initWAVES () = { | |
333 | + | let pm = value(i.payments[0]) | |
334 | + | let am = pm.amount | |
335 | + | if ((pm.assetId != wavesUsdnLp)) | |
336 | + | then throw("Unexpected token") | |
337 | + | else { | |
338 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
339 | + | if ((s == s)) | |
340 | + | then { | |
341 | + | let upd = IntegerEntry(keyWAVESUSDN, am) | |
342 | + | let updK = IntegerEntry(keyWavesCompound, 0) | |
343 | + | [upd, updK] | |
344 | + | } | |
345 | + | else throw("Strict value is not equal to itself.") | |
346 | + | } | |
347 | + | } | |
348 | + | ||
349 | + | ||
350 | + | ||
351 | + | @Callable(i) | |
352 | + | func initETH () = { | |
353 | + | let pm = value(i.payments[0]) | |
354 | + | let am = pm.amount | |
355 | + | if ((pm.assetId != ethUsdnLP)) | |
356 | + | then throw("Unexpected token") | |
357 | + | else { | |
358 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
359 | + | if ((s == s)) | |
360 | + | then { | |
361 | + | let upd = IntegerEntry(keyEthUsdn, am) | |
362 | + | let updK = IntegerEntry(keyEthUsdnCompound, 0) | |
363 | + | [upd, updK] | |
364 | + | } | |
365 | + | else throw("Strict value is not equal to itself.") | |
366 | + | } | |
367 | + | } | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(i) | |
372 | + | func initBTC () = { | |
373 | + | let pm = value(i.payments[0]) | |
374 | + | let am = pm.amount | |
375 | + | if ((pm.assetId != btcUsdnLP)) | |
376 | + | then throw("Unexpected token") | |
377 | + | else { | |
378 | + | let s = invoke(Address(base58'3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz'), "stake", nil, [pm]) | |
379 | + | if ((s == s)) | |
380 | + | then { | |
381 | + | let upd = IntegerEntry(keyBtcUsdn, am) | |
382 | + | let updK = IntegerEntry(keyBtcUsdnCompound, 0) | |
383 | + | [upd, updK] | |
384 | + | } | |
385 | + | else throw("Strict value is not equal to itself.") | |
386 | + | } | |
387 | + | } | |
388 | + | ||
389 | + | ||
390 | + | @Verifier(tx) | |
391 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
392 | + |
github/deemru/w8io/026f985 24.15 ms ◑