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