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