tx · ENBy7Jsp7aU3nrrqEjVnSuaFoxbYNwWUqvPTxZzAGkgf 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X: -0.00800000 Waves 2022.11.10 13:07 [2310915] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves
{ "type": 13, "id": "ENBy7Jsp7aU3nrrqEjVnSuaFoxbYNwWUqvPTxZzAGkgf", "fee": 800000, "feeAssetId": null, "timestamp": 1668074894634, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "3RKsiqPZWySw7zVotHPjhwP2mZxJqnZBgvxKRjFi2t4teMzF24GQbR7nXQjh3MF2wVgLxiiwzzA8kizCt6VQncgH" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEQEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgEOYXNzZXRPZmZlclN3YXABBWFzc2V0CQCsAgIFBWFzc2V0AgZfb2ZmZXIBDXRyeUdldEludGVnZXIBA2tleQQDdmFsBAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAA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yeQEJAKwCAgkBCG93bmVyS2V5AQUHb2ZmZXJJZAIEU3dhcAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgIJAQlpc3N1ZXJLZXkBBQdvZmZlcklkAgRTd2FwBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V57KWP8A==", "height": 2310915, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ZuGYzAhsFYbt9KpzkWJKto5CyMNfaMJdKTrZiEchsMV Next: D9hhaBDw81Q18gZWXYz6vZLLdYzTsP6XmVjhd8pQY7Dc Diff:
Old | New | Differences | |
---|---|---|---|
212 | 212 | let paymentAll = { | |
213 | 213 | let $l = i.payments | |
214 | 214 | let $s = size($l) | |
215 | - | let $acc0 = "" | |
215 | + | let $acc0 = "Swap" | |
216 | 216 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
217 | 217 | then $a | |
218 | 218 | else getAssetId($a, $l[$i]) | |
226 | 226 | let issuer = { | |
227 | 227 | let $l = i.payments | |
228 | 228 | let $s = size($l) | |
229 | - | let $acc0 = "" | |
229 | + | let $acc0 = "Swap" | |
230 | 230 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
231 | 231 | then $a | |
232 | 232 | else getAssetIssuer($a, $l[$i]) | |
240 | 240 | let price = { | |
241 | 241 | let $l = i.payments | |
242 | 242 | let $s = size($l) | |
243 | - | let $acc0 = "" | |
243 | + | let $acc0 = "Swap" | |
244 | 244 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
245 | 245 | then $a | |
246 | 246 | else getAssetPrice($a, $l[$i]) | |
320 | 320 | ||
321 | 321 | @Callable(i) | |
322 | 322 | func swapCancel (offerId) = { | |
323 | - | let ownerOffer = tryGetString(ownerKey(offerId)) | |
323 | + | let ownerOffer = tryGetString((ownerKey(offerId) + "Swap")) | |
324 | 324 | let price = tryGetString(priceKey(offerId)) | |
325 | 325 | if ((ownerOffer != toBase58String(i.caller.bytes))) | |
326 | 326 | then throw("The calling address is not the owner of the NFT token") |
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 countPay = size(i.payments) | |
193 | 193 | let status = { | |
194 | 194 | let $l = i.payments | |
195 | 195 | let $s = size($l) | |
196 | 196 | let $acc0 = true | |
197 | 197 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
198 | 198 | then $a | |
199 | 199 | else isAcceptableNft($a, $l[$i]) | |
200 | 200 | ||
201 | 201 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
202 | 202 | then $a | |
203 | 203 | else throw("List size exceeds 2") | |
204 | 204 | ||
205 | 205 | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
206 | 206 | } | |
207 | 207 | if (!(status)) | |
208 | 208 | then throw("Payments incorrect") | |
209 | 209 | else if ((tryGetInteger("commission") > i.payments[1].amount)) | |
210 | 210 | then throw("No minimum commission") | |
211 | 211 | else { | |
212 | 212 | let paymentAll = { | |
213 | 213 | let $l = i.payments | |
214 | 214 | let $s = size($l) | |
215 | - | let $acc0 = "" | |
215 | + | let $acc0 = "Swap" | |
216 | 216 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
217 | 217 | then $a | |
218 | 218 | else getAssetId($a, $l[$i]) | |
219 | 219 | ||
220 | 220 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
221 | 221 | then $a | |
222 | 222 | else throw("List size exceeds 2") | |
223 | 223 | ||
224 | 224 | $f1_2($f1_1($f1_1($acc0, 0), 1), 2) | |
225 | 225 | } | |
226 | 226 | let issuer = { | |
227 | 227 | let $l = i.payments | |
228 | 228 | let $s = size($l) | |
229 | - | let $acc0 = "" | |
229 | + | let $acc0 = "Swap" | |
230 | 230 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
231 | 231 | then $a | |
232 | 232 | else getAssetIssuer($a, $l[$i]) | |
233 | 233 | ||
234 | 234 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
235 | 235 | then $a | |
236 | 236 | else throw("List size exceeds 2") | |
237 | 237 | ||
238 | 238 | $f2_2($f2_1($f2_1($acc0, 0), 1), 2) | |
239 | 239 | } | |
240 | 240 | let price = { | |
241 | 241 | let $l = i.payments | |
242 | 242 | let $s = size($l) | |
243 | - | let $acc0 = "" | |
243 | + | let $acc0 = "Swap" | |
244 | 244 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
245 | 245 | then $a | |
246 | 246 | else getAssetPrice($a, $l[$i]) | |
247 | 247 | ||
248 | 248 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
249 | 249 | then $a | |
250 | 250 | else throw("List size exceeds 2") | |
251 | 251 | ||
252 | 252 | $f3_2($f3_1($f3_1($acc0, 0), 1), 2) | |
253 | 253 | } | |
254 | 254 | [StringEntry((priceKey(paymentAll) + "Swap"), price), StringEntry((ownerKey(paymentAll) + "Swap"), toBase58String(i.caller.bytes)), StringEntry((issuerKey(paymentAll) + "Swap"), issuer), StringEntry((assetOffer(paymentAll) + "Swap"), assetIdPrice)] | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | 260 | @Callable(i) | |
261 | 261 | func buy (assetStr) = { | |
262 | 262 | let price = tryGetInteger(priceKey(assetStr)) | |
263 | 263 | let acceptableAssetId = tryGetString(assetOffer(assetStr)) | |
264 | 264 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
265 | 265 | let owner = match addressFromString(ownerStr) { | |
266 | 266 | case a: Address => | |
267 | 267 | a | |
268 | 268 | case _ => | |
269 | 269 | throw("Address parsing error") | |
270 | 270 | } | |
271 | 271 | if (!(isPaymentOk(i, acceptableAssetId, price))) | |
272 | 272 | then throw("Wrong payment amount or asset") | |
273 | 273 | else if ((ownerStr == toBase58String(i.caller.bytes))) | |
274 | 274 | then throw("Owner cannot buy his NTF") | |
275 | 275 | else if ((price == 0)) | |
276 | 276 | then throw("This NFT is not for sale") | |
277 | 277 | else { | |
278 | 278 | let fee = ((price / 100) * 5) | |
279 | 279 | [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))] | |
280 | 280 | } | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | 285 | @Callable(i) | |
286 | 286 | func swapDone (offerId) = { | |
287 | 287 | let price = tryGetString(priceKey(offerId)) | |
288 | 288 | let offer = tryGetString(assetOffer(offerId)) | |
289 | 289 | let ownerOffer = tryGetString(ownerKey(offerId)) | |
290 | 290 | let ownerNft = tryGetString(ownerKey(offerId)) | |
291 | 291 | if ((ownerNft != toBase58String(i.caller.bytes))) | |
292 | 292 | then throw("The calling address is not the owner of the NFT token") | |
293 | 293 | else if ((price == "")) | |
294 | 294 | then throw("This NFT is not for sale") | |
295 | 295 | else { | |
296 | 296 | let fee = tryGetInteger("commission") | |
297 | 297 | let listAsset = split(offerId, "_") | |
298 | 298 | let listPrice = split(price, "_") | |
299 | 299 | [ScriptTransfer(addressFromStringValue(ownerNft), parseIntValue(listPrice[0]), fromBase58String(listAsset[0])), ScriptTransfer(addressFromStringValue(ownerNft), (parseIntValue(listPrice[1]) - fee), unit), ScriptTransfer(addressFromStringValue(ownerOffer), 1, fromBase58String(tryGetString(offerId))), DeleteEntry(priceKey(listAsset[0])), DeleteEntry(ownerKey(listAsset[0])), DeleteEntry(issuerKey(listAsset[0])), DeleteEntry(nameKey(listAsset[0])), DeleteEntry(descriptionKey(listAsset[0])), DeleteEntry(priceKey(offerId)), DeleteEntry(ownerKey(offerId)), DeleteEntry(issuerKey(offerId))] | |
300 | 300 | } | |
301 | 301 | } | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | ||
305 | 305 | @Callable(i) | |
306 | 306 | func cancelSelling (assetStr) = { | |
307 | 307 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
308 | 308 | let owner = match addressFromString(ownerStr) { | |
309 | 309 | case a: Address => | |
310 | 310 | a | |
311 | 311 | case _ => | |
312 | 312 | throw("Address parsing error") | |
313 | 313 | } | |
314 | 314 | if ((ownerStr != toBase58String(i.caller.bytes))) | |
315 | 315 | then throw("The calling address is not the owner of the NFT token") | |
316 | 316 | else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))] | |
317 | 317 | } | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(i) | |
322 | 322 | func swapCancel (offerId) = { | |
323 | - | let ownerOffer = tryGetString(ownerKey(offerId)) | |
323 | + | let ownerOffer = tryGetString((ownerKey(offerId) + "Swap")) | |
324 | 324 | let price = tryGetString(priceKey(offerId)) | |
325 | 325 | if ((ownerOffer != toBase58String(i.caller.bytes))) | |
326 | 326 | then throw("The calling address is not the owner of the NFT token") | |
327 | 327 | else { | |
328 | 328 | let listAsset = split(offerId, "_") | |
329 | 329 | let listPrice = split(price, "_") | |
330 | 330 | [ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[0]), fromBase58String(listAsset[0])), ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[1]), unit), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap"))] | |
331 | 331 | } | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Verifier(tx) | |
336 | 336 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
337 | 337 |
github/deemru/w8io/026f985 34.87 ms ◑