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