tx · DAzxxT7y6e3FHgfsW4KwhQai7mtuSCg2yzsDaT3mGhS9 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X: -0.00800000 Waves 2022.11.11 16:29 [2312549] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves
{ "type": 13, "id": "DAzxxT7y6e3FHgfsW4KwhQai7mtuSCg2yzsDaT3mGhS9", "fee": 800000, "feeAssetId": null, "timestamp": 1668173341604, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "fyEpmtvKhVNYyyzvS9tZKHJTjd9pK2wuZc9mWDVhACJiEhtv9FvVyrsueoiH5tsSxgweP5k8KrsXEbEGB6u1xBd" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEQEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgEOYXNzZXRPZmZlclN3YXABBWFzc2V0CQCsAgIFBWFzc2V0AgZfb2ZmZXIBDXRyeUdldEludGVnZXIBA2tleQQDdmFsBAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAU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DMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCm93bmVyT2ZmZXIJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQlsaXN0UHJpY2UAAgUEdW5pdAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgIJAQhwcmljZUtleQEFB29mZmVySWQCBFN3YXAJAMwIAgkBC0RlbGV0ZUVudHJ5AQkArAICCQEIb3duZXJLZXkBBQdvZmZlcklkAgRTd2FwCQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkBCWlzc3VlcktleQEFB29mZmVySWQCBFN3YXAJAMwIAgkBC0RlbGV0ZUVudHJ5AQkArAICCQEKYXNzZXRPZmZlcgEFB29mZmVySWQCBFN3YXAFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmkvTfX", "height": 2312549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6PaV3oCQCt4Tgh2BoysEtraes3fFmaD4dxYnhCwGyeGt Next: none Diff:
Old | New | Differences | |
---|---|---|---|
287 | 287 | let offer = tryGetString((assetOffer(offerId) + "Swap")) | |
288 | 288 | let ownerOffer = tryGetString((ownerKey(offerId) + "Swap")) | |
289 | 289 | let ownerNft = tryGetString(ownerKey(offer)) | |
290 | - | let errorAddress = match addressFromString(ownerNft) { | |
291 | - | case a: Address => | |
292 | - | a | |
293 | - | case _ => | |
294 | - | throw("This NFT is not for sale") | |
295 | - | } | |
296 | 290 | let offerOnAsset = tryGetString((assetOffer(offerId) + "Swap")) | |
297 | - | if ((ownerNft != toBase58String(i.caller.bytes))) | |
298 | - | then throw("The calling address is not the owner of the NFT token") | |
299 | - | else { | |
300 | - | let fee = tryGetInteger("commission") | |
301 | - | let listAsset = split(offerId, "_") | |
302 | - | let listPrice = split(price, "_") | |
291 | + | if ((ownerNft == "")) | |
292 | + | then throw("This NFT is not for sale") | |
293 | + | else if ((ownerNft != toBase58String(i.caller.bytes))) | |
294 | + | then throw("The calling address is not the owner of the NFT token") | |
295 | + | else { | |
296 | + | let fee = tryGetInteger("commission") | |
297 | + | let listAsset = split(offerId, "_") | |
298 | + | let listPrice = split(price, "_") | |
303 | 299 | [ScriptTransfer(addressFromStringValue(ownerNft), parseIntValue(listPrice[1]), fromBase58String(listAsset[1])), ScriptTransfer(addressFromStringValue(ownerNft), (parseIntValue(listPrice[2]) - fee), unit), ScriptTransfer(addressFromStringValue(ownerOffer), 1, fromBase58String(offerOnAsset)), DeleteEntry(priceKey(offerOnAsset)), DeleteEntry(ownerKey(offerOnAsset)), DeleteEntry(issuerKey(offerOnAsset)), DeleteEntry(nameKey(offerOnAsset)), DeleteEntry(assetOffer(offerOnAsset)), DeleteEntry(descriptionKey(offerOnAsset)), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap")), DeleteEntry((assetOffer(offerId) + "Swap"))] | |
304 | - | } | |
300 | + | } | |
305 | 301 | } | |
306 | 302 | ||
307 | 303 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func priceKey (asset) = (asset + "_price") | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func ownerKey (asset) = (asset + "_owner") | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | func issuerKey (asset) = (asset + "_issuer") | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func nameKey (asset) = (asset + "_name") | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func descriptionKey (asset) = (asset + "_description") | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func assetAccess (asset) = (asset + "_assetBuy") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func assetOffer (asset) = (asset + "_offer") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func assetOfferSwap (asset) = (asset + "_offer") | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func tryGetInteger (key) = { | |
29 | 29 | let val = match getInteger(this, key) { | |
30 | 30 | case b: Int => | |
31 | 31 | b | |
32 | 32 | case _ => | |
33 | 33 | 0 | |
34 | 34 | } | |
35 | 35 | val | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func tryGetString (key) = { | |
40 | 40 | let val = match getString(this, key) { | |
41 | 41 | case b: String => | |
42 | 42 | b | |
43 | 43 | case _ => | |
44 | 44 | "" | |
45 | 45 | } | |
46 | 46 | val | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func tryGetBool (key) = { | |
51 | 51 | let val = match getBoolean(this, key) { | |
52 | 52 | case b: Boolean => | |
53 | 53 | b | |
54 | 54 | case _ => | |
55 | 55 | false | |
56 | 56 | } | |
57 | 57 | val | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func isPaymentOk (i,acceptableAssetId,price) = if ((size(i.payments) == 0)) | |
62 | 62 | then throw("Payment not attached") | |
63 | 63 | else { | |
64 | 64 | let p = value(i.payments[0]) | |
65 | 65 | let val = match p.assetId { | |
66 | 66 | case assetId: ByteVector => | |
67 | 67 | if ((toBase58String(assetId) == acceptableAssetId)) | |
68 | 68 | then (p.amount >= price) | |
69 | 69 | else false | |
70 | 70 | case waves: Unit => | |
71 | 71 | (p.amount >= price) | |
72 | 72 | case _ => | |
73 | 73 | throw("Match error") | |
74 | 74 | } | |
75 | 75 | val | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func isAcceptableNft (status,assetSale) = { | |
80 | 80 | let idAsset = match assetSale.assetId { | |
81 | 81 | case b: ByteVector => | |
82 | 82 | b | |
83 | 83 | case b: Unit => | |
84 | 84 | base58'2CsAf' | |
85 | 85 | case _ => | |
86 | 86 | throw("Match error") | |
87 | 87 | } | |
88 | 88 | let asset = match assetInfo(idAsset) { | |
89 | 89 | case b: Asset => | |
90 | 90 | toBase58String(b.issuer.bytes) | |
91 | 91 | case waves: Unit => | |
92 | 92 | "WAVES" | |
93 | 93 | case _ => | |
94 | 94 | throw("Match error") | |
95 | 95 | } | |
96 | 96 | if (tryGetBool(asset)) | |
97 | 97 | then status | |
98 | 98 | else false | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getAssetId (status,assetSale) = { | |
103 | 103 | let idAsset = match assetSale.assetId { | |
104 | 104 | case b: ByteVector => | |
105 | 105 | toBase58String(b) | |
106 | 106 | case b: Unit => | |
107 | 107 | "WAVES" | |
108 | 108 | case _ => | |
109 | 109 | throw("Match error") | |
110 | 110 | } | |
111 | 111 | ((status + "_") + idAsset) | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getAssetPrice (status,assetSale) = { | |
116 | 116 | let price = toString(assetSale.amount) | |
117 | 117 | ((status + "_") + price) | |
118 | 118 | } | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getAssetIssuer (status,assetSale) = { | |
122 | 122 | let idAsset = match assetSale.assetId { | |
123 | 123 | case b: ByteVector => | |
124 | 124 | b | |
125 | 125 | case b: Unit => | |
126 | 126 | base58'2CsAf' | |
127 | 127 | case _ => | |
128 | 128 | throw("Match error") | |
129 | 129 | } | |
130 | 130 | let issuer = match assetInfo(idAsset) { | |
131 | 131 | case b: Asset => | |
132 | 132 | toBase58String(b.issuer.bytes) | |
133 | 133 | case b: Unit => | |
134 | 134 | "WAVES" | |
135 | 135 | case _ => | |
136 | 136 | throw("Match error") | |
137 | 137 | } | |
138 | 138 | ((status + "_") + issuer) | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getTransferAsset (status,data) = { | |
143 | 143 | let transferAddress = match addressFromString(data._1) { | |
144 | 144 | case b: Address => | |
145 | 145 | b | |
146 | 146 | case b: Unit => | |
147 | 147 | this | |
148 | 148 | case _ => | |
149 | 149 | throw("Match error") | |
150 | 150 | } | |
151 | 151 | if ((data._3 != "WAVES")) | |
152 | 152 | then (status :+ ScriptTransfer(transferAddress, data._2, fromBase58String(data._3))) | |
153 | 153 | else (status :+ ScriptTransfer(transferAddress, data._2, unit)) | |
154 | 154 | } | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice))) | |
159 | 159 | then (price > 0) | |
160 | 160 | else false)) | |
161 | 161 | then throw("Sale Asset incorrect") | |
162 | 162 | else { | |
163 | 163 | let firstPayment = value(i.payments[0]) | |
164 | 164 | let assetId = match firstPayment.assetId { | |
165 | 165 | case id: ByteVector => | |
166 | 166 | id | |
167 | 167 | case w: Unit => | |
168 | 168 | throw("Asset is not NFT") | |
169 | 169 | case _ => | |
170 | 170 | throw("Match error") | |
171 | 171 | } | |
172 | 172 | let assetIdStr = toBase58String(assetId) | |
173 | 173 | let asset = match assetInfo(assetId) { | |
174 | 174 | case a: Asset => | |
175 | 175 | a | |
176 | 176 | case _ => | |
177 | 177 | throw("Error getting information about asset") | |
178 | 178 | } | |
179 | 179 | if (if (if ((asset.quantity != 1)) | |
180 | 180 | then (asset.decimals != 0) | |
181 | 181 | else false) | |
182 | 182 | then asset.reissuable | |
183 | 183 | else false) | |
184 | 184 | then throw("Asset is not NFT") | |
185 | 185 | else [IntegerEntry(priceKey(assetIdStr), price), StringEntry(ownerKey(assetIdStr), toBase58String(i.caller.bytes)), StringEntry(issuerKey(assetIdStr), toBase58String(asset.issuer.bytes)), StringEntry(nameKey(assetIdStr), asset.name), StringEntry(descriptionKey(assetIdStr), asset.description), StringEntry(assetOffer(assetIdStr), assetIdPrice)] | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | ||
190 | 190 | @Callable(i) | |
191 | 191 | func offerForSwap (assetIdPrice) = { | |
192 | 192 | let status = { | |
193 | 193 | let $l = i.payments | |
194 | 194 | let $s = size($l) | |
195 | 195 | let $acc0 = true | |
196 | 196 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
197 | 197 | then $a | |
198 | 198 | else isAcceptableNft($a, $l[$i]) | |
199 | 199 | ||
200 | 200 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
201 | 201 | then $a | |
202 | 202 | else throw("List size exceeds 2") | |
203 | 203 | ||
204 | 204 | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
205 | 205 | } | |
206 | 206 | if (!(status)) | |
207 | 207 | then throw("Payments incorrect") | |
208 | 208 | else if ((tryGetInteger("commission") > i.payments[1].amount)) | |
209 | 209 | then throw("No minimum commission") | |
210 | 210 | else { | |
211 | 211 | let paymentAll = { | |
212 | 212 | let $l = i.payments | |
213 | 213 | let $s = size($l) | |
214 | 214 | let $acc0 = "Swap" | |
215 | 215 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
216 | 216 | then $a | |
217 | 217 | else getAssetId($a, $l[$i]) | |
218 | 218 | ||
219 | 219 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
220 | 220 | then $a | |
221 | 221 | else throw("List size exceeds 2") | |
222 | 222 | ||
223 | 223 | $f1_2($f1_1($f1_1($acc0, 0), 1), 2) | |
224 | 224 | } | |
225 | 225 | let issuer = { | |
226 | 226 | let $l = i.payments | |
227 | 227 | let $s = size($l) | |
228 | 228 | let $acc0 = "Swap" | |
229 | 229 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
230 | 230 | then $a | |
231 | 231 | else getAssetIssuer($a, $l[$i]) | |
232 | 232 | ||
233 | 233 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
234 | 234 | then $a | |
235 | 235 | else throw("List size exceeds 2") | |
236 | 236 | ||
237 | 237 | $f2_2($f2_1($f2_1($acc0, 0), 1), 2) | |
238 | 238 | } | |
239 | 239 | let price = { | |
240 | 240 | let $l = i.payments | |
241 | 241 | let $s = size($l) | |
242 | 242 | let $acc0 = "Swap" | |
243 | 243 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
244 | 244 | then $a | |
245 | 245 | else getAssetPrice($a, $l[$i]) | |
246 | 246 | ||
247 | 247 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
248 | 248 | then $a | |
249 | 249 | else throw("List size exceeds 2") | |
250 | 250 | ||
251 | 251 | $f3_2($f3_1($f3_1($acc0, 0), 1), 2) | |
252 | 252 | } | |
253 | 253 | [StringEntry((priceKey(paymentAll) + "Swap"), price), StringEntry((ownerKey(paymentAll) + "Swap"), toBase58String(i.caller.bytes)), StringEntry((issuerKey(paymentAll) + "Swap"), issuer), StringEntry((assetOffer(paymentAll) + "Swap"), assetIdPrice)] | |
254 | 254 | } | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | ||
259 | 259 | @Callable(i) | |
260 | 260 | func buy (assetStr) = { | |
261 | 261 | let price = tryGetInteger(priceKey(assetStr)) | |
262 | 262 | let acceptableAssetId = tryGetString(assetOffer(assetStr)) | |
263 | 263 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
264 | 264 | let owner = match addressFromString(ownerStr) { | |
265 | 265 | case a: Address => | |
266 | 266 | a | |
267 | 267 | case _ => | |
268 | 268 | throw("Address parsing error") | |
269 | 269 | } | |
270 | 270 | if (!(isPaymentOk(i, acceptableAssetId, price))) | |
271 | 271 | then throw("Wrong payment amount or asset") | |
272 | 272 | else if ((ownerStr == toBase58String(i.caller.bytes))) | |
273 | 273 | then throw("Owner cannot buy his NTF") | |
274 | 274 | else if ((price == 0)) | |
275 | 275 | then throw("This NFT is not for sale") | |
276 | 276 | else { | |
277 | 277 | let fee = ((price / 100) * 5) | |
278 | 278 | [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), ScriptTransfer(owner, (price - fee), unit), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr)), DeleteEntry(assetOffer(assetStr))] | |
279 | 279 | } | |
280 | 280 | } | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | ||
284 | 284 | @Callable(i) | |
285 | 285 | func swapDone (offerId) = { | |
286 | 286 | let price = tryGetString((priceKey(offerId) + "Swap")) | |
287 | 287 | let offer = tryGetString((assetOffer(offerId) + "Swap")) | |
288 | 288 | let ownerOffer = tryGetString((ownerKey(offerId) + "Swap")) | |
289 | 289 | let ownerNft = tryGetString(ownerKey(offer)) | |
290 | - | let errorAddress = match addressFromString(ownerNft) { | |
291 | - | case a: Address => | |
292 | - | a | |
293 | - | case _ => | |
294 | - | throw("This NFT is not for sale") | |
295 | - | } | |
296 | 290 | let offerOnAsset = tryGetString((assetOffer(offerId) + "Swap")) | |
297 | - | if ((ownerNft != toBase58String(i.caller.bytes))) | |
298 | - | then throw("The calling address is not the owner of the NFT token") | |
299 | - | else { | |
300 | - | let fee = tryGetInteger("commission") | |
301 | - | let listAsset = split(offerId, "_") | |
302 | - | let listPrice = split(price, "_") | |
291 | + | if ((ownerNft == "")) | |
292 | + | then throw("This NFT is not for sale") | |
293 | + | else if ((ownerNft != toBase58String(i.caller.bytes))) | |
294 | + | then throw("The calling address is not the owner of the NFT token") | |
295 | + | else { | |
296 | + | let fee = tryGetInteger("commission") | |
297 | + | let listAsset = split(offerId, "_") | |
298 | + | let listPrice = split(price, "_") | |
303 | 299 | [ScriptTransfer(addressFromStringValue(ownerNft), parseIntValue(listPrice[1]), fromBase58String(listAsset[1])), ScriptTransfer(addressFromStringValue(ownerNft), (parseIntValue(listPrice[2]) - fee), unit), ScriptTransfer(addressFromStringValue(ownerOffer), 1, fromBase58String(offerOnAsset)), DeleteEntry(priceKey(offerOnAsset)), DeleteEntry(ownerKey(offerOnAsset)), DeleteEntry(issuerKey(offerOnAsset)), DeleteEntry(nameKey(offerOnAsset)), DeleteEntry(assetOffer(offerOnAsset)), DeleteEntry(descriptionKey(offerOnAsset)), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap")), DeleteEntry((assetOffer(offerId) + "Swap"))] | |
304 | - | } | |
300 | + | } | |
305 | 301 | } | |
306 | 302 | ||
307 | 303 | ||
308 | 304 | ||
309 | 305 | @Callable(i) | |
310 | 306 | func cancelSelling (assetStr) = { | |
311 | 307 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
312 | 308 | let owner = match addressFromString(ownerStr) { | |
313 | 309 | case a: Address => | |
314 | 310 | a | |
315 | 311 | case _ => | |
316 | 312 | throw("Address parsing error") | |
317 | 313 | } | |
318 | 314 | if ((ownerStr != toBase58String(i.caller.bytes))) | |
319 | 315 | then throw("The calling address is not the owner of the NFT token") | |
320 | 316 | else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))] | |
321 | 317 | } | |
322 | 318 | ||
323 | 319 | ||
324 | 320 | ||
325 | 321 | @Callable(i) | |
326 | 322 | func swapCancel (offerId) = { | |
327 | 323 | let ownerOffer = tryGetString((ownerKey(offerId) + "Swap")) | |
328 | 324 | let price = tryGetString((priceKey(offerId) + "Swap")) | |
329 | 325 | if ((ownerOffer != toBase58String(i.caller.bytes))) | |
330 | 326 | then throw("The calling address is not the owner of the NFT token") | |
331 | 327 | else { | |
332 | 328 | let listAsset = split(offerId, "_") | |
333 | 329 | let listPrice = split(price, "_") | |
334 | 330 | [ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[1]), fromBase58String(listAsset[1])), ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[2]), unit), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap")), DeleteEntry((assetOffer(offerId) + "Swap"))] | |
335 | 331 | } | |
336 | 332 | } | |
337 | 333 | ||
338 | 334 | ||
339 | 335 | @Verifier(tx) | |
340 | 336 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
341 | 337 |
github/deemru/w8io/169f3d6 42.12 ms ◑