tx · Eh8Ym5XHkV4nUmudSuXA8424VSn3aRWVbMGnP6RNzfQx 3MyJLBd4WWTxpvMiist7PboYgjipbCBR8T3: -0.05000000 Waves 2022.03.01 04:24 [1944234] smart account 3MyJLBd4WWTxpvMiist7PboYgjipbCBR8T3 > SELF 0.00000000 Waves
{ "type": 13, "id": "Eh8Ym5XHkV4nUmudSuXA8424VSn3aRWVbMGnP6RNzfQx", "fee": 5000000, "feeAssetId": null, "timestamp": 1646097865650, "version": 2, "chainId": 84, "sender": "3MyJLBd4WWTxpvMiist7PboYgjipbCBR8T3", "senderPublicKey": "JbbExtWSdo3zyMwPZhGn1hPkfJaL2hoP1C7RxB3wt4H", "proofs": [ "3A7TMMJm5DBosv6hWPSaKZWmr9av1Me2JSY1JNNfxTZNjUMZQpidrc6g5d4xVP9Lwf5i6bfTqpgHdovov3gs4Ry2" ], "script": "base64:AAIFAAAAAAAAAC4IAhIDCgEIEgQKAggIEgQKAgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgQKAggIAAAAGwAAAAATTkZUSXNzdWVyZmVlUGVyY2VudAAAAAAAAAAAAwAAAAANc2NvbmV4RGFwcEtleQIAAAAKc2NvbmV4RGFwcAAAAAAJb3JhY2xlS2V5AgAAAAlvcmFjbGVLZXkBAAAABmdldFN0cgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAAAAAABm9yYWNsZQkBAAAABmdldFN0cgAAAAEFAAAACW9yYWNsZUtleQAAAAAJb3JhY2xlRmVlCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQmAAAAAQUAAAAGb3JhY2xlAgAAACtDb2xsZWN0aW9ucyBkYXBwIGRvZXNudCBoYXZlIG9yYWNsZSBkZWZpbmVkAAAAAApzY29uZXhEYXBwCQEAAAARQG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25pbAUAAAADbmlsAwkAAAAAAAACBQAAAANyZXMFAAAAA3JlcwUAAAAGYnV5UmVzCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5XjpTlA==", "height": 1944234, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: YRkdjzXh6nyceJz1JsuXfnoMbEnAzwhSm4fYDoQ1aGj Next: none Diff:
Old | New | Differences | |
---|---|---|---|
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Callable(N) | |
163 | - | func initAuction (P,Q) = { | |
163 | + | func transferNft (P,Q) = if ((N.caller == this)) | |
164 | + | then [ScriptTransfer(addressFromStringValue(Q), 1, fromBase58String(P))] | |
165 | + | else throw("Only the dApp can transfer NFT's") | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(N) | |
170 | + | func initAuction (R,S) = { | |
164 | 171 | let u = toBase58String(N.transactionId) | |
165 | 172 | if ((size(N.payments) == 0)) | |
166 | 173 | then throw("No payment attached") | |
167 | 174 | else if ((size(N.payments) >= 2)) | |
168 | 175 | then throw("Too many payments attached") | |
169 | 176 | else { | |
170 | - | let | |
171 | - | let E = value( | |
172 | - | let | |
173 | - | if (( | |
177 | + | let T = value(N.payments[0]) | |
178 | + | let E = value(T.assetId) | |
179 | + | let U = D(E) | |
180 | + | if ((U == "")) | |
174 | 181 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
175 | - | else if (!(containsElement([p, r], | |
182 | + | else if (!(containsElement([p, r], S))) | |
176 | 183 | then throw("We don't know this auction type") | |
177 | - | else [StringEntry((("auction_" + u) + "_status"), "open"), StringEntry((("auction_" + toBase58String(E)) + "_last"), u), StringEntry((("auction_" + u) + "_assetName"), | |
184 | + | else [StringEntry((("auction_" + u) + "_status"), "open"), StringEntry((("auction_" + toBase58String(E)) + "_last"), u), StringEntry((("auction_" + u) + "_assetName"), U), StringEntry((("auction_" + u) + "_assetId"), toBase58String(E)), IntegerEntry((("auction_" + u) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + u) + "_owner"), toString(N.caller)), IntegerEntry((("auction_" + u) + "_startPrice"), R), StringEntry(t(u), S), StringEntry((((("address_" + toString(N.caller)) + "_auction_") + u) + "_lockedNFT"), toBase58String(E))] | |
178 | 185 | } | |
179 | 186 | } | |
180 | 187 | ||
182 | 189 | ||
183 | 190 | @Callable(N) | |
184 | 191 | func cancelAuction (u) = { | |
185 | - | let | |
186 | - | if ((toString(N.caller) != | |
192 | + | let V = C((("auction_" + u) + "_owner")) | |
193 | + | if ((toString(N.caller) != V)) | |
187 | 194 | then throw("Only allowed to auction owner") | |
188 | 195 | else if ((C((("auction_" + u) + "_status")) != "open")) | |
189 | 196 | then throw("auction is close") | |
190 | - | else [StringEntry((("auction_" + u) + "_status"), "cancelled"), DeleteEntry((((("address_" + | |
197 | + | else [StringEntry((("auction_" + u) + "_status"), "cancelled"), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, 1, fromBase58String(getStringValue(this, (("auction_" + u) + "_assetId"))))] | |
191 | 198 | } | |
192 | 199 | ||
193 | 200 | ||
194 | 201 | ||
195 | 202 | @Callable(N) | |
196 | 203 | func placeBid (u) = { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
204 | + | let T = value(N.payments[0]) | |
205 | + | let W = T.amount | |
206 | + | let X = toBase58String(N.transactionId) | |
200 | 207 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
201 | - | let | |
208 | + | let Y = if (!(isDefined(T.assetId))) | |
202 | 209 | then throw("Only USDN is accepted!") | |
203 | - | else toBase58String(value( | |
204 | - | if (!(M( | |
210 | + | else toBase58String(value(T.assetId)) | |
211 | + | if (!(M(Y))) | |
205 | 212 | then throw("Auction does only support USDN payments") | |
206 | 213 | else { | |
207 | - | let | |
208 | - | if (( | |
209 | - | then throw(("The minimal initial price is set as " + toString( | |
214 | + | let Z = A((("auction_" + u) + "_startPrice")) | |
215 | + | if ((Z > W)) | |
216 | + | then throw(("The minimal initial price is set as " + toString(Z))) | |
210 | 217 | else { | |
211 | - | let | |
212 | - | if (( | |
213 | - | then [StringEntry((((("auction_" + u) + "_bid_") + | |
218 | + | let S = s(t(u)) | |
219 | + | if ((S == p)) | |
220 | + | then [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(W)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + u) + "_bid_") + X) + "_amount"), W), StringEntry(((((("address_" + toString(N.caller)) + "_auction_") + u) + "_bid_") + X), E), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "open")] | |
214 | 221 | else throw("Not a BidType auction!") | |
215 | 222 | } | |
216 | 223 | } | |
220 | 227 | ||
221 | 228 | @Callable(N) | |
222 | 229 | func directBuy (u) = { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
230 | + | let T = value(N.payments[0]) | |
231 | + | let W = T.amount | |
232 | + | let X = toBase58String(N.transactionId) | |
226 | 233 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
234 | + | let V = C((("auction_" + u) + "_owner")) | |
235 | + | let aa = W | |
236 | + | let ab = toString(N.caller) | |
237 | + | let Y = if (!(isDefined(T.assetId))) | |
231 | 238 | then throw("Only USDN is accepted!") | |
232 | - | else toBase58String(value( | |
233 | - | if (!(M( | |
239 | + | else toBase58String(value(T.assetId)) | |
240 | + | if (!(M(Y))) | |
234 | 241 | then throw("Auction does only support USDN payments") | |
235 | 242 | else { | |
236 | - | let | |
237 | - | if (( | |
238 | - | then throw(("The exact price is set as " + toString( | |
243 | + | let Z = A((("auction_" + u) + "_startPrice")) | |
244 | + | if ((Z != W)) | |
245 | + | then throw(("The exact price is set as " + toString(Z))) | |
239 | 246 | else { | |
240 | - | let | |
241 | - | if (( | |
247 | + | let S = s(t(u)) | |
248 | + | if ((S == r)) | |
242 | 249 | then { | |
243 | - | let | |
244 | - | let | |
250 | + | let ac = A((E + "_recordPrice")) | |
251 | + | let ad = max([ac, aa]) | |
245 | 252 | let H = G(E) | |
246 | 253 | let x = I(E) | |
247 | - | let | |
254 | + | let ae = J(H, x) | |
248 | 255 | if ((H == "")) | |
249 | 256 | then { | |
250 | - | let ad = [StringEntry((((("auction_" + u) + "_bid_") + V) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + V) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + V) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(Y)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), Y), IntegerEntry((E + "_recordPrice"), ab), DeleteEntry((((("address_" + T) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(T), fraction(Y, ((100 - a) - ac), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, ac, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, a, 100), o), ScriptTransfer(addressFromStringValue(Z), 1, fromBase58String(E))] | |
251 | - | let ae = invoke(addressFromStringValue(m), "createCert", [Z, E, l], nil) | |
252 | - | if ((ae == ae)) | |
253 | - | then ad | |
257 | + | let af = invoke(this, "transferNft", [E, ab], nil) | |
258 | + | if ((af == af)) | |
259 | + | then { | |
260 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(V), fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o)] | |
261 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, l], nil) | |
262 | + | if ((ah == ah)) | |
263 | + | then ag | |
264 | + | else throw("Strict value is not equal to itself.") | |
265 | + | } | |
254 | 266 | else throw("Strict value is not equal to itself.") | |
255 | 267 | } | |
256 | 268 | else { | |
257 | - | let ad = [StringEntry((((("auction_" + u) + "_bid_") + V) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + V) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + V) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(Y)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), Y), IntegerEntry((E + "_recordPrice"), ab), DeleteEntry((((("address_" + T) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(T), fraction(Y, ((100 - a) - ac), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(Y, ac, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, a, 100), o), ScriptTransfer(addressFromStringValue(Z), 1, fromBase58String(E))] | |
258 | - | let ae = invoke(addressFromStringValue(m), "createCert", [Z, E, H], nil) | |
259 | - | if ((ae == ae)) | |
260 | - | then ad | |
269 | + | let af = invoke(this, "transferNft", [E, ab], nil) | |
270 | + | if ((af == af)) | |
271 | + | then { | |
272 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(V), fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o)] | |
273 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, H], nil) | |
274 | + | if ((ah == ah)) | |
275 | + | then ag | |
276 | + | else throw("Strict value is not equal to itself.") | |
277 | + | } | |
261 | 278 | else throw("Strict value is not equal to itself.") | |
262 | 279 | } | |
263 | 280 | } | |
269 | 286 | ||
270 | 287 | ||
271 | 288 | @Callable(N) | |
272 | - | func cancelBid (u, | |
289 | + | func cancelBid (u,X) = { | |
273 | 290 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
274 | - | let | |
275 | - | let | |
276 | - | if (if ((toString(N.caller) != | |
291 | + | let ab = C((((("auction_" + u) + "_bid_") + X) + "_author")) | |
292 | + | let aa = A((((("auction_" + u) + "_bid_") + X) + "_amount")) | |
293 | + | if (if ((toString(N.caller) != ab)) | |
277 | 294 | then (N.caller != this) | |
278 | 295 | else false) | |
279 | 296 | then throw("Only allowed to the bid author or admin") | |
280 | - | else if ((C((((("auction_" + u) + "_bid_") + | |
297 | + | else if ((C((((("auction_" + u) + "_bid_") + X) + "_status")) != "open")) | |
281 | 298 | then throw("bid is not open") | |
282 | - | else [StringEntry((((("assetId_" + E) + "_bid_") + | |
299 | + | else [StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "cancelled"), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), ScriptTransfer(Address(fromBase58String(ab)), aa, o)] | |
283 | 300 | } | |
284 | 301 | ||
285 | 302 | ||
286 | 303 | ||
287 | 304 | @Callable(N) | |
288 | - | func acceptBid (u, | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
305 | + | func acceptBid (u,X) = { | |
306 | + | let V = C((("auction_" + u) + "_owner")) | |
307 | + | let ab = C((((("auction_" + u) + "_bid_") + X) + "_author")) | |
308 | + | let aa = A((((("auction_" + u) + "_bid_") + X) + "_amount")) | |
309 | + | let ai = C((((("auction_" + u) + "_bid_") + X) + "_status")) | |
293 | 310 | let E = C((("auction_" + u) + "_assetId")) | |
294 | - | if ((toString(N.caller) != | |
311 | + | if ((toString(N.caller) != V)) | |
295 | 312 | then throw("Only allowed to auction owner") | |
296 | - | else if (( | |
313 | + | else if ((ai != "open")) | |
297 | 314 | then throw("Bid was cancelled and cannot be accepted") | |
298 | 315 | else { | |
299 | - | let | |
300 | - | let | |
316 | + | let ac = A((E + "_recordPrice")) | |
317 | + | let ad = max([ac, aa]) | |
301 | 318 | let H = G(E) | |
302 | 319 | let x = I(E) | |
303 | - | let | |
320 | + | let ae = J(H, x) | |
304 | 321 | if ((H == "")) | |
305 | 322 | then { | |
306 | - | let | |
307 | - | let | |
308 | - | if (( | |
309 | - | then | |
323 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o), ScriptTransfer(addressFromStringValue(ab), 1, fromBase58String(E))] | |
324 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, l], nil) | |
325 | + | if ((ah == ah)) | |
326 | + | then ag | |
310 | 327 | else throw("Strict value is not equal to itself.") | |
311 | 328 | } | |
312 | 329 | else { | |
313 | - | let | |
314 | - | let | |
315 | - | if (( | |
316 | - | then | |
330 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o), ScriptTransfer(addressFromStringValue(ab), 1, fromBase58String(E))] | |
331 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, H], nil) | |
332 | + | if ((ah == ah)) | |
333 | + | then ag | |
317 | 334 | else throw("Strict value is not equal to itself.") | |
318 | 335 | } | |
319 | 336 | } | |
320 | 337 | } | |
321 | 338 | ||
322 | 339 | ||
323 | - | @Verifier( | |
324 | - | func | |
340 | + | @Verifier(aj) | |
341 | + | func ak () = sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) | |
325 | 342 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 3 | |
5 | 5 | ||
6 | 6 | let b = "sconexDapp" | |
7 | 7 | ||
8 | 8 | let c = "oracleKey" | |
9 | 9 | ||
10 | 10 | func d (e) = { | |
11 | 11 | let f = getString(this, e) | |
12 | 12 | if ($isInstanceOf(f, "String")) | |
13 | 13 | then { | |
14 | 14 | let g = f | |
15 | 15 | g | |
16 | 16 | } | |
17 | 17 | else "" | |
18 | 18 | } | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let h = d(c) | |
22 | 22 | ||
23 | 23 | let i = valueOrErrorMessage(addressFromString(h), "Collections dapp doesnt have oracle defined") | |
24 | 24 | ||
25 | 25 | let j = getStringValue(i, b) | |
26 | 26 | ||
27 | 27 | let k = valueOrErrorMessage(getString(i, "collectionsDapp"), "collectionDapp not found") | |
28 | 28 | ||
29 | 29 | let l = valueOrErrorMessage(getString(i, "feeReceiver"), "feeReceiver not found") | |
30 | 30 | ||
31 | 31 | let m = valueOrErrorMessage(getString(i, "certDapp"), "certDapp not found") | |
32 | 32 | ||
33 | 33 | let n = value(addressFromString(valueOrErrorMessage(getString(i, "userDapp"), "userdapp not found"))) | |
34 | 34 | ||
35 | 35 | let o = fromBase58String(getStringValue(i, "USDNAssetId")) | |
36 | 36 | ||
37 | 37 | let p = "BIDTYPE" | |
38 | 38 | ||
39 | 39 | let q = "TRADITIONAL" | |
40 | 40 | ||
41 | 41 | let r = "DIRECT" | |
42 | 42 | ||
43 | 43 | func s (e) = valueOrElse(getString(this, e), "") | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func t (u) = (("auction_" + u) + "_actionType") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func v (w,x) = ((("art_royalty_" + x) + "_") + w) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func y (e) = { | |
53 | 53 | let f = getString(addressFromStringValue(j), e) | |
54 | 54 | if ($isInstanceOf(f, "String")) | |
55 | 55 | then { | |
56 | 56 | let g = f | |
57 | 57 | g | |
58 | 58 | } | |
59 | 59 | else "" | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func z (e) = { | |
64 | 64 | let f = getInteger(addressFromStringValue(j), e) | |
65 | 65 | if ($isInstanceOf(f, "Int")) | |
66 | 66 | then { | |
67 | 67 | let g = f | |
68 | 68 | g | |
69 | 69 | } | |
70 | 70 | else 0 | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func A (e) = { | |
75 | 75 | let B = { | |
76 | 76 | let f = getInteger(this, e) | |
77 | 77 | if ($isInstanceOf(f, "Int")) | |
78 | 78 | then { | |
79 | 79 | let g = f | |
80 | 80 | g | |
81 | 81 | } | |
82 | 82 | else 0 | |
83 | 83 | } | |
84 | 84 | B | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func C (e) = { | |
89 | 89 | let B = { | |
90 | 90 | let f = getString(this, e) | |
91 | 91 | if ($isInstanceOf(f, "String")) | |
92 | 92 | then { | |
93 | 93 | let g = f | |
94 | 94 | g | |
95 | 95 | } | |
96 | 96 | else "" | |
97 | 97 | } | |
98 | 98 | B | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func D (E) = { | |
103 | 103 | let F = value(assetInfo(E)) | |
104 | 104 | if ((F.issuer == addressFromStringValue(j))) | |
105 | 105 | then "true" | |
106 | 106 | else "" | |
107 | 107 | } | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func G (E) = { | |
111 | 111 | let H = { | |
112 | 112 | let f = getString(addressFromStringValue(j), ("nft_issued_" + E)) | |
113 | 113 | if ($isInstanceOf(f, "String")) | |
114 | 114 | then { | |
115 | 115 | let g = f | |
116 | 116 | g | |
117 | 117 | } | |
118 | 118 | else "" | |
119 | 119 | } | |
120 | 120 | H | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func I (E) = { | |
125 | 125 | let H = { | |
126 | 126 | let f = getString(addressFromStringValue(j), ("nft_artId_" + E)) | |
127 | 127 | if ($isInstanceOf(f, "String")) | |
128 | 128 | then { | |
129 | 129 | let g = f | |
130 | 130 | g | |
131 | 131 | } | |
132 | 132 | else "" | |
133 | 133 | } | |
134 | 134 | H | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func J (K,x) = { | |
139 | 139 | let L = z(v(K, x)) | |
140 | 140 | if (if ((L > 0)) | |
141 | 141 | then (85 >= L) | |
142 | 142 | else false) | |
143 | 143 | then throw("Artist royalty incorrect") | |
144 | 144 | else L | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func M (E) = if ((E != toBase58String(o))) | |
149 | 149 | then throw("Only USDN accepted") | |
150 | 150 | else true | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | @Callable(N) | |
154 | 154 | func initDapp (O) = if ((N.caller != this)) | |
155 | 155 | then throw("You cannot do this action") | |
156 | 156 | else if ((h != "")) | |
157 | 157 | then throw("oracle already set, you can't override!") | |
158 | 158 | else [StringEntry(c, O)] | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Callable(N) | |
163 | - | func initAuction (P,Q) = { | |
163 | + | func transferNft (P,Q) = if ((N.caller == this)) | |
164 | + | then [ScriptTransfer(addressFromStringValue(Q), 1, fromBase58String(P))] | |
165 | + | else throw("Only the dApp can transfer NFT's") | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(N) | |
170 | + | func initAuction (R,S) = { | |
164 | 171 | let u = toBase58String(N.transactionId) | |
165 | 172 | if ((size(N.payments) == 0)) | |
166 | 173 | then throw("No payment attached") | |
167 | 174 | else if ((size(N.payments) >= 2)) | |
168 | 175 | then throw("Too many payments attached") | |
169 | 176 | else { | |
170 | - | let | |
171 | - | let E = value( | |
172 | - | let | |
173 | - | if (( | |
177 | + | let T = value(N.payments[0]) | |
178 | + | let E = value(T.assetId) | |
179 | + | let U = D(E) | |
180 | + | if ((U == "")) | |
174 | 181 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
175 | - | else if (!(containsElement([p, r], | |
182 | + | else if (!(containsElement([p, r], S))) | |
176 | 183 | then throw("We don't know this auction type") | |
177 | - | else [StringEntry((("auction_" + u) + "_status"), "open"), StringEntry((("auction_" + toBase58String(E)) + "_last"), u), StringEntry((("auction_" + u) + "_assetName"), | |
184 | + | else [StringEntry((("auction_" + u) + "_status"), "open"), StringEntry((("auction_" + toBase58String(E)) + "_last"), u), StringEntry((("auction_" + u) + "_assetName"), U), StringEntry((("auction_" + u) + "_assetId"), toBase58String(E)), IntegerEntry((("auction_" + u) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + u) + "_owner"), toString(N.caller)), IntegerEntry((("auction_" + u) + "_startPrice"), R), StringEntry(t(u), S), StringEntry((((("address_" + toString(N.caller)) + "_auction_") + u) + "_lockedNFT"), toBase58String(E))] | |
178 | 185 | } | |
179 | 186 | } | |
180 | 187 | ||
181 | 188 | ||
182 | 189 | ||
183 | 190 | @Callable(N) | |
184 | 191 | func cancelAuction (u) = { | |
185 | - | let | |
186 | - | if ((toString(N.caller) != | |
192 | + | let V = C((("auction_" + u) + "_owner")) | |
193 | + | if ((toString(N.caller) != V)) | |
187 | 194 | then throw("Only allowed to auction owner") | |
188 | 195 | else if ((C((("auction_" + u) + "_status")) != "open")) | |
189 | 196 | then throw("auction is close") | |
190 | - | else [StringEntry((("auction_" + u) + "_status"), "cancelled"), DeleteEntry((((("address_" + | |
197 | + | else [StringEntry((("auction_" + u) + "_status"), "cancelled"), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, 1, fromBase58String(getStringValue(this, (("auction_" + u) + "_assetId"))))] | |
191 | 198 | } | |
192 | 199 | ||
193 | 200 | ||
194 | 201 | ||
195 | 202 | @Callable(N) | |
196 | 203 | func placeBid (u) = { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
204 | + | let T = value(N.payments[0]) | |
205 | + | let W = T.amount | |
206 | + | let X = toBase58String(N.transactionId) | |
200 | 207 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
201 | - | let | |
208 | + | let Y = if (!(isDefined(T.assetId))) | |
202 | 209 | then throw("Only USDN is accepted!") | |
203 | - | else toBase58String(value( | |
204 | - | if (!(M( | |
210 | + | else toBase58String(value(T.assetId)) | |
211 | + | if (!(M(Y))) | |
205 | 212 | then throw("Auction does only support USDN payments") | |
206 | 213 | else { | |
207 | - | let | |
208 | - | if (( | |
209 | - | then throw(("The minimal initial price is set as " + toString( | |
214 | + | let Z = A((("auction_" + u) + "_startPrice")) | |
215 | + | if ((Z > W)) | |
216 | + | then throw(("The minimal initial price is set as " + toString(Z))) | |
210 | 217 | else { | |
211 | - | let | |
212 | - | if (( | |
213 | - | then [StringEntry((((("auction_" + u) + "_bid_") + | |
218 | + | let S = s(t(u)) | |
219 | + | if ((S == p)) | |
220 | + | then [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(W)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + u) + "_bid_") + X) + "_amount"), W), StringEntry(((((("address_" + toString(N.caller)) + "_auction_") + u) + "_bid_") + X), E), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "open")] | |
214 | 221 | else throw("Not a BidType auction!") | |
215 | 222 | } | |
216 | 223 | } | |
217 | 224 | } | |
218 | 225 | ||
219 | 226 | ||
220 | 227 | ||
221 | 228 | @Callable(N) | |
222 | 229 | func directBuy (u) = { | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
230 | + | let T = value(N.payments[0]) | |
231 | + | let W = T.amount | |
232 | + | let X = toBase58String(N.transactionId) | |
226 | 233 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
234 | + | let V = C((("auction_" + u) + "_owner")) | |
235 | + | let aa = W | |
236 | + | let ab = toString(N.caller) | |
237 | + | let Y = if (!(isDefined(T.assetId))) | |
231 | 238 | then throw("Only USDN is accepted!") | |
232 | - | else toBase58String(value( | |
233 | - | if (!(M( | |
239 | + | else toBase58String(value(T.assetId)) | |
240 | + | if (!(M(Y))) | |
234 | 241 | then throw("Auction does only support USDN payments") | |
235 | 242 | else { | |
236 | - | let | |
237 | - | if (( | |
238 | - | then throw(("The exact price is set as " + toString( | |
243 | + | let Z = A((("auction_" + u) + "_startPrice")) | |
244 | + | if ((Z != W)) | |
245 | + | then throw(("The exact price is set as " + toString(Z))) | |
239 | 246 | else { | |
240 | - | let | |
241 | - | if (( | |
247 | + | let S = s(t(u)) | |
248 | + | if ((S == r)) | |
242 | 249 | then { | |
243 | - | let | |
244 | - | let | |
250 | + | let ac = A((E + "_recordPrice")) | |
251 | + | let ad = max([ac, aa]) | |
245 | 252 | let H = G(E) | |
246 | 253 | let x = I(E) | |
247 | - | let | |
254 | + | let ae = J(H, x) | |
248 | 255 | if ((H == "")) | |
249 | 256 | then { | |
250 | - | let ad = [StringEntry((((("auction_" + u) + "_bid_") + V) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + V) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + V) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(Y)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), Y), IntegerEntry((E + "_recordPrice"), ab), DeleteEntry((((("address_" + T) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(T), fraction(Y, ((100 - a) - ac), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, ac, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, a, 100), o), ScriptTransfer(addressFromStringValue(Z), 1, fromBase58String(E))] | |
251 | - | let ae = invoke(addressFromStringValue(m), "createCert", [Z, E, l], nil) | |
252 | - | if ((ae == ae)) | |
253 | - | then ad | |
257 | + | let af = invoke(this, "transferNft", [E, ab], nil) | |
258 | + | if ((af == af)) | |
259 | + | then { | |
260 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(V), fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o)] | |
261 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, l], nil) | |
262 | + | if ((ah == ah)) | |
263 | + | then ag | |
264 | + | else throw("Strict value is not equal to itself.") | |
265 | + | } | |
254 | 266 | else throw("Strict value is not equal to itself.") | |
255 | 267 | } | |
256 | 268 | else { | |
257 | - | let ad = [StringEntry((((("auction_" + u) + "_bid_") + V) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + V) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + V) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(Y)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), Y), IntegerEntry((E + "_recordPrice"), ab), DeleteEntry((((("address_" + T) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(T), fraction(Y, ((100 - a) - ac), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(Y, ac, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(Y, a, 100), o), ScriptTransfer(addressFromStringValue(Z), 1, fromBase58String(E))] | |
258 | - | let ae = invoke(addressFromStringValue(m), "createCert", [Z, E, H], nil) | |
259 | - | if ((ae == ae)) | |
260 | - | then ad | |
269 | + | let af = invoke(this, "transferNft", [E, ab], nil) | |
270 | + | if ((af == af)) | |
271 | + | then { | |
272 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_author"), toString(N.caller)), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(V), fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o)] | |
273 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, H], nil) | |
274 | + | if ((ah == ah)) | |
275 | + | then ag | |
276 | + | else throw("Strict value is not equal to itself.") | |
277 | + | } | |
261 | 278 | else throw("Strict value is not equal to itself.") | |
262 | 279 | } | |
263 | 280 | } | |
264 | 281 | else throw("Not a directBuy auction!") | |
265 | 282 | } | |
266 | 283 | } | |
267 | 284 | } | |
268 | 285 | ||
269 | 286 | ||
270 | 287 | ||
271 | 288 | @Callable(N) | |
272 | - | func cancelBid (u, | |
289 | + | func cancelBid (u,X) = { | |
273 | 290 | let E = getStringValue(this, (("auction_" + u) + "_assetId")) | |
274 | - | let | |
275 | - | let | |
276 | - | if (if ((toString(N.caller) != | |
291 | + | let ab = C((((("auction_" + u) + "_bid_") + X) + "_author")) | |
292 | + | let aa = A((((("auction_" + u) + "_bid_") + X) + "_amount")) | |
293 | + | if (if ((toString(N.caller) != ab)) | |
277 | 294 | then (N.caller != this) | |
278 | 295 | else false) | |
279 | 296 | then throw("Only allowed to the bid author or admin") | |
280 | - | else if ((C((((("auction_" + u) + "_bid_") + | |
297 | + | else if ((C((((("auction_" + u) + "_bid_") + X) + "_status")) != "open")) | |
281 | 298 | then throw("bid is not open") | |
282 | - | else [StringEntry((((("assetId_" + E) + "_bid_") + | |
299 | + | else [StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "cancelled"), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), ScriptTransfer(Address(fromBase58String(ab)), aa, o)] | |
283 | 300 | } | |
284 | 301 | ||
285 | 302 | ||
286 | 303 | ||
287 | 304 | @Callable(N) | |
288 | - | func acceptBid (u, | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
305 | + | func acceptBid (u,X) = { | |
306 | + | let V = C((("auction_" + u) + "_owner")) | |
307 | + | let ab = C((((("auction_" + u) + "_bid_") + X) + "_author")) | |
308 | + | let aa = A((((("auction_" + u) + "_bid_") + X) + "_amount")) | |
309 | + | let ai = C((((("auction_" + u) + "_bid_") + X) + "_status")) | |
293 | 310 | let E = C((("auction_" + u) + "_assetId")) | |
294 | - | if ((toString(N.caller) != | |
311 | + | if ((toString(N.caller) != V)) | |
295 | 312 | then throw("Only allowed to auction owner") | |
296 | - | else if (( | |
313 | + | else if ((ai != "open")) | |
297 | 314 | then throw("Bid was cancelled and cannot be accepted") | |
298 | 315 | else { | |
299 | - | let | |
300 | - | let | |
316 | + | let ac = A((E + "_recordPrice")) | |
317 | + | let ad = max([ac, aa]) | |
301 | 318 | let H = G(E) | |
302 | 319 | let x = I(E) | |
303 | - | let | |
320 | + | let ae = J(H, x) | |
304 | 321 | if ((H == "")) | |
305 | 322 | then { | |
306 | - | let | |
307 | - | let | |
308 | - | if (( | |
309 | - | then | |
323 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o), ScriptTransfer(addressFromStringValue(ab), 1, fromBase58String(E))] | |
324 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, l], nil) | |
325 | + | if ((ah == ah)) | |
326 | + | then ag | |
310 | 327 | else throw("Strict value is not equal to itself.") | |
311 | 328 | } | |
312 | 329 | else { | |
313 | - | let | |
314 | - | let | |
315 | - | if (( | |
316 | - | then | |
330 | + | let ag = [StringEntry((((("auction_" + u) + "_bid_") + X) + "_status"), "finished"), StringEntry((("auction_" + u) + "_status"), "finished"), StringEntry((((("assetId_" + E) + "_bid_") + X) + "_data"), (((((("{\"auctionId\": \"" + u) + "\", \"author\": \"") + toString(N.caller)) + "\", \"amount\": \"") + toString(aa)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + u) + "_finalPrice"), aa), IntegerEntry((E + "_recordPrice"), ad), DeleteEntry(((((("address_" + ab) + "_auction_") + u) + "_bid_") + X)), DeleteEntry((((("address_" + V) + "_auction_") + u) + "_lockedNFT")), ScriptTransfer(N.caller, fraction(aa, ((100 - a) - ae), 100), o), ScriptTransfer(Address(fromBase58String(H)), fraction(aa, ae, 100), o), ScriptTransfer(addressFromStringValue(l), fraction(aa, a, 100), o), ScriptTransfer(addressFromStringValue(ab), 1, fromBase58String(E))] | |
331 | + | let ah = invoke(addressFromStringValue(m), "createCert", [ab, E, H], nil) | |
332 | + | if ((ah == ah)) | |
333 | + | then ag | |
317 | 334 | else throw("Strict value is not equal to itself.") | |
318 | 335 | } | |
319 | 336 | } | |
320 | 337 | } | |
321 | 338 | ||
322 | 339 | ||
323 | - | @Verifier( | |
324 | - | func | |
340 | + | @Verifier(aj) | |
341 | + | func ak () = sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) | |
325 | 342 |
github/deemru/w8io/169f3d6 144.22 ms ◑