tx · 2x6SL6RZsyb9SwHhfojCz1MytqVzXzADt3iomJgejQiv 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA: -0.01000000 Waves 2021.08.09 21:17 [1651154] smart account 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA > SELF 0.00000000 Waves
{ "type": 13, "id": "2x6SL6RZsyb9SwHhfojCz1MytqVzXzADt3iomJgejQiv", "fee": 1000000, "feeAssetId": null, "timestamp": 1628533092979, "version": 2, "chainId": 84, "sender": "3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA", "senderPublicKey": "9abKuN1XmLjjire2feZH26PmcEWhEXxiHToWSmii3Gn2", "proofs": [ "qvkdpcoH9FxDi59GcxETMJRMUkVzfV7XZr9fwZhQGujLmY5vqRRcgtSE7yFGS1SALr12kcKghb8iAFz1RHyEVMA" ], "script": "base64:AAIFAAAAAAAACtcIAhIICgYICAgICAgSCQoHCAEBCAgBARIECgIICBIDCgEIEgQKAggIEgYKBAgICAgSBQoDCAgIGg4KAmExEgh1bml0VGVzdBoPCgJhMhIJb3JhY2xlRmVlGhEKAmEzEgtmZWVSZWNlaXZlchoOCgJhNBIIdXNlckRhcHAaEwoCYTUSDXdoaXRlbGlzdERhcHAaEwoCYTYSDXNjb25leEFzc2V0SWQaCwoCYTcSBW93bmVyGhgKAmE4EhJzY29uZXhGaXJzdFNlbGxDdXQaEQoCYTkSC2RhcHBSdW5uaW5nGhQKAmIxEg5tYWludGVuYW5jZU1TRxoTCgJiMhINdXNlclN1c3BlbmRlZBoRCgJiMxILdXNlclJlbW92ZWQaFgoCYjQSEHVzZXJVbnJlZ2lzdGVyZWQaEQoCYjUSC3VzZXJBbGxvd2VkGhIKAmI2EgxhdWN0aW9uVHlwZTEaEgoCYjcSDGF1Y3Rpb25UeXBlMhoUCgJiOBIOZ2V0U3RyaW5nQnlLZXkaCQoCYjkSA2tleRofCgJjMRIZZ2V0SW50ZWdlckJ5S2V5RnJvbU9yYWNsZRoVCgJjM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AAAIFAAAAAmM2BQAAAAJpOQkAAAIAAAABAgAAABlZb3UgY2Fubm90IGRvIHRoaXMgYWN0aW9uCQEAAAACbTMAAAAFBQAAAAJnNAUAAAACYzgFAAAAAmk5BQAAAAJqMgUAAAACajEAAAACZzQBAAAACWNhbmNlbEJpZAAAAAMAAAACYzgAAAACaTkAAAACajIEAAAAAnA3CQEAAAACYjgAAAABCQEAAAACZDYAAAACBQAAAAJpOQUAAAACYzgDCQAAAAAAAAIFAAAAAnA3BQAAAAJiNgkBAAAAAm81AAAABAUAAAACZzQFAAAAAmM4BQAAAAJpOQUAAAACajIJAQAAAAJvOAAAAAQFAAAAAmc0BQAAAAJjOAUAAAACaTkFAAAAAmoyAAAAAB5Pq34=", "height": 1651154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3a5yM9dqE7TiUvvQkHU9QWbo5GqAs63wqdyDkuy4g32z Next: 7Dkm7YSE4erQsPKCaXs7wsZs8iUuYtDZ7SsqEcnUPj6H Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let unitTest = false | |
5 | 5 | ||
6 | 6 | let oracleFee = value(addressFromString("3MpZQjzGogmifcEKe8mDd6ribL7nxT9ACye")) | |
7 | 7 | ||
8 | 8 | let feeReceiver = "3N65xLq8JcCeaEiR1TJQ7dBqXBvEy6E48Wz" | |
9 | 9 | ||
10 | 10 | let userDapp = value(addressFromString("3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA")) | |
11 | 11 | ||
12 | 12 | let whitelistDapp = value(addressFromString("3N9xZYGpzMFDXvXuctmU6zV8qSzm2ZfF31f")) | |
13 | 13 | ||
14 | 14 | let sconexAssetId = base58'DZ8ALmuLeSZ2ocsYLAcL9MiXBFDbMNQG9LtitREyU5ZC' | |
15 | 15 | ||
16 | 16 | let owner = "3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy" | |
17 | 17 | ||
18 | 18 | let sconexFirstSellCut = 150 | |
19 | 19 | ||
20 | 20 | let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true) | |
21 | 21 | ||
22 | 22 | let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "") | |
23 | 23 | ||
24 | 24 | let userSuspended = "SUSPENDED" | |
25 | 25 | ||
26 | 26 | let userRemoved = "REMOVED" | |
27 | 27 | ||
28 | 28 | let userUnregistered = "UNREGISTERED" | |
29 | 29 | ||
30 | 30 | let userAllowed = "ALLOWED" | |
31 | 31 | ||
32 | 32 | let auctionType1 = "BIDTYPE" | |
33 | 33 | ||
34 | 34 | let auctionType2 = "TRADITIONAL" | |
35 | 35 | ||
36 | 36 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyUserStatus (caller) = ("user_status_" + caller) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyMinPrice (caller,artId) = ((("art_minprice_" + artId) + "_") + caller) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyDuration (caller,artId) = ((("art_duration_" + artId) + "_") + caller) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyAuctionType (caller,artId) = ((("art_auctiontype_" + artId) + "_") + caller) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller))))) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(sconexAssetId))) | |
106 | 106 | ||
107 | 107 | func validateString (str,max) = if ((size(str) == 0)) | |
108 | 108 | then throw("Field cannot be is empty") | |
109 | 109 | else if ((size(str) > max)) | |
110 | 110 | then throw((str + " is too long")) | |
111 | 111 | else true | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func validateUser (caller) = { | |
115 | 115 | let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered) | |
116 | 116 | if (if ((userStatus == userUnregistered)) | |
117 | 117 | then true | |
118 | 118 | else (userStatus == userAllowed)) | |
119 | 119 | then "Register this account first with 'Account' tab" | |
120 | 120 | else if ((userStatus == userSuspended)) | |
121 | 121 | then "Account suspended" | |
122 | 122 | else if ((userStatus == userRemoved)) | |
123 | 123 | then "Account removed" | |
124 | 124 | else "" | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func validateArtworkData (caller,cidDisplay,name,description,tags) = { | |
129 | 129 | let checkUser = validateUser(caller) | |
130 | 130 | if ((checkUser != "")) | |
131 | 131 | then throw(checkUser) | |
132 | 132 | else if ((size(cidDisplay) == 0)) | |
133 | 133 | then throw("Display CID cannot be empty") | |
134 | 134 | else if (!(validateString(name, 100))) | |
135 | 135 | then throw("100 Char. max name") | |
136 | 136 | else if (!(validateString(description, 1000))) | |
137 | 137 | then throw("1000 Char. max description") | |
138 | 138 | else if ((size(split(tags, ",")) > 5)) | |
139 | 139 | then throw("5 tags max.") | |
140 | 140 | else "" | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func isPayment (i) = if ((size(i.payments) == 0)) | |
145 | 145 | then throw("No payment attached") | |
146 | 146 | else { | |
147 | 147 | let payment = value(i.payments[0]) | |
148 | 148 | let amount = value(payment.amount) | |
149 | 149 | $Tuple2(payment, amount) | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func validatePayment (i) = { | |
154 | 154 | let t089829018 = isPayment(i) | |
155 | 155 | let payment = t089829018._1 | |
156 | 156 | let amount = t089829018._2 | |
157 | 157 | let assetId = if (if (isDefined(payment.assetId)) | |
158 | 158 | then (payment.assetId == sconexAssetId) | |
159 | 159 | else false) | |
160 | 160 | then payment.assetId | |
161 | 161 | else throw("Only Sconex token accepted as transaction fee") | |
162 | 162 | if ((amount != currentCertificationPrice)) | |
163 | 163 | then throw(("Payment amount should be " + toString(currentCertificationPrice))) | |
164 | 164 | else $Tuple2(amount, assetId) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func validatePriceAssetId (i,priceAssetId,artworkPrice) = { | |
169 | 169 | let t096119647 = isPayment(i) | |
170 | 170 | let payment = t096119647._1 | |
171 | 171 | let amount = t096119647._2 | |
172 | 172 | let assetId = if (!(isDefined(payment.assetId))) | |
173 | 173 | then throw("Wrong asset id") | |
174 | 174 | else if (if ((size(priceAssetId) > 0)) | |
175 | 175 | then (toBase58String(value(payment.assetId)) == priceAssetId) | |
176 | 176 | else false) | |
177 | 177 | then payment.assetId | |
178 | 178 | else throw("Wrong asset id") | |
179 | 179 | if (if ((assetId == unit)) | |
180 | 180 | then (priceAssetId != "") | |
181 | 181 | else false) | |
182 | 182 | then throw("Wrong asset id") | |
183 | 183 | else if ((artworkPrice != amount)) | |
184 | 184 | then throw("Payment don't match") | |
185 | 185 | else $Tuple2(amount, assetId) | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func acceptedAssetIds (assetId) = if ((assetId != toBase58String(sconexAssetId))) | |
190 | 190 | then throw("Only Sconex accepted") | |
191 | 191 | else true | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func validateMinSell (assetId,price) = { | |
195 | 195 | let minSellSconex = if (unitTest) | |
196 | 196 | then 1 | |
197 | 197 | else (currentCertificationPrice * 2) | |
198 | 198 | if (if (if ((assetId == toBase58String(sconexAssetId))) | |
199 | 199 | then (minSellSconex > price) | |
200 | 200 | else false) | |
201 | 201 | then (price != 0) | |
202 | 202 | else false) | |
203 | 203 | then throw(("Wrong minimum sell price " + toString(minSellSconex))) | |
204 | 204 | else true | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func getBidAssetId (assetId) = if ((assetId == "WAVES")) | |
209 | 209 | then throw("Only sconex is accepted!") | |
210 | 210 | else fromBase58String(assetId) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func getPriceAssetIdFromBid (bidDataKey) = { | |
214 | 214 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
215 | 215 | if ((bidData == "")) | |
216 | 216 | then throw("Bid not found") | |
217 | 217 | else { | |
218 | 218 | let bidDataArr = split(bidData, "_") | |
219 | 219 | let bidAmount = parseIntValue(bidDataArr[1]) | |
220 | 220 | let bidAssetId = getBidAssetId(bidDataArr[0]) | |
221 | 221 | if ((0 >= bidAmount)) | |
222 | 222 | then throw("Wrong amount") | |
223 | 223 | else $Tuple2(bidAmount, bidAssetId) | |
224 | 224 | } | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func idCallerDate (i) = if (!(dappRunning)) | |
229 | 229 | then throw(maintenanceMSG) | |
230 | 230 | else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func isBidCheck (i,issuer,bidOwner,bidId) = if (if (if ((toBase58String(i.caller.bytes) == issuer)) | |
234 | 234 | then (bidOwner != "") | |
235 | 235 | else false) | |
236 | 236 | then (bidId != "") | |
237 | 237 | else false) | |
238 | 238 | then true | |
239 | 239 | else false | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func getArtData (i,issuer,artId,isBid) = { | |
243 | 243 | let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer) | |
244 | 244 | let totalNFT = getIntegerByKey("total_nft_issued") | |
245 | 245 | let artworkName = getStringByKey(keyName(issuer, artId)) | |
246 | 246 | if ((artworkName == "")) | |
247 | 247 | then throw("Art doesn't exist") | |
248 | 248 | else { | |
249 | 249 | let isOnSale = getBooleanByKey(keyOnSale(issuer, artId)) | |
250 | 250 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
251 | 251 | let artworkPrice = if (callerIsIssuer) | |
252 | 252 | then (currentCertificationPrice * 2) | |
253 | 253 | else getIntegerByKey(keyPrice(issuer, artId)) | |
254 | 254 | let priceAssetId = if (callerIsIssuer) | |
255 | 255 | then toBase58String(sconexAssetId) | |
256 | 256 | else getStringByKey(keyAssetIdAccepted(issuer, artId)) | |
257 | 257 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
258 | 258 | if (if (if (!(isBid)) | |
259 | 259 | then !(callerIsIssuer) | |
260 | 260 | else false) | |
261 | 261 | then if (if ((0 >= artworkPrice)) | |
262 | 262 | then true | |
263 | 263 | else !(isOnSale)) | |
264 | 264 | then true | |
265 | 265 | else (0 >= maxCanSell) | |
266 | 266 | else false) | |
267 | 267 | then throw("Art not for sale") | |
268 | 268 | else if (if (if (!(isBid)) | |
269 | 269 | then callerIsIssuer | |
270 | 270 | else false) | |
271 | 271 | then (0 >= maxCanSell) | |
272 | 272 | else false) | |
273 | 273 | then throw("Max issuable not set") | |
274 | 274 | else $Tuple7(totalNFT, artworkName, amountSold, artworkPrice, priceAssetId, maxCanSell, isOnSale) | |
275 | 275 | } | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func getBidData (i,caller,issuer,artId,bidOwner,bidId,priceAssetId,artworkPrice,isBid) = { | |
280 | 280 | let checkUser = validateUser(issuer) | |
281 | 281 | if (if (isBid) | |
282 | 282 | then (checkUser != "") | |
283 | 283 | else false) | |
284 | 284 | then throw(checkUser) | |
285 | 285 | else { | |
286 | 286 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId) | |
287 | 287 | let t01351913648 = if (isBid) | |
288 | 288 | then getPriceAssetIdFromBid(bidDataKey) | |
289 | 289 | else validatePriceAssetId(i, priceAssetId, artworkPrice) | |
290 | 290 | let amount = t01351913648._1 | |
291 | 291 | let assetId = t01351913648._2 | |
292 | 292 | $Tuple3(bidDataKey, amount, assetId) | |
293 | 293 | } | |
294 | 294 | } | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func getCommissionData (issuer,assetId,amount,amountSold,maxCanSell) = { | |
298 | 298 | let isWhitelisted = checkWhitelist(issuer) | |
299 | 299 | let cut = if ((isWhitelisted > height)) | |
300 | 300 | then 0 | |
301 | 301 | else if ((assetId == sconexAssetId)) | |
302 | 302 | then sconexFirstSellCut | |
303 | 303 | else throw("Only Sconex is accepted!") | |
304 | 304 | let amountForSconex = fraction(amount, cut, 1000) | |
305 | 305 | let amountForCreator = (amount - amountForSconex) | |
306 | 306 | if ((amountSold == maxCanSell)) | |
307 | 307 | then throw("Art sold out") | |
308 | 308 | else { | |
309 | 309 | let newAmountSold = (amountSold + 1) | |
310 | 310 | $Tuple3(amountForSconex, amountForCreator, newAmountSold) | |
311 | 311 | } | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | func getIssueData (issuer,artId,artworkName,newAmountSold,maxCanSell,totalNFT,caller,bidOwner,bidId,i,isOnSale) = { | |
316 | 316 | let issueMeta = ((((((((("Creator: " + issuer) + ",ArtID: ") + artId) + ",Artwork name: ") + artworkName) + ",Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell)) | |
317 | 317 | let issueNFT = Issue(("SA_" + toString((totalNFT + 1))), issueMeta, 1, 0, false) | |
318 | 318 | let idNFT = calculateAssetId(issueNFT) | |
319 | 319 | let sellStatus = if (if ((newAmountSold == maxCanSell)) | |
320 | 320 | then true | |
321 | 321 | else !(isOnSale)) | |
322 | 322 | then false | |
323 | 323 | else true | |
324 | 324 | let receiveNFT = if (if (if ((caller == issuer)) | |
325 | 325 | then (bidOwner != "") | |
326 | 326 | else false) | |
327 | 327 | then (bidId != "") | |
328 | 328 | else false) | |
329 | 329 | then addressFromStringValue(bidOwner) | |
330 | 330 | else i.caller | |
331 | 331 | $Tuple4(issueNFT, idNFT, sellStatus, receiveNFT) | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func getBidKeyVal (assetId,bidDataKey,date) = { | |
336 | 336 | let assetIdBid = if (!(isDefined(assetId))) | |
337 | 337 | then throw("Only sconex is accepted") | |
338 | 338 | else toBase58String(value(assetId)) | |
339 | 339 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
340 | 340 | let bidDelOld = DeleteEntry((bidDataKey + "_OPEN")) | |
341 | 341 | let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date))) | |
342 | 342 | $Tuple3(assetIdBid, bidDelOld, bidUpdate) | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | func buyMint (i,artId,issuer,bidId,bidOwner) = { | |
347 | 347 | let t01551615566 = idCallerDate(i) | |
348 | 348 | let id = t01551615566._1 | |
349 | 349 | let caller = t01551615566._2 | |
350 | 350 | let date = t01551615566._3 | |
351 | 351 | let isBid = isBidCheck(i, issuer, bidOwner, bidId) | |
352 | 352 | let t01564615797 = getArtData(i, issuer, artId, isBid) | |
353 | 353 | let totalNFT = t01564615797._1 | |
354 | 354 | let artworkName = t01564615797._2 | |
355 | 355 | let amountSold = t01564615797._3 | |
356 | 356 | let artworkPrice = t01564615797._4 | |
357 | 357 | let priceAssetId = t01564615797._5 | |
358 | 358 | let maxCanSell = t01564615797._6 | |
359 | 359 | let isOnSale = t01564615797._7 | |
360 | 360 | let t01580215948 = getBidData(i, caller, issuer, artId, bidOwner, bidId, priceAssetId, artworkPrice, isBid) | |
361 | 361 | let bidDataKey = t01580215948._1 | |
362 | 362 | let amount = t01580215948._2 | |
363 | 363 | let assetId = t01580215948._3 | |
364 | 364 | let t01595316095 = getCommissionData(issuer, value(assetId), amount, amountSold, maxCanSell) | |
365 | 365 | let amountForSconex = t01595316095._1 | |
366 | 366 | let amountForCreator = t01595316095._2 | |
367 | 367 | let newAmountSold = t01595316095._3 | |
368 | 368 | let t01610016290 = getIssueData(issuer, artId, artworkName, newAmountSold, maxCanSell, totalNFT, caller, bidOwner, bidId, i, isOnSale) | |
369 | 369 | let issueNFT = t01610016290._1 | |
370 | 370 | let idNFT = t01610016290._2 | |
371 | 371 | let sellStatus = t01610016290._3 | |
372 | 372 | let receiveNFT = t01610016290._4 | |
373 | 373 | let t01629516394 = getBidKeyVal(assetId, bidDataKey, date) | |
374 | 374 | let assetIdBid = t01629516394._1 | |
375 | 375 | let bidDelOld = t01629516394._2 | |
376 | 376 | let bidUpdate = t01629516394._3 | |
377 | 377 | let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer) | |
378 | 378 | let soldValue = if (!(isBid)) | |
379 | 379 | then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT)) | |
380 | 380 | else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT)) | |
381 | 381 | let soldData = StringEntry(soldKey, soldValue) | |
382 | 382 | let buyRes = [IntegerEntry(keyIssued(issuer, artId), newAmountSold), StringEntry(("nft_" + toBase58String(idNFT)), soldKey), IntegerEntry("total_nft_issued", (totalNFT + 1)), BooleanEntry(keyOnSale(issuer, artId), sellStatus), issueNFT, ScriptTransfer(Address(fromBase58String(issuer)), amountForCreator, assetId), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSconex, assetId), ScriptTransfer(receiveNFT, 1, idNFT)] | |
383 | 383 | if (isBid) | |
384 | 384 | then (((buyRes :+ soldData) :+ bidUpdate) :+ bidDelOld) | |
385 | 385 | else soldData :: buyRes | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | func setBidNonTraditional (i,artId,issuer) = { | |
390 | 390 | let t02770927747 = idCallerDate(i) | |
391 | 391 | let id = t02770927747._1 | |
392 | 392 | let caller = t02770927747._2 | |
393 | 393 | let date = t02770927747._3 | |
394 | 394 | let t02775227788 = isPayment(i) | |
395 | 395 | let payment = t02775227788._1 | |
396 | 396 | let amount = t02775227788._2 | |
397 | 397 | let assetId = if (!(isDefined(payment.assetId))) | |
398 | 398 | then throw("Only sconex is accepted!") | |
399 | 399 | else toBase58String(value(payment.assetId)) | |
400 | 400 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
401 | 401 | if (!(acceptedAssetIds(assetId))) | |
402 | 402 | then throw("asset not accepted") | |
403 | 403 | else if (!(validateMinSell(assetId, amount))) | |
404 | 404 | then throw("Wrong min sell") | |
405 | 405 | else { | |
406 | 406 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
407 | 407 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
408 | 408 | if ((0 >= maxCanSell)) | |
409 | 409 | then throw("No max edition set for this artwork") | |
410 | 410 | else if ((amountSold >= maxCanSell)) | |
411 | 411 | then throw("Sold out, you cannot bid") | |
412 | 412 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
413 | 413 | } | |
414 | 414 | } | |
415 | 415 | ||
416 | 416 | ||
417 | 417 | func setBidTraditional (i,artId,issuer) = { | |
418 | 418 | let endHeight = getIntegerByKey(keyDuration(issuer, artId)) | |
419 | 419 | if ((height > endHeight)) | |
420 | 420 | then throw("This auction is finished already!") | |
421 | 421 | else { | |
422 | 422 | let callderData = idCallerDate(i) | |
423 | 423 | let id = callderData._1 | |
424 | 424 | let caller = callderData._2 | |
425 | 425 | let date = callderData._3 | |
426 | 426 | let isPaymentVar = isPayment(i) | |
427 | 427 | let payment = isPaymentVar._1 | |
428 | 428 | let amount = isPaymentVar._2 | |
429 | 429 | let assetId = if (!(isDefined(payment.assetId))) | |
430 | 430 | then throw("Only sconex is accepted!") | |
431 | 431 | else toBase58String(value(payment.assetId)) | |
432 | 432 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
433 | 433 | if (!(acceptedAssetIds(assetId))) | |
434 | 434 | then throw("asset not accepted") | |
435 | 435 | else if (!(validateMinSell(assetId, amount))) | |
436 | 436 | then throw("Wrong min sell") | |
437 | 437 | else { | |
438 | 438 | let amountSold = getIntegerByKey(keyIssued(issuer, artId)) | |
439 | 439 | let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId)) | |
440 | 440 | if ((0 >= maxCanSell)) | |
441 | 441 | then throw("No max edition set for this artwork") | |
442 | 442 | else if ((amountSold >= maxCanSell)) | |
443 | 443 | then throw("Sold out, you cannot bid") | |
444 | 444 | else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))] | |
445 | 445 | } | |
446 | 446 | } | |
447 | 447 | } | |
448 | 448 | ||
449 | 449 | ||
450 | 450 | func cancelBidImpl (i,artId,issuer,bidId) = { | |
451 | 451 | let t02894229094 = idCallerDate(i) | |
452 | 452 | let id = t02894229094._1 | |
453 | 453 | let caller = t02894229094._2 | |
454 | 454 | let date = t02894229094._3 | |
455 | 455 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
456 | 456 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
457 | 457 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
458 | 458 | if ((bidData == "")) | |
459 | 459 | then throw("Bid not found") | |
460 | 460 | else { | |
461 | 461 | let bidDataArr = split(bidData, "_") | |
462 | 462 | let assetId = getBidAssetId(bidDataArr[0]) | |
463 | 463 | let bidStatus = "CANCELED" | |
464 | 464 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
465 | 465 | } | |
466 | 466 | } | |
467 | 467 | ||
468 | 468 | ||
469 | 469 | func cancelBidImplTraditional (i,artId,issuer,bidId) = { | |
470 | 470 | let endHeight = getIntegerByKey(keyDuration(issuer, artId)) | |
471 | 471 | if ((endHeight > height)) | |
472 | 472 | then throw("This auction is not finished yet!") | |
473 | 473 | else { | |
474 | 474 | let t02894229094 = idCallerDate(i) | |
475 | 475 | let id = t02894229094._1 | |
476 | 476 | let caller = t02894229094._2 | |
477 | 477 | let date = t02894229094._3 | |
478 | 478 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
479 | 479 | let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId) | |
480 | 480 | let bidData = getStringByKey((bidDataKey + "_OPEN")) | |
481 | 481 | if ((bidData == "")) | |
482 | 482 | then throw("Bid not found") | |
483 | 483 | else { | |
484 | 484 | let bidDataArr = split(bidData, "_") | |
485 | 485 | let assetId = getBidAssetId(bidDataArr[0]) | |
486 | 486 | let bidStatus = "CANCELED" | |
487 | 487 | [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)] | |
488 | 488 | } | |
489 | 489 | } | |
490 | 490 | } | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | @Callable(i) | |
494 | 494 | func addArtwork (sha256Hash,name,description,tags,type,cidDisplay) = { | |
495 | 495 | let t01774017781 = idCallerDate(i) | |
496 | 496 | let artId = t01774017781._1 | |
497 | 497 | let caller = t01774017781._2 | |
498 | 498 | let date = t01774017781._3 | |
499 | 499 | let validateArtwork = validateArtworkData(caller, cidDisplay, name, description, tags) | |
500 | 500 | if ((validateArtwork != "")) | |
501 | 501 | then throw("Something went wrong!") | |
502 | 502 | else { | |
503 | 503 | let t01817018212 = validatePayment(i) | |
504 | 504 | let amount = t01817018212._1 | |
505 | 505 | let assetId = t01817018212._2 | |
506 | 506 | if (!(isDefined(amount))) | |
507 | 507 | then throw("Something went wrong") | |
508 | 508 | else { | |
509 | 509 | let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller)) | |
510 | 510 | if ((entryExist != "")) | |
511 | 511 | then throw("You already added it") | |
512 | 512 | else { | |
513 | 513 | let hashExist = getStringByKey(keyOwnerByHash(sha256Hash)) | |
514 | 514 | if ((hashExist != "")) | |
515 | 515 | then throw("Hash already registered") | |
516 | 516 | else [StringEntry(keyOwnerByHash(sha256Hash), caller), StringEntry(keyTxidByHashOwner(sha256Hash, caller), artId), IntegerEntry(keyDate(caller, artId), date), StringEntry(keyName(caller, artId), name), StringEntry(keyDesc(caller, artId), description), StringEntry(keyDisplayCid(caller, artId), cidDisplay), StringEntry(keyType(caller, artId), type), StringEntry(keyTags(caller, artId), tags), IntegerEntry(keyMaxMint(caller, artId), 0), IntegerEntry(keyIssued(caller, artId), 0), BooleanEntry(keyOnSale(caller, artId), false), StringEntry(keyHashByTxidAddr(caller, artId), sha256Hash), ScriptTransfer(Address(fromBase58String(feeReceiver)), amount, assetId)] | |
517 | 517 | } | |
518 | 518 | } | |
519 | 519 | } | |
520 | 520 | } | |
521 | 521 | ||
522 | 522 | ||
523 | 523 | ||
524 | 524 | @Callable(i) | |
525 | 525 | func sellArtwork (artId,price,maxMint,assetId,auctionType,minBid,duration) = { | |
526 | 526 | let t02571425747 = idCallerDate(i) | |
527 | 527 | let id = t02571425747._1 | |
528 | 528 | let caller = t02571425747._2 | |
529 | 529 | let artworkName = getStringByKey(keyName(caller, artId)) | |
530 | 530 | if (!(containsElement([auctionType1, auctionType2], auctionType))) | |
531 | 531 | then throw("We dont know this auction type") | |
532 | 532 | else if ((artworkName == "")) | |
533 | 533 | then throw("This art doesn't match your account") | |
534 | 534 | else { | |
535 | 535 | let bidNbr = getIntegerByKey(("current_bidamount_" + artId)) | |
536 | 536 | if (!(acceptedAssetIds(assetId))) | |
537 | 537 | then throw("Something went wrong!") | |
538 | 538 | else if (!(validateMinSell(assetId, price))) | |
539 | 539 | then throw("Something went wrong!") | |
540 | 540 | else { | |
541 | 541 | let checkUser = validateUser(caller) | |
542 | 542 | if ((checkUser != "")) | |
543 | 543 | then throw(checkUser) | |
544 | 544 | else { | |
545 | 545 | let amountSold = getIntegerByKey(keyIssued(caller, artId)) | |
546 | 546 | let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId)) | |
547 | 547 | if ((maxMint > 10)) | |
548 | 548 | then throw("10 editions max per artwork") | |
549 | 549 | else if (if ((amountSold != 0)) | |
550 | 550 | then (amountSold == maxCanSell) | |
551 | 551 | else false) | |
552 | 552 | then throw("Max edition reached.") | |
553 | 553 | else if (if ((amountSold > 0)) | |
554 | 554 | then (maxCanSell != maxMint) | |
555 | 555 | else false) | |
556 | 556 | then throw("Cannot change maximum issuable anymore") | |
557 | 557 | else if (if ((bidNbr > 0)) | |
558 | 558 | then (maxCanSell != maxMint) | |
559 | 559 | else false) | |
560 | 560 | then throw("Cannot change maximum issuable with active orders") | |
561 | 561 | else { | |
562 | 562 | let sellStatus = if (if ((price > 0)) | |
563 | 563 | then (maxMint > 0) | |
564 | 564 | else false) | |
565 | 565 | then true | |
566 | 566 | else false | |
567 | 567 | let endHeight = (duration + height) | |
568 | 568 | [BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), IntegerEntry(keyMinPrice(caller, artId), minBid), IntegerEntry(keyDuration(caller, artId), endHeight), StringEntry(keyAssetIdAccepted(caller, artId), assetId), StringEntry(keyAuctionType(caller, artId), auctionType)] | |
569 | 569 | } | |
570 | 570 | } | |
571 | 571 | } | |
572 | 572 | } | |
573 | 573 | } | |
574 | 574 | ||
575 | 575 | ||
576 | 576 | ||
577 | 577 | @Callable(i) | |
578 | 578 | func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "") | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | ||
582 | 582 | @Callable(i) | |
583 | 583 | func deleteEntry (entry) = { | |
584 | 584 | let caller = toString(addressFromPublicKey(i.callerPublicKey)) | |
585 | 585 | if ((caller == owner)) | |
586 | 586 | then [DeleteEntry(entry)] | |
587 | 587 | else throw("no") | |
588 | 588 | } | |
589 | 589 | ||
590 | 590 | ||
591 | 591 | ||
592 | 592 | @Callable(i) | |
593 | 593 | func setBid (artId,issuer) = { | |
594 | 594 | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
595 | 595 | if ((auctionType == auctionType1)) | |
596 | 596 | then setBidNonTraditional(i, artId, issuer) | |
597 | 597 | else if ((auctionType == auctionType2)) | |
598 | 598 | then setBidTraditional(i, artId, issuer) | |
599 | 599 | else throw((("Unknown auction type :" + auctionType) + ", please contact the admins")) | |
600 | 600 | } | |
601 | 601 | ||
602 | 602 | ||
603 | 603 | ||
604 | 604 | @Callable(i) | |
605 | 605 | func acceptBid (artId,issuer,bidId,bidOwner) = { | |
606 | 606 | let caller = toBase58String(i.caller.bytes) | |
607 | 607 | if ((caller != issuer)) | |
608 | 608 | then throw("You cannot do this action") | |
609 | 609 | else buyMint(i, artId, issuer, bidId, bidOwner) | |
610 | 610 | } | |
611 | 611 | ||
612 | 612 | ||
613 | 613 | ||
614 | 614 | @Callable(i) | |
615 | 615 | func cancelBid (artId,issuer,bidId) = { | |
616 | 616 | let auctionType = getStringByKey(keyAuctionType(issuer, artId)) | |
617 | 617 | if ((auctionType == auctionType1)) | |
618 | 618 | then cancelBidImpl(i, artId, issuer, bidId) | |
619 | 619 | else cancelBidImplTraditional(i, artId, issuer, bidId) | |
620 | 620 | } | |
621 | 621 | ||
622 | 622 |
github/deemru/w8io/026f985 55.33 ms ◑