tx · 6PAaA4Jj6eMoa9Smseo9fdQEYmxtkSqFJfnkN9qpXgqu 3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx: -0.01400000 Waves 2023.02.09 11:42 [2441870] smart account 3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx > SELF 0.00000000 Waves
{ "type": 13, "id": "6PAaA4Jj6eMoa9Smseo9fdQEYmxtkSqFJfnkN9qpXgqu", "fee": 1400000, "feeAssetId": null, "timestamp": 1675932278587, "version": 2, "chainId": 84, "sender": "3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx", "senderPublicKey": "EKZmHJ5bK3qKKgRdq8rAamt9qrDbVMLARzRqXoQW258v", "proofs": [ "27ECiD1GaHVqwwFGB6pNoqr3fBkoqbEska8y113hjLygrM336Xkvg96XwG6mysWyvRnmBBGzyb5Vs8imdbqzFEo8" ], "script": "base64:BgJQCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgMKAQgSBwoFCAgIAQISBwoFCAgICAISBgoECAgIAhIECgIIAhIDCgEIEgQKAggIEgMKAQgLAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwAEm1heEF1Y3Rpb25EdXJhdGlvbgAHAAV0ZWFtcwEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4ABVdBVkVTAQAABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMJAAACCAUFdG9rZW4IZGVjaW1hbHMAAAkAAAIIBQV0b2tlbghxdWFudGl0eQABBwkAAAIIBQ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aXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEFB3JlY2l2ZXIFBmFtb3VudAUFdGVhbXMFA25pbAUDbmlsAWkBB3Rlc3RCaWQBBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgI4RThra0ZCWUN5NDRKSmFxNnBBWjZLaXpzdVJlc2k1VUtOaGJEMVdOWndoaFlfaGlnaGVzdF9iaWQCATAFA25pbAD3KEtb", "height": 2441870, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dwwsot3LmC8Gwe3G6ykrzHccUd7GCb1kHzhv7iNAjVDD Next: D1g7v81broU4YvRLK1CwrehWmD86k2sF4dmcchKV9yt9 Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(o) | |
50 | - | func sellNFT (B) = { | |
50 | + | func sellNFT (B,C) = { | |
51 | 51 | let A = o.transactionId | |
52 | - | let | |
53 | - | let | |
54 | - | let | |
55 | - | let | |
56 | - | if (!(k( | |
52 | + | let D = o.caller.bytes | |
53 | + | let E = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | + | let F = E._1 | |
55 | + | let G = E._2 | |
56 | + | if (!(k(F))) | |
57 | 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( | |
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 | - | func buyNFT ( | |
65 | - | let l = fromBase58String( | |
66 | - | let | |
67 | - | let | |
68 | - | let m = getString(this, (("nft_" + | |
64 | + | func buyNFT (H,I) = { | |
65 | + | let l = fromBase58String(H) | |
66 | + | let J = value(o.payments[0].amount) | |
67 | + | let K = { | |
68 | + | let m = getString(this, (("nft_" + I) + "_owner")) | |
69 | 69 | if ($isInstanceOf(m, "String")) | |
70 | 70 | then { | |
71 | - | let | |
72 | - | | |
71 | + | let L = m | |
72 | + | L | |
73 | 73 | } | |
74 | 74 | else false | |
75 | 75 | } | |
76 | - | let B = getStringValue(((((c + a) + | |
77 | - | if (( | |
76 | + | let B = getStringValue(((((c + a) + H) + "_") + I)) | |
77 | + | if ((I == toString(o.caller))) | |
78 | 78 | then throw("current Owner of NFT not able to purchase") | |
79 | 79 | else if ((o.payments[0].assetId == f)) | |
80 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String( | |
80 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), J, 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))] | |
81 | 81 | else if ((o.payments[0].assetId == unit)) | |
82 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String( | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), J, 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))] | |
83 | 83 | else nil | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | ||
88 | 88 | @Callable(o) | |
89 | - | func cancelSell ( | |
89 | + | func cancelSell (M) = { | |
90 | 90 | let A = toBase58String(o.transactionId) | |
91 | - | let | |
92 | - | [StringEntry(((A + | |
91 | + | let D = o.caller.bytes | |
92 | + | [StringEntry(((A + M) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(M))] | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(o) | |
98 | - | func addAuction ( | |
98 | + | func addAuction (N,O,P,Q,C) = { | |
99 | 99 | let A = toBase58String(o.transactionId) | |
100 | - | let | |
101 | - | let B = value( | |
102 | - | let R = (lastBlock.height + | |
100 | + | let M = value(o.payments[0].assetId) | |
101 | + | let B = value(P) | |
102 | + | let R = (lastBlock.height + Q) | |
103 | 103 | let S = o.caller.bytes | |
104 | 104 | let T = { | |
105 | - | let m = getString(this, (((toBase58String( | |
105 | + | let m = getString(this, (((toBase58String(M) + a) + "nft_status_") + toBase58String(S))) | |
106 | 106 | if ($isInstanceOf(m, "String")) | |
107 | 107 | then { | |
108 | - | let | |
108 | + | let L = m | |
109 | 109 | true | |
110 | 110 | } | |
111 | 111 | else false | |
112 | 112 | } | |
113 | 113 | if ((T == true)) | |
114 | 114 | then throw("Already in auction list") | |
115 | - | else if (( | |
115 | + | else if ((Q > e)) | |
116 | 116 | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
117 | 117 | else if ((o.payments[0].assetId == unit)) | |
118 | 118 | then throw("NFT not attached") | |
119 | 119 | else if ((o.payments[0].assetId == f)) | |
120 | 120 | then throw("NFT not attached") | |
121 | - | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(S)), | |
121 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(S)), N), StringEntry(((A + "nft_end_auction_date") + toBase58String(S)), O), StringEntry((A + "_nft_start_price"), P), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(M)), 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")] | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(o) | |
127 | - | func placeBid (U, | |
127 | + | func placeBid (U,M,q,V,W) = { | |
128 | 128 | let A = toBase58String(o.transactionId) | |
129 | 129 | let S = o.caller.bytes | |
130 | - | let l = fromBase58String( | |
130 | + | let l = fromBase58String(M) | |
131 | 131 | let X = o.payments[0].amount | |
132 | 132 | let Y = getStringValue(this, (U + "_highest_bid")) | |
133 | 133 | let Z = getString(this, (U + "_previous_bidder")) | |
140 | 140 | then throw("Bid is less then starting/highest Bid") | |
141 | 141 | else if ((Y == "0")) | |
142 | 142 | then [StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y)] | |
143 | - | else [StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y), ScriptTransfer(Address(fromBase58String(ab)), parseIntValue(Y), W)] | |
143 | + | else if ((Y != "0")) | |
144 | + | then [ScriptTransfer(Address(fromBase58String(ab)), parseIntValue(Y), W), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V)] | |
145 | + | else nil | |
144 | 146 | } | |
145 | 147 | ||
146 | 148 | ||
147 | 149 | ||
148 | 150 | @Callable(o) | |
149 | - | func acceptBidOffer (U, | |
151 | + | func acceptBidOffer (U,M,ac,W) = { | |
150 | 152 | let A = toBase58String(o.transactionId) | |
151 | 153 | let S = o.caller.bytes | |
152 | - | let l = fromBase58String( | |
154 | + | let l = fromBase58String(M) | |
153 | 155 | let ad = getStringValue(this, (U + "_highest_bid")) | |
154 | 156 | let ae = getStringValue(this, (U + "_winner_of_nft")) | |
155 | 157 | if ((W == g)) | |
168 | 170 | let af = getStringValue(this, (U + "_nft_status")) | |
169 | 171 | let ag = getStringValue(this, (U + "_winner_of_nft")) | |
170 | 172 | let ah = getStringValue(this, (U + "_nft_owner")) | |
171 | - | let | |
173 | + | let M = getStringValue(this, (U + "_nft_on_auction")) | |
172 | 174 | let ai = getStringValue(this, (U + "_highest_bid")) | |
173 | 175 | if ((ag == "0")) | |
174 | - | then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
176 | + | then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M))] | |
175 | 177 | else if ((W == g)) | |
176 | - | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
178 | + | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(ag)), parseIntValue(ai), unit)] | |
177 | 179 | else if ((W == f)) | |
178 | - | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
180 | + | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(ag)), parseIntValue(ai), f)] | |
179 | 181 | else nil | |
180 | 182 | } | |
181 | 183 | ||
198 | 200 | func manualFundTransfer (an,ao) = { | |
199 | 201 | let S = o.caller.bytes | |
200 | 202 | let ap = fromBase58String(an) | |
201 | - | let | |
203 | + | let J = o.payments[0].amount | |
202 | 204 | if ((o.payments[0].assetId == unit)) | |
203 | - | then [IntegerEntry((toBase58String(S) + "_transfer"), | |
205 | + | then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), an), ScriptTransfer(Address(ap), J, unit)] | |
204 | 206 | else if ((o.payments[0].assetId == f)) | |
205 | - | then [IntegerEntry((toBase58String(S) + "_transfer"), | |
207 | + | then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), an), ScriptTransfer(Address(ap), J, f)] | |
206 | 208 | else nil | |
207 | 209 | } | |
208 | 210 |
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 | 12 | let e = 7 | |
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 | - | func sellNFT (B) = { | |
50 | + | func sellNFT (B,C) = { | |
51 | 51 | let A = o.transactionId | |
52 | - | let | |
53 | - | let | |
54 | - | let | |
55 | - | let | |
56 | - | if (!(k( | |
52 | + | let D = o.caller.bytes | |
53 | + | let E = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount)) | |
54 | + | let F = E._1 | |
55 | + | let G = E._2 | |
56 | + | if (!(k(F))) | |
57 | 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( | |
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 | - | func buyNFT ( | |
65 | - | let l = fromBase58String( | |
66 | - | let | |
67 | - | let | |
68 | - | let m = getString(this, (("nft_" + | |
64 | + | func buyNFT (H,I) = { | |
65 | + | let l = fromBase58String(H) | |
66 | + | let J = value(o.payments[0].amount) | |
67 | + | let K = { | |
68 | + | let m = getString(this, (("nft_" + I) + "_owner")) | |
69 | 69 | if ($isInstanceOf(m, "String")) | |
70 | 70 | then { | |
71 | - | let | |
72 | - | | |
71 | + | let L = m | |
72 | + | L | |
73 | 73 | } | |
74 | 74 | else false | |
75 | 75 | } | |
76 | - | let B = getStringValue(((((c + a) + | |
77 | - | if (( | |
76 | + | let B = getStringValue(((((c + a) + H) + "_") + I)) | |
77 | + | if ((I == toString(o.caller))) | |
78 | 78 | then throw("current Owner of NFT not able to purchase") | |
79 | 79 | else if ((o.payments[0].assetId == f)) | |
80 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String( | |
80 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), J, 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))] | |
81 | 81 | else if ((o.payments[0].assetId == unit)) | |
82 | - | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String( | |
82 | + | then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(I)), J, 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))] | |
83 | 83 | else nil | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | ||
88 | 88 | @Callable(o) | |
89 | - | func cancelSell ( | |
89 | + | func cancelSell (M) = { | |
90 | 90 | let A = toBase58String(o.transactionId) | |
91 | - | let | |
92 | - | [StringEntry(((A + | |
91 | + | let D = o.caller.bytes | |
92 | + | [StringEntry(((A + M) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(M))] | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(o) | |
98 | - | func addAuction ( | |
98 | + | func addAuction (N,O,P,Q,C) = { | |
99 | 99 | let A = toBase58String(o.transactionId) | |
100 | - | let | |
101 | - | let B = value( | |
102 | - | let R = (lastBlock.height + | |
100 | + | let M = value(o.payments[0].assetId) | |
101 | + | let B = value(P) | |
102 | + | let R = (lastBlock.height + Q) | |
103 | 103 | let S = o.caller.bytes | |
104 | 104 | let T = { | |
105 | - | let m = getString(this, (((toBase58String( | |
105 | + | let m = getString(this, (((toBase58String(M) + a) + "nft_status_") + toBase58String(S))) | |
106 | 106 | if ($isInstanceOf(m, "String")) | |
107 | 107 | then { | |
108 | - | let | |
108 | + | let L = m | |
109 | 109 | true | |
110 | 110 | } | |
111 | 111 | else false | |
112 | 112 | } | |
113 | 113 | if ((T == true)) | |
114 | 114 | then throw("Already in auction list") | |
115 | - | else if (( | |
115 | + | else if ((Q > e)) | |
116 | 116 | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
117 | 117 | else if ((o.payments[0].assetId == unit)) | |
118 | 118 | then throw("NFT not attached") | |
119 | 119 | else if ((o.payments[0].assetId == f)) | |
120 | 120 | then throw("NFT not attached") | |
121 | - | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(S)), | |
121 | + | else [StringEntry(((A + "nft_start_auction_date") + toBase58String(S)), N), StringEntry(((A + "nft_end_auction_date") + toBase58String(S)), O), StringEntry((A + "_nft_start_price"), P), StringEntry((A + "_nft_owner"), toString(o.caller)), StringEntry((A + "_nft_on_auction"), toBase58String(M)), 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")] | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | ||
126 | 126 | @Callable(o) | |
127 | - | func placeBid (U, | |
127 | + | func placeBid (U,M,q,V,W) = { | |
128 | 128 | let A = toBase58String(o.transactionId) | |
129 | 129 | let S = o.caller.bytes | |
130 | - | let l = fromBase58String( | |
130 | + | let l = fromBase58String(M) | |
131 | 131 | let X = o.payments[0].amount | |
132 | 132 | let Y = getStringValue(this, (U + "_highest_bid")) | |
133 | 133 | let Z = getString(this, (U + "_previous_bidder")) | |
134 | 134 | let aa = getStringValue(this, (U + "_bidder_count")) | |
135 | 135 | let ab = getStringValue(this, (U + "_winner_of_nft")) | |
136 | 136 | let T = getStringValue(this, (U + "_nft_status")) | |
137 | 137 | if ((T != "OPEN")) | |
138 | 138 | then throw("Not open for auction") | |
139 | 139 | else if ((parseIntValue(Y) >= parseIntValue(toString(X)))) | |
140 | 140 | then throw("Bid is less then starting/highest Bid") | |
141 | 141 | else if ((Y == "0")) | |
142 | 142 | then [StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y)] | |
143 | - | else [StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y), ScriptTransfer(Address(fromBase58String(ab)), parseIntValue(Y), W)] | |
143 | + | else if ((Y != "0")) | |
144 | + | then [ScriptTransfer(Address(fromBase58String(ab)), parseIntValue(Y), W), StringEntry((A + "_previous_bid_amount_refund_to_address"), ab), StringEntry((A + "_prevoius_bid_amount_refund"), Y), StringEntry((U + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((U + "_highest_bid"), toString(X)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(X)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(aa) + 1))), StringEntry((((A + "_") + U) + "_nft_id"), toBase58String(l)), StringEntry((((A + "_") + U) + "_nft_owner"), q), StringEntry((A + "_bid_for_nft_by"), toBase58String(S)), StringEntry((A + "_bid_price_place"), V)] | |
145 | + | else nil | |
144 | 146 | } | |
145 | 147 | ||
146 | 148 | ||
147 | 149 | ||
148 | 150 | @Callable(o) | |
149 | - | func acceptBidOffer (U, | |
151 | + | func acceptBidOffer (U,M,ac,W) = { | |
150 | 152 | let A = toBase58String(o.transactionId) | |
151 | 153 | let S = o.caller.bytes | |
152 | - | let l = fromBase58String( | |
154 | + | let l = fromBase58String(M) | |
153 | 155 | let ad = getStringValue(this, (U + "_highest_bid")) | |
154 | 156 | let ae = getStringValue(this, (U + "_winner_of_nft")) | |
155 | 157 | if ((W == g)) | |
156 | 158 | then [ScriptTransfer(Address(S), parseIntValue(ad), unit), ScriptTransfer(Address(fromBase58String(ae)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ad), StringEntry((A + "_nft_transfer_to"), ae), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ad), StringEntry((U + "_nft_transfer_to"), ae), StringEntry((U + "_nft_status"), "REWARDED")] | |
157 | 159 | else if ((W == f)) | |
158 | 160 | then [ScriptTransfer(Address(S), parseIntValue(ad), f), ScriptTransfer(Address(fromBase58String(ae)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ad), StringEntry((A + "_nft_transfer_to"), ae), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ad), StringEntry((U + "_nft_transfer_to"), ae), StringEntry((U + "_nft_status"), "REWARDED")] | |
159 | 161 | else nil | |
160 | 162 | } | |
161 | 163 | ||
162 | 164 | ||
163 | 165 | ||
164 | 166 | @Callable(o) | |
165 | 167 | func cancelAuction (U,W) = { | |
166 | 168 | let A = toBase58String(o.transactionId) | |
167 | 169 | let S = o.caller.bytes | |
168 | 170 | let af = getStringValue(this, (U + "_nft_status")) | |
169 | 171 | let ag = getStringValue(this, (U + "_winner_of_nft")) | |
170 | 172 | let ah = getStringValue(this, (U + "_nft_owner")) | |
171 | - | let | |
173 | + | let M = getStringValue(this, (U + "_nft_on_auction")) | |
172 | 174 | let ai = getStringValue(this, (U + "_highest_bid")) | |
173 | 175 | if ((ag == "0")) | |
174 | - | then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
176 | + | then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M))] | |
175 | 177 | else if ((W == g)) | |
176 | - | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
178 | + | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(ag)), parseIntValue(ai), unit)] | |
177 | 179 | else if ((W == f)) | |
178 | - | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String( | |
180 | + | then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), ag), StringEntry((U + "_prevoius_bid_amount_refund"), ai), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), ag), StringEntry((A + "_prevoius_bid_amount_refund"), ai), ScriptTransfer(Address(fromBase58String(ah)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(ag)), parseIntValue(ai), f)] | |
179 | 181 | else nil | |
180 | 182 | } | |
181 | 183 | ||
182 | 184 | ||
183 | 185 | ||
184 | 186 | @Callable(o) | |
185 | 187 | func withdrawBid (aj) = { | |
186 | 188 | let S = o.caller.bytes | |
187 | 189 | let ak = getStringValue(this, (aj + "_highest_bid")) | |
188 | 190 | let al = getStringValue(this, (aj + "_winner")) | |
189 | 191 | let am = getStringValue(this, (aj + "_nft_id")) | |
190 | 192 | if ((toBase58String(S) != al)) | |
191 | 193 | then throw("No bid") | |
192 | 194 | else [StringEntry((aj + "_nft_bid"), "WITHDRAW"), StringEntry((aj + "_nft_id"), am), StringEntry((aj + "_bidding_price_refund_amount"), ak), ScriptTransfer(o.caller, parseIntValue(ak), unit)] | |
193 | 195 | } | |
194 | 196 | ||
195 | 197 | ||
196 | 198 | ||
197 | 199 | @Callable(o) | |
198 | 200 | func manualFundTransfer (an,ao) = { | |
199 | 201 | let S = o.caller.bytes | |
200 | 202 | let ap = fromBase58String(an) | |
201 | - | let | |
203 | + | let J = o.payments[0].amount | |
202 | 204 | if ((o.payments[0].assetId == unit)) | |
203 | - | then [IntegerEntry((toBase58String(S) + "_transfer"), | |
205 | + | then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), an), ScriptTransfer(Address(ap), J, unit)] | |
204 | 206 | else if ((o.payments[0].assetId == f)) | |
205 | - | then [IntegerEntry((toBase58String(S) + "_transfer"), | |
207 | + | then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), an), ScriptTransfer(Address(ap), J, f)] | |
206 | 208 | else nil | |
207 | 209 | } | |
208 | 210 | ||
209 | 211 | ||
210 | 212 | ||
211 | 213 | @Callable(o) | |
212 | 214 | func testBid (aq) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
213 | 215 | ||
214 | 216 |
github/deemru/w8io/169f3d6 75.33 ms ◑