tx · C9bYyTpag8remkfU4bhBbXWThdpduKHrJDA2zcCDDerV 3MtVYGt1cJJB8g21cvSzJScK3hxUi9JHdcN: -0.01400000 Waves 2021.12.23 12:27 [1846724] smart account 3MtVYGt1cJJB8g21cvSzJScK3hxUi9JHdcN > SELF 0.00000000 Waves
{ "type": 13, "id": "C9bYyTpag8remkfU4bhBbXWThdpduKHrJDA2zcCDDerV", "fee": 1400000, "feeAssetId": null, "timestamp": 1640251641337, "version": 2, "chainId": 84, "sender": "3MtVYGt1cJJB8g21cvSzJScK3hxUi9JHdcN", "senderPublicKey": "65qdY9G3EVQgF1GhvrT6rw2zPmUsFirt9Kjm5q5fdJvu", "proofs": [ "3hJjCBwpfUWMCkqqGx24V5auvNAoNFCWFaqmZtvrpoPUyP8b4MazRBvrYTiN92nhnNGtx645SWu6YNi3cQQz9Keu" ], "script": "base64:AAIFAAAAAAAAAZoIAhIGCgQBAQgIEgMKAQgaFQoBYRIQTkZUSXNzdWVyQWRkcmVzcxoPCgFiEgplZ2dBc3NldElkGhIKAWMSDXRyeUdldEludGVnZXIaCAoBZBIDa2V5GggKAWUSA3ZhbBoMCgFmEgckbWF0Y2gwGgYKAWcSAWIaEgoBaBINdHJ5R2V0Qm9vbGVhbhoVCgFpEhBnZXRBc3NldEdlbm90eXBlGgwKAWoSB2Fzc2V0SWQaBgoBaxIBaRoPCgFsEgpzdGFydFByaWNlGhEKAW0SDGluc3RhbnRQcmljZRoQCgFuEgtkZXNjcmlwdGlvbhoMCgFvEgdlZ2dTZWxsGg4KAXASCWF1Y3Rpb25JZBoICgFxEgNwbXQaCgoBchIFYXNzZXQaDgoBcxIJaXNFZ2dTZWxsGhMKAXQSDnBheW1lbnRBc3NldElkGhUKAXUSEHBheW1lbnRBc3NldE5hbWUaCwoBdhIGYW1vdW50GgoKAXcSBWJpZElkGg0KAXgSCG1pblByaWNlGgcKAXkSAnR4GgsKAXoSBnZlcmlmeQAAAAUAAAAAAWEBAAAAGgFU0t1kJimk0QfLjh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cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACGF1Y3Rpb25fBQAAAAFwAgAAAAVfYmlkXwUAAAABdwIAAAAHX3N0YXR1cwIAAAAEb3BlbgUAAAADbmlsAAAAAQAAAAF5AQAAAAF6AAAAAAkAAfQAAAADCAUAAAABeQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAXkAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAABeQAAAA9zZW5kZXJQdWJsaWNLZXlUXgP9", "height": 1846724, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 91C2GFWuWgVXb1cGNeDFGRYcVGjmaSLgbJT51d5Ruw8Z Next: G495Ly92r4PnPRqXWGh5HhCvbTYewwAePvz3tNscbc7r Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3N992tjd7EWM6dSHrdVjjjuJrLD4koNztZ9' | |
5 | 5 | ||
6 | - | func b (c) = if ((value(assetInfo(c)).issuer == Address(a))) | |
6 | + | let b = base58'HPZgDYSHSkEZ1d8XHgVLbJFgRdRdhQDGYbBmBQmUQnwB' | |
7 | + | ||
8 | + | func c (d) = { | |
9 | + | let e = { | |
10 | + | let f = getInteger(this, d) | |
11 | + | if ($isInstanceOf(f, "Int")) | |
12 | + | then { | |
13 | + | let g = f | |
14 | + | g | |
15 | + | } | |
16 | + | else 0 | |
17 | + | } | |
18 | + | e | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | func h (d) = { | |
23 | + | let f = getBoolean(this, d) | |
24 | + | if ($isInstanceOf(f, "Boolean")) | |
25 | + | then { | |
26 | + | let g = f | |
27 | + | g | |
28 | + | } | |
29 | + | else false | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func i (j) = if ((value(assetInfo(j)).issuer == Address(a))) | |
7 | 34 | then "ART" | |
8 | 35 | else "" | |
9 | 36 | ||
10 | 37 | ||
11 | - | @Callable( | |
12 | - | func initAuction ( | |
13 | - | let | |
14 | - | let | |
15 | - | let | |
16 | - | let | |
17 | - | if (( | |
38 | + | @Callable(k) | |
39 | + | func initAuction (l,m,n,o) = { | |
40 | + | let p = toBase58String(k.transactionId) | |
41 | + | let q = value(k.payments[0]) | |
42 | + | let j = value(q.assetId) | |
43 | + | let r = i(j) | |
44 | + | if ((r == "")) | |
18 | 45 | then throw("You can only sell an NFT-duck created in incubator or breeder") | |
19 | - | else [StringEntry((("auction_" + | |
46 | + | else [StringEntry((("auction_" + p) + "_status"), "open"), BooleanEntry((("auction_" + p) + "_eggSell"), (o == "true")), StringEntry((("auction_" + toBase58String(j)) + "_last"), p), StringEntry((("auction_" + p) + "_assetGen"), r), StringEntry((("auction_" + p) + "_assetId"), toBase58String(j)), IntegerEntry((("auction_" + p) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + p) + "_owner"), toString(k.originCaller)), StringEntry((("auction_" + p) + "_description"), n), IntegerEntry((("auction_" + p) + "_startPrice"), l), BooleanEntry((("auction_" + p) + "_isArtefact"), (value(assetInfo(j)).issuer == Address(a))), IntegerEntry((("auction_" + p) + "_instantPrice"), m), StringEntry((((("address_" + toString(k.originCaller)) + "_auction_") + p) + "_lockedNFT"), toBase58String(j))] | |
20 | 47 | } | |
21 | 48 | ||
22 | 49 | ||
23 | - | @Verifier(l) | |
24 | - | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
50 | + | ||
51 | + | @Callable(k) | |
52 | + | func placeBid (p) = { | |
53 | + | let s = h((("auction_" + p) + "_eggSell")) | |
54 | + | let t = if ((s == true)) | |
55 | + | then b | |
56 | + | else unit | |
57 | + | let u = if ((s == true)) | |
58 | + | then "EGG" | |
59 | + | else "WAVES" | |
60 | + | let q = value(k.payments[0]) | |
61 | + | let v = q.amount | |
62 | + | let w = toBase58String(k.transactionId) | |
63 | + | let j = getStringValue(this, (("auction_" + p) + "_assetId")) | |
64 | + | if ((q.assetId != t)) | |
65 | + | then throw((("Auction does only support " + u) + " payments.")) | |
66 | + | else { | |
67 | + | let x = c((("auction_" + p) + "_startPrice")) | |
68 | + | if ((x > v)) | |
69 | + | then throw(("The minimal initial price is set as " + toString(x))) | |
70 | + | else [StringEntry((((("auction_" + p) + "_bid_") + w) + "_author"), toString(k.originCaller)), StringEntry((((("assetId_" + j) + "_bid_") + w) + "_data"), (((((("{\"auctionId\": \"" + p) + "\", \"author\": \"") + toString(k.originCaller)) + "\", \"amount\": \"") + toString(v)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + p) + "_bid_") + w) + "_amount"), v), StringEntry(((((("address_" + toString(k.originCaller)) + "_auction_") + p) + "_bid_") + w), j), StringEntry((((("auction_" + p) + "_bid_") + w) + "_status"), "open")] | |
71 | + | } | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | @Verifier(y) | |
76 | + | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
25 | 77 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3N992tjd7EWM6dSHrdVjjjuJrLD4koNztZ9' | |
5 | 5 | ||
6 | - | func b (c) = if ((value(assetInfo(c)).issuer == Address(a))) | |
6 | + | let b = base58'HPZgDYSHSkEZ1d8XHgVLbJFgRdRdhQDGYbBmBQmUQnwB' | |
7 | + | ||
8 | + | func c (d) = { | |
9 | + | let e = { | |
10 | + | let f = getInteger(this, d) | |
11 | + | if ($isInstanceOf(f, "Int")) | |
12 | + | then { | |
13 | + | let g = f | |
14 | + | g | |
15 | + | } | |
16 | + | else 0 | |
17 | + | } | |
18 | + | e | |
19 | + | } | |
20 | + | ||
21 | + | ||
22 | + | func h (d) = { | |
23 | + | let f = getBoolean(this, d) | |
24 | + | if ($isInstanceOf(f, "Boolean")) | |
25 | + | then { | |
26 | + | let g = f | |
27 | + | g | |
28 | + | } | |
29 | + | else false | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func i (j) = if ((value(assetInfo(j)).issuer == Address(a))) | |
7 | 34 | then "ART" | |
8 | 35 | else "" | |
9 | 36 | ||
10 | 37 | ||
11 | - | @Callable( | |
12 | - | func initAuction ( | |
13 | - | let | |
14 | - | let | |
15 | - | let | |
16 | - | let | |
17 | - | if (( | |
38 | + | @Callable(k) | |
39 | + | func initAuction (l,m,n,o) = { | |
40 | + | let p = toBase58String(k.transactionId) | |
41 | + | let q = value(k.payments[0]) | |
42 | + | let j = value(q.assetId) | |
43 | + | let r = i(j) | |
44 | + | if ((r == "")) | |
18 | 45 | then throw("You can only sell an NFT-duck created in incubator or breeder") | |
19 | - | else [StringEntry((("auction_" + | |
46 | + | else [StringEntry((("auction_" + p) + "_status"), "open"), BooleanEntry((("auction_" + p) + "_eggSell"), (o == "true")), StringEntry((("auction_" + toBase58String(j)) + "_last"), p), StringEntry((("auction_" + p) + "_assetGen"), r), StringEntry((("auction_" + p) + "_assetId"), toBase58String(j)), IntegerEntry((("auction_" + p) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + p) + "_owner"), toString(k.originCaller)), StringEntry((("auction_" + p) + "_description"), n), IntegerEntry((("auction_" + p) + "_startPrice"), l), BooleanEntry((("auction_" + p) + "_isArtefact"), (value(assetInfo(j)).issuer == Address(a))), IntegerEntry((("auction_" + p) + "_instantPrice"), m), StringEntry((((("address_" + toString(k.originCaller)) + "_auction_") + p) + "_lockedNFT"), toBase58String(j))] | |
20 | 47 | } | |
21 | 48 | ||
22 | 49 | ||
23 | - | @Verifier(l) | |
24 | - | func m () = sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
50 | + | ||
51 | + | @Callable(k) | |
52 | + | func placeBid (p) = { | |
53 | + | let s = h((("auction_" + p) + "_eggSell")) | |
54 | + | let t = if ((s == true)) | |
55 | + | then b | |
56 | + | else unit | |
57 | + | let u = if ((s == true)) | |
58 | + | then "EGG" | |
59 | + | else "WAVES" | |
60 | + | let q = value(k.payments[0]) | |
61 | + | let v = q.amount | |
62 | + | let w = toBase58String(k.transactionId) | |
63 | + | let j = getStringValue(this, (("auction_" + p) + "_assetId")) | |
64 | + | if ((q.assetId != t)) | |
65 | + | then throw((("Auction does only support " + u) + " payments.")) | |
66 | + | else { | |
67 | + | let x = c((("auction_" + p) + "_startPrice")) | |
68 | + | if ((x > v)) | |
69 | + | then throw(("The minimal initial price is set as " + toString(x))) | |
70 | + | else [StringEntry((((("auction_" + p) + "_bid_") + w) + "_author"), toString(k.originCaller)), StringEntry((((("assetId_" + j) + "_bid_") + w) + "_data"), (((((("{\"auctionId\": \"" + p) + "\", \"author\": \"") + toString(k.originCaller)) + "\", \"amount\": \"") + toString(v)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + p) + "_bid_") + w) + "_amount"), v), StringEntry(((((("address_" + toString(k.originCaller)) + "_auction_") + p) + "_bid_") + w), j), StringEntry((((("auction_" + p) + "_bid_") + w) + "_status"), "open")] | |
71 | + | } | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | @Verifier(y) | |
76 | + | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
25 | 77 |
github/deemru/w8io/169f3d6 44.54 ms ◑