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