tx · Dt5FWBqNqxLccb1KU7zLKENfod9QnPrCxv6EvYp2zRQo 3MrfHoPDiF2nJb6T6Z6J7MdhpX3LeVaLaW2: -0.05000000 Waves 2021.09.01 23:18 [1684437] smart account 3MrfHoPDiF2nJb6T6Z6J7MdhpX3LeVaLaW2 > SELF 0.00000000 Waves
{ "type": 13, "id": "Dt5FWBqNqxLccb1KU7zLKENfod9QnPrCxv6EvYp2zRQo", "fee": 5000000, "feeAssetId": null, "timestamp": 1630527512505, "version": 2, "chainId": 84, "sender": "3MrfHoPDiF2nJb6T6Z6J7MdhpX3LeVaLaW2", "senderPublicKey": "ANm32Ptz6YTMKvYUJBEYd4CYiTVn6XEvYjZhewQMphSJ", "proofs": [ "57LEB3SgYa1FPYEkPPXAdcCmprDJLYY4hvE7bCj1FFhEYNo1L3vsRi6YnkmDWqyubbLPn7CVgJUJeRREQ1QdmoVz" ], "script": "base64:AAIFAAAAAAAAAoMIAhIDCgEBEgMKAQgSAwoBCBIECgIICBIECgIICBoWCgJhMRIQTkZUSXNzdWVyQWRkcmVzcxoaCgJhMhIUTkZUSXNzdWVyZmVlUmVjZWl2ZXIaGQoCYTMSE05GVElzc3VlcmZlZVBlcmNlbnQaFgoCYTQSEEFydGlzdGZlZVBlcmNlbnQaEwoCYTUSDXNjb25leEFzc2V0SWQaEwoCYTYSDXRyeUdldEludGVnZXIaCQoCYTcSA2tleRoJCgJhOBIDdmFsGg0KAmE5EgckbWF0Y2gwGgcKAmIxEgFiGhIKAmIyEgx0cnlHZXRTdHJpbmcaEgoCYjMSDGdldE5GVElzc3VlchoNCgJiNBIHYXNzZXRJZBoRCgJiNRILbXlhc3NldGluZm8aEgoCYjYSDGdldE5GVEFydGlzdBoTCgJiNxINQXJ0aXN0QWRkcmVzcxoWCgJiOBIQYWNjZXB0ZWRBc3NldElkcxoHCgJiORIBaRoQCgJjMRIKc3RhcnRQcmljZRoPCgJjMhIJYXVjdGlvbklkGgcKAmMzEgF4GggKAmM0EgJ4MRoJCg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AAZAUAAAACYTUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABBQAAAAJhMgkAAGsAAAADBQAAAAJkNAUAAAACYTMAAAAAAAAAAGQFAAAAAmE1CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAAAmQzAAAAAAAAAAABCQACWQAAAAEFAAAAAmI0BQAAAANuaWwAAAABAAAAAmQ4AQAAAAJkOQAAAAAJAAH0AAAAAwgFAAAAAmQ4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZDgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACZDgAAAAPc2VuZGVyUHVibGljS2V53O1JRg==", "height": 1684437, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8G8BGrUyjndxQhEgXCQzFFTF4ze7GFm8ALWsyxsbtHY1 Next: 5MuQSjKxfgBqaUEVGqdjar2drsH2P7cGYJEJpurd267w Diff:
Old | New | Differences | |
---|---|---|---|
69 | 69 | @Callable(r) | |
70 | 70 | func initAuction (s) = { | |
71 | 71 | let t = toBase58String(r.transactionId) | |
72 | - | let u = if ( | |
73 | - | then value(r.payments | |
72 | + | let u = if ((size(r.payments) == 0)) | |
73 | + | then value(r.payments) | |
74 | 74 | else throw("No payment attached") | |
75 | - | let v = value(r.payments[0]) | |
76 | - | let m = value(v.assetId) | |
77 | - | let w = l(m) | |
78 | - | if ((w == "")) | |
75 | + | let v = if ((size(r.payments) > 1)) | |
76 | + | then value(r.payments) | |
77 | + | else throw("Too many payments attached") | |
78 | + | let w = value(r.payments[0]) | |
79 | + | let m = value(w.assetId) | |
80 | + | let x = l(m) | |
81 | + | if ((x == "")) | |
79 | 82 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
80 | - | else [StringEntry((("auction_" + t) + "_status"), "open"), StringEntry((("auction_" + toBase58String(m)) + "_last"), t), StringEntry((("auction_" + t) + "_assetName"), | |
83 | + | else [StringEntry((("auction_" + t) + "_status"), "open"), StringEntry((("auction_" + toBase58String(m)) + "_last"), t), StringEntry((("auction_" + t) + "_assetName"), x), StringEntry((("auction_" + t) + "_assetId"), toBase58String(m)), IntegerEntry((("auction_" + t) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + t) + "_owner"), toString(r.caller)), IntegerEntry((("auction_" + t) + "_startPrice"), s), StringEntry((((("address_" + toString(r.caller)) + "_auction_") + t) + "_lockedNFT"), toBase58String(m))] | |
81 | 84 | } | |
82 | 85 | ||
83 | 86 | ||
84 | 87 | ||
85 | 88 | @Callable(r) | |
86 | 89 | func cancelAuction (t) = { | |
87 | - | let | |
88 | - | if ((toString(r.caller) != | |
90 | + | let y = k((("auction_" + t) + "_owner")) | |
91 | + | if ((toString(r.caller) != y)) | |
89 | 92 | then throw("Only allowed to auction owner") | |
90 | 93 | else if ((k((("auction_" + t) + "_status")) != "open")) | |
91 | 94 | then throw("auction is close") | |
92 | - | else [StringEntry((("auction_" + t) + "_status"), "cancelled"), DeleteEntry((((("address_" + | |
95 | + | else [StringEntry((("auction_" + t) + "_status"), "cancelled"), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, 1, fromBase58String(getStringValue(this, (("auction_" + t) + "_assetId"))))] | |
93 | 96 | } | |
94 | 97 | ||
95 | 98 | ||
96 | 99 | ||
97 | 100 | @Callable(r) | |
98 | 101 | func placeBid (t) = { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | + | let w = value(r.payments[0]) | |
103 | + | let z = w.amount | |
104 | + | let A = toBase58String(r.transactionId) | |
102 | 105 | let m = getStringValue(this, (("auction_" + t) + "_assetId")) | |
103 | - | let | |
106 | + | let B = if (!(isDefined(w.assetId))) | |
104 | 107 | then throw("Only sconex is accepted!") | |
105 | - | else toBase58String(value( | |
106 | - | if (!(q( | |
108 | + | else toBase58String(value(w.assetId)) | |
109 | + | if (!(q(B))) | |
107 | 110 | then throw("Auction does only support sconex payments") | |
108 | 111 | else { | |
109 | - | let | |
110 | - | if (( | |
111 | - | then throw(("The minimal initial price is set as " + toString( | |
112 | - | else [StringEntry((((("auction_" + t) + "_bid_") + | |
112 | + | let C = f((("auction_" + t) + "_startPrice")) | |
113 | + | if ((C > z)) | |
114 | + | then throw(("The minimal initial price is set as " + toString(C))) | |
115 | + | else [StringEntry((((("auction_" + t) + "_bid_") + A) + "_author"), toString(r.caller)), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(z)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + t) + "_bid_") + A) + "_amount"), z), StringEntry(((((("address_" + toString(r.caller)) + "_auction_") + t) + "_bid_") + A), m), StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "open")] | |
113 | 116 | } | |
114 | 117 | } | |
115 | 118 | ||
116 | 119 | ||
117 | 120 | ||
118 | 121 | @Callable(r) | |
119 | - | func cancelBid (t, | |
122 | + | func cancelBid (t,A) = { | |
120 | 123 | let m = getStringValue(this, (("auction_" + t) + "_assetId")) | |
121 | - | let | |
122 | - | let | |
123 | - | if (if ((toString(r.caller) != | |
124 | + | let D = k((((("auction_" + t) + "_bid_") + A) + "_author")) | |
125 | + | let E = f((((("auction_" + t) + "_bid_") + A) + "_amount")) | |
126 | + | if (if ((toString(r.caller) != D)) | |
124 | 127 | then (r.caller != this) | |
125 | 128 | else false) | |
126 | 129 | then throw("Only allowed to the bid author or admin") | |
127 | - | else if ((k((((("auction_" + t) + "_bid_") + | |
130 | + | else if ((k((((("auction_" + t) + "_bid_") + A) + "_status")) != "open")) | |
128 | 131 | then throw("bid is not open") | |
129 | - | else [StringEntry((((("assetId_" + m) + "_bid_") + | |
132 | + | else [StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "cancelled"), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), ScriptTransfer(Address(fromBase58String(D)), E, e)] | |
130 | 133 | } | |
131 | 134 | ||
132 | 135 | ||
133 | 136 | ||
134 | 137 | @Callable(r) | |
135 | - | func acceptBid (t, | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
138 | + | func acceptBid (t,A) = { | |
139 | + | let y = k((("auction_" + t) + "_owner")) | |
140 | + | let D = k((((("auction_" + t) + "_bid_") + A) + "_author")) | |
141 | + | let E = f((((("auction_" + t) + "_bid_") + A) + "_amount")) | |
142 | + | let F = k((((("auction_" + t) + "_bid_") + A) + "_status")) | |
140 | 143 | let m = k((("auction_" + t) + "_assetId")) | |
141 | - | if ((toString(r.caller) != | |
144 | + | if ((toString(r.caller) != y)) | |
142 | 145 | then throw("Only allowed to auction owner") | |
143 | - | else if (( | |
146 | + | else if ((F != "open")) | |
144 | 147 | then throw("Bid was cancelled and cannot be accepted") | |
145 | 148 | else { | |
146 | - | let | |
147 | - | let | |
149 | + | let G = f((m + "_recordPrice")) | |
150 | + | let H = max([G, E]) | |
148 | 151 | let p = o(m) | |
149 | 152 | if ((p == "")) | |
150 | - | then [StringEntry((((("auction_" + t) + "_bid_") + | |
151 | - | else [StringEntry((((("auction_" + t) + "_bid_") + | |
153 | + | then [StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "finished"), StringEntry((("auction_" + t) + "_status"), "finished"), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + t) + "_finalPrice"), E), IntegerEntry((m + "_recordPrice"), H), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, fraction(E, ((100 - c) - d), 100), e), ScriptTransfer(Address(b), fraction(E, d, 100), e), ScriptTransfer(Address(b), fraction(E, c, 100), e), ScriptTransfer(addressFromStringValue(D), 1, fromBase58String(m))] | |
154 | + | else [StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "finished"), StringEntry((("auction_" + t) + "_status"), "finished"), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + t) + "_finalPrice"), E), IntegerEntry((m + "_recordPrice"), H), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, fraction(E, ((100 - c) - d), 100), e), ScriptTransfer(Address(fromBase58String(p)), fraction(E, d, 100), e), ScriptTransfer(Address(b), fraction(E, c, 100), e), ScriptTransfer(addressFromStringValue(D), 1, fromBase58String(m))] | |
152 | 155 | } | |
153 | 156 | } | |
154 | 157 | ||
155 | 158 | ||
156 | - | @Verifier( | |
157 | - | func | |
159 | + | @Verifier(I) | |
160 | + | func J () = sigVerify(I.bodyBytes, I.proofs[0], I.senderPublicKey) | |
158 | 161 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'3MrWNTqFcHBqb58Za1A5crQrMV5KJ5DYhtA' | |
5 | 5 | ||
6 | 6 | let b = base58'3N65xLq8JcCeaEiR1TJQ7dBqXBvEy6E48Wz' | |
7 | 7 | ||
8 | 8 | let c = 3 | |
9 | 9 | ||
10 | 10 | let d = 7 | |
11 | 11 | ||
12 | 12 | let e = base58'DZ8ALmuLeSZ2ocsYLAcL9MiXBFDbMNQG9LtitREyU5ZC' | |
13 | 13 | ||
14 | 14 | func f (g) = { | |
15 | 15 | let h = { | |
16 | 16 | let i = getInteger(this, g) | |
17 | 17 | if ($isInstanceOf(i, "Int")) | |
18 | 18 | then { | |
19 | 19 | let j = i | |
20 | 20 | j | |
21 | 21 | } | |
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | h | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func k (g) = { | |
29 | 29 | let h = { | |
30 | 30 | let i = getString(this, g) | |
31 | 31 | if ($isInstanceOf(i, "String")) | |
32 | 32 | then { | |
33 | 33 | let j = i | |
34 | 34 | j | |
35 | 35 | } | |
36 | 36 | else "" | |
37 | 37 | } | |
38 | 38 | h | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func l (m) = { | |
43 | 43 | let n = value(assetInfo(m)) | |
44 | 44 | if ((n.issuer == Address(a))) | |
45 | 45 | then "true" | |
46 | 46 | else "" | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func o (m) = { | |
51 | 51 | let p = { | |
52 | 52 | let i = getString(Address(a), ("nft_issued_" + m)) | |
53 | 53 | if ($isInstanceOf(i, "String")) | |
54 | 54 | then { | |
55 | 55 | let j = i | |
56 | 56 | j | |
57 | 57 | } | |
58 | 58 | else "" | |
59 | 59 | } | |
60 | 60 | p | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func q (m) = if ((m != toBase58String(e))) | |
65 | 65 | then throw("Only Sconex accepted") | |
66 | 66 | else true | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(r) | |
70 | 70 | func initAuction (s) = { | |
71 | 71 | let t = toBase58String(r.transactionId) | |
72 | - | let u = if ( | |
73 | - | then value(r.payments | |
72 | + | let u = if ((size(r.payments) == 0)) | |
73 | + | then value(r.payments) | |
74 | 74 | else throw("No payment attached") | |
75 | - | let v = value(r.payments[0]) | |
76 | - | let m = value(v.assetId) | |
77 | - | let w = l(m) | |
78 | - | if ((w == "")) | |
75 | + | let v = if ((size(r.payments) > 1)) | |
76 | + | then value(r.payments) | |
77 | + | else throw("Too many payments attached") | |
78 | + | let w = value(r.payments[0]) | |
79 | + | let m = value(w.assetId) | |
80 | + | let x = l(m) | |
81 | + | if ((x == "")) | |
79 | 82 | then throw("You can only sell an NFT created on SCONE Marketplace") | |
80 | - | else [StringEntry((("auction_" + t) + "_status"), "open"), StringEntry((("auction_" + toBase58String(m)) + "_last"), t), StringEntry((("auction_" + t) + "_assetName"), | |
83 | + | else [StringEntry((("auction_" + t) + "_status"), "open"), StringEntry((("auction_" + toBase58String(m)) + "_last"), t), StringEntry((("auction_" + t) + "_assetName"), x), StringEntry((("auction_" + t) + "_assetId"), toBase58String(m)), IntegerEntry((("auction_" + t) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + t) + "_owner"), toString(r.caller)), IntegerEntry((("auction_" + t) + "_startPrice"), s), StringEntry((((("address_" + toString(r.caller)) + "_auction_") + t) + "_lockedNFT"), toBase58String(m))] | |
81 | 84 | } | |
82 | 85 | ||
83 | 86 | ||
84 | 87 | ||
85 | 88 | @Callable(r) | |
86 | 89 | func cancelAuction (t) = { | |
87 | - | let | |
88 | - | if ((toString(r.caller) != | |
90 | + | let y = k((("auction_" + t) + "_owner")) | |
91 | + | if ((toString(r.caller) != y)) | |
89 | 92 | then throw("Only allowed to auction owner") | |
90 | 93 | else if ((k((("auction_" + t) + "_status")) != "open")) | |
91 | 94 | then throw("auction is close") | |
92 | - | else [StringEntry((("auction_" + t) + "_status"), "cancelled"), DeleteEntry((((("address_" + | |
95 | + | else [StringEntry((("auction_" + t) + "_status"), "cancelled"), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, 1, fromBase58String(getStringValue(this, (("auction_" + t) + "_assetId"))))] | |
93 | 96 | } | |
94 | 97 | ||
95 | 98 | ||
96 | 99 | ||
97 | 100 | @Callable(r) | |
98 | 101 | func placeBid (t) = { | |
99 | - | let | |
100 | - | let | |
101 | - | let | |
102 | + | let w = value(r.payments[0]) | |
103 | + | let z = w.amount | |
104 | + | let A = toBase58String(r.transactionId) | |
102 | 105 | let m = getStringValue(this, (("auction_" + t) + "_assetId")) | |
103 | - | let | |
106 | + | let B = if (!(isDefined(w.assetId))) | |
104 | 107 | then throw("Only sconex is accepted!") | |
105 | - | else toBase58String(value( | |
106 | - | if (!(q( | |
108 | + | else toBase58String(value(w.assetId)) | |
109 | + | if (!(q(B))) | |
107 | 110 | then throw("Auction does only support sconex payments") | |
108 | 111 | else { | |
109 | - | let | |
110 | - | if (( | |
111 | - | then throw(("The minimal initial price is set as " + toString( | |
112 | - | else [StringEntry((((("auction_" + t) + "_bid_") + | |
112 | + | let C = f((("auction_" + t) + "_startPrice")) | |
113 | + | if ((C > z)) | |
114 | + | then throw(("The minimal initial price is set as " + toString(C))) | |
115 | + | else [StringEntry((((("auction_" + t) + "_bid_") + A) + "_author"), toString(r.caller)), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(z)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + t) + "_bid_") + A) + "_amount"), z), StringEntry(((((("address_" + toString(r.caller)) + "_auction_") + t) + "_bid_") + A), m), StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "open")] | |
113 | 116 | } | |
114 | 117 | } | |
115 | 118 | ||
116 | 119 | ||
117 | 120 | ||
118 | 121 | @Callable(r) | |
119 | - | func cancelBid (t, | |
122 | + | func cancelBid (t,A) = { | |
120 | 123 | let m = getStringValue(this, (("auction_" + t) + "_assetId")) | |
121 | - | let | |
122 | - | let | |
123 | - | if (if ((toString(r.caller) != | |
124 | + | let D = k((((("auction_" + t) + "_bid_") + A) + "_author")) | |
125 | + | let E = f((((("auction_" + t) + "_bid_") + A) + "_amount")) | |
126 | + | if (if ((toString(r.caller) != D)) | |
124 | 127 | then (r.caller != this) | |
125 | 128 | else false) | |
126 | 129 | then throw("Only allowed to the bid author or admin") | |
127 | - | else if ((k((((("auction_" + t) + "_bid_") + | |
130 | + | else if ((k((((("auction_" + t) + "_bid_") + A) + "_status")) != "open")) | |
128 | 131 | then throw("bid is not open") | |
129 | - | else [StringEntry((((("assetId_" + m) + "_bid_") + | |
132 | + | else [StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "cancelled"), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), ScriptTransfer(Address(fromBase58String(D)), E, e)] | |
130 | 133 | } | |
131 | 134 | ||
132 | 135 | ||
133 | 136 | ||
134 | 137 | @Callable(r) | |
135 | - | func acceptBid (t, | |
136 | - | let | |
137 | - | let | |
138 | - | let | |
139 | - | let | |
138 | + | func acceptBid (t,A) = { | |
139 | + | let y = k((("auction_" + t) + "_owner")) | |
140 | + | let D = k((((("auction_" + t) + "_bid_") + A) + "_author")) | |
141 | + | let E = f((((("auction_" + t) + "_bid_") + A) + "_amount")) | |
142 | + | let F = k((((("auction_" + t) + "_bid_") + A) + "_status")) | |
140 | 143 | let m = k((("auction_" + t) + "_assetId")) | |
141 | - | if ((toString(r.caller) != | |
144 | + | if ((toString(r.caller) != y)) | |
142 | 145 | then throw("Only allowed to auction owner") | |
143 | - | else if (( | |
146 | + | else if ((F != "open")) | |
144 | 147 | then throw("Bid was cancelled and cannot be accepted") | |
145 | 148 | else { | |
146 | - | let | |
147 | - | let | |
149 | + | let G = f((m + "_recordPrice")) | |
150 | + | let H = max([G, E]) | |
148 | 151 | let p = o(m) | |
149 | 152 | if ((p == "")) | |
150 | - | then [StringEntry((((("auction_" + t) + "_bid_") + | |
151 | - | else [StringEntry((((("auction_" + t) + "_bid_") + | |
153 | + | then [StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "finished"), StringEntry((("auction_" + t) + "_status"), "finished"), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + t) + "_finalPrice"), E), IntegerEntry((m + "_recordPrice"), H), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, fraction(E, ((100 - c) - d), 100), e), ScriptTransfer(Address(b), fraction(E, d, 100), e), ScriptTransfer(Address(b), fraction(E, c, 100), e), ScriptTransfer(addressFromStringValue(D), 1, fromBase58String(m))] | |
154 | + | else [StringEntry((((("auction_" + t) + "_bid_") + A) + "_status"), "finished"), StringEntry((("auction_" + t) + "_status"), "finished"), StringEntry((((("assetId_" + m) + "_bid_") + A) + "_data"), (((((("{\"auctionId\": \"" + t) + "\", \"author\": \"") + toString(r.caller)) + "\", \"amount\": \"") + toString(E)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + t) + "_finalPrice"), E), IntegerEntry((m + "_recordPrice"), H), DeleteEntry(((((("address_" + D) + "_auction_") + t) + "_bid_") + A)), DeleteEntry((((("address_" + y) + "_auction_") + t) + "_lockedNFT")), ScriptTransfer(r.caller, fraction(E, ((100 - c) - d), 100), e), ScriptTransfer(Address(fromBase58String(p)), fraction(E, d, 100), e), ScriptTransfer(Address(b), fraction(E, c, 100), e), ScriptTransfer(addressFromStringValue(D), 1, fromBase58String(m))] | |
152 | 155 | } | |
153 | 156 | } | |
154 | 157 | ||
155 | 158 | ||
156 | - | @Verifier( | |
157 | - | func | |
159 | + | @Verifier(I) | |
160 | + | func J () = sigVerify(I.bodyBytes, I.proofs[0], I.senderPublicKey) | |
158 | 161 |
github/deemru/w8io/026f985 90.05 ms ◑