tx · 5mmfkuCtvrdGBiM6F1hDyM64tmzcynPawGmVpNYPBSro 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F: -0.01000000 Waves 2023.01.05 13:14 [2391525] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves
{ "type": 13, "id": "5mmfkuCtvrdGBiM6F1hDyM64tmzcynPawGmVpNYPBSro", "fee": 1000000, "feeAssetId": null, "timestamp": 1672913762736, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "4cWmNckHS9XSvcWErxRoDeU3coKrTgyRYQXUA5Z7Puwi895JsnUjnMsqvkeb5EHrYQNuFzoHrxqJVKz4DpBSdNyy" ], "script": "base64:BgJACAISCwoJCAgICAgBCAgIEgMKAQESBAoCCAgSBgoECAgIARIGCgQICAgIEgUKAwgIARIDCgEIEgMKAQgSAwoBCAkACXNlcGFyYXRvcgIBXwAEa0J1eQIDYnV5AAZrUHJpY2UCBXByaWNlAAVrU2VsbAIEc2VsbAASbWF4QXVjdGlvbkR1cmF0aW9uAAcABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMJAAACCAUFdG9rZW4IZGVjaW1hbHMAAAkAAAIIBQV0b2tlbghxdWFudGl0eQABBwkAAAIIBQV0b2tlbgpyZWlzc3VhYmxlBwcHCQFpAQljcmVhdGVOZnQJCG5mdF9uYW1lCW5mdF9vd25lcg9uZnRfZEF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CAgUHYmlkVHhJZAIHX25mdF9pZAMJAQIhPQIJANgEAQUGY2FsbGVyBQhhc0JpZGRlcgkAAgECBk5vIGJpZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2JpZFR4SWQCCF9uZnRfYmlkAghXSVRIRFJBVwkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2JpZFR4SWQCB19uZnRfaWQFCWJpZEZvck5GVAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB2JpZFR4SWQCHF9iaWRkaW5nX3ByaWNlX3JlZnVuZF9hbW91bnQFCGJpZFByaWNlCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkBDXBhcnNlSW50VmFsdWUBBQhiaWRQcmljZQUEdW5pdAUDbmlsAWkBB3Rlc3RCaWQBBGRhdGEJAMwIAgkBC1N0cmluZ0VudHJ5AgI4RThra0ZCWUN5NDRKSmFxNnBBWjZLaXpzdVJlc2k1VUtOaGJEMVdOWndoaFlfaGlnaGVzdF9iaWQCATAFA25pbABvbVR9", "height": 2391525, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4o5zmW6XLMiRrdzHJfFjc4WTsMkbue6Ta9CUiXXCuWEz Next: 5SaU139HamsH6oNfYfgXhonL47hU39TUkR6o23BLxWK2 Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(m) | |
36 | - | func placeBid (n,o,p,q) = { | |
37 | - | let r = toBase58String(m.transactionId) | |
38 | - | let s = m.caller.bytes | |
39 | - | let j = fromBase58String(o) | |
40 | - | let t = m.payments[0].amount | |
41 | - | let u = getStringValue(this, (n + "_highest_bid")) | |
42 | - | let v = getString(this, (n + "_previous_bidder")) | |
43 | - | let w = getStringValue(this, (n + "_bidder_count")) | |
44 | - | let x = getStringValue(this, (n + "_winner_of_nft")) | |
45 | - | let y = getStringValue(this, (n + "_nft_status")) | |
36 | + | func createNft (n,o,p,q,r,s,t,u,v) = { | |
37 | + | let w = Issue(n, t, 1, 0, false) | |
38 | + | let x = calculateAssetId(w) | |
39 | + | let y = m.transactionId | |
40 | + | [w, ScriptTransfer(m.caller, 1, x), StringEntry(((toBase58String(x) + a) + "Owner"), toString(m.caller)), StringEntry(((toBase58String(x) + a) + "nft_type"), q), StringEntry(((toBase58String(x) + a) + "nft_tags"), r), StringEntry(((toBase58String(x) + a) + "nft_dAppAddress"), p), IntegerEntry(((toBase58String(x) + a) + "nft_selling_price"), s), StringEntry(((toBase58String(x) + a) + "nft_onSell"), u), StringEntry(((toBase58String(x) + a) + "nft_data"), v), StringEntry(((toBase58String(y) + a) + "issue_nft"), toBase58String(x))] | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | @Callable(m) | |
46 | + | func sellNFT (z) = { | |
47 | + | let y = m.transactionId | |
48 | + | let A = m.caller.bytes | |
49 | + | let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount)) | |
50 | + | let C = B._1 | |
51 | + | let D = B._2 | |
52 | + | if (!(i(C))) | |
53 | + | then throw("Token is not NFT") | |
54 | + | else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), toString(z)), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))] | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | @Callable(m) | |
60 | + | func buyNFT (E,F) = { | |
61 | + | let j = fromBase58String(E) | |
62 | + | let G = value(m.payments[0].amount) | |
63 | + | let H = { | |
64 | + | let k = getString(this, (("nft_" + F) + "_owner")) | |
65 | + | if ($isInstanceOf(k, "String")) | |
66 | + | then { | |
67 | + | let I = k | |
68 | + | I | |
69 | + | } | |
70 | + | else false | |
71 | + | } | |
72 | + | let z = getStringValue(((((c + a) + E) + "_") + F)) | |
73 | + | let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner") | |
46 | 74 | if ((m.payments[0].assetId != unit)) | |
47 | - | then throw("Pay in waves or asimi") | |
48 | - | else if ((y != "OPEN")) | |
75 | + | then throw("Pay in waves") | |
76 | + | else if ((H == toString(m.caller))) | |
77 | + | then throw("Owner of NFT not able to purchase") | |
78 | + | else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner"))] | |
79 | + | } | |
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | @Callable(m) | |
84 | + | func addAuction (K,L,M,N) = { | |
85 | + | let y = toBase58String(m.transactionId) | |
86 | + | let O = value(m.payments[0].assetId) | |
87 | + | let z = value(M) | |
88 | + | let P = (lastBlock.height + N) | |
89 | + | let Q = m.caller.bytes | |
90 | + | let R = { | |
91 | + | let k = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(Q))) | |
92 | + | if ($isInstanceOf(k, "String")) | |
93 | + | then { | |
94 | + | let I = k | |
95 | + | true | |
96 | + | } | |
97 | + | else false | |
98 | + | } | |
99 | + | if ((m.payments[0].assetId == unit)) | |
100 | + | then throw("NFT not attached") | |
101 | + | else if ((R == true)) | |
102 | + | then throw("Already in auction list") | |
103 | + | else if ((N > e)) | |
104 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
105 | + | else [StringEntry(((y + "_nft_start_auction_date_") + toBase58String(Q)), K), StringEntry(((y + "_nft_end_auction_date_") + toBase58String(Q)), L), StringEntry((y + "_nft_start_price"), M), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(O)), StringEntry((y + "_previous_bidder"), "none"), StringEntry((y + "_highest_bid"), "0"), StringEntry((y + "_winner_of_nft"), "0"), StringEntry((y + "_bidder_count"), "0"), StringEntry((y + "_nft_status"), "OPEN")] | |
106 | + | } | |
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | @Callable(m) | |
111 | + | func placeBid (S,O,o,T) = { | |
112 | + | let y = toBase58String(m.transactionId) | |
113 | + | let Q = m.caller.bytes | |
114 | + | let j = fromBase58String(O) | |
115 | + | let U = m.payments[0].amount | |
116 | + | let V = getStringValue(this, (S + "_highest_bid")) | |
117 | + | let W = getString(this, (S + "_previous_bidder")) | |
118 | + | let X = getStringValue(this, (S + "_bidder_count")) | |
119 | + | let Y = getStringValue(this, (S + "_winner_of_nft")) | |
120 | + | let R = getStringValue(this, (S + "_nft_status")) | |
121 | + | if ((m.payments[0].assetId != unit)) | |
122 | + | then throw("Pay in waves") | |
123 | + | else if ((R != "OPEN")) | |
49 | 124 | then throw("Not open for auction") | |
50 | - | else if ((parseIntValue( | |
125 | + | else if ((parseIntValue(V) >= U)) | |
51 | 126 | then throw("Bid is less then starting/highest Bid") | |
52 | - | else if (( | |
53 | - | then [StringEntry(( | |
54 | - | else [StringEntry(( | |
127 | + | else if ((V == "0")) | |
128 | + | then [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V)] | |
129 | + | else [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V), ScriptTransfer(Address(fromBase58String(Y)), parseIntValue(V), unit)] | |
55 | 130 | } | |
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | @Callable(m) | |
135 | + | func acceptBidOffer (S,O,Z) = { | |
136 | + | let y = toBase58String(m.transactionId) | |
137 | + | let Q = m.caller.bytes | |
138 | + | let j = fromBase58String(O) | |
139 | + | let aa = getStringValue(this, (S + "_highest_bid")) | |
140 | + | let ab = getStringValue(this, (S + "_winner_of_nft")) | |
141 | + | [ScriptTransfer(Address(Q), parseIntValue(aa), unit), ScriptTransfer(Address(fromBase58String(ab)), 1, j), StringEntry((y + "_amount_paid_to_owner"), aa), StringEntry((y + "_nft_transfer_to"), ab), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((S + "_amount_paid_to_owner"), aa), StringEntry((S + "_nft_transfer_to"), ab), StringEntry((S + "_nft_status"), "REWARDED")] | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | @Callable(m) | |
147 | + | func cancelAuction (S) = { | |
148 | + | let y = toBase58String(m.transactionId) | |
149 | + | let Q = m.caller.bytes | |
150 | + | let ac = getStringValue(this, (S + "_nft_status")) | |
151 | + | let ad = getStringValue(this, (S + "_winner_of_nft")) | |
152 | + | let ae = getStringValue(this, (S + "_nft_owner")) | |
153 | + | let O = getStringValue(this, (S + "_nft_on_auction")) | |
154 | + | let af = getStringValue(this, (S + "_highest_bid")) | |
155 | + | if ((ad == "0")) | |
156 | + | then [StringEntry(((y + S) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O))] | |
157 | + | else [StringEntry((S + "_nft_status"), "CANCELED"), StringEntry((S + "_previous_bid_amount_refund_to_address"), ad), StringEntry((S + "_prevoius_bid_amount_refund"), af), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ad), StringEntry((y + "_prevoius_bid_amount_refund"), af), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O)), ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(af), unit)] | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | ||
162 | + | @Callable(m) | |
163 | + | func withdrawBid (ag) = { | |
164 | + | let Q = m.caller.bytes | |
165 | + | let ah = getStringValue(this, (ag + "_highest_bid")) | |
166 | + | let ai = getStringValue(this, (ag + "_winner")) | |
167 | + | let aj = getStringValue(this, (ag + "_nft_id")) | |
168 | + | if ((toBase58String(Q) != ai)) | |
169 | + | then throw("No bid") | |
170 | + | else [StringEntry((ag + "_nft_bid"), "WITHDRAW"), StringEntry((ag + "_nft_id"), aj), StringEntry((ag + "_bidding_price_refund_amount"), ah), ScriptTransfer(m.caller, parseIntValue(ah), unit)] | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | @Callable(m) | |
176 | + | func testBid (ak) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
56 | 177 | ||
57 | 178 |
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 = "bid" | |
15 | 15 | ||
16 | 16 | let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED") | |
17 | 17 | ||
18 | 18 | let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq' | |
19 | 19 | ||
20 | 20 | func i (j) = { | |
21 | 21 | let k = assetInfo(j) | |
22 | 22 | if ($isInstanceOf(k, "Asset")) | |
23 | 23 | then { | |
24 | 24 | let l = k | |
25 | 25 | if (if ((l.decimals == 0)) | |
26 | 26 | then (l.quantity == 1) | |
27 | 27 | else false) | |
28 | 28 | then (l.reissuable == false) | |
29 | 29 | else false | |
30 | 30 | } | |
31 | 31 | else false | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | @Callable(m) | |
36 | - | func placeBid (n,o,p,q) = { | |
37 | - | let r = toBase58String(m.transactionId) | |
38 | - | let s = m.caller.bytes | |
39 | - | let j = fromBase58String(o) | |
40 | - | let t = m.payments[0].amount | |
41 | - | let u = getStringValue(this, (n + "_highest_bid")) | |
42 | - | let v = getString(this, (n + "_previous_bidder")) | |
43 | - | let w = getStringValue(this, (n + "_bidder_count")) | |
44 | - | let x = getStringValue(this, (n + "_winner_of_nft")) | |
45 | - | let y = getStringValue(this, (n + "_nft_status")) | |
36 | + | func createNft (n,o,p,q,r,s,t,u,v) = { | |
37 | + | let w = Issue(n, t, 1, 0, false) | |
38 | + | let x = calculateAssetId(w) | |
39 | + | let y = m.transactionId | |
40 | + | [w, ScriptTransfer(m.caller, 1, x), StringEntry(((toBase58String(x) + a) + "Owner"), toString(m.caller)), StringEntry(((toBase58String(x) + a) + "nft_type"), q), StringEntry(((toBase58String(x) + a) + "nft_tags"), r), StringEntry(((toBase58String(x) + a) + "nft_dAppAddress"), p), IntegerEntry(((toBase58String(x) + a) + "nft_selling_price"), s), StringEntry(((toBase58String(x) + a) + "nft_onSell"), u), StringEntry(((toBase58String(x) + a) + "nft_data"), v), StringEntry(((toBase58String(y) + a) + "issue_nft"), toBase58String(x))] | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | @Callable(m) | |
46 | + | func sellNFT (z) = { | |
47 | + | let y = m.transactionId | |
48 | + | let A = m.caller.bytes | |
49 | + | let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount)) | |
50 | + | let C = B._1 | |
51 | + | let D = B._2 | |
52 | + | if (!(i(C))) | |
53 | + | then throw("Token is not NFT") | |
54 | + | else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), toString(z)), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))] | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | @Callable(m) | |
60 | + | func buyNFT (E,F) = { | |
61 | + | let j = fromBase58String(E) | |
62 | + | let G = value(m.payments[0].amount) | |
63 | + | let H = { | |
64 | + | let k = getString(this, (("nft_" + F) + "_owner")) | |
65 | + | if ($isInstanceOf(k, "String")) | |
66 | + | then { | |
67 | + | let I = k | |
68 | + | I | |
69 | + | } | |
70 | + | else false | |
71 | + | } | |
72 | + | let z = getStringValue(((((c + a) + E) + "_") + F)) | |
73 | + | let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner") | |
46 | 74 | if ((m.payments[0].assetId != unit)) | |
47 | - | then throw("Pay in waves or asimi") | |
48 | - | else if ((y != "OPEN")) | |
75 | + | then throw("Pay in waves") | |
76 | + | else if ((H == toString(m.caller))) | |
77 | + | then throw("Owner of NFT not able to purchase") | |
78 | + | else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner"))] | |
79 | + | } | |
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | @Callable(m) | |
84 | + | func addAuction (K,L,M,N) = { | |
85 | + | let y = toBase58String(m.transactionId) | |
86 | + | let O = value(m.payments[0].assetId) | |
87 | + | let z = value(M) | |
88 | + | let P = (lastBlock.height + N) | |
89 | + | let Q = m.caller.bytes | |
90 | + | let R = { | |
91 | + | let k = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(Q))) | |
92 | + | if ($isInstanceOf(k, "String")) | |
93 | + | then { | |
94 | + | let I = k | |
95 | + | true | |
96 | + | } | |
97 | + | else false | |
98 | + | } | |
99 | + | if ((m.payments[0].assetId == unit)) | |
100 | + | then throw("NFT not attached") | |
101 | + | else if ((R == true)) | |
102 | + | then throw("Already in auction list") | |
103 | + | else if ((N > e)) | |
104 | + | then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e))) | |
105 | + | else [StringEntry(((y + "_nft_start_auction_date_") + toBase58String(Q)), K), StringEntry(((y + "_nft_end_auction_date_") + toBase58String(Q)), L), StringEntry((y + "_nft_start_price"), M), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(O)), StringEntry((y + "_previous_bidder"), "none"), StringEntry((y + "_highest_bid"), "0"), StringEntry((y + "_winner_of_nft"), "0"), StringEntry((y + "_bidder_count"), "0"), StringEntry((y + "_nft_status"), "OPEN")] | |
106 | + | } | |
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | @Callable(m) | |
111 | + | func placeBid (S,O,o,T) = { | |
112 | + | let y = toBase58String(m.transactionId) | |
113 | + | let Q = m.caller.bytes | |
114 | + | let j = fromBase58String(O) | |
115 | + | let U = m.payments[0].amount | |
116 | + | let V = getStringValue(this, (S + "_highest_bid")) | |
117 | + | let W = getString(this, (S + "_previous_bidder")) | |
118 | + | let X = getStringValue(this, (S + "_bidder_count")) | |
119 | + | let Y = getStringValue(this, (S + "_winner_of_nft")) | |
120 | + | let R = getStringValue(this, (S + "_nft_status")) | |
121 | + | if ((m.payments[0].assetId != unit)) | |
122 | + | then throw("Pay in waves") | |
123 | + | else if ((R != "OPEN")) | |
49 | 124 | then throw("Not open for auction") | |
50 | - | else if ((parseIntValue( | |
125 | + | else if ((parseIntValue(V) >= U)) | |
51 | 126 | then throw("Bid is less then starting/highest Bid") | |
52 | - | else if (( | |
53 | - | then [StringEntry(( | |
54 | - | else [StringEntry(( | |
127 | + | else if ((V == "0")) | |
128 | + | then [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V)] | |
129 | + | else [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V), ScriptTransfer(Address(fromBase58String(Y)), parseIntValue(V), unit)] | |
55 | 130 | } | |
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | @Callable(m) | |
135 | + | func acceptBidOffer (S,O,Z) = { | |
136 | + | let y = toBase58String(m.transactionId) | |
137 | + | let Q = m.caller.bytes | |
138 | + | let j = fromBase58String(O) | |
139 | + | let aa = getStringValue(this, (S + "_highest_bid")) | |
140 | + | let ab = getStringValue(this, (S + "_winner_of_nft")) | |
141 | + | [ScriptTransfer(Address(Q), parseIntValue(aa), unit), ScriptTransfer(Address(fromBase58String(ab)), 1, j), StringEntry((y + "_amount_paid_to_owner"), aa), StringEntry((y + "_nft_transfer_to"), ab), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((S + "_amount_paid_to_owner"), aa), StringEntry((S + "_nft_transfer_to"), ab), StringEntry((S + "_nft_status"), "REWARDED")] | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | @Callable(m) | |
147 | + | func cancelAuction (S) = { | |
148 | + | let y = toBase58String(m.transactionId) | |
149 | + | let Q = m.caller.bytes | |
150 | + | let ac = getStringValue(this, (S + "_nft_status")) | |
151 | + | let ad = getStringValue(this, (S + "_winner_of_nft")) | |
152 | + | let ae = getStringValue(this, (S + "_nft_owner")) | |
153 | + | let O = getStringValue(this, (S + "_nft_on_auction")) | |
154 | + | let af = getStringValue(this, (S + "_highest_bid")) | |
155 | + | if ((ad == "0")) | |
156 | + | then [StringEntry(((y + S) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O))] | |
157 | + | else [StringEntry((S + "_nft_status"), "CANCELED"), StringEntry((S + "_previous_bid_amount_refund_to_address"), ad), StringEntry((S + "_prevoius_bid_amount_refund"), af), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ad), StringEntry((y + "_prevoius_bid_amount_refund"), af), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O)), ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(af), unit)] | |
158 | + | } | |
159 | + | ||
160 | + | ||
161 | + | ||
162 | + | @Callable(m) | |
163 | + | func withdrawBid (ag) = { | |
164 | + | let Q = m.caller.bytes | |
165 | + | let ah = getStringValue(this, (ag + "_highest_bid")) | |
166 | + | let ai = getStringValue(this, (ag + "_winner")) | |
167 | + | let aj = getStringValue(this, (ag + "_nft_id")) | |
168 | + | if ((toBase58String(Q) != ai)) | |
169 | + | then throw("No bid") | |
170 | + | else [StringEntry((ag + "_nft_bid"), "WITHDRAW"), StringEntry((ag + "_nft_id"), aj), StringEntry((ag + "_bidding_price_refund_amount"), ah), ScriptTransfer(m.caller, parseIntValue(ah), unit)] | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | @Callable(m) | |
176 | + | func testBid (ak) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")] | |
56 | 177 | ||
57 | 178 |
github/deemru/w8io/026f985 87.50 ms ◑