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