tx · 73PfuKW7etUGedZUsoYoLnzt3z9ujjiycgQiMPQV2AW4

3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA:  -0.01000000 Waves

2021.08.15 15:06 [1659446] smart account 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA > SELF 0.00000000 Waves

{ "type": 13, "id": "73PfuKW7etUGedZUsoYoLnzt3z9ujjiycgQiMPQV2AW4", "fee": 1000000, "feeAssetId": null, "timestamp": 1629029183478, "version": 2, "chainId": 84, "sender": "3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA", "senderPublicKey": "9abKuN1XmLjjire2feZH26PmcEWhEXxiHToWSmii3Gn2", "proofs": [ "21owp5eUAvospNgbLBQFAsGAVL6vJXQUHsTkeMDEz5r9B6khmK8eSBQFZttVXwENimw1T4rCRSFucknypa1n9H5P" ], "script": "base64:AAIFAAAAAAAAC1oIAhIICgYICAgICAgSCQoHCAEBCAgBARIECgIICBIDCgEIEgQKAggIEgYKBAgICAgSBQoDCAgIGg4KAmExEgh1bml0VGVzdBoPCgJhMhIJb3JhY2xlRmVlGhEKAmEzEgtmZWVSZWNlaXZlchoOCgJhNBIIdXNlckRhcHAaEwoCYTUSDXdoaXRlbGlzdERhcHAaEwoCYTYSDXNjb25leEFzc2V0SWQaCwoCYTcSBW93bmVyGhgKAmE4EhJzY29uZXhGaXJzdFNlbGxDdXQaEQoCYTkSC2RhcHBSdW5uaW5nGhQKAmIxEg5tYWludGVuYW5jZU1TRxoTCgJiMhINdXNlclN1c3BlbmRlZBoRCgJiMxILdXNlclJlbW92ZWQaFgoCYjQSEHVzZXJVbnJlZ2lzdGVyZWQaEQoCYjUSC3VzZXJBbGxvd2VkGhIKAmI2EgxhdWN0aW9uVHlwZTEaEgoCYjcSDGF1Y3Rpb25UeXBlMhoUCgJiOBIOZ2V0U3RyaW5nQnlLZXkaCQoCYjkSA2tleRofCgJjMRIZZ2V0SW50ZWdlckJ5S2V5RnJvbU9yYWNsZRoVCgJjM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gYWRtaW5zAAAAAmc3AQAAAAlhY2NlcHRCaWQAAAAEAAAAAmM4AAAAAmozAAAAAmo1AAAAAmo0BAAAAAJxNAkBAAAAAmI4AAAAAQkBAAAAAmQ3AAAAAgUAAAACajMFAAAAAmM4AwkAAAAAAAACBQAAAAJxNAUAAAACYjYJAQAAAAJvOQAAAAUFAAAAAmc3BQAAAAJjOAUAAAACajMFAAAAAmo1BQAAAAJqNAMJAAAAAAAAAgUAAAACcTQFAAAAAmI3CQEAAAACcDEAAAAFBQAAAAJnNwUAAAACYzgFAAAAAmozBQAAAAJqNQUAAAACajQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAFlVua25vd24gYXVjdGlvbiB0eXBlIDoFAAAAAnE0AgAAABssIHBsZWFzZSBjb250YWN0IHRoZSBhZG1pbnMAAAACZzcBAAAACWNhbmNlbEJpZAAAAAMAAAACYzgAAAACajMAAAACajUEAAAAAnE0CQEAAAACYjgAAAABCQEAAAACZDcAAAACBQAAAAJqMwUAAAACYzgDCQAAAAAAAAIFAAAAAnE0BQAAAAJiNgkBAAAAAnAyAAAABAUAAAACZzcFAAAAAmM4BQAAAAJqMwUAAAACajUJAQAAAAJwNQAAAAQFAAAAAmc3BQAAAAJjOAUAAAACajMFAAAAAmo1AAAAALQZ82c=", "height": 1659446, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A9EiXZ1sbCgH3wSaRUk6y28ENw2oqpE4uUKewizjf8Cz Next: 5UkWNL6phPXyaRqWZq16HAQ3aY2TJBiXzSTmjDBXzsDX Diff:
OldNewDifferences
458458 }
459459
460460
461+func acceptBidNonTraditional (i,artId,issuer,bidId,bidOwner) = {
462+ let caller = toBase58String(i.caller.bytes)
463+ if ((caller != issuer))
464+ then throw("You cannot do this action")
465+ else buyMint(i, artId, issuer, bidId, bidOwner)
466+ }
467+
468+
469+func acceptBidTraditional (i,artId,issuer,bidId,bidOwner) = {
470+ let caller = toBase58String(i.caller.bytes)
471+ if ((caller != issuer))
472+ then throw("You cannot do this action")
473+ else buyMint(i, artId, issuer, bidId, bidOwner)
474+ }
475+
476+
461477 func cancelBidImpl (i,artId,issuer,bidId) = {
462478 let t02894229094 = idCallerDate(i)
463479 let id = t02894229094._1
478494
479495
480496 func cancelBidImplTraditional (i,artId,issuer,bidId) = {
481- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
482- if ((endHeight > height))
483- then throw("This auction is not finished yet!")
497+ let t02894229094 = idCallerDate(i)
498+ let id = t02894229094._1
499+ let caller = t02894229094._2
500+ let date = t02894229094._3
501+ let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
502+ let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
503+ let bidData = getStringByKey((bidDataKey + "_OPEN"))
504+ if ((bidData == ""))
505+ then throw("Bid not found")
484506 else {
485- let t02894229094 = idCallerDate(i)
486- let id = t02894229094._1
487- let caller = t02894229094._2
488- let date = t02894229094._3
489- let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
490- let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
491- let bidData = getStringByKey((bidDataKey + "_OPEN"))
492- if ((bidData == ""))
493- then throw("Bid not found")
494- else {
495- let bidDataArr = split(bidData, "_")
496- let assetId = getBidAssetId(bidDataArr[0])
497- let bidStatus = "CANCELED"
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- }
507+ let bidDataArr = split(bidData, "_")
508+ let assetId = getBidAssetId(bidDataArr[0])
509+ let bidStatus = "CANCELED"
510+ let bidAmount = parseIntValue(bidDataArr[1])
511+ let highestBid = getIntegerByKey(keyHighestBid(artId))
512+ if ((bidAmount == highestBid))
513+ then throw("You can't cancel the highest bid!")
514+ else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)]
500515 }
501516 }
502517
614629
615630 @Callable(i)
616631 func acceptBid (artId,issuer,bidId,bidOwner) = {
617- let caller = toBase58String(i.caller.bytes)
618- if ((caller != issuer))
619- then throw("You cannot do this action")
620- else buyMint(i, artId, issuer, bidId, bidOwner)
632+ let auctionType = getStringByKey(keyAuctionType(issuer, artId))
633+ if ((auctionType == auctionType1))
634+ then acceptBidNonTraditional(i, artId, issuer, bidId, bidOwner)
635+ else if ((auctionType == auctionType2))
636+ then acceptBidTraditional(i, artId, issuer, bidId, bidOwner)
637+ else throw((("Unknown auction type :" + auctionType) + ", please contact the admins"))
621638 }
622639
623640
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let unitTest = false
55
66 let oracleFee = value(addressFromString("3MpZQjzGogmifcEKe8mDd6ribL7nxT9ACye"))
77
88 let feeReceiver = "3N65xLq8JcCeaEiR1TJQ7dBqXBvEy6E48Wz"
99
1010 let userDapp = value(addressFromString("3N9cQgZFPHHVu8wqsn2DkQFehg3h8CNiooA"))
1111
1212 let whitelistDapp = value(addressFromString("3N9xZYGpzMFDXvXuctmU6zV8qSzm2ZfF31f"))
1313
1414 let sconexAssetId = base58'DZ8ALmuLeSZ2ocsYLAcL9MiXBFDbMNQG9LtitREyU5ZC'
1515
1616 let owner = "3N1Dhq5ZZyoojQisuTLusYjnGisqrxDwGLy"
1717
1818 let sconexFirstSellCut = 150
1919
2020 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
2121
2222 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
2323
2424 let userSuspended = "SUSPENDED"
2525
2626 let userRemoved = "REMOVED"
2727
2828 let userUnregistered = "UNREGISTERED"
2929
3030 let userAllowed = "ALLOWED"
3131
3232 let auctionType1 = "BIDTYPE"
3333
3434 let auctionType2 = "TRADITIONAL"
3535
3636 func getStringByKey (key) = valueOrElse(getString(this, key), "")
3737
3838
3939 func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle")
4040
4141
4242 func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 0)
4343
4444
4545 func checkWhitelist (key) = valueOrElse(getInteger(whitelistDapp, key), 0)
4646
4747
4848 func getBooleanByKey (key) = valueOrElse(getBoolean(this, key), false)
4949
5050
5151 func keyUserStatus (caller) = ("user_status_" + caller)
5252
5353
5454 func keyDate (caller,artId) = ((("art_date_" + artId) + "_") + caller)
5555
5656
5757 func keyName (caller,artId) = ((("art_name_" + artId) + "_") + caller)
5858
5959
6060 func keyDesc (caller,artId) = ((("art_desc_" + artId) + "_") + caller)
6161
6262
6363 func keyDisplayCid (caller,artId) = ((("art_display_cid_" + artId) + "_") + caller)
6464
6565
6666 func keyMaxMint (caller,artId) = ((("art_maxmint_" + artId) + "_") + caller)
6767
6868
6969 func keyMinPrice (caller,artId) = ((("art_minprice_" + artId) + "_") + caller)
7070
7171
7272 func keyHighestBid (artId) = ("art_highestBid_" + artId)
7373
7474
7575 func keyDuration (caller,artId) = ((("art_duration_" + artId) + "_") + caller)
7676
7777
7878 func keyAuctionType (caller,artId) = ((("art_auctiontype_" + artId) + "_") + caller)
7979
8080
8181 func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller)
8282
8383
8484 func KeyNftIssuer (nftId) = ("nft_issued_" + nftId)
8585
8686
8787 func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller)
8888
8989
9090 func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller)
9191
9292
9393 func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller)
9494
9595
9696 func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller)
9797
9898
9999 func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller)
100100
101101
102102 func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller)
103103
104104
105105 func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash)
106106
107107
108108 func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
109109
110110
111111 let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(sconexAssetId)))
112112
113113 func validateString (str,max) = if ((size(str) == 0))
114114 then throw("Field cannot be is empty")
115115 else if ((size(str) > max))
116116 then throw((str + " is too long"))
117117 else true
118118
119119
120120 func validateUser (caller) = {
121121 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
122122 if (if ((userStatus == userUnregistered))
123123 then true
124124 else (userStatus == userAllowed))
125125 then "Register this account first with 'Account' tab"
126126 else if ((userStatus == userSuspended))
127127 then "Account suspended"
128128 else if ((userStatus == userRemoved))
129129 then "Account removed"
130130 else ""
131131 }
132132
133133
134134 func validateArtworkData (caller,cidDisplay,name,description,tags) = {
135135 let checkUser = validateUser(caller)
136136 if ((checkUser != ""))
137137 then throw(checkUser)
138138 else if ((size(cidDisplay) == 0))
139139 then throw("Display CID cannot be empty")
140140 else if (!(validateString(name, 100)))
141141 then throw("100 Char. max name")
142142 else if (!(validateString(description, 1000)))
143143 then throw("1000 Char. max description")
144144 else if ((size(split(tags, ",")) > 5))
145145 then throw("5 tags max.")
146146 else ""
147147 }
148148
149149
150150 func isPayment (i) = if ((size(i.payments) == 0))
151151 then throw("No payment attached")
152152 else {
153153 let payment = value(i.payments[0])
154154 let amount = value(payment.amount)
155155 $Tuple2(payment, amount)
156156 }
157157
158158
159159 func validatePayment (i) = {
160160 let t089829018 = isPayment(i)
161161 let payment = t089829018._1
162162 let amount = t089829018._2
163163 let assetId = if (if (isDefined(payment.assetId))
164164 then (payment.assetId == sconexAssetId)
165165 else false)
166166 then payment.assetId
167167 else throw("Only Sconex token accepted as transaction fee")
168168 if ((amount != currentCertificationPrice))
169169 then throw(("Payment amount should be " + toString(currentCertificationPrice)))
170170 else $Tuple2(amount, assetId)
171171 }
172172
173173
174174 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
175175 let t096119647 = isPayment(i)
176176 let payment = t096119647._1
177177 let amount = t096119647._2
178178 let assetId = if (!(isDefined(payment.assetId)))
179179 then throw("Wrong asset id")
180180 else if (if ((size(priceAssetId) > 0))
181181 then (toBase58String(value(payment.assetId)) == priceAssetId)
182182 else false)
183183 then payment.assetId
184184 else throw("Wrong asset id")
185185 if (if ((assetId == unit))
186186 then (priceAssetId != "")
187187 else false)
188188 then throw("Wrong asset id")
189189 else if ((artworkPrice != amount))
190190 then throw("Payment don't match")
191191 else $Tuple2(amount, assetId)
192192 }
193193
194194
195195 func acceptedAssetIds (assetId) = if ((assetId != toBase58String(sconexAssetId)))
196196 then throw("Only Sconex accepted")
197197 else true
198198
199199
200200 func validateMinSell (assetId,price) = {
201201 let minSellSconex = if (unitTest)
202202 then 1
203203 else (currentCertificationPrice * 2)
204204 if (if (if ((assetId == toBase58String(sconexAssetId)))
205205 then (minSellSconex > price)
206206 else false)
207207 then (price != 0)
208208 else false)
209209 then throw(("Wrong minimum sell price " + toString(minSellSconex)))
210210 else true
211211 }
212212
213213
214214 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
215215 then throw("Only sconex is accepted!")
216216 else fromBase58String(assetId)
217217
218218
219219 func getPriceAssetIdFromBid (bidDataKey) = {
220220 let bidData = getStringByKey((bidDataKey + "_OPEN"))
221221 if ((bidData == ""))
222222 then throw("Bid not found")
223223 else {
224224 let bidDataArr = split(bidData, "_")
225225 let bidAmount = parseIntValue(bidDataArr[1])
226226 let bidAssetId = getBidAssetId(bidDataArr[0])
227227 if ((0 >= bidAmount))
228228 then throw("Wrong amount")
229229 else $Tuple2(bidAmount, bidAssetId)
230230 }
231231 }
232232
233233
234234 func idCallerDate (i) = if (!(dappRunning))
235235 then throw(maintenanceMSG)
236236 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
237237
238238
239239 func isBidCheck (i,issuer,bidOwner,bidId) = if (if (if ((toBase58String(i.caller.bytes) == issuer))
240240 then (bidOwner != "")
241241 else false)
242242 then (bidId != "")
243243 else false)
244244 then true
245245 else false
246246
247247
248248 func getArtData (i,issuer,artId,isBid) = {
249249 let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer)
250250 let totalNFT = getIntegerByKey("total_nft_issued")
251251 let artworkName = getStringByKey(keyName(issuer, artId))
252252 if ((artworkName == ""))
253253 then throw("Art doesn't exist")
254254 else {
255255 let isOnSale = getBooleanByKey(keyOnSale(issuer, artId))
256256 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
257257 let artworkPrice = if (callerIsIssuer)
258258 then (currentCertificationPrice * 2)
259259 else getIntegerByKey(keyPrice(issuer, artId))
260260 let priceAssetId = if (callerIsIssuer)
261261 then toBase58String(sconexAssetId)
262262 else getStringByKey(keyAssetIdAccepted(issuer, artId))
263263 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
264264 if (if (if (!(isBid))
265265 then !(callerIsIssuer)
266266 else false)
267267 then if (if ((0 >= artworkPrice))
268268 then true
269269 else !(isOnSale))
270270 then true
271271 else (0 >= maxCanSell)
272272 else false)
273273 then throw("Art not for sale")
274274 else if (if (if (!(isBid))
275275 then callerIsIssuer
276276 else false)
277277 then (0 >= maxCanSell)
278278 else false)
279279 then throw("Max issuable not set")
280280 else $Tuple7(totalNFT, artworkName, amountSold, artworkPrice, priceAssetId, maxCanSell, isOnSale)
281281 }
282282 }
283283
284284
285285 func getBidData (i,caller,issuer,artId,bidOwner,bidId,priceAssetId,artworkPrice,isBid) = {
286286 let checkUser = validateUser(issuer)
287287 if (if (isBid)
288288 then (checkUser != "")
289289 else false)
290290 then throw(checkUser)
291291 else {
292292 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
293293 let t01351913648 = if (isBid)
294294 then getPriceAssetIdFromBid(bidDataKey)
295295 else validatePriceAssetId(i, priceAssetId, artworkPrice)
296296 let amount = t01351913648._1
297297 let assetId = t01351913648._2
298298 $Tuple3(bidDataKey, amount, assetId)
299299 }
300300 }
301301
302302
303303 func getCommissionData (issuer,assetId,amount,amountSold,maxCanSell) = {
304304 let isWhitelisted = checkWhitelist(issuer)
305305 let cut = if ((isWhitelisted > height))
306306 then 0
307307 else if ((assetId == sconexAssetId))
308308 then sconexFirstSellCut
309309 else throw("Only Sconex is accepted!")
310310 let amountForSconex = fraction(amount, cut, 1000)
311311 let amountForCreator = (amount - amountForSconex)
312312 if ((amountSold == maxCanSell))
313313 then throw("Art sold out")
314314 else {
315315 let newAmountSold = (amountSold + 1)
316316 $Tuple3(amountForSconex, amountForCreator, newAmountSold)
317317 }
318318 }
319319
320320
321321 func getIssueData (issuer,artId,artworkName,newAmountSold,maxCanSell,totalNFT,caller,bidOwner,bidId,i,isOnSale) = {
322322 let issueMeta = ((((((((("Creator: " + issuer) + ",ArtID: ") + artId) + ",Artwork name: ") + artworkName) + ",Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
323323 let issueNFT = Issue(("SCONEX_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
324324 let idNFT = calculateAssetId(issueNFT)
325325 let sellStatus = if (if ((newAmountSold == maxCanSell))
326326 then true
327327 else !(isOnSale))
328328 then false
329329 else true
330330 let receiveNFT = if (if (if ((caller == issuer))
331331 then (bidOwner != "")
332332 else false)
333333 then (bidId != "")
334334 else false)
335335 then addressFromStringValue(bidOwner)
336336 else i.caller
337337 $Tuple4(issueNFT, idNFT, sellStatus, receiveNFT)
338338 }
339339
340340
341341 func getBidKeyVal (assetId,bidDataKey,date) = {
342342 let assetIdBid = if (!(isDefined(assetId)))
343343 then throw("Only sconex is accepted")
344344 else toBase58String(value(assetId))
345345 let bidData = getStringByKey((bidDataKey + "_OPEN"))
346346 let bidDelOld = DeleteEntry((bidDataKey + "_OPEN"))
347347 let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date)))
348348 $Tuple3(assetIdBid, bidDelOld, bidUpdate)
349349 }
350350
351351
352352 func buyMint (i,artId,issuer,bidId,bidOwner) = {
353353 let t01551615566 = idCallerDate(i)
354354 let id = t01551615566._1
355355 let caller = t01551615566._2
356356 let date = t01551615566._3
357357 let isBid = isBidCheck(i, issuer, bidOwner, bidId)
358358 let t01564615797 = getArtData(i, issuer, artId, isBid)
359359 let totalNFT = t01564615797._1
360360 let artworkName = t01564615797._2
361361 let amountSold = t01564615797._3
362362 let artworkPrice = t01564615797._4
363363 let priceAssetId = t01564615797._5
364364 let maxCanSell = t01564615797._6
365365 let isOnSale = t01564615797._7
366366 let t01580215948 = getBidData(i, caller, issuer, artId, bidOwner, bidId, priceAssetId, artworkPrice, isBid)
367367 let bidDataKey = t01580215948._1
368368 let amount = t01580215948._2
369369 let assetId = t01580215948._3
370370 let t01595316095 = getCommissionData(issuer, value(assetId), amount, amountSold, maxCanSell)
371371 let amountForSconex = t01595316095._1
372372 let amountForCreator = t01595316095._2
373373 let newAmountSold = t01595316095._3
374374 let t01610016290 = getIssueData(issuer, artId, artworkName, newAmountSold, maxCanSell, totalNFT, caller, bidOwner, bidId, i, isOnSale)
375375 let issueNFT = t01610016290._1
376376 let idNFT = t01610016290._2
377377 let sellStatus = t01610016290._3
378378 let receiveNFT = t01610016290._4
379379 let t01629516394 = getBidKeyVal(assetId, bidDataKey, date)
380380 let assetIdBid = t01629516394._1
381381 let bidDelOld = t01629516394._2
382382 let bidUpdate = t01629516394._3
383383 let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)
384384 let soldValue = if (!(isBid))
385385 then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))
386386 else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT))
387387 let soldData = StringEntry(soldKey, soldValue)
388388 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)]
389389 if (isBid)
390390 then (((buyRes :+ soldData) :+ bidUpdate) :+ bidDelOld)
391391 else soldData :: buyRes
392392 }
393393
394394
395395 func setBidNonTraditional (i,artId,issuer) = {
396396 let t02770927747 = idCallerDate(i)
397397 let id = t02770927747._1
398398 let caller = t02770927747._2
399399 let date = t02770927747._3
400400 let t02775227788 = isPayment(i)
401401 let payment = t02775227788._1
402402 let amount = t02775227788._2
403403 let assetId = if (!(isDefined(payment.assetId)))
404404 then throw("Only sconex is accepted!")
405405 else toBase58String(value(payment.assetId))
406406 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
407407 if (!(acceptedAssetIds(assetId)))
408408 then throw("asset not accepted")
409409 else if (!(validateMinSell(assetId, amount)))
410410 then throw("Wrong min sell")
411411 else {
412412 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
413413 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
414414 if ((0 >= maxCanSell))
415415 then throw("No max edition set for this artwork")
416416 else if ((amountSold >= maxCanSell))
417417 then throw("Sold out, you cannot bid")
418418 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))]
419419 }
420420 }
421421
422422
423423 func setBidTraditional (i,artId,issuer) = {
424424 let endHeight = getIntegerByKey(keyDuration(issuer, artId))
425425 let highestBid = getIntegerByKey(keyHighestBid(artId))
426426 if ((height > endHeight))
427427 then throw("This auction is finished already!")
428428 else {
429429 let callderData = idCallerDate(i)
430430 let id = callderData._1
431431 let caller = callderData._2
432432 let date = callderData._3
433433 let isPaymentVar = isPayment(i)
434434 let payment = isPaymentVar._1
435435 let amount = isPaymentVar._2
436436 if ((highestBid >= amount))
437437 then throw(("Please place a bid higher then: " + toString(highestBid)))
438438 else {
439439 let assetId = if (!(isDefined(payment.assetId)))
440440 then throw("Only sconex is accepted!")
441441 else toBase58String(value(payment.assetId))
442442 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
443443 if (!(acceptedAssetIds(assetId)))
444444 then throw("asset not accepted")
445445 else if (!(validateMinSell(assetId, amount)))
446446 then throw("Wrong min sell")
447447 else {
448448 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
449449 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
450450 if ((0 >= maxCanSell))
451451 then throw("No max edition set for this artwork")
452452 else if ((amountSold >= maxCanSell))
453453 then throw("Sold out, you cannot bid")
454454 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1)), IntegerEntry(keyHighestBid(artId), amount)]
455455 }
456456 }
457457 }
458458 }
459459
460460
461+func acceptBidNonTraditional (i,artId,issuer,bidId,bidOwner) = {
462+ let caller = toBase58String(i.caller.bytes)
463+ if ((caller != issuer))
464+ then throw("You cannot do this action")
465+ else buyMint(i, artId, issuer, bidId, bidOwner)
466+ }
467+
468+
469+func acceptBidTraditional (i,artId,issuer,bidId,bidOwner) = {
470+ let caller = toBase58String(i.caller.bytes)
471+ if ((caller != issuer))
472+ then throw("You cannot do this action")
473+ else buyMint(i, artId, issuer, bidId, bidOwner)
474+ }
475+
476+
461477 func cancelBidImpl (i,artId,issuer,bidId) = {
462478 let t02894229094 = idCallerDate(i)
463479 let id = t02894229094._1
464480 let caller = t02894229094._2
465481 let date = t02894229094._3
466482 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
467483 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
468484 let bidData = getStringByKey((bidDataKey + "_OPEN"))
469485 if ((bidData == ""))
470486 then throw("Bid not found")
471487 else {
472488 let bidDataArr = split(bidData, "_")
473489 let assetId = getBidAssetId(bidDataArr[0])
474490 let bidStatus = "CANCELED"
475491 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
476492 }
477493 }
478494
479495
480496 func cancelBidImplTraditional (i,artId,issuer,bidId) = {
481- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
482- if ((endHeight > height))
483- then throw("This auction is not finished yet!")
497+ let t02894229094 = idCallerDate(i)
498+ let id = t02894229094._1
499+ let caller = t02894229094._2
500+ let date = t02894229094._3
501+ let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
502+ let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
503+ let bidData = getStringByKey((bidDataKey + "_OPEN"))
504+ if ((bidData == ""))
505+ then throw("Bid not found")
484506 else {
485- let t02894229094 = idCallerDate(i)
486- let id = t02894229094._1
487- let caller = t02894229094._2
488- let date = t02894229094._3
489- let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
490- let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
491- let bidData = getStringByKey((bidDataKey + "_OPEN"))
492- if ((bidData == ""))
493- then throw("Bid not found")
494- else {
495- let bidDataArr = split(bidData, "_")
496- let assetId = getBidAssetId(bidDataArr[0])
497- let bidStatus = "CANCELED"
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- }
507+ let bidDataArr = split(bidData, "_")
508+ let assetId = getBidAssetId(bidDataArr[0])
509+ let bidStatus = "CANCELED"
510+ let bidAmount = parseIntValue(bidDataArr[1])
511+ let highestBid = getIntegerByKey(keyHighestBid(artId))
512+ if ((bidAmount == highestBid))
513+ then throw("You can't cancel the highest bid!")
514+ else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)]
500515 }
501516 }
502517
503518
504519 @Callable(i)
505520 func addArtwork (sha256Hash,name,description,tags,type,cidDisplay) = {
506521 let t01774017781 = idCallerDate(i)
507522 let artId = t01774017781._1
508523 let caller = t01774017781._2
509524 let date = t01774017781._3
510525 let validateArtwork = validateArtworkData(caller, cidDisplay, name, description, tags)
511526 if ((validateArtwork != ""))
512527 then throw("Something went wrong!")
513528 else {
514529 let t01817018212 = validatePayment(i)
515530 let amount = t01817018212._1
516531 let assetId = t01817018212._2
517532 if (!(isDefined(amount)))
518533 then throw("Something went wrong")
519534 else {
520535 let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
521536 if ((entryExist != ""))
522537 then throw("You already added it")
523538 else {
524539 let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
525540 if ((hashExist != ""))
526541 then throw("Hash already registered")
527542 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)]
528543 }
529544 }
530545 }
531546 }
532547
533548
534549
535550 @Callable(i)
536551 func sellArtwork (artId,price,maxMint,assetId,auctionType,minBid,duration) = {
537552 let t02571425747 = idCallerDate(i)
538553 let id = t02571425747._1
539554 let caller = t02571425747._2
540555 let artworkName = getStringByKey(keyName(caller, artId))
541556 if (!(containsElement([auctionType1, auctionType2], auctionType)))
542557 then throw("We dont know this auction type")
543558 else if ((artworkName == ""))
544559 then throw("This art doesn't match your account")
545560 else {
546561 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
547562 if (!(acceptedAssetIds(assetId)))
548563 then throw("Something went wrong!")
549564 else if (!(validateMinSell(assetId, price)))
550565 then throw("Something went wrong!")
551566 else {
552567 let checkUser = validateUser(caller)
553568 if ((checkUser != ""))
554569 then throw(checkUser)
555570 else {
556571 let amountSold = getIntegerByKey(keyIssued(caller, artId))
557572 let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId))
558573 if ((maxMint > 10))
559574 then throw("10 editions max per artwork")
560575 else if (if ((amountSold != 0))
561576 then (amountSold == maxCanSell)
562577 else false)
563578 then throw("Max edition reached.")
564579 else if (if ((amountSold > 0))
565580 then (maxCanSell != maxMint)
566581 else false)
567582 then throw("Cannot change maximum issuable anymore")
568583 else if (if ((bidNbr > 0))
569584 then (maxCanSell != maxMint)
570585 else false)
571586 then throw("Cannot change maximum issuable with active orders")
572587 else {
573588 let sellStatus = if (if ((price > 0))
574589 then (maxMint > 0)
575590 else false)
576591 then true
577592 else false
578593 let endHeight = (duration + height)
579594 [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)]
580595 }
581596 }
582597 }
583598 }
584599 }
585600
586601
587602
588603 @Callable(i)
589604 func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "")
590605
591606
592607
593608 @Callable(i)
594609 func deleteEntry (entry) = {
595610 let caller = toString(addressFromPublicKey(i.callerPublicKey))
596611 if ((caller == owner))
597612 then [DeleteEntry(entry)]
598613 else throw("no")
599614 }
600615
601616
602617
603618 @Callable(i)
604619 func setBid (artId,issuer) = {
605620 let auctionType = getStringByKey(keyAuctionType(issuer, artId))
606621 if ((auctionType == auctionType1))
607622 then setBidNonTraditional(i, artId, issuer)
608623 else if ((auctionType == auctionType2))
609624 then setBidTraditional(i, artId, issuer)
610625 else throw((("Unknown auction type :" + auctionType) + ", please contact the admins"))
611626 }
612627
613628
614629
615630 @Callable(i)
616631 func acceptBid (artId,issuer,bidId,bidOwner) = {
617- let caller = toBase58String(i.caller.bytes)
618- if ((caller != issuer))
619- then throw("You cannot do this action")
620- else buyMint(i, artId, issuer, bidId, bidOwner)
632+ let auctionType = getStringByKey(keyAuctionType(issuer, artId))
633+ if ((auctionType == auctionType1))
634+ then acceptBidNonTraditional(i, artId, issuer, bidId, bidOwner)
635+ else if ((auctionType == auctionType2))
636+ then acceptBidTraditional(i, artId, issuer, bidId, bidOwner)
637+ else throw((("Unknown auction type :" + auctionType) + ", please contact the admins"))
621638 }
622639
623640
624641
625642 @Callable(i)
626643 func cancelBid (artId,issuer,bidId) = {
627644 let auctionType = getStringByKey(keyAuctionType(issuer, artId))
628645 if ((auctionType == auctionType1))
629646 then cancelBidImpl(i, artId, issuer, bidId)
630647 else cancelBidImplTraditional(i, artId, issuer, bidId)
631648 }
632649
633650

github/deemru/w8io/169f3d6 
85.41 ms