tx · HMQpDU3s2H6G1yAmSXZdwRF3y7tucwTBCA1anaV3BS85 3MrToFL7kWPJfYn65SYNzsiZk5NfukqpyGc: -0.01400000 Waves 2023.01.25 19:39 [2420760] smart account 3MrToFL7kWPJfYn65SYNzsiZk5NfukqpyGc > SELF 0.00000000 Waves
{ "type": 13, "id": "HMQpDU3s2H6G1yAmSXZdwRF3y7tucwTBCA1anaV3BS85", "fee": 1400000, "feeAssetId": null, "timestamp": 1674664789885, "version": 2, "chainId": 84, "sender": "3MrToFL7kWPJfYn65SYNzsiZk5NfukqpyGc", "senderPublicKey": "2CRzFM7gSbmTxT2EbR4ApdH54Sg2o8vwYG3dHKbfbwFs", "proofs": [ "5AAm2XR2CEBgPCTEStvxr2WKVg6UV4ggQyQeVnJ2xXcDua6r2bLZm2pjiRdWav2xFd7wNPtE1aNYco1r44QxexqL" ], "script": "base64:BgJLCAISCwoJCAgICAgBCAgIEgMKAQgSBAoCCAgSAwoBCBIGCgQICAgBEgYKBAgICAgSBQoDCAgBEgMKAQgSAwoBCBIECgIICBIDCgEICwAJc2VwYXJhdG9yAgFfAARrQnV5AgNidXkABmtQcmljZQIFcHJpY2UABWtTZWxsAgRzZWxsABJtYXhBdWN0aW9uRHVyYXRpb24ABwAFQXNzZXQBIAppC8GrFmb6Ii6KSWrgcuSa5rQDtofKVsUwHV7nVeByAAV3YXZlcwEAAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmVpc3N1YW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VyBQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQDYBAEFBmNhbGxlcgIMX3RyYW5zZmVyX3RvBQ1yZWNlcGllbnRBZGRyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQUHcmVjaXZlcgUGYW1vdW50BQR1bml0BQNuaWwDCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQVBc3NldAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQDYBAEFBmNhbGxlcgIJX3RyYW5zZmVyBQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQDYBAEFBmNhbGxlcgIMX3RyYW5zZmVyX3RvBQ1yZWNlcGllbnRBZGRyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQUHcmVjaXZlcgUGYW1vdW50BQVBc3NldAUDbmlsBQNuaWwBaQEHdGVzdEJpZAEEZGF0YQkAzAgCCQELU3RyaW5nRW50cnkCAjhFOGtrRkJZQ3k0NEpKYXE2cEFaNktpenN1UmVzaTVVS05oYkQxV05ad2hoWV9oaWdoZXN0X2JpZAIBMAUDbmlsAJzm4a4=", "height": 2420760, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6V3LJHduu5JjwN12Fojscx6w61Dmj3yAhF1fdfHn24Fw Next: HRkjZwbdHkMB2yVzSY9hFrKQ2rWhrSE7BTv3cFBFFart Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "sell" | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 7 | |
13 | 13 | ||
14 | - | let f = base58'' | |
14 | + | let f = base58'hdyr9C9udjZEX3bZwcjC2YiuWrc8LU8jfru2z2st7KF' | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = base58'' | |
17 | 17 | ||
18 | 18 | let h = "bid" | |
19 | 19 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(o) | |
50 | - | func addAuction (B,C,D,E) = { | |
50 | + | func sellNFT (B) = { | |
51 | + | let A = o.transactionId | |
52 | + | let C = o.caller.bytes | |
53 | + | let D = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | + | let E = D._1 | |
55 | + | let F = D._2 | |
56 | + | if (!(k(E))) | |
57 | + | then throw("Token is not NFT") | |
58 | + | else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))] | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | @Callable(o) | |
64 | + | func buyNFT (G,H) = { | |
65 | + | let l = fromBase58String(G) | |
66 | + | let I = value(o.payments[0].amount) | |
67 | + | let J = { | |
68 | + | let m = getString(this, (("nft_" + H) + "_owner")) | |
69 | + | if ($isInstanceOf(m, "String")) | |
70 | + | then { | |
71 | + | let K = m | |
72 | + | K | |
73 | + | } | |
74 | + | else false | |
75 | + | } | |
76 | + | let B = getStringValue(((((c + a) + G) + "_") + H)) | |
77 | + | if ((H == toString(o.caller))) | |
78 | + | then throw("current Owner of NFT not able to purchase") | |
79 | + | else if ((o.payments[0].assetId == f)) | |
80 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, f), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))] | |
81 | + | else if ((o.payments[0].assetId == unit)) | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, unit), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))] | |
83 | + | else nil | |
84 | + | } | |
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | @Callable(o) | |
89 | + | func cancelSell (L) = { | |
51 | 90 | let A = toBase58String(o.transactionId) | |
52 | - | let F = value(o.payments[0].assetId) | |
53 | - | let G = value(D) | |
54 | - | let H = (lastBlock.height + E) | |
55 | - | let I = o.caller.bytes | |
56 | - | let J = { | |
57 | - | let m = getString(this, (((toBase58String(F) + a) + "nft_status_") + toBase58String(I))) | |
91 | + | let C = o.caller.bytes | |
92 | + | [StringEntry(((A + L) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(C), 1, fromBase58String(L))] | |
93 | + | } | |
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | @Callable(o) | |
98 | + | func addAuction (M,N,O,P) = { | |
99 | + | let A = toBase58String(o.transactionId) | |
100 | + | let L = value(o.payments[0].assetId) | |
101 | + | let B = value(O) | |
102 | + | let Q = (lastBlock.height + P) | |
103 | + | let R = o.caller.bytes | |
104 | + | let S = { | |
105 | + | let m = getString(this, (((toBase58String(L) + a) + "nft_status_") + toBase58String(R))) | |
58 | 106 | if ($isInstanceOf(m, "String")) | |
59 | 107 | then { | |
60 | 108 | let K = m | |
62 | 110 | } | |
63 | 111 | else false | |
64 | 112 | } | |
65 | - | if (( | |
113 | + | if ((S == true)) | |
66 | 114 | then throw("Already in auction list") | |
67 | - | else if (( | |
68 | - | then throw(("Duration is too long. Must be less than or equal to 7 " + toString( | |
115 | + | else if ((P > e)) | |
116 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
69 | 117 | else if ((o.payments[0].assetId == unit)) | |
70 | 118 | then throw("NFT not attached") | |
71 | - | else if ((o.payments[0].assetId == | |
119 | + | else if ((o.payments[0].assetId == f)) | |
72 | 120 | then throw("NFT not attached") | |
73 | - | else [StringEntry(((A + "nft_start_auction_date") + toBase58String( | |
121 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(R)), M), StringEntry(((A + "nft_end_auction_date") + toBase58String(R)), N), StringEntry((A + "_nft_start_price"), O), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(L)), StringEntry((A + "_previous_bidder"), "none"), StringEntry((A + "_highest_bid"), "0"), StringEntry((A + "_winner_of_nft"), "0"), StringEntry((A + "_bidder_count"), "0"), StringEntry((A + "_nft_status"), "OPEN")] | |
74 | 122 | } | |
75 | 123 | ||
76 | 124 | ||
77 | 125 | ||
78 | 126 | @Callable(o) | |
79 | - | func placeBid (L | |
127 | + | func placeBid (T,L,q,U) = { | |
80 | 128 | let A = toBase58String(o.transactionId) | |
81 | - | let | |
82 | - | let l = fromBase58String( | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | if (( | |
129 | + | let R = o.caller.bytes | |
130 | + | let l = fromBase58String(L) | |
131 | + | let V = o.payments[0].amount | |
132 | + | let W = getStringValue(this, (T + "_highest_bid")) | |
133 | + | let X = getString(this, (T + "_previous_bidder")) | |
134 | + | let Y = getStringValue(this, (T + "_bidder_count")) | |
135 | + | let Z = getStringValue(this, (T + "_winner_of_nft")) | |
136 | + | let S = getStringValue(this, (T + "_nft_status")) | |
137 | + | if ((S != "OPEN")) | |
90 | 138 | then throw("Not open for auction") | |
91 | - | else if ((parseIntValue( | |
139 | + | else if ((parseIntValue(W) >= V)) | |
92 | 140 | then throw("Bid is less then starting/highest Bid") | |
93 | - | else if (( | |
94 | - | then [StringEntry(( | |
141 | + | else if ((W == "0")) | |
142 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W)] | |
95 | 143 | else if ((o.payments[0].assetId == unit)) | |
96 | - | then [StringEntry(( | |
97 | - | else if ((o.payments[0].assetId == | |
98 | - | then [StringEntry(( | |
144 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W), ScriptTransfer(Address(fromBase58String(Z)), parseIntValue(W), unit)] | |
145 | + | else if ((o.payments[0].assetId == f)) | |
146 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W), ScriptTransfer(Address(fromBase58String(Z)), parseIntValue(W), f)] | |
99 | 147 | else nil | |
100 | 148 | } | |
101 | 149 | ||
102 | 150 | ||
103 | 151 | ||
104 | 152 | @Callable(o) | |
105 | - | func acceptBidOffer (L, | |
153 | + | func acceptBidOffer (T,L,aa) = { | |
106 | 154 | let A = toBase58String(o.transactionId) | |
107 | - | let | |
108 | - | let l = fromBase58String( | |
109 | - | let | |
110 | - | let | |
111 | - | if ((o.payments[0].assetId == | |
112 | - | then [ScriptTransfer(Address( | |
155 | + | let R = o.caller.bytes | |
156 | + | let l = fromBase58String(L) | |
157 | + | let ab = getStringValue(this, (T + "_highest_bid")) | |
158 | + | let ac = getStringValue(this, (T + "_winner_of_nft")) | |
159 | + | if ((o.payments[0].assetId == f)) | |
160 | + | then [ScriptTransfer(Address(R), parseIntValue(ab), f), ScriptTransfer(Address(fromBase58String(ac)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ab), StringEntry((A + "_nft_transfer_to"), ac), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((T + "_amount_paid_to_owner"), ab), StringEntry((T + "_nft_transfer_to"), ac), StringEntry((T + "_nft_status"), "REWARDED")] | |
113 | 161 | else if ((o.payments[0].assetId == unit)) | |
114 | - | then [ScriptTransfer(Address( | |
162 | + | then [ScriptTransfer(Address(R), parseIntValue(ab), unit), ScriptTransfer(Address(fromBase58String(ac)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ab), StringEntry((A + "_nft_transfer_to"), ac), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((T + "_amount_paid_to_owner"), ab), StringEntry((T + "_nft_transfer_to"), ac), StringEntry((T + "_nft_status"), "REWARDED")] | |
115 | 163 | else nil | |
116 | 164 | } | |
117 | 165 | ||
118 | 166 | ||
119 | 167 | ||
120 | 168 | @Callable(o) | |
121 | - | func cancelAuction ( | |
169 | + | func cancelAuction (T) = { | |
122 | 170 | let A = toBase58String(o.transactionId) | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | if (( | |
130 | - | then [StringEntry(((A + | |
171 | + | let R = o.caller.bytes | |
172 | + | let ad = getStringValue(this, (T + "_nft_status")) | |
173 | + | let ae = getStringValue(this, (T + "_winner_of_nft")) | |
174 | + | let af = getStringValue(this, (T + "_nft_owner")) | |
175 | + | let L = getStringValue(this, (T + "_nft_on_auction")) | |
176 | + | let ag = getStringValue(this, (T + "_highest_bid")) | |
177 | + | if ((ae == "0")) | |
178 | + | then [StringEntry(((A + T) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L))] | |
131 | 179 | else if ((o.payments[0].assetId == unit)) | |
132 | - | then [StringEntry(( | |
133 | - | else if ((o.payments[0].assetId == | |
134 | - | then [StringEntry(( | |
180 | + | then [StringEntry((T + "_nft_status"), "CANCELED"), StringEntry((T + "_previous_bid_amount_refund_to_address"), ae), StringEntry((T + "_prevoius_bid_amount_refund"), ag), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ag), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L)), ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ag), unit)] | |
181 | + | else if ((o.payments[0].assetId == f)) | |
182 | + | then [StringEntry((T + "_nft_status"), "CANCELED"), StringEntry((T + "_previous_bid_amount_refund_to_address"), ae), StringEntry((T + "_prevoius_bid_amount_refund"), ag), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ag), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L)), ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ag), f)] | |
135 | 183 | else nil | |
136 | 184 | } | |
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | @Callable(o) | |
189 | + | func withdrawBid (ah) = { | |
190 | + | let R = o.caller.bytes | |
191 | + | let ai = getStringValue(this, (ah + "_highest_bid")) | |
192 | + | let aj = getStringValue(this, (ah + "_winner")) | |
193 | + | let ak = getStringValue(this, (ah + "_nft_id")) | |
194 | + | if ((toBase58String(R) != aj)) | |
195 | + | then throw("No bid") | |
196 | + | else [StringEntry((ah + "_nft_bid"), "WITHDRAW"), StringEntry((ah + "_nft_id"), ak), StringEntry((ah + "_bidding_price_refund_amount"), ai), ScriptTransfer(o.caller, parseIntValue(ai), unit)] | |
197 | + | } | |
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | @Callable(o) | |
202 | + | func manualFundTransfer (al,am) = { | |
203 | + | let R = o.caller.bytes | |
204 | + | let an = fromBase58String(al) | |
205 | + | let I = o.payments[0].amount | |
206 | + | if ((o.payments[0].assetId == unit)) | |
207 | + | then [IntegerEntry((toBase58String(R) + "_transfer"), I), StringEntry((toBase58String(R) + "_transfer_to"), al), ScriptTransfer(Address(an), I, unit)] | |
208 | + | else if ((o.payments[0].assetId == f)) | |
209 | + | then [IntegerEntry((toBase58String(R) + "_transfer"), I), StringEntry((toBase58String(R) + "_transfer_to"), al), ScriptTransfer(Address(an), I, f)] | |
210 | + | else nil | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | ||
215 | + | @Callable(o) | |
216 | + | func testBid (ao) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
137 | 217 | ||
138 | 218 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_" | |
5 | 5 | ||
6 | 6 | let b = "buy" | |
7 | 7 | ||
8 | 8 | let c = "price" | |
9 | 9 | ||
10 | 10 | let d = "sell" | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 7 | |
13 | 13 | ||
14 | - | let f = base58'' | |
14 | + | let f = base58'hdyr9C9udjZEX3bZwcjC2YiuWrc8LU8jfru2z2st7KF' | |
15 | 15 | ||
16 | - | let g = | |
16 | + | let g = base58'' | |
17 | 17 | ||
18 | 18 | let h = "bid" | |
19 | 19 | ||
20 | 20 | let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED") | |
21 | 21 | ||
22 | 22 | let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq' | |
23 | 23 | ||
24 | 24 | func k (l) = { | |
25 | 25 | let m = assetInfo(l) | |
26 | 26 | if ($isInstanceOf(m, "Asset")) | |
27 | 27 | then { | |
28 | 28 | let n = m | |
29 | 29 | if (if ((n.decimals == 0)) | |
30 | 30 | then (n.quantity == 1) | |
31 | 31 | else false) | |
32 | 32 | then (n.reissuable == false) | |
33 | 33 | else false | |
34 | 34 | } | |
35 | 35 | else false | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | @Callable(o) | |
40 | 40 | func createNft (p,q,r,s,t,u,v,w,x) = { | |
41 | 41 | let y = Issue(p, v, 1, 0, false) | |
42 | 42 | let z = calculateAssetId(y) | |
43 | 43 | let A = o.transactionId | |
44 | 44 | [y, ScriptTransfer(o.caller, 1, z), StringEntry(((toBase58String(z) + a) + "Owner"), toString(o.caller)), StringEntry(((toBase58String(z) + a) + "nft_type"), s), StringEntry(((toBase58String(z) + a) + "nft_tags"), t), StringEntry(((toBase58String(z) + a) + "nft_dAppAddress"), r), IntegerEntry(((toBase58String(z) + a) + "nft_selling_price"), u), StringEntry(((toBase58String(z) + a) + "nft_onSell"), w), StringEntry(((toBase58String(z) + a) + "nft_data"), x), StringEntry(((toBase58String(A) + a) + "issue_nft"), toBase58String(z))] | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(o) | |
50 | - | func addAuction (B,C,D,E) = { | |
50 | + | func sellNFT (B) = { | |
51 | + | let A = o.transactionId | |
52 | + | let C = o.caller.bytes | |
53 | + | let D = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | + | let E = D._1 | |
55 | + | let F = D._2 | |
56 | + | if (!(k(E))) | |
57 | + | then throw("Token is not NFT") | |
58 | + | else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))] | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | @Callable(o) | |
64 | + | func buyNFT (G,H) = { | |
65 | + | let l = fromBase58String(G) | |
66 | + | let I = value(o.payments[0].amount) | |
67 | + | let J = { | |
68 | + | let m = getString(this, (("nft_" + H) + "_owner")) | |
69 | + | if ($isInstanceOf(m, "String")) | |
70 | + | then { | |
71 | + | let K = m | |
72 | + | K | |
73 | + | } | |
74 | + | else false | |
75 | + | } | |
76 | + | let B = getStringValue(((((c + a) + G) + "_") + H)) | |
77 | + | if ((H == toString(o.caller))) | |
78 | + | then throw("current Owner of NFT not able to purchase") | |
79 | + | else if ((o.payments[0].assetId == f)) | |
80 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, f), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))] | |
81 | + | else if ((o.payments[0].assetId == unit)) | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, unit), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))] | |
83 | + | else nil | |
84 | + | } | |
85 | + | ||
86 | + | ||
87 | + | ||
88 | + | @Callable(o) | |
89 | + | func cancelSell (L) = { | |
51 | 90 | let A = toBase58String(o.transactionId) | |
52 | - | let F = value(o.payments[0].assetId) | |
53 | - | let G = value(D) | |
54 | - | let H = (lastBlock.height + E) | |
55 | - | let I = o.caller.bytes | |
56 | - | let J = { | |
57 | - | let m = getString(this, (((toBase58String(F) + a) + "nft_status_") + toBase58String(I))) | |
91 | + | let C = o.caller.bytes | |
92 | + | [StringEntry(((A + L) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(C), 1, fromBase58String(L))] | |
93 | + | } | |
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | @Callable(o) | |
98 | + | func addAuction (M,N,O,P) = { | |
99 | + | let A = toBase58String(o.transactionId) | |
100 | + | let L = value(o.payments[0].assetId) | |
101 | + | let B = value(O) | |
102 | + | let Q = (lastBlock.height + P) | |
103 | + | let R = o.caller.bytes | |
104 | + | let S = { | |
105 | + | let m = getString(this, (((toBase58String(L) + a) + "nft_status_") + toBase58String(R))) | |
58 | 106 | if ($isInstanceOf(m, "String")) | |
59 | 107 | then { | |
60 | 108 | let K = m | |
61 | 109 | true | |
62 | 110 | } | |
63 | 111 | else false | |
64 | 112 | } | |
65 | - | if (( | |
113 | + | if ((S == true)) | |
66 | 114 | then throw("Already in auction list") | |
67 | - | else if (( | |
68 | - | then throw(("Duration is too long. Must be less than or equal to 7 " + toString( | |
115 | + | else if ((P > e)) | |
116 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
69 | 117 | else if ((o.payments[0].assetId == unit)) | |
70 | 118 | then throw("NFT not attached") | |
71 | - | else if ((o.payments[0].assetId == | |
119 | + | else if ((o.payments[0].assetId == f)) | |
72 | 120 | then throw("NFT not attached") | |
73 | - | else [StringEntry(((A + "nft_start_auction_date") + toBase58String( | |
121 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(R)), M), StringEntry(((A + "nft_end_auction_date") + toBase58String(R)), N), StringEntry((A + "_nft_start_price"), O), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(L)), StringEntry((A + "_previous_bidder"), "none"), StringEntry((A + "_highest_bid"), "0"), StringEntry((A + "_winner_of_nft"), "0"), StringEntry((A + "_bidder_count"), "0"), StringEntry((A + "_nft_status"), "OPEN")] | |
74 | 122 | } | |
75 | 123 | ||
76 | 124 | ||
77 | 125 | ||
78 | 126 | @Callable(o) | |
79 | - | func placeBid (L | |
127 | + | func placeBid (T,L,q,U) = { | |
80 | 128 | let A = toBase58String(o.transactionId) | |
81 | - | let | |
82 | - | let l = fromBase58String( | |
83 | - | let | |
84 | - | let | |
85 | - | let | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | if (( | |
129 | + | let R = o.caller.bytes | |
130 | + | let l = fromBase58String(L) | |
131 | + | let V = o.payments[0].amount | |
132 | + | let W = getStringValue(this, (T + "_highest_bid")) | |
133 | + | let X = getString(this, (T + "_previous_bidder")) | |
134 | + | let Y = getStringValue(this, (T + "_bidder_count")) | |
135 | + | let Z = getStringValue(this, (T + "_winner_of_nft")) | |
136 | + | let S = getStringValue(this, (T + "_nft_status")) | |
137 | + | if ((S != "OPEN")) | |
90 | 138 | then throw("Not open for auction") | |
91 | - | else if ((parseIntValue( | |
139 | + | else if ((parseIntValue(W) >= V)) | |
92 | 140 | then throw("Bid is less then starting/highest Bid") | |
93 | - | else if (( | |
94 | - | then [StringEntry(( | |
141 | + | else if ((W == "0")) | |
142 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W)] | |
95 | 143 | else if ((o.payments[0].assetId == unit)) | |
96 | - | then [StringEntry(( | |
97 | - | else if ((o.payments[0].assetId == | |
98 | - | then [StringEntry(( | |
144 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W), ScriptTransfer(Address(fromBase58String(Z)), parseIntValue(W), unit)] | |
145 | + | else if ((o.payments[0].assetId == f)) | |
146 | + | then [StringEntry((T + "_highest_bid"), toString(V)), StringEntry((T + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((T + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((T + "_nft_id"), toBase58String(l)), StringEntry((T + "_nft_owner"), q), StringEntry((((A + "_") + T) + "_highest_bid"), toString(V)), StringEntry((((A + "_") + T) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + T) + "_bidder_count"), toString((parseIntValue(Y) + 1))), StringEntry((((A + "_") + T) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + T) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(R)), StringEntry((A + "_bid_price_place"), U), StringEntry((A + "_previous_bid_amount_refund_to_address"), Z), StringEntry((A + "_prevoius_bid_amount_refund"), W), ScriptTransfer(Address(fromBase58String(Z)), parseIntValue(W), f)] | |
99 | 147 | else nil | |
100 | 148 | } | |
101 | 149 | ||
102 | 150 | ||
103 | 151 | ||
104 | 152 | @Callable(o) | |
105 | - | func acceptBidOffer (L, | |
153 | + | func acceptBidOffer (T,L,aa) = { | |
106 | 154 | let A = toBase58String(o.transactionId) | |
107 | - | let | |
108 | - | let l = fromBase58String( | |
109 | - | let | |
110 | - | let | |
111 | - | if ((o.payments[0].assetId == | |
112 | - | then [ScriptTransfer(Address( | |
155 | + | let R = o.caller.bytes | |
156 | + | let l = fromBase58String(L) | |
157 | + | let ab = getStringValue(this, (T + "_highest_bid")) | |
158 | + | let ac = getStringValue(this, (T + "_winner_of_nft")) | |
159 | + | if ((o.payments[0].assetId == f)) | |
160 | + | then [ScriptTransfer(Address(R), parseIntValue(ab), f), ScriptTransfer(Address(fromBase58String(ac)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ab), StringEntry((A + "_nft_transfer_to"), ac), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((T + "_amount_paid_to_owner"), ab), StringEntry((T + "_nft_transfer_to"), ac), StringEntry((T + "_nft_status"), "REWARDED")] | |
113 | 161 | else if ((o.payments[0].assetId == unit)) | |
114 | - | then [ScriptTransfer(Address( | |
162 | + | then [ScriptTransfer(Address(R), parseIntValue(ab), unit), ScriptTransfer(Address(fromBase58String(ac)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ab), StringEntry((A + "_nft_transfer_to"), ac), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((T + "_amount_paid_to_owner"), ab), StringEntry((T + "_nft_transfer_to"), ac), StringEntry((T + "_nft_status"), "REWARDED")] | |
115 | 163 | else nil | |
116 | 164 | } | |
117 | 165 | ||
118 | 166 | ||
119 | 167 | ||
120 | 168 | @Callable(o) | |
121 | - | func cancelAuction ( | |
169 | + | func cancelAuction (T) = { | |
122 | 170 | let A = toBase58String(o.transactionId) | |
123 | - | let | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | if (( | |
130 | - | then [StringEntry(((A + | |
171 | + | let R = o.caller.bytes | |
172 | + | let ad = getStringValue(this, (T + "_nft_status")) | |
173 | + | let ae = getStringValue(this, (T + "_winner_of_nft")) | |
174 | + | let af = getStringValue(this, (T + "_nft_owner")) | |
175 | + | let L = getStringValue(this, (T + "_nft_on_auction")) | |
176 | + | let ag = getStringValue(this, (T + "_highest_bid")) | |
177 | + | if ((ae == "0")) | |
178 | + | then [StringEntry(((A + T) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L))] | |
131 | 179 | else if ((o.payments[0].assetId == unit)) | |
132 | - | then [StringEntry(( | |
133 | - | else if ((o.payments[0].assetId == | |
134 | - | then [StringEntry(( | |
180 | + | then [StringEntry((T + "_nft_status"), "CANCELED"), StringEntry((T + "_previous_bid_amount_refund_to_address"), ae), StringEntry((T + "_prevoius_bid_amount_refund"), ag), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ag), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L)), ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ag), unit)] | |
181 | + | else if ((o.payments[0].assetId == f)) | |
182 | + | then [StringEntry((T + "_nft_status"), "CANCELED"), StringEntry((T + "_previous_bid_amount_refund_to_address"), ae), StringEntry((T + "_prevoius_bid_amount_refund"), ag), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ag), ScriptTransfer(Address(fromBase58String(af)), 1, fromBase58String(L)), ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ag), f)] | |
135 | 183 | else nil | |
136 | 184 | } | |
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | @Callable(o) | |
189 | + | func withdrawBid (ah) = { | |
190 | + | let R = o.caller.bytes | |
191 | + | let ai = getStringValue(this, (ah + "_highest_bid")) | |
192 | + | let aj = getStringValue(this, (ah + "_winner")) | |
193 | + | let ak = getStringValue(this, (ah + "_nft_id")) | |
194 | + | if ((toBase58String(R) != aj)) | |
195 | + | then throw("No bid") | |
196 | + | else [StringEntry((ah + "_nft_bid"), "WITHDRAW"), StringEntry((ah + "_nft_id"), ak), StringEntry((ah + "_bidding_price_refund_amount"), ai), ScriptTransfer(o.caller, parseIntValue(ai), unit)] | |
197 | + | } | |
198 | + | ||
199 | + | ||
200 | + | ||
201 | + | @Callable(o) | |
202 | + | func manualFundTransfer (al,am) = { | |
203 | + | let R = o.caller.bytes | |
204 | + | let an = fromBase58String(al) | |
205 | + | let I = o.payments[0].amount | |
206 | + | if ((o.payments[0].assetId == unit)) | |
207 | + | then [IntegerEntry((toBase58String(R) + "_transfer"), I), StringEntry((toBase58String(R) + "_transfer_to"), al), ScriptTransfer(Address(an), I, unit)] | |
208 | + | else if ((o.payments[0].assetId == f)) | |
209 | + | then [IntegerEntry((toBase58String(R) + "_transfer"), I), StringEntry((toBase58String(R) + "_transfer_to"), al), ScriptTransfer(Address(an), I, f)] | |
210 | + | else nil | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | ||
215 | + | @Callable(o) | |
216 | + | func testBid (ao) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
137 | 217 | ||
138 | 218 |
github/deemru/w8io/169f3d6 118.97 ms ◑