tx · Dcpchxai79sWBeXTKAYo2J31Cw32PpgJBhu1oB3Uz8jk 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X: -0.00800000 Waves 2022.11.08 16:17 [2308219] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves
{ "type": 13, "id": "Dcpchxai79sWBeXTKAYo2J31Cw32PpgJBhu1oB3Uz8jk", "fee": 800000, "feeAssetId": null, "timestamp": 1667913479957, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "3XRNgZVaJL2Lbxpn8wdwhL5iS5bWMzXEcYY6JtuyRMKvLYGU4tnwYoYvrHERCbyPNqRMDMZRJgPEjZWcXxeMyAQh" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEAEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgENdHJ5R2V0SW50ZWdlcgEDa2V5BAN2YWwEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAABQN2YWwBDHRyeUdldFN0cmluZwEDa2V5BAN2YWwEByRtYXRjaDAJAJ0I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AwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWsELJE=", "height": 2308219, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CBmDZzadMxhmh3bBddre4vpNH7zy8Hgi1BHCtv7WPo3d Next: 27Sa57jwtqw3QsaPtgtTdw2AzAsjA89SReEx1FGaJLtQ Diff:
Old | New | Differences | |
---|---|---|---|
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 | } | |
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 | } | |
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 | } | |
145 | 145 | case _ => | |
146 | 146 | throw("Match error") | |
147 | 147 | } | |
148 | - | if ((data._3 != " | |
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 | } |
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 | - | if ((data._3 != " | |
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 | 155 | func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice))) | |
156 | 156 | then (price > 0) | |
157 | 157 | else false)) | |
158 | 158 | then throw("Sale Asset incorrect") | |
159 | 159 | else { | |
160 | 160 | let firstPayment = value(i.payments[0]) | |
161 | 161 | let assetId = match firstPayment.assetId { | |
162 | 162 | case id: ByteVector => | |
163 | 163 | id | |
164 | 164 | case w: Unit => | |
165 | 165 | throw("Asset is not NFT") | |
166 | 166 | case _ => | |
167 | 167 | throw("Match error") | |
168 | 168 | } | |
169 | 169 | let assetIdStr = toBase58String(assetId) | |
170 | 170 | let asset = match assetInfo(assetId) { | |
171 | 171 | case a: Asset => | |
172 | 172 | a | |
173 | 173 | case _ => | |
174 | 174 | throw("Error getting information about asset") | |
175 | 175 | } | |
176 | 176 | if (if (if ((asset.quantity != 1)) | |
177 | 177 | then (asset.decimals != 0) | |
178 | 178 | else false) | |
179 | 179 | then asset.reissuable | |
180 | 180 | else false) | |
181 | 181 | then throw("Asset is not NFT") | |
182 | 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 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | ||
187 | 187 | @Callable(i) | |
188 | 188 | func offerForSwap (assetIdPrice) = { | |
189 | 189 | let countPay = size(i.payments) | |
190 | 190 | let status = { | |
191 | 191 | let $l = i.payments | |
192 | 192 | let $s = size($l) | |
193 | 193 | let $acc0 = true | |
194 | 194 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
195 | 195 | then $a | |
196 | 196 | else isAcceptableNft($a, $l[$i]) | |
197 | 197 | ||
198 | 198 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
199 | 199 | then $a | |
200 | 200 | else throw("List size exceeds 2") | |
201 | 201 | ||
202 | 202 | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
203 | 203 | } | |
204 | 204 | if (!(status)) | |
205 | 205 | then throw("Payments incorrect") | |
206 | 206 | else if ((tryGetInteger("commission") > i.payments[1].amount)) | |
207 | 207 | then throw("No minimum commission") | |
208 | 208 | else { | |
209 | 209 | let paymentAll = { | |
210 | 210 | let $l = i.payments | |
211 | 211 | let $s = size($l) | |
212 | 212 | let $acc0 = "" | |
213 | 213 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
214 | 214 | then $a | |
215 | 215 | else getAssetId($a, $l[$i]) | |
216 | 216 | ||
217 | 217 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
218 | 218 | then $a | |
219 | 219 | else throw("List size exceeds 2") | |
220 | 220 | ||
221 | 221 | $f1_2($f1_1($f1_1($acc0, 0), 1), 2) | |
222 | 222 | } | |
223 | 223 | let issuer = { | |
224 | 224 | let $l = i.payments | |
225 | 225 | let $s = size($l) | |
226 | 226 | let $acc0 = "" | |
227 | 227 | func $f2_1 ($a,$i) = if (($i >= $s)) | |
228 | 228 | then $a | |
229 | 229 | else getAssetIssuer($a, $l[$i]) | |
230 | 230 | ||
231 | 231 | func $f2_2 ($a,$i) = if (($i >= $s)) | |
232 | 232 | then $a | |
233 | 233 | else throw("List size exceeds 2") | |
234 | 234 | ||
235 | 235 | $f2_2($f2_1($f2_1($acc0, 0), 1), 2) | |
236 | 236 | } | |
237 | 237 | let price = { | |
238 | 238 | let $l = i.payments | |
239 | 239 | let $s = size($l) | |
240 | 240 | let $acc0 = "" | |
241 | 241 | func $f3_1 ($a,$i) = if (($i >= $s)) | |
242 | 242 | then $a | |
243 | 243 | else getAssetPrice($a, $l[$i]) | |
244 | 244 | ||
245 | 245 | func $f3_2 ($a,$i) = if (($i >= $s)) | |
246 | 246 | then $a | |
247 | 247 | else throw("List size exceeds 2") | |
248 | 248 | ||
249 | 249 | $f3_2($f3_1($f3_1($acc0, 0), 1), 2) | |
250 | 250 | } | |
251 | 251 | [StringEntry(priceKey(paymentAll), price), StringEntry(ownerKey(paymentAll), toBase58String(i.caller.bytes)), StringEntry(issuerKey(paymentAll), issuer), StringEntry(assetOffer(paymentAll), assetIdPrice)] | |
252 | 252 | } | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(i) | |
258 | 258 | func buy (assetStr) = { | |
259 | 259 | let price = tryGetInteger(priceKey(assetStr)) | |
260 | 260 | let acceptableAssetId = tryGetString(assetOffer(assetStr)) | |
261 | 261 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
262 | 262 | let owner = match addressFromString(ownerStr) { | |
263 | 263 | case a: Address => | |
264 | 264 | a | |
265 | 265 | case _ => | |
266 | 266 | throw("Address parsing error") | |
267 | 267 | } | |
268 | 268 | if (!(isPaymentOk(i, acceptableAssetId, price))) | |
269 | 269 | then throw("Wrong payment amount or asset") | |
270 | 270 | else if ((ownerStr == toBase58String(i.caller.bytes))) | |
271 | 271 | then throw("Owner cannot buy his NTF") | |
272 | 272 | else if ((price == 0)) | |
273 | 273 | then throw("This NFT is not for sale") | |
274 | 274 | else { | |
275 | 275 | let fee = ((price / 100) * 5) | |
276 | 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 | 277 | } | |
278 | 278 | } | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | ||
282 | 282 | @Callable(i) | |
283 | 283 | func swapDone (offerId) = { | |
284 | 284 | let price = tryGetString(priceKey(offerId)) | |
285 | 285 | let offer = tryGetString(assetOffer(offerId)) | |
286 | 286 | let ownerOffer = tryGetString(ownerKey(offerId)) | |
287 | 287 | let ownerNft = tryGetString(ownerKey(offerId)) | |
288 | 288 | if ((ownerNft != toBase58String(i.caller.bytes))) | |
289 | 289 | then throw("The calling address is not the owner of the NFT token") | |
290 | 290 | else if ((price == "")) | |
291 | 291 | then throw("This NFT is not for sale") | |
292 | 292 | else { | |
293 | 293 | let fee = tryGetInteger("commission") | |
294 | 294 | let listAsset = split(offerId, "_") | |
295 | 295 | let listPrice = split(price, "_") | |
296 | 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 | 297 | } | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | ||
302 | 302 | @Callable(i) | |
303 | 303 | func cancelSelling (assetStr) = { | |
304 | 304 | let ownerStr = tryGetString(ownerKey(assetStr)) | |
305 | 305 | let owner = match addressFromString(ownerStr) { | |
306 | 306 | case a: Address => | |
307 | 307 | a | |
308 | 308 | case _ => | |
309 | 309 | throw("Address parsing error") | |
310 | 310 | } | |
311 | 311 | if ((ownerStr != toBase58String(i.caller.bytes))) | |
312 | 312 | then throw("The calling address is not the owner of the NFT token") | |
313 | 313 | else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))] | |
314 | 314 | } | |
315 | 315 | ||
316 | 316 | ||
317 | 317 | ||
318 | 318 | @Callable(i) | |
319 | 319 | func swapCancel (offerId) = { | |
320 | 320 | let ownerOffer = tryGetString(ownerKey(offerId)) | |
321 | 321 | let price = tryGetString(priceKey(offerId)) | |
322 | 322 | if ((ownerOffer != toBase58String(i.caller.bytes))) | |
323 | 323 | then throw("The calling address is not the owner of the NFT token") | |
324 | 324 | else { | |
325 | 325 | let listAsset = split(offerId, "_") | |
326 | 326 | let listPrice = split(price, "_") | |
327 | 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 | 328 | } | |
329 | 329 | } | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | @Verifier(tx) | |
333 | 333 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
334 | 334 |
github/deemru/w8io/026f985 53.19 ms ◑