tx · 5vDU1fKEyfTPbcXytTxyv571sdZ4KfWujdLvHXzQVNs3 3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX: -0.01400000 Waves 2022.05.15 18:31 [2052974] smart account 3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX > SELF 0.00000000 Waves
{ "type": 13, "id": "5vDU1fKEyfTPbcXytTxyv571sdZ4KfWujdLvHXzQVNs3", "fee": 1400000, "feeAssetId": null, "timestamp": 1652628719505, "version": 2, "chainId": 84, "sender": "3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX", "senderPublicKey": "4cHkGAqfd5S8yGnVB6eHDYTeE5ciLkQ7PuGAXFzjf7z5", "proofs": [ "5Cy7p3FKeQ1zFHYCQ6APbhSP8ToG8mjfqaKShbrs8cUYCXaDPq335635EarCS67WfP4buW3cUQYbB4TZ54FoRfzh" ], "script": "base64:AAIFAAAAAAAAAC4IAhIDCgEIEgQKAggIEgQKAgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgQKAggIAAAAHQAAAAATTkZUSXNzdWVyZmVlUGVyY2VudAAAAAAAAAAAAwAAAAANc2NvbmV4RGFwcEtleQIAAAAKc2NvbmV4RGFwcAAAAAAJb3JhY2xlS2V5AgAAAAlvcmFjbGVLZXkBAAAABmdldFN0cgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAAAAAABm9yYWNsZQkBAAAABmdldFN0cgAAAAEFAAAACW9yYWNsZUtleQAAAAAJb3JhY2xlRmVlCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQmAAAAAQUAAAAGb3JhY2xlAgAAACtDb2xsZWN0aW9ucyBkYXBwIGRvZXNudCBoYXZlIG9yYWNsZSBkZWZpbmVkAAAAAApzY29uZXhEYXBwCQEA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ZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnPHXnS", "height": 2052974, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CiaCqjWMLMbmVDCs9rQcL57v9TuzQjXp4PZV2GBQ6TMc Next: 3ks5SBRZ4nmcPD9bzmKaQArjJcicDAf8bnYPXsjsdHnL Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let oracleFee = valueOrErrorMessage(addressFromString(oracle), "Collections dapp doesnt have oracle defined") | |
21 | 21 | ||
22 | 22 | let sconexDapp = getStringValue(oracleFee, sconexDappKey) | |
23 | + | ||
24 | + | let stakeDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "stakeDapp"), "sconexDapp not found")) | |
23 | 25 | ||
24 | 26 | let collectionsDapp = valueOrErrorMessage(getString(oracleFee, "collectionsDapp"), "collectionDapp not found") | |
25 | 27 | ||
133 | 135 | ||
134 | 136 | ||
135 | 137 | @Callable(i) | |
136 | - | func transferNft (nftID,receiveNFT) = if ((i.caller | |
137 | - | then | |
138 | - | else | |
138 | + | func transferNft (nftID,receiveNFT) = if ((i.caller != this)) | |
139 | + | then throw("Only the dApp can transfer NFT's") | |
140 | + | else [ScriptTransfer(addressFromStringValue(receiveNFT), 1, fromBase58String(nftID))] | |
139 | 141 | ||
140 | 142 | ||
141 | 143 | ||
144 | 146 | let auctionId = toBase58String(i.transactionId) | |
145 | 147 | if ((size(i.payments) == 0)) | |
146 | 148 | then throw("No payment attached") | |
147 | - | else if ((size(i.payments) >= | |
149 | + | else if ((size(i.payments) >= 3)) | |
148 | 150 | then throw("Too many payments attached") | |
149 | 151 | else if ((i.payments[0].amount != 1)) | |
150 | 152 | then throw("No nft attached to the payment") | |
151 | 153 | else { | |
152 | 154 | let pmt = value(i.payments[0]) | |
153 | 155 | let assetId = value(pmt.assetId) | |
154 | - | let minSellSconex = minUSDNPrice | |
155 | - | if ((minSellSconex > startPrice)) | |
156 | - | then throw(("Wrong minimum sell price " + toString(minSellSconex))) | |
156 | + | if ((minUSDNPrice > startPrice)) | |
157 | + | then throw(("Wrong minimum sell price " + toString(minUSDNPrice))) | |
157 | 158 | else { | |
158 | 159 | let asset = getNFTIssuer(assetId) | |
159 | 160 | if ((asset == "")) | |
160 | 161 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
161 | 162 | else if (!(containsElement([auctionType1, auctionType3], auctionType))) | |
162 | 163 | then throw("We don't know this auction type") | |
163 | - | else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))] | |
164 | + | else { | |
165 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
166 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
167 | + | then [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))] | |
168 | + | else throw("Strict value is not equal to itself.") | |
169 | + | } | |
164 | 170 | } | |
165 | 171 | } | |
166 | 172 | } | |
174 | 180 | then throw("Only allowed to auction owner") | |
175 | 181 | else if ((tryGetString((("auction_" + auctionId) + "_status")) != "open")) | |
176 | 182 | then throw("auction is close") | |
177 | - | else [StringEntry((("auction_" + auctionId) + "_status"), "cancelled"), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, 1, fromBase58String(getStringValue(this, (("auction_" + auctionId) + "_assetId"))))] | |
183 | + | else { | |
184 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
185 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
186 | + | then [StringEntry((("auction_" + auctionId) + "_status"), "cancelled"), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, 1, fromBase58String(getStringValue(this, (("auction_" + auctionId) + "_assetId"))))] | |
187 | + | else throw("Strict value is not equal to itself.") | |
188 | + | } | |
178 | 189 | } | |
179 | 190 | ||
180 | 191 | ||
196 | 207 | then throw(("The minimal initial price is set as " + toString(minPrice))) | |
197 | 208 | else { | |
198 | 209 | let auctionType = getStringByKey(keyAuctionType(auctionId)) | |
199 | - | if ((auctionType == auctionType1)) | |
200 | - | then [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(amount)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"), amount), StringEntry(((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_bid_") + bidId), assetId), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "open")] | |
201 | - | else throw("Not a BidType auction!") | |
210 | + | if ((auctionType != auctionType1)) | |
211 | + | then throw("Not a BidType auction!") | |
212 | + | else { | |
213 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
214 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
215 | + | then [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(amount)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"), amount), StringEntry(((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_bid_") + bidId), assetId), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "open")] | |
216 | + | else throw("Strict value is not equal to itself.") | |
217 | + | } | |
202 | 218 | } | |
203 | 219 | } | |
204 | 220 | } | |
225 | 241 | then throw(("The exact price is set as " + toString(minPrice))) | |
226 | 242 | else { | |
227 | 243 | let auctionType = getStringByKey(keyAuctionType(auctionId)) | |
228 | - | if ((auctionType == auctionType3)) | |
229 | - | then { | |
244 | + | if ((auctionType != auctionType3)) | |
245 | + | then throw("Not a directBuy auction!") | |
246 | + | else { | |
230 | 247 | let recordPrice = tryGetInteger((assetId + "_recordPrice")) | |
231 | 248 | let newRecordPrice = max([recordPrice, bidAmount]) | |
232 | 249 | let ArtistAddress = getNFTArtist(assetId) | |
240 | 257 | let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))] | |
241 | 258 | let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil) | |
242 | 259 | if ((res == res)) | |
243 | - | then buyRes | |
260 | + | then { | |
261 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
262 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
263 | + | then buyRes | |
264 | + | else throw("Strict value is not equal to itself.") | |
265 | + | } | |
244 | 266 | else throw("Strict value is not equal to itself.") | |
245 | 267 | } | |
246 | 268 | else throw("Strict value is not equal to itself.") | |
247 | 269 | } | |
248 | 270 | else throw("Strict value is not equal to itself.") | |
249 | 271 | } | |
250 | - | else throw("Not a directBuy auction!") | |
251 | 272 | } | |
252 | 273 | } | |
253 | 274 | } | |
265 | 286 | then throw("Only allowed to the bid author or admin") | |
266 | 287 | else if ((tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_status")) != "open")) | |
267 | 288 | then throw("bid is not open") | |
268 | - | else [StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "cancelled"), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), ScriptTransfer(Address(fromBase58String(bidAuthor)), bidAmount, USDNAssetId)] | |
289 | + | else { | |
290 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
291 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
292 | + | then [StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "cancelled"), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), ScriptTransfer(Address(fromBase58String(bidAuthor)), bidAmount, USDNAssetId)] | |
293 | + | else throw("Strict value is not equal to itself.") | |
294 | + | } | |
269 | 295 | } | |
270 | 296 | ||
271 | 297 | ||
295 | 321 | let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))] | |
296 | 322 | let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil) | |
297 | 323 | if ((res == res)) | |
298 | - | then buyRes | |
324 | + | then { | |
325 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
326 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
327 | + | then buyRes | |
328 | + | else throw("Strict value is not equal to itself.") | |
329 | + | } | |
299 | 330 | else throw("Strict value is not equal to itself.") | |
300 | 331 | } | |
301 | 332 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NFTIssuerfeePercent = 3 | |
5 | 5 | ||
6 | 6 | let sconexDappKey = "sconexDapp" | |
7 | 7 | ||
8 | 8 | let oracleKey = "oracleKey" | |
9 | 9 | ||
10 | 10 | func getStr (key) = match getString(this, key) { | |
11 | 11 | case b: String => | |
12 | 12 | b | |
13 | 13 | case _ => | |
14 | 14 | "" | |
15 | 15 | } | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | let oracle = getStr(oracleKey) | |
19 | 19 | ||
20 | 20 | let oracleFee = valueOrErrorMessage(addressFromString(oracle), "Collections dapp doesnt have oracle defined") | |
21 | 21 | ||
22 | 22 | let sconexDapp = getStringValue(oracleFee, sconexDappKey) | |
23 | + | ||
24 | + | let stakeDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "stakeDapp"), "sconexDapp not found")) | |
23 | 25 | ||
24 | 26 | let collectionsDapp = valueOrErrorMessage(getString(oracleFee, "collectionsDapp"), "collectionDapp not found") | |
25 | 27 | ||
26 | 28 | let feeReceiver = valueOrErrorMessage(getString(oracleFee, "feeReceiver"), "feeReceiver not found") | |
27 | 29 | ||
28 | 30 | let certDapp = valueOrErrorMessage(getString(oracleFee, "certDapp"), "certDapp not found") | |
29 | 31 | ||
30 | 32 | let feeDapp = valueOrErrorMessage(getString(oracleFee, "feeDapp"), "feeDapp not found") | |
31 | 33 | ||
32 | 34 | func getIntegerByKeyFromOracle (key) = valueOrErrorMessage(getInteger(oracleFee, key), "Integer undefine or 0 in oracle") | |
33 | 35 | ||
34 | 36 | ||
35 | 37 | let USDNAssetId = fromBase58String(getStringValue(oracleFee, "USDNAssetId")) | |
36 | 38 | ||
37 | 39 | let minUSDNPrice = getIntegerByKeyFromOracle(("min_" + toBase58String(USDNAssetId))) | |
38 | 40 | ||
39 | 41 | let userDapp = value(addressFromString(valueOrErrorMessage(getString(oracleFee, "userDapp"), "userdapp not found"))) | |
40 | 42 | ||
41 | 43 | let auctionType1 = "BIDTYPE" | |
42 | 44 | ||
43 | 45 | let auctionType2 = "TRADITIONAL" | |
44 | 46 | ||
45 | 47 | let auctionType3 = "DIRECT" | |
46 | 48 | ||
47 | 49 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
48 | 50 | ||
49 | 51 | ||
50 | 52 | func keyAuctionType (auctionId) = (("auction_" + auctionId) + "_actionType") | |
51 | 53 | ||
52 | 54 | ||
53 | 55 | func getStrfromMain (key) = match getString(addressFromStringValue(sconexDapp), key) { | |
54 | 56 | case b: String => | |
55 | 57 | b | |
56 | 58 | case _ => | |
57 | 59 | "" | |
58 | 60 | } | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func getIntfromMain (key) = match getInteger(addressFromStringValue(sconexDapp), key) { | |
62 | 64 | case b: Int => | |
63 | 65 | b | |
64 | 66 | case _ => | |
65 | 67 | 0 | |
66 | 68 | } | |
67 | 69 | ||
68 | 70 | ||
69 | 71 | func tryGetInteger (key) = { | |
70 | 72 | let val = match getInteger(this, key) { | |
71 | 73 | case b: Int => | |
72 | 74 | b | |
73 | 75 | case _ => | |
74 | 76 | 0 | |
75 | 77 | } | |
76 | 78 | val | |
77 | 79 | } | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func tryGetString (key) = { | |
81 | 83 | let val = match getString(this, key) { | |
82 | 84 | case b: String => | |
83 | 85 | b | |
84 | 86 | case _ => | |
85 | 87 | "" | |
86 | 88 | } | |
87 | 89 | val | |
88 | 90 | } | |
89 | 91 | ||
90 | 92 | ||
91 | 93 | func getNFTIssuer (assetId) = { | |
92 | 94 | let myassetinfo = value(assetInfo(assetId)) | |
93 | 95 | if ((myassetinfo.issuer == addressFromStringValue(sconexDapp))) | |
94 | 96 | then "true" | |
95 | 97 | else "" | |
96 | 98 | } | |
97 | 99 | ||
98 | 100 | ||
99 | 101 | func getNFTArtist (assetId) = { | |
100 | 102 | let ArtistAddress = match getString(addressFromStringValue(sconexDapp), ("nft_issued_" + assetId)) { | |
101 | 103 | case b: String => | |
102 | 104 | b | |
103 | 105 | case _ => | |
104 | 106 | "" | |
105 | 107 | } | |
106 | 108 | ArtistAddress | |
107 | 109 | } | |
108 | 110 | ||
109 | 111 | ||
110 | 112 | func getArtId (assetId) = { | |
111 | 113 | let ArtistAddress = match getString(addressFromStringValue(sconexDapp), ("nft_artId_" + assetId)) { | |
112 | 114 | case b: String => | |
113 | 115 | b | |
114 | 116 | case _ => | |
115 | 117 | "" | |
116 | 118 | } | |
117 | 119 | ArtistAddress | |
118 | 120 | } | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | func acceptedAssetIds (assetId) = if ((assetId != toBase58String(USDNAssetId))) | |
122 | 124 | then throw("Only USDN accepted") | |
123 | 125 | else true | |
124 | 126 | ||
125 | 127 | ||
126 | 128 | @Callable(i) | |
127 | 129 | func initDapp (dappKey) = if ((i.caller != this)) | |
128 | 130 | then throw("You cannot do this action") | |
129 | 131 | else if ((oracle != "")) | |
130 | 132 | then throw("oracle already set, you can't override!") | |
131 | 133 | else [StringEntry(oracleKey, dappKey)] | |
132 | 134 | ||
133 | 135 | ||
134 | 136 | ||
135 | 137 | @Callable(i) | |
136 | - | func transferNft (nftID,receiveNFT) = if ((i.caller | |
137 | - | then | |
138 | - | else | |
138 | + | func transferNft (nftID,receiveNFT) = if ((i.caller != this)) | |
139 | + | then throw("Only the dApp can transfer NFT's") | |
140 | + | else [ScriptTransfer(addressFromStringValue(receiveNFT), 1, fromBase58String(nftID))] | |
139 | 141 | ||
140 | 142 | ||
141 | 143 | ||
142 | 144 | @Callable(i) | |
143 | 145 | func initAuction (startPrice,auctionType) = { | |
144 | 146 | let auctionId = toBase58String(i.transactionId) | |
145 | 147 | if ((size(i.payments) == 0)) | |
146 | 148 | then throw("No payment attached") | |
147 | - | else if ((size(i.payments) >= | |
149 | + | else if ((size(i.payments) >= 3)) | |
148 | 150 | then throw("Too many payments attached") | |
149 | 151 | else if ((i.payments[0].amount != 1)) | |
150 | 152 | then throw("No nft attached to the payment") | |
151 | 153 | else { | |
152 | 154 | let pmt = value(i.payments[0]) | |
153 | 155 | let assetId = value(pmt.assetId) | |
154 | - | let minSellSconex = minUSDNPrice | |
155 | - | if ((minSellSconex > startPrice)) | |
156 | - | then throw(("Wrong minimum sell price " + toString(minSellSconex))) | |
156 | + | if ((minUSDNPrice > startPrice)) | |
157 | + | then throw(("Wrong minimum sell price " + toString(minUSDNPrice))) | |
157 | 158 | else { | |
158 | 159 | let asset = getNFTIssuer(assetId) | |
159 | 160 | if ((asset == "")) | |
160 | 161 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
161 | 162 | else if (!(containsElement([auctionType1, auctionType3], auctionType))) | |
162 | 163 | then throw("We don't know this auction type") | |
163 | - | else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))] | |
164 | + | else { | |
165 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
166 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
167 | + | then [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))] | |
168 | + | else throw("Strict value is not equal to itself.") | |
169 | + | } | |
164 | 170 | } | |
165 | 171 | } | |
166 | 172 | } | |
167 | 173 | ||
168 | 174 | ||
169 | 175 | ||
170 | 176 | @Callable(i) | |
171 | 177 | func cancelAuction (auctionId) = { | |
172 | 178 | let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner")) | |
173 | 179 | if ((toString(i.caller) != auctionOwner)) | |
174 | 180 | then throw("Only allowed to auction owner") | |
175 | 181 | else if ((tryGetString((("auction_" + auctionId) + "_status")) != "open")) | |
176 | 182 | then throw("auction is close") | |
177 | - | else [StringEntry((("auction_" + auctionId) + "_status"), "cancelled"), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, 1, fromBase58String(getStringValue(this, (("auction_" + auctionId) + "_assetId"))))] | |
183 | + | else { | |
184 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
185 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
186 | + | then [StringEntry((("auction_" + auctionId) + "_status"), "cancelled"), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, 1, fromBase58String(getStringValue(this, (("auction_" + auctionId) + "_assetId"))))] | |
187 | + | else throw("Strict value is not equal to itself.") | |
188 | + | } | |
178 | 189 | } | |
179 | 190 | ||
180 | 191 | ||
181 | 192 | ||
182 | 193 | @Callable(i) | |
183 | 194 | func placeBid (auctionId) = { | |
184 | 195 | let pmt = value(i.payments[0]) | |
185 | 196 | let amount = pmt.amount | |
186 | 197 | let bidId = toBase58String(i.transactionId) | |
187 | 198 | let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId")) | |
188 | 199 | let PayAssetId = if (!(isDefined(pmt.assetId))) | |
189 | 200 | then throw("Only USDN is accepted!") | |
190 | 201 | else toBase58String(value(pmt.assetId)) | |
191 | 202 | if (!(acceptedAssetIds(PayAssetId))) | |
192 | 203 | then throw("Auction does only support USDN payments") | |
193 | 204 | else { | |
194 | 205 | let minPrice = tryGetInteger((("auction_" + auctionId) + "_startPrice")) | |
195 | 206 | if ((minPrice > amount)) | |
196 | 207 | then throw(("The minimal initial price is set as " + toString(minPrice))) | |
197 | 208 | else { | |
198 | 209 | let auctionType = getStringByKey(keyAuctionType(auctionId)) | |
199 | - | if ((auctionType == auctionType1)) | |
200 | - | then [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(amount)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"), amount), StringEntry(((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_bid_") + bidId), assetId), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "open")] | |
201 | - | else throw("Not a BidType auction!") | |
210 | + | if ((auctionType != auctionType1)) | |
211 | + | then throw("Not a BidType auction!") | |
212 | + | else { | |
213 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
214 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
215 | + | then [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(amount)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"), amount), StringEntry(((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_bid_") + bidId), assetId), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "open")] | |
216 | + | else throw("Strict value is not equal to itself.") | |
217 | + | } | |
202 | 218 | } | |
203 | 219 | } | |
204 | 220 | } | |
205 | 221 | ||
206 | 222 | ||
207 | 223 | ||
208 | 224 | @Callable(i) | |
209 | 225 | func directBuy (auctionId) = { | |
210 | 226 | let pmt = value(i.payments[0]) | |
211 | 227 | let amount = pmt.amount | |
212 | 228 | let bidId = toBase58String(i.transactionId) | |
213 | 229 | let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId")) | |
214 | 230 | let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner")) | |
215 | 231 | let bidAmount = amount | |
216 | 232 | let bidAuthor = toString(i.caller) | |
217 | 233 | let PayAssetId = if (!(isDefined(pmt.assetId))) | |
218 | 234 | then throw("Only USDN is accepted!") | |
219 | 235 | else toBase58String(value(pmt.assetId)) | |
220 | 236 | if (!(acceptedAssetIds(PayAssetId))) | |
221 | 237 | then throw("Auction does only support USDN payments") | |
222 | 238 | else { | |
223 | 239 | let minPrice = tryGetInteger((("auction_" + auctionId) + "_startPrice")) | |
224 | 240 | if ((minPrice != amount)) | |
225 | 241 | then throw(("The exact price is set as " + toString(minPrice))) | |
226 | 242 | else { | |
227 | 243 | let auctionType = getStringByKey(keyAuctionType(auctionId)) | |
228 | - | if ((auctionType == auctionType3)) | |
229 | - | then { | |
244 | + | if ((auctionType != auctionType3)) | |
245 | + | then throw("Not a directBuy auction!") | |
246 | + | else { | |
230 | 247 | let recordPrice = tryGetInteger((assetId + "_recordPrice")) | |
231 | 248 | let newRecordPrice = max([recordPrice, bidAmount]) | |
232 | 249 | let ArtistAddress = getNFTArtist(assetId) | |
233 | 250 | let artId = getArtId(assetId) | |
234 | 251 | let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil) | |
235 | 252 | if ((transferres == transferres)) | |
236 | 253 | then { | |
237 | 254 | let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId, auctionOwner], [AttachedPayment(USDNAssetId, amount)]) | |
238 | 255 | if ((invokeTeamFeeSplit == invokeTeamFeeSplit)) | |
239 | 256 | then { | |
240 | 257 | let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))] | |
241 | 258 | let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil) | |
242 | 259 | if ((res == res)) | |
243 | - | then buyRes | |
260 | + | then { | |
261 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[1]]) | |
262 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
263 | + | then buyRes | |
264 | + | else throw("Strict value is not equal to itself.") | |
265 | + | } | |
244 | 266 | else throw("Strict value is not equal to itself.") | |
245 | 267 | } | |
246 | 268 | else throw("Strict value is not equal to itself.") | |
247 | 269 | } | |
248 | 270 | else throw("Strict value is not equal to itself.") | |
249 | 271 | } | |
250 | - | else throw("Not a directBuy auction!") | |
251 | 272 | } | |
252 | 273 | } | |
253 | 274 | } | |
254 | 275 | ||
255 | 276 | ||
256 | 277 | ||
257 | 278 | @Callable(i) | |
258 | 279 | func cancelBid (auctionId,bidId) = { | |
259 | 280 | let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId")) | |
260 | 281 | let bidAuthor = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_author")) | |
261 | 282 | let bidAmount = tryGetInteger((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount")) | |
262 | 283 | if (if ((toString(i.caller) != bidAuthor)) | |
263 | 284 | then (i.caller != this) | |
264 | 285 | else false) | |
265 | 286 | then throw("Only allowed to the bid author or admin") | |
266 | 287 | else if ((tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_status")) != "open")) | |
267 | 288 | then throw("bid is not open") | |
268 | - | else [StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "cancelled"), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), ScriptTransfer(Address(fromBase58String(bidAuthor)), bidAmount, USDNAssetId)] | |
289 | + | else { | |
290 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
291 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
292 | + | then [StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "cancelled"), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), ScriptTransfer(Address(fromBase58String(bidAuthor)), bidAmount, USDNAssetId)] | |
293 | + | else throw("Strict value is not equal to itself.") | |
294 | + | } | |
269 | 295 | } | |
270 | 296 | ||
271 | 297 | ||
272 | 298 | ||
273 | 299 | @Callable(i) | |
274 | 300 | func acceptBid (auctionId,bidId) = { | |
275 | 301 | let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner")) | |
276 | 302 | let bidAuthor = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_author")) | |
277 | 303 | let bidAmount = tryGetInteger((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount")) | |
278 | 304 | let bidStatus = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_status")) | |
279 | 305 | let assetId = tryGetString((("auction_" + auctionId) + "_assetId")) | |
280 | 306 | if ((toString(i.caller) != auctionOwner)) | |
281 | 307 | then throw("Only allowed to auction owner") | |
282 | 308 | else if ((bidStatus != "open")) | |
283 | 309 | then throw("Bid was cancelled and cannot be accepted") | |
284 | 310 | else { | |
285 | 311 | let recordPrice = tryGetInteger((assetId + "_recordPrice")) | |
286 | 312 | let newRecordPrice = max([recordPrice, bidAmount]) | |
287 | 313 | let ArtistAddress = getNFTArtist(assetId) | |
288 | 314 | let artId = getArtId(assetId) | |
289 | 315 | let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId, auctionOwner], [AttachedPayment(USDNAssetId, bidAmount)]) | |
290 | 316 | if ((invokeTeamFeeSplit == invokeTeamFeeSplit)) | |
291 | 317 | then { | |
292 | 318 | let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil) | |
293 | 319 | if ((transferres == transferres)) | |
294 | 320 | then { | |
295 | 321 | let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))] | |
296 | 322 | let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil) | |
297 | 323 | if ((res == res)) | |
298 | - | then buyRes | |
324 | + | then { | |
325 | + | let validateAndProcessPaymentInvoke = invoke(valueOrErrorMessage(stakeDapp, "this not found"), "validateAndProcessPayment", nil, [i.payments[0]]) | |
326 | + | if ((validateAndProcessPaymentInvoke == validateAndProcessPaymentInvoke)) | |
327 | + | then buyRes | |
328 | + | else throw("Strict value is not equal to itself.") | |
329 | + | } | |
299 | 330 | else throw("Strict value is not equal to itself.") | |
300 | 331 | } | |
301 | 332 | else throw("Strict value is not equal to itself.") | |
302 | 333 | } | |
303 | 334 | else throw("Strict value is not equal to itself.") | |
304 | 335 | } | |
305 | 336 | } | |
306 | 337 | ||
307 | 338 | ||
308 | 339 | @Verifier(tx) | |
309 | 340 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
310 | 341 |
github/deemru/w8io/026f985 67.47 ms ◑