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