tx · 4MnYe91jp6gPxSSBp9xtJXK9gRavLWPKpLBnK5kD3dSi 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw: -0.01200000 Waves 2023.02.11 11:57 [2444746] smart account 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw > SELF 0.00000000 Waves
{ "type": 13, "id": "4MnYe91jp6gPxSSBp9xtJXK9gRavLWPKpLBnK5kD3dSi", "fee": 1200000, "feeAssetId": null, "timestamp": 1676105944532, "version": 2, "chainId": 84, "sender": "3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw", "senderPublicKey": "4NDsd3dGKXuKLCoSbYvcWCX276K9ShP75cs9HTBMLJEN", "proofs": [ "67gbQMitXYGLf3wpWygmXWJbkCn1FHtPVnTNDWCENsTkeEYCXvhZKcS7uZwB7ZhRo2pBfnH6DTzHtnh63mkt7EWc" ], "script": "base64:BgJLCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgMKAQgSBwoFCAgIAQISBwoFCAgICAISBgoECAgIAhIECgIIAhIECgIICBIDCgEICwAJc2VwYXJhdG9yAgFfAARrQnV5AgNidXkABmtQcmljZQIFcHJpY2UABWtTZWxsAgRzZWxsABJtYXhBdWN0aW9uRHVyYXRpb24AHgAFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AAVXQVZFUwEAAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmVp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New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "sell" | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 30 | |
13 | 13 | ||
14 | 14 | let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
15 | 15 | ||
75 | 75 | } | |
76 | 76 | let B = getStringValue(((((c + a) + H) + "_") + I)) | |
77 | 77 | let M = ((J / 1000) * 975) | |
78 | + | let N = ((J / 1000) * 25) | |
78 | 79 | if ((I == toString(o.caller))) | |
79 | 80 | then throw("current Owner of NFT not able to purchase") | |
80 | 81 | else if ((o.payments[0].assetId == f)) | |
81 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, f), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, f), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
82 | 83 | else if ((o.payments[0].assetId == unit)) | |
83 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, unit), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
84 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, unit), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
84 | 85 | else nil | |
85 | 86 | } | |
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | @Callable(o) | |
91 | + | func cancelSell (O) = { | |
92 | + | let A = toBase58String(o.transactionId) | |
93 | + | let D = o.caller.bytes | |
94 | + | [StringEntry(((A + O) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(O))] | |
95 | + | } | |
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | @Callable(o) | |
100 | + | func addAuction (P,Q,R,S,C) = { | |
101 | + | let A = toBase58String(o.transactionId) | |
102 | + | let O = value(o.payments[0].assetId) | |
103 | + | let B = value(R) | |
104 | + | let T = (lastBlock.height + S) | |
105 | + | let U = o.caller.bytes | |
106 | + | let V = { | |
107 | + | let m = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(U))) | |
108 | + | if ($isInstanceOf(m, "String")) | |
109 | + | then { | |
110 | + | let L = m | |
111 | + | true | |
112 | + | } | |
113 | + | else false | |
114 | + | } | |
115 | + | if ((V == true)) | |
116 | + | then throw("Already in auction list") | |
117 | + | else if ((S > e)) | |
118 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
119 | + | else if ((o.payments[0].assetId == unit)) | |
120 | + | then throw("NFT not attached") | |
121 | + | else if ((o.payments[0].assetId == f)) | |
122 | + | then throw("NFT not attached") | |
123 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(U)), P), StringEntry(((A + "nft_end_auction_date") + toBase58String(U)), Q), StringEntry((A + "_nft_start_price"), R), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(O)), 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")] | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | @Callable(o) | |
129 | + | func placeBid (W,O,q,X,Y) = { | |
130 | + | let A = toBase58String(o.transactionId) | |
131 | + | let U = o.caller.bytes | |
132 | + | let l = fromBase58String(O) | |
133 | + | let Z = o.payments[0].amount | |
134 | + | let aa = getStringValue(this, (W + "_highest_bid")) | |
135 | + | let ab = getString(this, (W + "_previous_bidder")) | |
136 | + | let ac = getStringValue(this, (W + "_bidder_count")) | |
137 | + | let ad = getStringValue(this, (W + "_winner_of_nft")) | |
138 | + | let V = getStringValue(this, (W + "_nft_status")) | |
139 | + | if ((V != "OPEN")) | |
140 | + | then throw("Not open for auction") | |
141 | + | else if ((parseIntValue(aa) >= parseIntValue(toString(Z)))) | |
142 | + | then throw("Bid is less then starting/highest Bid") | |
143 | + | else if ((aa == "0")) | |
144 | + | then [StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa)] | |
145 | + | else if ((aa != "0")) | |
146 | + | then [ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(aa), Y), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X)] | |
147 | + | else nil | |
148 | + | } | |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | @Callable(o) | |
153 | + | func acceptBidOffer (W,O,ae,Y) = { | |
154 | + | let A = toBase58String(o.transactionId) | |
155 | + | let U = o.caller.bytes | |
156 | + | let l = fromBase58String(O) | |
157 | + | let af = getStringValue(this, (W + "_highest_bid")) | |
158 | + | let ag = ((parseIntValue(af) / 1000) * 975) | |
159 | + | let N = ((parseIntValue(af) / 1000) * 25) | |
160 | + | let ah = getStringValue(this, (W + "_winner_of_nft")) | |
161 | + | if ((Y == g)) | |
162 | + | then [ScriptTransfer(Address(U), ag, unit), ScriptTransfer(Address(fromBase58String(ah)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
163 | + | else if ((Y == f)) | |
164 | + | then [ScriptTransfer(Address(U), ag, f), ScriptTransfer(Address(fromBase58String(ah)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
165 | + | else nil | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(o) | |
171 | + | func cancelAuction (W,Y) = { | |
172 | + | let A = toBase58String(o.transactionId) | |
173 | + | let U = o.caller.bytes | |
174 | + | let ai = getStringValue(this, (W + "_nft_status")) | |
175 | + | let aj = getStringValue(this, (W + "_winner_of_nft")) | |
176 | + | let ak = getStringValue(this, (W + "_nft_owner")) | |
177 | + | let O = getStringValue(this, (W + "_nft_on_auction")) | |
178 | + | let al = getStringValue(this, (W + "_highest_bid")) | |
179 | + | if ((aj == "0")) | |
180 | + | then [StringEntry(((A + W) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ak)), 1, fromBase58String(O))] | |
181 | + | else if ((aj != "0")) | |
182 | + | then throw("soory you can't cancel it because already auction placed by someone") | |
183 | + | else nil | |
184 | + | } | |
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | @Callable(o) | |
189 | + | func manualFundTransfer (am,an) = { | |
190 | + | let U = o.caller.bytes | |
191 | + | let ao = fromBase58String(am) | |
192 | + | let J = o.payments[0].amount | |
193 | + | let ap = ((J / 1000) * 975) | |
194 | + | let N = ((J / 1000) * 25) | |
195 | + | if ((o.payments[0].assetId == unit)) | |
196 | + | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), am), ScriptTransfer(Address(ao), ap, unit)] | |
197 | + | else if ((o.payments[0].assetId == f)) | |
198 | + | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), am), ScriptTransfer(Address(ao), ap, f)] | |
199 | + | else nil | |
200 | + | } | |
201 | + | ||
202 | + | ||
203 | + | ||
204 | + | @Callable(o) | |
205 | + | func testBid (aq) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
86 | 206 | ||
87 | 207 |
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 = 30 | |
13 | 13 | ||
14 | 14 | let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
15 | 15 | ||
16 | 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 | 50 | func sellNFT (B,C) = { | |
51 | 51 | let A = o.transactionId | |
52 | 52 | let D = o.caller.bytes | |
53 | 53 | let E = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | 54 | let F = E._1 | |
55 | 55 | let G = E._2 | |
56 | 56 | if (!(k(F))) | |
57 | 57 | then throw("Token is not NFT") | |
58 | 58 | else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))] | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(o) | |
64 | 64 | func buyNFT (H,I) = { | |
65 | 65 | let l = fromBase58String(H) | |
66 | 66 | let J = value(o.payments[0].amount) | |
67 | 67 | let K = { | |
68 | 68 | let m = getString(this, (("nft_" + I) + "_owner")) | |
69 | 69 | if ($isInstanceOf(m, "String")) | |
70 | 70 | then { | |
71 | 71 | let L = m | |
72 | 72 | L | |
73 | 73 | } | |
74 | 74 | else false | |
75 | 75 | } | |
76 | 76 | let B = getStringValue(((((c + a) + H) + "_") + I)) | |
77 | 77 | let M = ((J / 1000) * 975) | |
78 | + | let N = ((J / 1000) * 25) | |
78 | 79 | if ((I == toString(o.caller))) | |
79 | 80 | then throw("current Owner of NFT not able to purchase") | |
80 | 81 | else if ((o.payments[0].assetId == f)) | |
81 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, f), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, f), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
82 | 83 | else if ((o.payments[0].assetId == unit)) | |
83 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, unit), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
84 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), M, unit), StringEntry((("nft_" + H) + "platform_fee"), toString(N)), StringEntry(((toString(o.caller) + a) + b), ((H + a) + toString(J))), DeleteEntry((("nft_" + I) + "_owner")), StringEntry((("nft_" + I) + "_owner"), toString(o.caller)), StringEntry(((H + a) + "_owner"), toString(o.caller))] | |
84 | 85 | else nil | |
85 | 86 | } | |
87 | + | ||
88 | + | ||
89 | + | ||
90 | + | @Callable(o) | |
91 | + | func cancelSell (O) = { | |
92 | + | let A = toBase58String(o.transactionId) | |
93 | + | let D = o.caller.bytes | |
94 | + | [StringEntry(((A + O) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(O))] | |
95 | + | } | |
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | @Callable(o) | |
100 | + | func addAuction (P,Q,R,S,C) = { | |
101 | + | let A = toBase58String(o.transactionId) | |
102 | + | let O = value(o.payments[0].assetId) | |
103 | + | let B = value(R) | |
104 | + | let T = (lastBlock.height + S) | |
105 | + | let U = o.caller.bytes | |
106 | + | let V = { | |
107 | + | let m = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(U))) | |
108 | + | if ($isInstanceOf(m, "String")) | |
109 | + | then { | |
110 | + | let L = m | |
111 | + | true | |
112 | + | } | |
113 | + | else false | |
114 | + | } | |
115 | + | if ((V == true)) | |
116 | + | then throw("Already in auction list") | |
117 | + | else if ((S > e)) | |
118 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
119 | + | else if ((o.payments[0].assetId == unit)) | |
120 | + | then throw("NFT not attached") | |
121 | + | else if ((o.payments[0].assetId == f)) | |
122 | + | then throw("NFT not attached") | |
123 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(U)), P), StringEntry(((A + "nft_end_auction_date") + toBase58String(U)), Q), StringEntry((A + "_nft_start_price"), R), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(O)), 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")] | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | @Callable(o) | |
129 | + | func placeBid (W,O,q,X,Y) = { | |
130 | + | let A = toBase58String(o.transactionId) | |
131 | + | let U = o.caller.bytes | |
132 | + | let l = fromBase58String(O) | |
133 | + | let Z = o.payments[0].amount | |
134 | + | let aa = getStringValue(this, (W + "_highest_bid")) | |
135 | + | let ab = getString(this, (W + "_previous_bidder")) | |
136 | + | let ac = getStringValue(this, (W + "_bidder_count")) | |
137 | + | let ad = getStringValue(this, (W + "_winner_of_nft")) | |
138 | + | let V = getStringValue(this, (W + "_nft_status")) | |
139 | + | if ((V != "OPEN")) | |
140 | + | then throw("Not open for auction") | |
141 | + | else if ((parseIntValue(aa) >= parseIntValue(toString(Z)))) | |
142 | + | then throw("Bid is less then starting/highest Bid") | |
143 | + | else if ((aa == "0")) | |
144 | + | then [StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa)] | |
145 | + | else if ((aa != "0")) | |
146 | + | then [ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(aa), Y), StringEntry((A + "_previous_bid_amount_refund_to_address"), ad), StringEntry((A + "_prevoius_bid_amount_refund"), aa), StringEntry((W + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((W + "_highest_bid"), toString(Z)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(Z)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ac) + 1))), StringEntry((((A + "_") + W) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + W) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(U)), StringEntry((A + "_bid_price_place"), X)] | |
147 | + | else nil | |
148 | + | } | |
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | @Callable(o) | |
153 | + | func acceptBidOffer (W,O,ae,Y) = { | |
154 | + | let A = toBase58String(o.transactionId) | |
155 | + | let U = o.caller.bytes | |
156 | + | let l = fromBase58String(O) | |
157 | + | let af = getStringValue(this, (W + "_highest_bid")) | |
158 | + | let ag = ((parseIntValue(af) / 1000) * 975) | |
159 | + | let N = ((parseIntValue(af) / 1000) * 25) | |
160 | + | let ah = getStringValue(this, (W + "_winner_of_nft")) | |
161 | + | if ((Y == g)) | |
162 | + | then [ScriptTransfer(Address(U), ag, unit), ScriptTransfer(Address(fromBase58String(ah)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
163 | + | else if ((Y == f)) | |
164 | + | then [ScriptTransfer(Address(U), ag, f), ScriptTransfer(Address(fromBase58String(ah)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), af), StringEntry((A + "_nft_transfer_to"), ah), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), af), StringEntry((W + "_nft_transfer_to"), ah), StringEntry((W + "_nft_status"), "REWARDED")] | |
165 | + | else nil | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | @Callable(o) | |
171 | + | func cancelAuction (W,Y) = { | |
172 | + | let A = toBase58String(o.transactionId) | |
173 | + | let U = o.caller.bytes | |
174 | + | let ai = getStringValue(this, (W + "_nft_status")) | |
175 | + | let aj = getStringValue(this, (W + "_winner_of_nft")) | |
176 | + | let ak = getStringValue(this, (W + "_nft_owner")) | |
177 | + | let O = getStringValue(this, (W + "_nft_on_auction")) | |
178 | + | let al = getStringValue(this, (W + "_highest_bid")) | |
179 | + | if ((aj == "0")) | |
180 | + | then [StringEntry(((A + W) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ak)), 1, fromBase58String(O))] | |
181 | + | else if ((aj != "0")) | |
182 | + | then throw("soory you can't cancel it because already auction placed by someone") | |
183 | + | else nil | |
184 | + | } | |
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | @Callable(o) | |
189 | + | func manualFundTransfer (am,an) = { | |
190 | + | let U = o.caller.bytes | |
191 | + | let ao = fromBase58String(am) | |
192 | + | let J = o.payments[0].amount | |
193 | + | let ap = ((J / 1000) * 975) | |
194 | + | let N = ((J / 1000) * 25) | |
195 | + | if ((o.payments[0].assetId == unit)) | |
196 | + | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), am), ScriptTransfer(Address(ao), ap, unit)] | |
197 | + | else if ((o.payments[0].assetId == f)) | |
198 | + | then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), am), ScriptTransfer(Address(ao), ap, f)] | |
199 | + | else nil | |
200 | + | } | |
201 | + | ||
202 | + | ||
203 | + | ||
204 | + | @Callable(o) | |
205 | + | func testBid (aq) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
86 | 206 | ||
87 | 207 |
github/deemru/w8io/026f985 44.25 ms ◑