tx · FtNWsyFPm6F3TjJaA5VcMpooc82jm41DFgYcAd6YL5h8

3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA:  -0.01000000 Waves

2021.08.22 12:26 [1669360] smart account 3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA > SELF 0.00000000 Waves

{ "type": 13, "id": "FtNWsyFPm6F3TjJaA5VcMpooc82jm41DFgYcAd6YL5h8", "fee": 1000000, "feeAssetId": null, "timestamp": 1629624493388, "version": 2, "chainId": 84, "sender": "3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA", "senderPublicKey": "9abKuN1XmLjjire2feZH26PmcEWhEXxiHToWSmii3Gn2", "proofs": [ "2si6W87oFqk6vy8zsK9KhYUCVSodZdrXX8uFsuzSk8yrxfaXDNaxPB5PyDpXqaJC1UER5s6kR1orPeJCczbBGbwL" ], "script": "base64:AAIFAAAAAAAAC+oIAhIICgYICAgICAgSCQoHCAEBCAgBARIECgIICBIDCgEIEgQKAggIEgYKBAgICAgSBQoDCAgIGg4KAmExEgh1bml0VGVzdBoPCgJhMhIJb3JhY2xlRmVlGhEKAmEzEgtmZWVSZWNlaXZlchoOCgJhNBIIdXNlckRhcHAaEwoCYTUSDXdoaXRlbGlzdERhcHAaEwoCYTYSDXNjb25leEFzc2V0SWQaCwoCYTcSBW93bmVyGhgKAmE4EhJzY29uZXhGaXJzdFNlbGxDdXQaEQoCYTkSC2RhcHBSdW5uaW5nGhQKAmIxEg5tYWludGVuYW5jZU1TRxoTCgJiMhINdXNlclN1c3BlbmRlZBoRCgJiMxILdXNlclJlbW92ZWQaFgoCYjQSEHVzZXJVbnJlZ2lzdGVyZWQaEQoCYjUSC3VzZXJBbGxvd2VkGhIKAmI2EgxhdWN0aW9uVHlwZTEaEgoCYjcSDGF1Y3Rpb25UeXBlMhoUCgJiOBIOZ2V0U3RyaW5nQnlLZXkaCQoCYjkSA2tleRofCgJjMRIZZ2V0SW50ZWdlckJ5S2V5RnJvbU9yYWNsZRo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ZTEAAAACBQAAAAJqNgUAAAACYzgDCQAAAAAAAAIFAAAAAnIzBQAAAAJiNgkBAAAAAnExAAAABAUAAAACaDEFAAAAAmM4BQAAAAJqNgUAAAACZDcJAQAAAAJxNAAAAAQFAAAAAmgxBQAAAAJjOAUAAAACajYFAAAAAmQ3AAAAAO/BfP4=", "height": 1669360, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JB4AmsFwcfmU7GvMLf3T4yZoxy18jEnmL3gLKmGaW2Ni Next: HiBU8ifrs6QPM9cJkLhPwfLTNZ7EYWqvatii9Dqx4tEr Diff:
OldNewDifferences
7676
7777
7878 func keyDuration (caller,artId) = ((("art_duration_" + artId) + "_") + caller)
79+
80+
81+func keyEndHeight (caller,artId) = ((("art_endheight_" + artId) + "_") + caller)
7982
8083
8184 func keyAuctionType (caller,artId) = ((("art_auctiontype_" + artId) + "_") + caller)
424427
425428
426429 func setBidTraditional (i,artId,issuer) = {
427- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
430+ let endHeight = getIntegerByKey(keyEndHeight(issuer, artId))
428431 let highestBid = getIntegerByKey(keyHighestBid(artId))
429432 if ((height > endHeight))
430433 then throw("This auction is finished already!")
469472 }
470473
471474
475+func restartAuction (artId,issuer) = {
476+ let amountSold = getIntegerByKey(keyIssued(issuer, artId))
477+ let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
478+ let oldEndHeight = getIntegerByKey(keyEndHeight(issuer, artId))
479+ let duration = getIntegerByKey(keyDuration(issuer, artId))
480+ let endHeight = (duration + height)
481+ if ((height > oldEndHeight))
482+ then if ((amountSold == maxCanSell))
483+ then throw("Can't restart auction, max amount sold")
484+ else [IntegerEntry(keyHighestBid(artId), 0), IntegerEntry(keyDuration(issuer, artId), duration), IntegerEntry(keyEndHeight(issuer, artId), endHeight)]
485+ else throw("Previous auction isn't completed yet")
486+ }
487+
488+
472489 func acceptBidTraditional (i,artId,issuer,bidId,bidOwner) = {
473- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
490+ let endHeight = getIntegerByKey(keyEndHeight(issuer, artId))
474491 let highestBid = getIntegerByKey(keyHighestBid(artId))
475492 let amountByBidId = getIntegerByKey(keyBidId(bidId))
476493 if ((height > endHeight))
477494 then if ((amountByBidId == highestBid))
478- then buyMint(i, artId, issuer, bidId, bidOwner)
495+ then {
496+ let buyMintData = buyMint(i, artId, issuer, bidId, bidOwner)
497+ let restartAuctionData = restartAuction(artId, issuer)
498+ (restartAuctionData ++ buyMintData)
499+ }
479500 else throw("This is not the winning bid!")
480501 else throw("This auction is not yet finished!")
481502 }
598619 then true
599620 else false
600621 let endHeight = (duration + height)
601-[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)]
622+[BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), IntegerEntry(keyMinPrice(caller, artId), minBid), IntegerEntry(keyDuration(caller, artId), duration), IntegerEntry(keyEndHeight(caller, artId), endHeight), StringEntry(keyAssetIdAccepted(caller, artId), assetId), StringEntry(keyAuctionType(caller, artId), auctionType), IntegerEntry(keyHighestBid(artId), 0)]
602623 }
603624 }
604625 }
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 keyBidId (bidId) = ("bid_" + bidId)
7676
7777
7878 func keyDuration (caller,artId) = ((("art_duration_" + artId) + "_") + caller)
79+
80+
81+func keyEndHeight (caller,artId) = ((("art_endheight_" + artId) + "_") + caller)
7982
8083
8184 func keyAuctionType (caller,artId) = ((("art_auctiontype_" + artId) + "_") + caller)
8285
8386
8487 func keyIssued (caller,artId) = ((("art_issued_" + artId) + "_") + caller)
8588
8689
8790 func KeyNftIssuer (nftId) = ("nft_issued_" + nftId)
8891
8992
9093 func keyOnSale (caller,artId) = ((("art_onsale_" + artId) + "_") + caller)
9194
9295
9396 func keyTags (caller,artId) = ((("art_tags_" + artId) + "_") + caller)
9497
9598
9699 func keyType (caller,artId) = ((("art_type_" + artId) + "_") + caller)
97100
98101
99102 func keyPrice (caller,artId) = ((("art_price_" + artId) + "_") + caller)
100103
101104
102105 func keyAssetIdAccepted (caller,artId) = ((("art_assetAccepted_" + artId) + "_") + caller)
103106
104107
105108 func keyHashByTxidAddr (caller,txid) = ((("get_hashbytxidaddr_" + txid) + "_") + caller)
106109
107110
108111 func keyOwnerByHash (sha256Hash) = ("get_owner_by_hash_" + sha256Hash)
109112
110113
111114 func keyTxidByHashOwner (sha256Hash,caller) = ("get_txid_by_hash_owner_" + toBase58String(sha256_16Kb(toBytes((sha256Hash + caller)))))
112115
113116
114117 let currentCertificationPrice = getIntegerByKeyFromOracle(("certification_fee_" + toBase58String(sconexAssetId)))
115118
116119 func validateString (str,max) = if ((size(str) == 0))
117120 then throw("Field cannot be is empty")
118121 else if ((size(str) > max))
119122 then throw((str + " is too long"))
120123 else true
121124
122125
123126 func validateUser (caller) = {
124127 let userStatus = valueOrElse(getString(userDapp, keyUserStatus(caller)), userUnregistered)
125128 if (if ((userStatus == userUnregistered))
126129 then true
127130 else (userStatus == userAllowed))
128131 then "Register this account first with 'Account' tab"
129132 else if ((userStatus == userSuspended))
130133 then "Account suspended"
131134 else if ((userStatus == userRemoved))
132135 then "Account removed"
133136 else ""
134137 }
135138
136139
137140 func validateArtworkData (caller,cidDisplay,name,description,tags) = {
138141 let checkUser = validateUser(caller)
139142 if ((checkUser != ""))
140143 then throw(checkUser)
141144 else if ((size(cidDisplay) == 0))
142145 then throw("Display CID cannot be empty")
143146 else if (!(validateString(name, 100)))
144147 then throw("100 Char. max name")
145148 else if (!(validateString(description, 1000)))
146149 then throw("1000 Char. max description")
147150 else if ((size(split(tags, ",")) > 5))
148151 then throw("5 tags max.")
149152 else ""
150153 }
151154
152155
153156 func isPayment (i) = if ((size(i.payments) == 0))
154157 then throw("No payment attached")
155158 else {
156159 let payment = value(i.payments[0])
157160 let amount = value(payment.amount)
158161 $Tuple2(payment, amount)
159162 }
160163
161164
162165 func validatePayment (i) = {
163166 let t089829018 = isPayment(i)
164167 let payment = t089829018._1
165168 let amount = t089829018._2
166169 let assetId = if (if (isDefined(payment.assetId))
167170 then (payment.assetId == sconexAssetId)
168171 else false)
169172 then payment.assetId
170173 else throw("Only Sconex token accepted as transaction fee")
171174 if ((amount != currentCertificationPrice))
172175 then throw(("Payment amount should be " + toString(currentCertificationPrice)))
173176 else $Tuple2(amount, assetId)
174177 }
175178
176179
177180 func validatePriceAssetId (i,priceAssetId,artworkPrice) = {
178181 let t096119647 = isPayment(i)
179182 let payment = t096119647._1
180183 let amount = t096119647._2
181184 let assetId = if (!(isDefined(payment.assetId)))
182185 then throw("Wrong asset id")
183186 else if (if ((size(priceAssetId) > 0))
184187 then (toBase58String(value(payment.assetId)) == priceAssetId)
185188 else false)
186189 then payment.assetId
187190 else throw("Wrong asset id")
188191 if (if ((assetId == unit))
189192 then (priceAssetId != "")
190193 else false)
191194 then throw("Wrong asset id")
192195 else if ((artworkPrice != amount))
193196 then throw("Payment don't match")
194197 else $Tuple2(amount, assetId)
195198 }
196199
197200
198201 func acceptedAssetIds (assetId) = if ((assetId != toBase58String(sconexAssetId)))
199202 then throw("Only Sconex accepted")
200203 else true
201204
202205
203206 func validateMinSell (assetId,price) = {
204207 let minSellSconex = if (unitTest)
205208 then 1
206209 else (currentCertificationPrice * 2)
207210 if (if (if ((assetId == toBase58String(sconexAssetId)))
208211 then (minSellSconex > price)
209212 else false)
210213 then (price != 0)
211214 else false)
212215 then throw(("Wrong minimum sell price " + toString(minSellSconex)))
213216 else true
214217 }
215218
216219
217220 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
218221 then throw("Only sconex is accepted!")
219222 else fromBase58String(assetId)
220223
221224
222225 func getPriceAssetIdFromBid (bidDataKey) = {
223226 let bidData = getStringByKey((bidDataKey + "_OPEN"))
224227 if ((bidData == ""))
225228 then throw("Bid not found")
226229 else {
227230 let bidDataArr = split(bidData, "_")
228231 let bidAmount = parseIntValue(bidDataArr[1])
229232 let bidAssetId = getBidAssetId(bidDataArr[0])
230233 if ((0 >= bidAmount))
231234 then throw("Wrong amount")
232235 else $Tuple2(bidAmount, bidAssetId)
233236 }
234237 }
235238
236239
237240 func idCallerDate (i) = if (!(dappRunning))
238241 then throw(maintenanceMSG)
239242 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
240243
241244
242245 func isBidCheck (i,issuer,bidOwner,bidId) = if (if (if ((toBase58String(i.caller.bytes) == issuer))
243246 then (bidOwner != "")
244247 else false)
245248 then (bidId != "")
246249 else false)
247250 then true
248251 else false
249252
250253
251254 func getArtData (i,issuer,artId,isBid) = {
252255 let callerIsIssuer = (toBase58String(i.caller.bytes) == issuer)
253256 let totalNFT = getIntegerByKey("total_nft_issued")
254257 let artworkName = getStringByKey(keyName(issuer, artId))
255258 if ((artworkName == ""))
256259 then throw("Art doesn't exist")
257260 else {
258261 let isOnSale = getBooleanByKey(keyOnSale(issuer, artId))
259262 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
260263 let artworkPrice = if (callerIsIssuer)
261264 then (currentCertificationPrice * 2)
262265 else getIntegerByKey(keyPrice(issuer, artId))
263266 let priceAssetId = if (callerIsIssuer)
264267 then toBase58String(sconexAssetId)
265268 else getStringByKey(keyAssetIdAccepted(issuer, artId))
266269 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
267270 if (if (if (!(isBid))
268271 then !(callerIsIssuer)
269272 else false)
270273 then if (if ((0 >= artworkPrice))
271274 then true
272275 else !(isOnSale))
273276 then true
274277 else (0 >= maxCanSell)
275278 else false)
276279 then throw("Art not for sale")
277280 else if (if (if (!(isBid))
278281 then callerIsIssuer
279282 else false)
280283 then (0 >= maxCanSell)
281284 else false)
282285 then throw("Max issuable not set")
283286 else $Tuple7(totalNFT, artworkName, amountSold, artworkPrice, priceAssetId, maxCanSell, isOnSale)
284287 }
285288 }
286289
287290
288291 func getBidData (i,caller,issuer,artId,bidOwner,bidId,priceAssetId,artworkPrice,isBid) = {
289292 let checkUser = validateUser(issuer)
290293 if (if (isBid)
291294 then (checkUser != "")
292295 else false)
293296 then throw(checkUser)
294297 else {
295298 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + bidOwner) + "_") + bidId)
296299 let t01351913648 = if (isBid)
297300 then getPriceAssetIdFromBid(bidDataKey)
298301 else validatePriceAssetId(i, priceAssetId, artworkPrice)
299302 let amount = t01351913648._1
300303 let assetId = t01351913648._2
301304 $Tuple3(bidDataKey, amount, assetId)
302305 }
303306 }
304307
305308
306309 func getCommissionData (issuer,assetId,amount,amountSold,maxCanSell) = {
307310 let isWhitelisted = checkWhitelist(issuer)
308311 let cut = if ((isWhitelisted > height))
309312 then 0
310313 else if ((assetId == sconexAssetId))
311314 then sconexFirstSellCut
312315 else throw("Only Sconex is accepted!")
313316 let amountForSconex = fraction(amount, cut, 1000)
314317 let amountForCreator = (amount - amountForSconex)
315318 if ((amountSold == maxCanSell))
316319 then throw("Art sold out")
317320 else {
318321 let newAmountSold = (amountSold + 1)
319322 $Tuple3(amountForSconex, amountForCreator, newAmountSold)
320323 }
321324 }
322325
323326
324327 func getIssueData (issuer,artId,artworkName,newAmountSold,maxCanSell,totalNFT,caller,bidOwner,bidId,i,isOnSale) = {
325328 let issueMeta = ((((((((("Creator: " + issuer) + ",ArtID: ") + artId) + ",Artwork name: ") + artworkName) + ",Issue: ") + toString(newAmountSold)) + "/") + toString(maxCanSell))
326329 let issueNFT = Issue(("SCONEX_" + toString((totalNFT + 1))), issueMeta, 1, 0, false)
327330 let idNFT = calculateAssetId(issueNFT)
328331 let sellStatus = if (if ((newAmountSold == maxCanSell))
329332 then true
330333 else !(isOnSale))
331334 then false
332335 else true
333336 let receiveNFT = if (if (if ((caller == issuer))
334337 then (bidOwner != "")
335338 else false)
336339 then (bidId != "")
337340 else false)
338341 then addressFromStringValue(bidOwner)
339342 else i.caller
340343 $Tuple4(issueNFT, idNFT, sellStatus, receiveNFT)
341344 }
342345
343346
344347 func getBidKeyVal (assetId,bidDataKey,date) = {
345348 let assetIdBid = if (!(isDefined(assetId)))
346349 then throw("Only sconex is accepted")
347350 else toBase58String(value(assetId))
348351 let bidData = getStringByKey((bidDataKey + "_OPEN"))
349352 let bidDelOld = DeleteEntry((bidDataKey + "_OPEN"))
350353 let bidUpdate = StringEntry((bidDataKey + "_CLOSED"), ((bidData + "_") + toString(date)))
351354 $Tuple3(assetIdBid, bidDelOld, bidUpdate)
352355 }
353356
354357
355358 func buyMint (i,artId,issuer,bidId,bidOwner) = {
356359 let t01551615566 = idCallerDate(i)
357360 let id = t01551615566._1
358361 let caller = t01551615566._2
359362 let date = t01551615566._3
360363 let isBid = isBidCheck(i, issuer, bidOwner, bidId)
361364 let t01564615797 = getArtData(i, issuer, artId, isBid)
362365 let totalNFT = t01564615797._1
363366 let artworkName = t01564615797._2
364367 let amountSold = t01564615797._3
365368 let artworkPrice = t01564615797._4
366369 let priceAssetId = t01564615797._5
367370 let maxCanSell = t01564615797._6
368371 let isOnSale = t01564615797._7
369372 let t01580215948 = getBidData(i, caller, issuer, artId, bidOwner, bidId, priceAssetId, artworkPrice, isBid)
370373 let bidDataKey = t01580215948._1
371374 let amount = t01580215948._2
372375 let assetId = t01580215948._3
373376 let t01595316095 = getCommissionData(issuer, value(assetId), amount, amountSold, maxCanSell)
374377 let amountForSconex = t01595316095._1
375378 let amountForCreator = t01595316095._2
376379 let newAmountSold = t01595316095._3
377380 let t01610016290 = getIssueData(issuer, artId, artworkName, newAmountSold, maxCanSell, totalNFT, caller, bidOwner, bidId, i, isOnSale)
378381 let issueNFT = t01610016290._1
379382 let idNFT = t01610016290._2
380383 let sellStatus = t01610016290._3
381384 let receiveNFT = t01610016290._4
382385 let t01629516394 = getBidKeyVal(assetId, bidDataKey, date)
383386 let assetIdBid = t01629516394._1
384387 let bidDelOld = t01629516394._2
385388 let bidUpdate = t01629516394._3
386389 let soldKey = ((((((("art_sold_" + toString(newAmountSold)) + "_of_") + toString(maxCanSell)) + "_") + artId) + "_") + issuer)
387390 let soldValue = if (!(isBid))
388391 then ((((((((((caller + "_") + toString(date)) + "_") + id) + "_") + toString(artworkPrice)) + "_") + priceAssetId) + "_") + toBase58String(idNFT))
389392 else ((((((((((toString(receiveNFT) + "_") + toString(date)) + "_") + id) + "_") + toString(amount)) + "_") + assetIdBid) + "_") + toBase58String(idNFT))
390393 let soldData = StringEntry(soldKey, soldValue)
391394 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)]
392395 if (isBid)
393396 then (((buyRes :+ soldData) :+ bidUpdate) :+ bidDelOld)
394397 else soldData :: buyRes
395398 }
396399
397400
398401 func setBidNonTraditional (i,artId,issuer) = {
399402 let t02770927747 = idCallerDate(i)
400403 let id = t02770927747._1
401404 let caller = t02770927747._2
402405 let date = t02770927747._3
403406 let t02775227788 = isPayment(i)
404407 let payment = t02775227788._1
405408 let amount = t02775227788._2
406409 let assetId = if (!(isDefined(payment.assetId)))
407410 then throw("Only sconex is accepted!")
408411 else toBase58String(value(payment.assetId))
409412 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
410413 if (!(acceptedAssetIds(assetId)))
411414 then throw("asset not accepted")
412415 else if (!(validateMinSell(assetId, amount)))
413416 then throw("Wrong min sell")
414417 else {
415418 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
416419 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
417420 if ((0 >= maxCanSell))
418421 then throw("No max edition set for this artwork")
419422 else if ((amountSold >= maxCanSell))
420423 then throw("Sold out, you cannot bid")
421424 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1))]
422425 }
423426 }
424427
425428
426429 func setBidTraditional (i,artId,issuer) = {
427- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
430+ let endHeight = getIntegerByKey(keyEndHeight(issuer, artId))
428431 let highestBid = getIntegerByKey(keyHighestBid(artId))
429432 if ((height > endHeight))
430433 then throw("This auction is finished already!")
431434 else {
432435 let callderData = idCallerDate(i)
433436 let id = callderData._1
434437 let caller = callderData._2
435438 let date = callderData._3
436439 let isPaymentVar = isPayment(i)
437440 let payment = isPaymentVar._1
438441 let amount = isPaymentVar._2
439442 if ((highestBid >= amount))
440443 then throw(("Please place a bid higher then: " + toString(highestBid)))
441444 else {
442445 let assetId = if (!(isDefined(payment.assetId)))
443446 then throw("Only sconex is accepted!")
444447 else toBase58String(value(payment.assetId))
445448 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
446449 if (!(acceptedAssetIds(assetId)))
447450 then throw("asset not accepted")
448451 else if (!(validateMinSell(assetId, amount)))
449452 then throw("Wrong min sell")
450453 else {
451454 let amountSold = getIntegerByKey(keyIssued(issuer, artId))
452455 let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
453456 if ((0 >= maxCanSell))
454457 then throw("No max edition set for this artwork")
455458 else if ((amountSold >= maxCanSell))
456459 then throw("Sold out, you cannot bid")
457460 else [StringEntry((((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + id) + "_OPEN"), ((((assetId + "_") + toString(amount)) + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr + 1)), IntegerEntry(keyHighestBid(artId), amount), IntegerEntry(keyBidId(toBase58String(i.transactionId)), amount)]
458461 }
459462 }
460463 }
461464 }
462465
463466
464467 func acceptBidNonTraditional (i,artId,issuer,bidId,bidOwner) = {
465468 let caller = toBase58String(i.caller.bytes)
466469 if ((caller != issuer))
467470 then throw("You cannot do this action")
468471 else buyMint(i, artId, issuer, bidId, bidOwner)
469472 }
470473
471474
475+func restartAuction (artId,issuer) = {
476+ let amountSold = getIntegerByKey(keyIssued(issuer, artId))
477+ let maxCanSell = getIntegerByKey(keyMaxMint(issuer, artId))
478+ let oldEndHeight = getIntegerByKey(keyEndHeight(issuer, artId))
479+ let duration = getIntegerByKey(keyDuration(issuer, artId))
480+ let endHeight = (duration + height)
481+ if ((height > oldEndHeight))
482+ then if ((amountSold == maxCanSell))
483+ then throw("Can't restart auction, max amount sold")
484+ else [IntegerEntry(keyHighestBid(artId), 0), IntegerEntry(keyDuration(issuer, artId), duration), IntegerEntry(keyEndHeight(issuer, artId), endHeight)]
485+ else throw("Previous auction isn't completed yet")
486+ }
487+
488+
472489 func acceptBidTraditional (i,artId,issuer,bidId,bidOwner) = {
473- let endHeight = getIntegerByKey(keyDuration(issuer, artId))
490+ let endHeight = getIntegerByKey(keyEndHeight(issuer, artId))
474491 let highestBid = getIntegerByKey(keyHighestBid(artId))
475492 let amountByBidId = getIntegerByKey(keyBidId(bidId))
476493 if ((height > endHeight))
477494 then if ((amountByBidId == highestBid))
478- then buyMint(i, artId, issuer, bidId, bidOwner)
495+ then {
496+ let buyMintData = buyMint(i, artId, issuer, bidId, bidOwner)
497+ let restartAuctionData = restartAuction(artId, issuer)
498+ (restartAuctionData ++ buyMintData)
499+ }
479500 else throw("This is not the winning bid!")
480501 else throw("This auction is not yet finished!")
481502 }
482503
483504
484505 func cancelBidImpl (i,artId,issuer,bidId) = {
485506 let t02894229094 = idCallerDate(i)
486507 let id = t02894229094._1
487508 let caller = t02894229094._2
488509 let date = t02894229094._3
489510 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
490511 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
491512 let bidData = getStringByKey((bidDataKey + "_OPEN"))
492513 if ((bidData == ""))
493514 then throw("Bid not found")
494515 else {
495516 let bidDataArr = split(bidData, "_")
496517 let assetId = getBidAssetId(bidDataArr[0])
497518 let bidStatus = "CANCELED"
498519 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
499520 }
500521 }
501522
502523
503524 func cancelBidImplTraditional (i,artId,issuer,bidId) = {
504525 let t02894229094 = idCallerDate(i)
505526 let id = t02894229094._1
506527 let caller = t02894229094._2
507528 let date = t02894229094._3
508529 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
509530 let bidDataKey = ((((((("bid_" + artId) + "_") + issuer) + "_") + caller) + "_") + bidId)
510531 let bidData = getStringByKey((bidDataKey + "_OPEN"))
511532 if ((bidData == ""))
512533 then throw("Bid not found")
513534 else {
514535 let bidDataArr = split(bidData, "_")
515536 let assetId = getBidAssetId(bidDataArr[0])
516537 let bidStatus = "CANCELED"
517538 let bidAmount = parseIntValue(bidDataArr[1])
518539 let highestBid = getIntegerByKey(keyHighestBid(artId))
519540 if ((bidAmount == highestBid))
520541 then throw("You can't cancel the highest bid!")
521542 else [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), IntegerEntry(("current_bidamount_" + artId), (bidNbr - 1)), ScriptTransfer(Address(fromBase58String(caller)), bidAmount, assetId)]
522543 }
523544 }
524545
525546
526547 @Callable(i)
527548 func addArtwork (sha256Hash,name,description,tags,type,cidDisplay) = {
528549 let t01774017781 = idCallerDate(i)
529550 let artId = t01774017781._1
530551 let caller = t01774017781._2
531552 let date = t01774017781._3
532553 let validateArtwork = validateArtworkData(caller, cidDisplay, name, description, tags)
533554 if ((validateArtwork != ""))
534555 then throw("Something went wrong!")
535556 else {
536557 let t01817018212 = validatePayment(i)
537558 let amount = t01817018212._1
538559 let assetId = t01817018212._2
539560 if (!(isDefined(amount)))
540561 then throw("Something went wrong")
541562 else {
542563 let entryExist = getStringByKey(keyTxidByHashOwner(sha256Hash, caller))
543564 if ((entryExist != ""))
544565 then throw("You already added it")
545566 else {
546567 let hashExist = getStringByKey(keyOwnerByHash(sha256Hash))
547568 if ((hashExist != ""))
548569 then throw("Hash already registered")
549570 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)]
550571 }
551572 }
552573 }
553574 }
554575
555576
556577
557578 @Callable(i)
558579 func sellArtwork (artId,price,maxMint,assetId,auctionType,minBid,duration) = {
559580 let t02571425747 = idCallerDate(i)
560581 let id = t02571425747._1
561582 let caller = t02571425747._2
562583 let artworkName = getStringByKey(keyName(caller, artId))
563584 if (!(containsElement([auctionType1, auctionType2], auctionType)))
564585 then throw("We dont know this auction type")
565586 else if ((artworkName == ""))
566587 then throw("This art doesn't match your account")
567588 else {
568589 let bidNbr = getIntegerByKey(("current_bidamount_" + artId))
569590 if (!(acceptedAssetIds(assetId)))
570591 then throw("Something went wrong!")
571592 else if (!(validateMinSell(assetId, price)))
572593 then throw("Something went wrong!")
573594 else {
574595 let checkUser = validateUser(caller)
575596 if ((checkUser != ""))
576597 then throw(checkUser)
577598 else {
578599 let amountSold = getIntegerByKey(keyIssued(caller, artId))
579600 let maxCanSell = getIntegerByKey(keyMaxMint(caller, artId))
580601 if ((maxMint > 10))
581602 then throw("10 editions max per artwork")
582603 else if (if ((amountSold != 0))
583604 then (amountSold == maxCanSell)
584605 else false)
585606 then throw("Max edition reached.")
586607 else if (if ((amountSold > 0))
587608 then (maxCanSell != maxMint)
588609 else false)
589610 then throw("Cannot change maximum issuable anymore")
590611 else if (if ((bidNbr > 0))
591612 then (maxCanSell != maxMint)
592613 else false)
593614 then throw("Cannot change maximum issuable with active orders")
594615 else {
595616 let sellStatus = if (if ((price > 0))
596617 then (maxMint > 0)
597618 else false)
598619 then true
599620 else false
600621 let endHeight = (duration + height)
601-[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)]
622+[BooleanEntry(keyOnSale(caller, artId), sellStatus), IntegerEntry(keyPrice(caller, artId), price), IntegerEntry(keyMaxMint(caller, artId), maxMint), IntegerEntry(keyMinPrice(caller, artId), minBid), IntegerEntry(keyDuration(caller, artId), duration), IntegerEntry(keyEndHeight(caller, artId), endHeight), StringEntry(keyAssetIdAccepted(caller, artId), assetId), StringEntry(keyAuctionType(caller, artId), auctionType), IntegerEntry(keyHighestBid(artId), 0)]
602623 }
603624 }
604625 }
605626 }
606627 }
607628
608629
609630
610631 @Callable(i)
611632 func buyArtwork (artId,issuer) = buyMint(i, artId, issuer, "", "")
612633
613634
614635
615636 @Callable(i)
616637 func deleteEntry (entry) = {
617638 let caller = toString(addressFromPublicKey(i.callerPublicKey))
618639 if ((caller == owner))
619640 then [DeleteEntry(entry)]
620641 else throw("no")
621642 }
622643
623644
624645
625646 @Callable(i)
626647 func setBid (artId,issuer) = {
627648 let auctionType = getStringByKey(keyAuctionType(issuer, artId))
628649 if ((auctionType == auctionType1))
629650 then setBidNonTraditional(i, artId, issuer)
630651 else if ((auctionType == auctionType2))
631652 then setBidTraditional(i, artId, issuer)
632653 else throw((("Unknown auction type :" + auctionType) + ", please contact the admins"))
633654 }
634655
635656
636657
637658 @Callable(i)
638659 func acceptBid (artId,issuer,bidId,bidOwner) = {
639660 let auctionType = getStringByKey(keyAuctionType(issuer, artId))
640661 if ((auctionType == auctionType1))
641662 then acceptBidNonTraditional(i, artId, issuer, bidId, bidOwner)
642663 else if ((auctionType == auctionType2))
643664 then acceptBidTraditional(i, artId, issuer, bidId, bidOwner)
644665 else throw((("Unknown auction type :" + auctionType) + ", please contact the admins"))
645666 }
646667
647668
648669
649670 @Callable(i)
650671 func cancelBid (artId,issuer,bidId) = {
651672 let auctionType = getStringByKey(keyAuctionType(issuer, artId))
652673 if ((auctionType == auctionType1))
653674 then cancelBidImpl(i, artId, issuer, bidId)
654675 else cancelBidImplTraditional(i, artId, issuer, bidId)
655676 }
656677
657678

github/deemru/w8io/169f3d6 
135.60 ms