tx · 9H4N7vC4itkAQJPCifni3mLc5o9WDynpUY8kr9UcDptG 3N9yxjwDM9T8cFxAxjrw8k5wiGxRxHh9FdW: -0.01400000 Waves 2021.05.17 11:26 [1529433] smart account 3N9yxjwDM9T8cFxAxjrw8k5wiGxRxHh9FdW > SELF 0.00000000 Waves
{ "type": 13, "id": "9H4N7vC4itkAQJPCifni3mLc5o9WDynpUY8kr9UcDptG", "fee": 1400000, "feeAssetId": null, "timestamp": 1621240004806, "version": 2, "chainId": 84, "sender": "3N9yxjwDM9T8cFxAxjrw8k5wiGxRxHh9FdW", "senderPublicKey": "7nc1RVTNTXy1DvKS2F4boNQWQir3Lqpvi8zMoo42M3nP", "proofs": [ "5h6FkXUeqKmgnJxuffPPK9ZeJWzaiFaUfHqdbopQCFVCv8KG9ZMqUMWDrszFyhvihWPG6eLcgmoXsyc73naE2f4m" ], "script": "base64:AAIEAAAAAAAAACoIAhIECgIBCBIDCgEIEgMKAQgSAwoBCBIFCgMICAgSBQoDCAgIEgMKAQgAAAAkAAAAAAh1bml0VGVzdAcAAAAACW9yYWNsZUZlZQkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTjJzNVJ0YUhQQmVuQ3N4MkVDY29GUmJZSHgzbm9aaFhXMQAAAAAIc2lnbkRhcHAJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM05DMjhoU2l2cm1zVFVYYVlEMXg2TDM2Mko0WnBVbm9UZEIAAAAADGFydHdvcmtzRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkJ5bmZiWEMyS2FzdFV4aHVrY01VYUU1OEs5Y0JkQjlVWQAAAAALZmVlUmVjZWl2ZXICAAAAIzNOMUU2dFhkZFJvVmFSZlE5ZFEzdmc1TGFXMmZzZDhIS3ViAAAAAAh1c2VyRGFwcAMFAAAACHVuaXRUZXN0CQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNNdDRSR01FeWpTV1lBb2NUUHFkNTV3Z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AAKYmlkRGF0YUtleQQAAAAKYmlkRGF0YUFycggFAAAADSR0MDEzNzg0MTM4NDMAAAACXzEEAAAAB2Fzc2V0SWQIBQAAAA0kdDAxMzc4NDEzODQzAAAAAl8yBAAAAAdiaWREYXRhCAUAAAANJHQwMTM3ODQxMzg0MwAAAAJfMwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIFAAAACmJpZERhdGFLZXkCAAAABV9PUEVOCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAApiaWREYXRhS2V5AgAAAAFfCQABpAAAAAEFAAAABGRhdGUCAAAAAV8FAAAAAmlkAgAAAApfQ0FOQ0VMTEVECQABLAAAAAIJAAEsAAAAAgUAAAAHYmlkRGF0YQIAAAABXwkAAaQAAAABBQAAAARkYXRlCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAZjYWxsZXIJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAApiaWREYXRhQXJyAAAAAAAAAAABBQAAAAdhc3NldElkBQAAAANuaWwAAAABaQEAAAALZGVsZXRlRW50cnkAAAABAAAABWVudHJ5BAAAAAZjYWxsZXIJAAQlAAAAAQkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5AwkAAAAAAAACBQAAAAZjYWxsZXIFAAAABWNocmlzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABWVudHJ5BQAAAANuaWwJAAACAAAAAQIAAAACbm8AAAAA7cx/9g==", "height": 1529433, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3NG9Wqsg16bpivg5MAy4FUSKYR4ub38Ug6swmLfoURa4 Next: BG4RC62midFT4Fgi1ByaNowSrwcu7XiHoPiKSp4bLUGe Diff:
Old | New | Differences | |
---|---|---|---|
226 | 226 | then throw("Sale Not found!") | |
227 | 227 | else { | |
228 | 228 | let saleInfoArray = split(saleInfo, "_") | |
229 | - | let $t086288664 = isPayment(i) | |
230 | - | let payment = $t086288664._1 | |
231 | - | let amount = $t086288664._2 | |
232 | - | if (if ((saleInfoArray[1] != toString(amount))) | |
233 | - | then true | |
234 | - | else (saleInfoArray[2] != toBase58String(value(payment.assetId)))) | |
235 | - | then throw("Payment infos don't match.") | |
229 | + | if ((parseInt(saleInfoArray[1]) == 0)) | |
230 | + | then throw("Offer only") | |
236 | 231 | else { | |
237 | - | let amountForSign = fraction(amount, signCut, 100) | |
238 | - | let amountForCreator = fraction(amount, creatorCut, 100) | |
239 | - | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
232 | + | let $t087008736 = isPayment(i) | |
233 | + | let payment = $t087008736._1 | |
234 | + | let amount = $t087008736._2 | |
235 | + | if (if ((saleInfoArray[1] != toString(amount))) | |
236 | + | then true | |
237 | + | else (saleInfoArray[2] != toBase58String(value(payment.assetId)))) | |
238 | + | then throw("Payment infos don't match.") | |
239 | + | else { | |
240 | + | let amountForSign = fraction(amount, signCut, 100) | |
241 | + | let amountForCreator = fraction(amount, creatorCut, 100) | |
242 | + | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
240 | 243 | [DeleteEntry((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_to_") + caller)), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, payment.assetId), ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, payment.assetId), ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, payment.assetId), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))] | |
244 | + | } | |
241 | 245 | } | |
242 | 246 | } | |
243 | 247 | } | |
247 | 251 | ||
248 | 252 | @Callable(i) | |
249 | 253 | func setOffer (nftid) = { | |
250 | - | let $ | |
251 | - | let id = $ | |
252 | - | let offerOwner = $ | |
253 | - | let date = $ | |
254 | - | let $ | |
255 | - | let payment = $ | |
256 | - | let amount = $ | |
254 | + | let $t01018410226 = idCallerDate(i) | |
255 | + | let id = $t01018410226._1 | |
256 | + | let offerOwner = $t01018410226._2 | |
257 | + | let date = $t01018410226._3 | |
258 | + | let $t01023110267 = isPayment(i) | |
259 | + | let payment = $t01023110267._1 | |
260 | + | let amount = $t01023110267._2 | |
257 | 261 | let assetId = if (!(isDefined(payment.assetId))) | |
258 | 262 | then "WAVES" | |
259 | 263 | else toBase58String(value(payment.assetId)) | |
260 | 264 | if (!(acceptedAssetIds(assetId))) | |
261 | 265 | then throw("asset not accepted") | |
262 | 266 | else { | |
263 | - | let saleOwner = getSaleOwnerAndStatus(nftid) | |
267 | + | let $t01045310504 = checkNFTInfo(nftid) | |
268 | + | let isValidNFT = $t01045310504._1 | |
269 | + | let creatorAddr = $t01045310504._2 | |
270 | + | if (!(isValidNFT)) | |
271 | + | then throw("Something went wrong") | |
272 | + | else { | |
273 | + | let saleOwner = getSaleOwnerAndStatus(nftid) | |
264 | 274 | [StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + offerOwner) + "_") + id))] | |
275 | + | } | |
265 | 276 | } | |
266 | 277 | } | |
267 | 278 | ||
269 | 280 | ||
270 | 281 | @Callable(i) | |
271 | 282 | func acceptOffer (nftid,offerId,offerOwner) = { | |
272 | - | let $ | |
273 | - | let id = $ | |
274 | - | let caller = $ | |
275 | - | let date = $ | |
283 | + | let $t01113511275 = idCallerDate(i) | |
284 | + | let id = $t01113511275._1 | |
285 | + | let caller = $t01113511275._2 | |
286 | + | let date = $t01113511275._3 | |
276 | 287 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
277 | 288 | if ((caller != saleOwner)) | |
278 | 289 | then throw("You cannot do this action") | |
281 | 292 | if ((offerExist == "")) | |
282 | 293 | then throw("Offer not found or not for sale") | |
283 | 294 | else { | |
284 | - | let $ | |
285 | - | let isValidNFT = $ | |
286 | - | let creatorAddr = $ | |
295 | + | let $t01158011631 = checkNFTInfo(nftid) | |
296 | + | let isValidNFT = $t01158011631._1 | |
297 | + | let creatorAddr = $t01158011631._2 | |
287 | 298 | if (!(isValidNFT)) | |
288 | 299 | then throw("Something went wrong") | |
289 | 300 | else { | |
292 | 303 | then throw("Sale Not found!") | |
293 | 304 | else { | |
294 | 305 | let bidDataKey = ((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
295 | - | let $ | |
296 | - | let bidDataArr = $ | |
297 | - | let assetId = $ | |
298 | - | let bidData = $ | |
306 | + | let $t01196712026 = getBidData(bidDataKey) | |
307 | + | let bidDataArr = $t01196712026._1 | |
308 | + | let assetId = $t01196712026._2 | |
309 | + | let bidData = $t01196712026._3 | |
299 | 310 | let amount = value(parseInt(bidDataArr[1])) | |
300 | 311 | let amountForSign = fraction(amount, signCut, 100) | |
301 | 312 | let amountForCreator = fraction(amount, creatorCut, 100) | |
311 | 322 | ||
312 | 323 | @Callable(i) | |
313 | 324 | func cancelOffer (nftid,offerId,saleOwner) = { | |
314 | - | let $ | |
315 | - | let id = $ | |
316 | - | let caller = $ | |
317 | - | let date = $ | |
325 | + | let $t01341613698 = idCallerDate(i) | |
326 | + | let id = $t01341613698._1 | |
327 | + | let caller = $t01341613698._2 | |
328 | + | let date = $t01341613698._3 | |
318 | 329 | let bidDataKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
319 | - | let $ | |
320 | - | let bidDataArr = $ | |
321 | - | let assetId = $ | |
322 | - | let bidData = $ | |
330 | + | let $t01378413843 = getBidData(bidDataKey) | |
331 | + | let bidDataArr = $t01378413843._1 | |
332 | + | let assetId = $t01378413843._2 | |
333 | + | let bidData = $t01378413843._3 | |
323 | 334 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry((((((bidDataKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((bidData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
324 | - | } | |
325 | - | ||
326 | - | ||
327 | - | ||
328 | - | @Callable(i) | |
329 | - | func setRequest (nftid) = { | |
330 | - | let $t01419014228 = idCallerDate(i) | |
331 | - | let id = $t01419014228._1 | |
332 | - | let caller = $t01419014228._2 | |
333 | - | let date = $t01419014228._3 | |
334 | - | let $t01423314269 = isPayment(i) | |
335 | - | let payment = $t01423314269._1 | |
336 | - | let amount = $t01423314269._2 | |
337 | - | let assetId = if (!(isDefined(payment.assetId))) | |
338 | - | then "WAVES" | |
339 | - | else toBase58String(value(payment.assetId)) | |
340 | - | if (!(acceptedAssetIds(assetId))) | |
341 | - | then throw("asset not accepted") | |
342 | - | else { | |
343 | - | let $t01449014541 = checkNFTInfo(nftid) | |
344 | - | let isValidNFT = $t01449014541._1 | |
345 | - | let creatorAddr = $t01449014541._2 | |
346 | - | if (!(isValidNFT)) | |
347 | - | then throw("Something went wrong") | |
348 | - | else [StringEntry((((((("request2nd_" + nftid) + "_") + caller) + "_") + id) + "_OPEN"), ((((((((assetId + "_") + toString(amount)) + "_") + toString(date)) + "_") + caller) + "_") + id))] | |
349 | - | } | |
350 | 335 | } | |
351 | 336 | ||
352 | 337 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1")) | |
7 | 7 | ||
8 | 8 | let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB")) | |
9 | 9 | ||
10 | 10 | let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY")) | |
11 | 11 | ||
12 | 12 | let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub" | |
13 | 13 | ||
14 | 14 | let userDapp = if (unitTest) | |
15 | 15 | then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm")) | |
16 | 16 | else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj")) | |
17 | 17 | ||
18 | 18 | let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq")) | |
19 | 19 | ||
20 | 20 | let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
21 | 21 | ||
22 | 22 | let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
23 | 23 | ||
24 | 24 | let wavesAssetId = base58'' | |
25 | 25 | ||
26 | 26 | let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp" | |
27 | 27 | ||
28 | 28 | let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN" | |
29 | 29 | ||
30 | 30 | let signCut = 3 | |
31 | 31 | ||
32 | 32 | let creatorCut = 10 | |
33 | 33 | ||
34 | 34 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
35 | 35 | ||
36 | 36 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
37 | 37 | ||
38 | 38 | let userSuspended = "SUSPENDED" | |
39 | 39 | ||
40 | 40 | let userRemoved = "REMOVED" | |
41 | 41 | ||
42 | 42 | let artIllegal = "ILLEGAL" | |
43 | 43 | ||
44 | 44 | let artSuspended = "SUSPENDED" | |
45 | 45 | ||
46 | 46 | func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getStrByK (key) = valueOrElse(getString(this, key), "") | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getIntByK (key) = valueOrElse(getInteger(this, key), 0) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyUserStatus (addr) = ("user_status_" + addr) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyNFTData (id) = ("nft_" + id) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func idCallerDate (i) = if (!(dappRunning)) | |
71 | 71 | then throw(maintenanceMSG) | |
72 | 72 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func isPayment (i) = if ((size(i.payments) == 0)) | |
76 | 76 | then throw("No payment attached") | |
77 | 77 | else { | |
78 | 78 | let payment = value(i.payments[0]) | |
79 | 79 | let amount = value(payment.amount) | |
80 | 80 | $Tuple2(payment, amount) | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func isSignArtNFT (id) = { | |
85 | 85 | let assetDetails = value(assetInfo(id)) | |
86 | 86 | if (if (if (if ((assetDetails.quantity != 1)) | |
87 | 87 | then true | |
88 | 88 | else (assetDetails.decimals != 0)) | |
89 | 89 | then true | |
90 | 90 | else (assetDetails.reissuable != false)) | |
91 | 91 | then true | |
92 | 92 | else (assetDetails.issuer != artworksDapp)) | |
93 | 93 | then false | |
94 | 94 | else true | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId))) | |
99 | 99 | then (assetId != toBase58String(wavesAssetId)) | |
100 | 100 | else false) | |
101 | 101 | then (assetId != "WAVES") | |
102 | 102 | else false) | |
103 | 103 | then (assetId != toBase58String(usdnAssetId)) | |
104 | 104 | else false) | |
105 | 105 | then false | |
106 | 106 | else true | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
110 | 110 | then unit | |
111 | 111 | else fromBase58String(assetId) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getSaleOwnerAndStatus (nftid) = { | |
115 | 115 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
116 | 116 | if ((size(saleOwner) == 0)) | |
117 | 117 | then throw("NFT not found") | |
118 | 118 | else { | |
119 | 119 | let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid)) | |
120 | 120 | if ((saleStatus != "OPEN")) | |
121 | 121 | then throw("NFT not for sale") | |
122 | 122 | else saleOwner | |
123 | 123 | } | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getBidData (key) = { | |
128 | 128 | let bidData = getStrByK((key + "_OPEN")) | |
129 | 129 | if ((bidData == "")) | |
130 | 130 | then throw("Offer not found") | |
131 | 131 | else { | |
132 | 132 | let bidDataArr = split(bidData, "_") | |
133 | 133 | let assetId = getBidAssetId(bidDataArr[2]) | |
134 | 134 | $Tuple3(bidDataArr, assetId, bidData) | |
135 | 135 | } | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func checkNFTInfo (assetId) = { | |
140 | 140 | let nftData = split(getArtStrByK(keyNFTData(assetId)), "_") | |
141 | 141 | let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5])) | |
142 | 142 | if ((size(artSignID) == 0)) | |
143 | 143 | then throw("Artwork not found on SIGN Art") | |
144 | 144 | else { | |
145 | 145 | let artStatus = getArtStrByK(keyFlag(nftData[6], nftData[5])) | |
146 | 146 | if (if ((artStatus == artIllegal)) | |
147 | 147 | then true | |
148 | 148 | else (artStatus == artSuspended)) | |
149 | 149 | then throw(("Original Artwork flagged as " + artStatus)) | |
150 | 150 | else { | |
151 | 151 | let artistStatus = getUserStrByK(keyUserStatus(nftData[6])) | |
152 | 152 | if (containsElement([userSuspended, userRemoved], artistStatus)) | |
153 | 153 | then throw(("Original Artist " + artistStatus)) | |
154 | 154 | else $Tuple2(true, nftData[6]) | |
155 | 155 | } | |
156 | 156 | } | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(i) | |
161 | 161 | func sellNFT (price,asset) = { | |
162 | 162 | let $t059225961 = idCallerDate(i) | |
163 | 163 | let id = $t059225961._1 | |
164 | 164 | let caller = $t059225961._2 | |
165 | 165 | let date = $t059225961._3 | |
166 | 166 | let $t059666002 = isPayment(i) | |
167 | 167 | let payment = $t059666002._1 | |
168 | 168 | let amount = $t059666002._2 | |
169 | 169 | let assetId = if (if (isDefined(payment.assetId)) | |
170 | 170 | then isSignArtNFT(value(payment.assetId)) | |
171 | 171 | else false) | |
172 | 172 | then payment.assetId | |
173 | 173 | else throw("No NFT found") | |
174 | 174 | if (!(acceptedAssetIds(asset))) | |
175 | 175 | then throw("Only SIGN, USDN or WAVES accepted") | |
176 | 176 | else { | |
177 | 177 | let $t062676343 = checkNFTInfo(toBase58String(value(assetId))) | |
178 | 178 | let isValidNFT = $t062676343._1 | |
179 | 179 | let creatorAddr = $t062676343._2 | |
180 | 180 | if (!(isValidNFT)) | |
181 | 181 | then throw("Something went wrong") | |
182 | 182 | else [StringEntry((((((("sale2nd_info_" + caller) + "_") + toBase58String(value(payment.assetId))) + "_") + creatorAddr) + "_OPEN"), ((((toString(date) + "_") + toString(price)) + "_") + asset)), StringEntry(((("sale2nd_status_" + caller) + "_") + toBase58String(value(payment.assetId))), "OPEN"), StringEntry(("current_owner_on_dapp_" + toBase58String(value(payment.assetId))), caller)] | |
183 | 183 | } | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | ||
188 | 188 | @Callable(i) | |
189 | 189 | func cancelSale (nftid) = { | |
190 | 190 | let $t070197058 = idCallerDate(i) | |
191 | 191 | let id = $t070197058._1 | |
192 | 192 | let caller = $t070197058._2 | |
193 | 193 | let date = $t070197058._3 | |
194 | 194 | let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid)) | |
195 | 195 | if ((saleOwner != caller)) | |
196 | 196 | then throw("You don't own this NFT") | |
197 | 197 | else { | |
198 | 198 | let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid)) | |
199 | 199 | if ((saleStatus != "OPEN")) | |
200 | 200 | then throw("Sale not active") | |
201 | 201 | else { | |
202 | 202 | let creatorAddr = split(getArtStrByK(keyNFTData(nftid)), "_")[6] | |
203 | 203 | let saleInfo = getStrByK(((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + saleStatus)) | |
204 | 204 | [DeleteEntry((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + creatorAddr) + "_") + toString(date)) + "_") + id) + "_CANCELLED"), saleInfo), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))] | |
205 | 205 | } | |
206 | 206 | } | |
207 | 207 | } | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | 211 | @Callable(i) | |
212 | 212 | func buyNFT (nftid) = { | |
213 | 213 | let $t081878258 = idCallerDate(i) | |
214 | 214 | let id = $t081878258._1 | |
215 | 215 | let caller = $t081878258._2 | |
216 | 216 | let date = $t081878258._3 | |
217 | 217 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
218 | 218 | let $t083138364 = checkNFTInfo(nftid) | |
219 | 219 | let isValidNFT = $t083138364._1 | |
220 | 220 | let creatorAddr = $t083138364._2 | |
221 | 221 | if (!(isValidNFT)) | |
222 | 222 | then throw("Something went wrong") | |
223 | 223 | else { | |
224 | 224 | let saleInfo = getStrByK((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")) | |
225 | 225 | if ((size(saleInfo) == 0)) | |
226 | 226 | then throw("Sale Not found!") | |
227 | 227 | else { | |
228 | 228 | let saleInfoArray = split(saleInfo, "_") | |
229 | - | let $t086288664 = isPayment(i) | |
230 | - | let payment = $t086288664._1 | |
231 | - | let amount = $t086288664._2 | |
232 | - | if (if ((saleInfoArray[1] != toString(amount))) | |
233 | - | then true | |
234 | - | else (saleInfoArray[2] != toBase58String(value(payment.assetId)))) | |
235 | - | then throw("Payment infos don't match.") | |
229 | + | if ((parseInt(saleInfoArray[1]) == 0)) | |
230 | + | then throw("Offer only") | |
236 | 231 | else { | |
237 | - | let amountForSign = fraction(amount, signCut, 100) | |
238 | - | let amountForCreator = fraction(amount, creatorCut, 100) | |
239 | - | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
232 | + | let $t087008736 = isPayment(i) | |
233 | + | let payment = $t087008736._1 | |
234 | + | let amount = $t087008736._2 | |
235 | + | if (if ((saleInfoArray[1] != toString(amount))) | |
236 | + | then true | |
237 | + | else (saleInfoArray[2] != toBase58String(value(payment.assetId)))) | |
238 | + | then throw("Payment infos don't match.") | |
239 | + | else { | |
240 | + | let amountForSign = fraction(amount, signCut, 100) | |
241 | + | let amountForCreator = fraction(amount, creatorCut, 100) | |
242 | + | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
240 | 243 | [DeleteEntry((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_to_") + caller)), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, payment.assetId), ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, payment.assetId), ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, payment.assetId), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))] | |
244 | + | } | |
241 | 245 | } | |
242 | 246 | } | |
243 | 247 | } | |
244 | 248 | } | |
245 | 249 | ||
246 | 250 | ||
247 | 251 | ||
248 | 252 | @Callable(i) | |
249 | 253 | func setOffer (nftid) = { | |
250 | - | let $ | |
251 | - | let id = $ | |
252 | - | let offerOwner = $ | |
253 | - | let date = $ | |
254 | - | let $ | |
255 | - | let payment = $ | |
256 | - | let amount = $ | |
254 | + | let $t01018410226 = idCallerDate(i) | |
255 | + | let id = $t01018410226._1 | |
256 | + | let offerOwner = $t01018410226._2 | |
257 | + | let date = $t01018410226._3 | |
258 | + | let $t01023110267 = isPayment(i) | |
259 | + | let payment = $t01023110267._1 | |
260 | + | let amount = $t01023110267._2 | |
257 | 261 | let assetId = if (!(isDefined(payment.assetId))) | |
258 | 262 | then "WAVES" | |
259 | 263 | else toBase58String(value(payment.assetId)) | |
260 | 264 | if (!(acceptedAssetIds(assetId))) | |
261 | 265 | then throw("asset not accepted") | |
262 | 266 | else { | |
263 | - | let saleOwner = getSaleOwnerAndStatus(nftid) | |
267 | + | let $t01045310504 = checkNFTInfo(nftid) | |
268 | + | let isValidNFT = $t01045310504._1 | |
269 | + | let creatorAddr = $t01045310504._2 | |
270 | + | if (!(isValidNFT)) | |
271 | + | then throw("Something went wrong") | |
272 | + | else { | |
273 | + | let saleOwner = getSaleOwnerAndStatus(nftid) | |
264 | 274 | [StringEntry((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + id) + "_OPEN"), ((((((((toString(date) + "_") + toString(amount)) + "_") + assetId) + "_") + offerOwner) + "_") + id))] | |
275 | + | } | |
265 | 276 | } | |
266 | 277 | } | |
267 | 278 | ||
268 | 279 | ||
269 | 280 | ||
270 | 281 | @Callable(i) | |
271 | 282 | func acceptOffer (nftid,offerId,offerOwner) = { | |
272 | - | let $ | |
273 | - | let id = $ | |
274 | - | let caller = $ | |
275 | - | let date = $ | |
283 | + | let $t01113511275 = idCallerDate(i) | |
284 | + | let id = $t01113511275._1 | |
285 | + | let caller = $t01113511275._2 | |
286 | + | let date = $t01113511275._3 | |
276 | 287 | let saleOwner = getSaleOwnerAndStatus(nftid) | |
277 | 288 | if ((caller != saleOwner)) | |
278 | 289 | then throw("You cannot do this action") | |
279 | 290 | else { | |
280 | 291 | let offerExist = getStrByK((((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) + "_OPEN")) | |
281 | 292 | if ((offerExist == "")) | |
282 | 293 | then throw("Offer not found or not for sale") | |
283 | 294 | else { | |
284 | - | let $ | |
285 | - | let isValidNFT = $ | |
286 | - | let creatorAddr = $ | |
295 | + | let $t01158011631 = checkNFTInfo(nftid) | |
296 | + | let isValidNFT = $t01158011631._1 | |
297 | + | let creatorAddr = $t01158011631._2 | |
287 | 298 | if (!(isValidNFT)) | |
288 | 299 | then throw("Something went wrong") | |
289 | 300 | else { | |
290 | 301 | let saleInfo = getStrByK((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")) | |
291 | 302 | if ((size(saleInfo) == 0)) | |
292 | 303 | then throw("Sale Not found!") | |
293 | 304 | else { | |
294 | 305 | let bidDataKey = ((((((("offer2nd_" + offerOwner) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
295 | - | let $ | |
296 | - | let bidDataArr = $ | |
297 | - | let assetId = $ | |
298 | - | let bidData = $ | |
306 | + | let $t01196712026 = getBidData(bidDataKey) | |
307 | + | let bidDataArr = $t01196712026._1 | |
308 | + | let assetId = $t01196712026._2 | |
309 | + | let bidData = $t01196712026._3 | |
299 | 310 | let amount = value(parseInt(bidDataArr[1])) | |
300 | 311 | let amountForSign = fraction(amount, signCut, 100) | |
301 | 312 | let amountForCreator = fraction(amount, creatorCut, 100) | |
302 | 313 | let amountForOwner = (amount - (amountForSign + amountForCreator)) | |
303 | 314 | [DeleteEntry((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_OPEN")), DeleteEntry((bidDataKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), DeleteEntry(("current_owner_on_dapp_" + nftid)), StringEntry((((((bidDataKey + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(assetId))) + "_") + offerOwner) + "_") + offerId)), StringEntry((((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + creatorAddr) + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(assetId))) + "_to_") + offerOwner)), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(Address(fromBase58String(creatorAddr)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId), ScriptTransfer(Address(fromBase58String(bidDataArr[3])), 1, fromBase58String(nftid))] | |
304 | 315 | } | |
305 | 316 | } | |
306 | 317 | } | |
307 | 318 | } | |
308 | 319 | } | |
309 | 320 | ||
310 | 321 | ||
311 | 322 | ||
312 | 323 | @Callable(i) | |
313 | 324 | func cancelOffer (nftid,offerId,saleOwner) = { | |
314 | - | let $ | |
315 | - | let id = $ | |
316 | - | let caller = $ | |
317 | - | let date = $ | |
325 | + | let $t01341613698 = idCallerDate(i) | |
326 | + | let id = $t01341613698._1 | |
327 | + | let caller = $t01341613698._2 | |
328 | + | let date = $t01341613698._3 | |
318 | 329 | let bidDataKey = ((((((("offer2nd_" + caller) + "_") + nftid) + "_") + saleOwner) + "_") + offerId) | |
319 | - | let $ | |
320 | - | let bidDataArr = $ | |
321 | - | let assetId = $ | |
322 | - | let bidData = $ | |
330 | + | let $t01378413843 = getBidData(bidDataKey) | |
331 | + | let bidDataArr = $t01378413843._1 | |
332 | + | let assetId = $t01378413843._2 | |
333 | + | let bidData = $t01378413843._3 | |
323 | 334 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry((((((bidDataKey + "_") + toString(date)) + "_") + id) + "_CANCELLED"), ((bidData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
324 | - | } | |
325 | - | ||
326 | - | ||
327 | - | ||
328 | - | @Callable(i) | |
329 | - | func setRequest (nftid) = { | |
330 | - | let $t01419014228 = idCallerDate(i) | |
331 | - | let id = $t01419014228._1 | |
332 | - | let caller = $t01419014228._2 | |
333 | - | let date = $t01419014228._3 | |
334 | - | let $t01423314269 = isPayment(i) | |
335 | - | let payment = $t01423314269._1 | |
336 | - | let amount = $t01423314269._2 | |
337 | - | let assetId = if (!(isDefined(payment.assetId))) | |
338 | - | then "WAVES" | |
339 | - | else toBase58String(value(payment.assetId)) | |
340 | - | if (!(acceptedAssetIds(assetId))) | |
341 | - | then throw("asset not accepted") | |
342 | - | else { | |
343 | - | let $t01449014541 = checkNFTInfo(nftid) | |
344 | - | let isValidNFT = $t01449014541._1 | |
345 | - | let creatorAddr = $t01449014541._2 | |
346 | - | if (!(isValidNFT)) | |
347 | - | then throw("Something went wrong") | |
348 | - | else [StringEntry((((((("request2nd_" + nftid) + "_") + caller) + "_") + id) + "_OPEN"), ((((((((assetId + "_") + toString(amount)) + "_") + toString(date)) + "_") + caller) + "_") + id))] | |
349 | - | } | |
350 | 335 | } | |
351 | 336 | ||
352 | 337 | ||
353 | 338 | ||
354 | 339 | @Callable(i) | |
355 | 340 | func deleteEntry (entry) = { | |
356 | 341 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
357 | 342 | if ((caller == chris)) | |
358 | 343 | then [DeleteEntry(entry)] | |
359 | 344 | else throw("no") | |
360 | 345 | } | |
361 | 346 | ||
362 | 347 |
github/deemru/w8io/169f3d6 82.05 ms ◑