tx · ExKBYU8N9FURKa5xxPjK3MvydBi5ewxyoJAG1V2EQ1FK

3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx:  -0.02500000 Waves

2023.03.28 17:51 [2509946] smart account 3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx > SELF 0.00000000 Waves

{ "type": 13, "id": "ExKBYU8N9FURKa5xxPjK3MvydBi5ewxyoJAG1V2EQ1FK", "fee": 2500000, "feeAssetId": null, "timestamp": 1680015236864, "version": 2, "chainId": 84, "sender": "3N85YW6NZ9pLYvSdt1ASMQTGxvncnU1vUNx", "senderPublicKey": "EKZmHJ5bK3qKKgRdq8rAamt9qrDbVMLARzRqXoQW258v", "proofs": [ "2fMkgyeDfBVn9nZWawAnezHfWWJEUjJ6Xdb6Fqhwzoma7yKXPh4NooMwGjs7eovuZrStEYPBxasJgSMbGiz2SWcm" ], "script": "base64:BgJRCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgMKAQgSBwoFCAgIAQISBwoFCAgICAISBgoECAgICBIECgIICBIECgIICBIDCgEIEgQKAggICwAJc2VwYXJhdG9yAgFfAARrQnV5AgNidXkABmtQcmljZQIFcHJpY2UABWtTZWxsAgRzZWxsABJtYXhBdWN0aW9uRHVyYXRpb24AHgAFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AAVXQVZFUwEAAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmV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JAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkBDXBhcnNlSW50VmFsdWUBBQhiaWRQcmljZQUKYW1vdW50VW5pdAUDbmlsAwkAAAIFEGN1cnJlbnRfY3VycmVuY3kCBVdBVkVTCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYmlkVHhJZAIIX25mdF9iaWQCCFdJVEhEUkFXCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYmlkVHhJZAIHX25mdF9pZAUJYmlkRm9yTkZUCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUHYmlkVHhJZAIcX2JpZGRpbmdfcHJpY2VfcmVmdW5kX2Ftb3VudAUIYmlkUHJpY2UJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyCQENcGFyc2VJbnRWYWx1ZQEFCGJpZFByaWNlBQR1bml0BQNuaWwFA25pbAARi8vP", "height": 2509946, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JBqMPQ7HeyzvXh4ASXDSCs6q7DRmHBKnjbivUwBzrsmG Next: 7e7drXjcddLtvaHiaAwEumFDcbzWQH7noiiBSosG4GtE Diff:
OldNewDifferences
1717
1818 let h = "bid"
1919
20-let i = true
20+let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
2121
22-let j = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
22+let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
2323
24-let k = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
25-
26-func l (m) = {
27- let n = assetInfo(m)
28- if ($isInstanceOf(n, "Asset"))
24+func k (l) = {
25+ let m = assetInfo(l)
26+ if ($isInstanceOf(m, "Asset"))
2927 then {
30- let o = n
31- if (if ((o.decimals == 0))
32- then (o.quantity == 1)
28+ let n = m
29+ if (if ((n.decimals == 0))
30+ then (n.quantity == 1)
3331 else false)
34- then (o.reissuable == false)
32+ then (n.reissuable == false)
3533 else false
3634 }
3735 else false
3836 }
3937
4038
41-@Callable(p)
42-func createNft (q,r,s,t,u,v,w,x,y) = {
43- let z = Issue(q, w, 1, 0, false)
44- let A = calculateAssetId(z)
45- let B = p.transactionId
46-[z, ScriptTransfer(p.caller, 1, A), StringEntry(((toBase58String(A) + a) + "Owner"), toString(p.caller)), StringEntry(((toBase58String(A) + a) + "nft_type"), t), StringEntry(((toBase58String(A) + a) + "nft_tags"), u), StringEntry(((toBase58String(A) + a) + "nft_dAppAddress"), s), IntegerEntry(((toBase58String(A) + a) + "nft_selling_price"), v), StringEntry(((toBase58String(A) + a) + "nft_onSell"), x), StringEntry(((toBase58String(A) + a) + "nft_data"), y), StringEntry(((toBase58String(B) + a) + "issue_nft"), toBase58String(A))]
39+@Callable(o)
40+func createNft (p,q,r,s,t,u,v,w,x) = {
41+ let y = Issue(p, v, 1, 0, false)
42+ let z = calculateAssetId(y)
43+ let A = o.transactionId
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))]
4745 }
4846
4947
5048
51-@Callable(p)
52-func sellNFT (C,D) = {
53- let B = p.transactionId
54- let E = p.caller.bytes
55- let F = $Tuple2(value(p.payments[0].assetId), value(p.payments[0].amount))
56- let G = F._1
57- let H = F._2
58- if (!(l(G)))
49+@Callable(o)
50+func sellNFT (B,C) = {
51+ let A = o.transactionId
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)))
5957 then throw("Token is not NFT")
60- else [StringEntry(((c + a) + toBase58String(value(p.payments[0].assetId))), C), StringEntry(((toString(p.caller) + a) + d), (((toBase58String(G) + a) + toString(H)) + D))]
58+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))]
6159 }
6260
6361
6462
65-@Callable(p)
66-func buyNFT (I,J) = {
67- let m = fromBase58String(I)
63+@Callable(o)
64+func buyNFT (H,I) = {
65+ let l = fromBase58String(H)
66+ let J = value(o.payments[0].amount)
6867 let K = {
69- let n = getString(this, (("nft_" + J) + "_owner"))
70- if ($isInstanceOf(n, "String"))
68+ let m = getString(this, (("nft_" + I) + "_owner"))
69+ if ($isInstanceOf(m, "String"))
7170 then {
72- let L = n
71+ let L = m
7372 L
7473 }
7574 else false
7675 }
77- let C = getStringValue(((((c + a) + I) + "_") + J))
78- let M = value(p.payments[0].amount)
79- let N = (M - ((M / 1000) * 25))
80- let O = (M - N)
81- if ((J == toString(p.caller)))
76+ let B = getStringValue(((((c + a) + H) + "_") + I))
77+ let M = ((J / 1000) * 975)
78+ let N = ((J / 1000) * 25)
79+ if ((I == toString(o.caller)))
8280 then throw("current Owner of NFT not able to purchase")
83- else if ((p.payments[0].assetId == f))
84- then [ScriptTransfer(p.caller, 1, m), ScriptTransfer(Address(fromBase58String(J)), N, f), StringEntry((("nft_" + I) + "platform_fee"), toString(O)), StringEntry(((toString(p.caller) + a) + b), ((I + a) + toString(M))), DeleteEntry((("nft_" + J) + "_owner")), StringEntry((("nft_" + J) + "_owner"), toString(p.caller)), StringEntry(((I + a) + "_owner"), toString(p.caller))]
85- else if ((p.payments[0].assetId == unit))
86- then [ScriptTransfer(p.caller, 1, m), ScriptTransfer(Address(fromBase58String(J)), N, unit), StringEntry((("nft_" + I) + "platform_fee"), toString(O)), StringEntry(((toString(p.caller) + a) + b), ((I + a) + toString(M))), DeleteEntry((("nft_" + J) + "_owner")), StringEntry((("nft_" + J) + "_owner"), toString(p.caller)), StringEntry(((I + a) + "_owner"), toString(p.caller))]
81+ else if ((o.payments[0].assetId == f))
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))]
83+ else if ((o.payments[0].assetId == unit))
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))]
8785 else nil
8886 }
8987
9088
9189
92-@Callable(p)
93-func cancelSell (P) = {
94- let B = toBase58String(p.transactionId)
95- let E = p.caller.bytes
96-[StringEntry(((B + P) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(E), 1, fromBase58String(P))]
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))]
9795 }
9896
9997
10098
101-@Callable(p)
102-func addAuction (Q,R,S,T,D) = {
103- let B = toBase58String(p.transactionId)
104- let P = value(p.payments[0].assetId)
105- let C = value(S)
106- let U = (lastBlock.height + T)
107- let V = p.caller.bytes
108- let W = {
109- let n = getString(this, (((toBase58String(P) + a) + "nft_status_") + toBase58String(V)))
110- if ($isInstanceOf(n, "String"))
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"))
111109 then {
112- let L = n
110+ let L = m
113111 true
114112 }
115113 else false
116114 }
117- if ((W == true))
115+ if ((V == true))
118116 then throw("Already in auction list")
119- else if ((T > e))
120- then throw(("Duration is too long. Must be less than or equal to 30 " + toString(e)))
121- else if ((p.payments[0].assetId == unit))
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))
122120 then throw("NFT not attached")
123- else if ((p.payments[0].assetId == f))
121+ else if ((o.payments[0].assetId == f))
124122 then throw("NFT not attached")
125- else [StringEntry(((B + "nft_start_auction_date") + toBase58String(V)), Q), StringEntry(((B + "nft_end_auction_date") + toBase58String(V)), R), StringEntry((B + "_nft_start_price"), S), StringEntry((B + "_nft_owner"), toString(p.caller)), StringEntry((B + "_nft_on_auction"), toBase58String(P)), StringEntry((B + "_previous_bidder"), "none"), StringEntry((B + "_highest_bid"), "0"), StringEntry((B + "_winner_of_nft"), "0"), StringEntry((B + "_bidder_count"), "0"), StringEntry((B + "_nft_status"), "OPEN")]
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")]
126124 }
127125
128126
129127
130-@Callable(p)
131-func placeBid (X,P,r,Y,Z) = {
132- let B = toBase58String(p.transactionId)
133- let V = p.caller.bytes
134- let m = fromBase58String(P)
135- let aa = p.payments[0].assetId
136- let ab = p.payments[0].amount
137- let ac = getStringValue(this, (X + "_highest_bid"))
138- let ad = getString(this, (X + "_previous_bidder"))
139- let ae = getStringValue(this, (X + "_bidder_count"))
140- let af = getStringValue(this, (X + "_winner_of_nft"))
141- let W = getStringValue(this, (X + "_nft_status"))
142- if ((W != "OPEN"))
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].assetId
134+ let aa = o.payments[0].amount
135+ let ab = getStringValue(this, (W + "_highest_bid"))
136+ let ac = getString(this, (W + "_previous_bidder"))
137+ let ad = getStringValue(this, (W + "_bidder_count"))
138+ let ae = getStringValue(this, (W + "_winner_of_nft"))
139+ let V = getStringValue(this, (W + "_nft_status"))
140+ if ((V != "OPEN"))
143141 then throw("Not open for auction")
144- else if ((parseIntValue(ac) >= ab))
142+ else if ((parseIntValue(ab) >= aa))
145143 then throw("Bid is less then starting/highest Bid")
146- else if ((ac == "0"))
147- then [StringEntry((X + "_highest_bid"), toString(ab)), StringEntry((X + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((X + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((X + "_nft_id"), toBase58String(m)), StringEntry((X + "_nft_owner"), r), StringEntry((((B + "_") + X) + "_highest_bid"), toString(ab)), StringEntry((((B + "_") + X) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((B + "_") + X) + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((((B + "_") + X) + "_nft_id"), toBase58String(m)), StringEntry((((B + "_") + X) + "_nft_owner"), r), StringEntry((B + "_bid_for_nft_by"), toBase58String(V)), StringEntry((B + "_bid_price_place"), Y), StringEntry((B + "_previous_bid_amount_refund_to_address"), af), StringEntry((B + "_prevoius_bid_amount_refund"), ac)]
148- else if ((ac != "0"))
149- then [ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), aa), StringEntry((B + "_previous_bid_amount_refund_to_address"), af), StringEntry((B + "_prevoius_bid_amount_refund"), ac), StringEntry((X + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((X + "_highest_bid"), toString(ab)), StringEntry((X + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((X + "_nft_id"), toBase58String(m)), StringEntry((X + "_nft_owner"), r), StringEntry((((B + "_") + X) + "_highest_bid"), toString(ab)), StringEntry((((B + "_") + X) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((B + "_") + X) + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((((B + "_") + X) + "_nft_id"), toBase58String(m)), StringEntry((((B + "_") + X) + "_nft_owner"), r), StringEntry((B + "_bid_for_nft_by"), toBase58String(V)), StringEntry((B + "_bid_price_place"), Y)]
144+ else if ((ab == "0"))
145+ then [StringEntry((W + "_highest_bid"), toString(aa)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ad) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(aa)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ad) + 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"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ab)]
146+ else if ((ab != "0"))
147+ then [ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ab), Z), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ab), StringEntry((W + "_bidder_count"), toString((parseIntValue(ad) + 1))), StringEntry((W + "_highest_bid"), toString(aa)), 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(aa)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ad) + 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)]
150148 else nil
151149 }
152150
153151
154152
155-@Callable(p)
156-func acceptBidOffer (X,P,ag,Z) = {
157- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
158- let B = toBase58String(p.transactionId)
159- let ai = fromBase58String(Z)
160- let V = p.caller.bytes
161- let m = fromBase58String(P)
162- let aj = getStringValue(this, (X + "_highest_bid"))
163- let ak = ((parseIntValue(aj) / 1000) * 975)
164- let O = ((parseIntValue(aj) / 1000) * 25)
165- let al = getStringValue(this, (X + "_winner_of_nft"))
166- if ((Z == ah))
167- then [ScriptTransfer(Address(V), ak, ai), ScriptTransfer(Address(fromBase58String(al)), 1, m), StringEntry((B + "_amount_paid_to_owner"), aj), StringEntry((B + "_nft_transfer_to"), al), StringEntry((B + "_nft_status"), "REWARDED"), StringEntry((X + "_amount_paid_to_owner"), aj), StringEntry((X + "_nft_transfer_to"), al), StringEntry((X + "_nft_status"), "REWARDED")]
168- else if ((Z == "WAVES"))
169- then [ScriptTransfer(Address(V), parseIntValue(aj), unit), ScriptTransfer(Address(fromBase58String(al)), 1, m), StringEntry((B + "_amount_paid_to_owner"), aj), StringEntry((B + "_nft_transfer_to"), al), StringEntry((B + "_nft_status"), "REWARDED"), StringEntry((X + "_amount_paid_to_owner"), aj), StringEntry((X + "_nft_transfer_to"), al), StringEntry((X + "_nft_status"), "REWARDED")]
153+@Callable(o)
154+func acceptBidOffer (W,O,af,Y) = {
155+ let ag = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
156+ let A = toBase58String(o.transactionId)
157+ let ah = fromBase58String(Y)
158+ let U = o.caller.bytes
159+ let l = fromBase58String(O)
160+ let ai = getStringValue(this, (W + "_highest_bid"))
161+ let aj = ((parseIntValue(ai) / 1000) * 975)
162+ let N = ((parseIntValue(ai) / 1000) * 25)
163+ let ak = getStringValue(this, (W + "_winner_of_nft"))
164+ if ((Y == ag))
165+ then [ScriptTransfer(Address(U), aj, ah), ScriptTransfer(Address(fromBase58String(ak)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), ai), StringEntry((A + "_nft_transfer_to"), ak), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), ai), StringEntry((W + "_nft_transfer_to"), ak), StringEntry((W + "_nft_status"), "REWARDED")]
166+ else if ((Y == "WAVES"))
167+ then [ScriptTransfer(Address(U), aj, unit), ScriptTransfer(Address(fromBase58String(ak)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), ai), StringEntry((A + "_nft_transfer_to"), ak), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), ai), StringEntry((W + "_nft_transfer_to"), ak), StringEntry((W + "_nft_status"), "REWARDED")]
170168 else nil
171169 }
172170
173171
174172
175-@Callable(p)
176-func cancelAuction (X,Z) = {
177- let B = toBase58String(p.transactionId)
178- let V = p.caller.bytes
179- let am = getStringValue(this, (X + "_nft_status"))
180- let an = getStringValue(this, (X + "_winner_of_nft"))
181- let ao = getStringValue(this, (X + "_nft_owner"))
182- let P = getStringValue(this, (X + "_nft_on_auction"))
183- let ap = getStringValue(this, (X + "_highest_bid"))
184- if ((an == "0"))
185- then [StringEntry(((B + X) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
186- else if ((an != "0"))
173+@Callable(o)
174+func cancelAuction (W,Y) = {
175+ let A = toBase58String(o.transactionId)
176+ let U = o.caller.bytes
177+ let al = getStringValue(this, (W + "_nft_status"))
178+ let am = getStringValue(this, (W + "_winner_of_nft"))
179+ let an = getStringValue(this, (W + "_nft_owner"))
180+ let O = getStringValue(this, (W + "_nft_on_auction"))
181+ let ao = getStringValue(this, (W + "_highest_bid"))
182+ if ((am == "0"))
183+ then [StringEntry(((A + W) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(an)), 1, fromBase58String(O))]
184+ else if ((am != "0"))
187185 then throw("soory you can't cancel it because already auction placed by someone")
188186 else nil
189187 }
190188
191189
192190
193-@Callable(p)
194-func manualFundTransfer (aq,ar) = {
195- let as = p.caller.bytes
196- let at = fromBase58String(aq)
197- let M = p.payments[0].amount
198- let au = parseIntValue(ar)
199- let O = ((M / 1000) * 25)
200- let av = (M + O)
201- if ((av != M))
202- then throw("please submit the sum of actual amount and platform")
203- else if ((p.payments[0].assetId == unit))
204- then [IntegerEntry((toBase58String(as) + "_transfer"), M), StringEntry("platform_fee", toString(O)), StringEntry((toBase58String(as) + "_transfer_to"), aq), ScriptTransfer(Address(at), au, unit)]
205- else if ((p.payments[0].assetId == f))
206- then [IntegerEntry((toBase58String(as) + "_transfer"), M), StringEntry("platform_fee", toString(O)), StringEntry((toBase58String(as) + "_transfer_to"), aq), ScriptTransfer(Address(at), au, f)]
207- else nil
208- }
209-
210-
211-
212-@Callable(p)
213-func backValue (X) = {
214- let V = p.caller.bytes
215- let P = getStringValue(this, (X + "_nft_on_auction"))
216- let ao = getStringValue(this, (X + "_nft_owner"))
217-[StringEntry((X + "_nft_status"), "Auction_time over"), ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
218- }
219-
220-
221-
222-@Callable(p)
223-func withdrawBid (aw,Z) = {
224- let V = p.caller.bytes
225- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
226- let B = toBase58String(p.transactionId)
227- let ai = fromBase58String(Z)
228- let ax = getStringValue(this, (aw + "_highest_bid"))
229- let ay = getStringValue(this, (aw + "_winner"))
230- let az = getStringValue(this, (aw + "_nft_id"))
231- if ((Z == ah))
232- then [StringEntry((aw + "_nft_bid"), "WITHDRAW"), StringEntry((aw + "_nft_id"), az), StringEntry((aw + "_bidding_price_refund_amount"), ax), ScriptTransfer(p.caller, parseIntValue(ax), ai)]
233- else if ((Z == "WAVES"))
234- then [StringEntry((aw + "_nft_bid"), "WITHDRAW"), StringEntry((aw + "_nft_id"), az), StringEntry((aw + "_bidding_price_refund_amount"), ax), ScriptTransfer(p.caller, parseIntValue(ax), unit)]
191+@Callable(o)
192+func manualFundTransfer (ap,aq) = {
193+ let U = o.caller.bytes
194+ let ar = fromBase58String(ap)
195+ let J = o.payments[0].amount
196+ let as = ((J / 1000) * 975)
197+ let N = ((J / 1000) * 25)
198+ if ((o.payments[0].assetId == unit))
199+ then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), ap), ScriptTransfer(Address(ar), as, unit)]
200+ else if ((o.payments[0].assetId == f))
201+ then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), ap), ScriptTransfer(Address(ar), as, f)]
235202 else nil
236203 }
237204
238205
239206
240-@Callable(p)
241-func automateFunction (X,Z) = {
242- let V = p.caller.bytes
243- let P = getStringValue(this, (X + "_nft_on_auction"))
244- let ao = getStringValue(this, (X + "_nft_owner"))
245- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
246- let ai = fromBase58String(Z)
247- let ac = getStringValue(this, (X + "_highest_bid"))
248- let af = getStringValue(this, (X + "_winner_of_nft"))
249- let an = getStringValue(this, (X + "_winner_of_nft"))
250- if ((an == "0"))
251- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
252- else if (if ((an != "0"))
253- then (Z == ah)
254- else false)
255- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), ai)]
256- else if (if ((an != "0"))
257- then (Z == "WAVES")
258- else false)
259- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), unit)]
260- else nil
207+@Callable(o)
208+func backValue (W) = {
209+ let U = o.caller.bytes
210+ let O = getStringValue(this, (W + "_nft_on_auction"))
211+ let an = getStringValue(this, (W + "_nft_owner"))
212+[StringEntry((W + "_nft_status"), "Auction_time over"), ScriptTransfer(Address(fromBase58String(an)), 1, fromBase58String(O))]
261213 }
262214
263215
264216
265-@Callable(p)
266-func buyAllProducts_asimi (aA,aB) = {
267- let aC = p.caller
268- let aD = assetBalance(aC, f)
269- let M = value(p.payments[0].amount)
270- let av = parseIntValue(aB)
271- let aE = ((av / 1000) * 25)
272- let aF = (av + aE)
273- let aG = split(aA[0], "_")
274- let aH = split(aA[1], "_")
275- let aI = split(aA[2], "_")
276- let aJ = split(aA[3], "_")
277- let aK = split(aA[4], "_")
278- if ((aF > M))
279- then throw("your paying amount is wrong ")
280- else if ((M > aD))
281- then throw("Buyer does not have enough funds to complete the purchase.")
282- else if ((size(aA) == 1))
283- then [StringEntry((("first_nft_Info=" + "nftId") + aG[0]), ("buyer" + toString(aC))), StringEntry((("first_nft_Info=" + "seller_address") + aG[1]), ("price" + aG[2])), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f)]
284- else if ((size(aA) == 2))
285- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f)]
286- else if ((size(aA) == 3))
287- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f)]
288- else if ((size(aA) == 4))
289- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aJ[1])), (parseIntValue(aJ[2]) * 100), f)]
290- else if ((size(aA) == 5))
291- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), StringEntry((((((("fifth_nft_Info=" + "nftId") + aK[0]) + "seller_address") + aK[1]) + "price") + aK[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(aC, 1, fromBase58String(aK[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aJ[1])), (parseIntValue(aJ[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aK[1])), (parseIntValue(aK[2]) * 100), f)]
292- else if ((size(aA) > 5))
293- then throw("sorry! maximum limit of your cart is 5 items")
294- else nil
295- }
296-
297-
298-
299-@Callable(p)
300-func buyAllProducts_waves (aA,aB) = {
301- let aC = p.caller
302- let aD = assetBalance(aC, g)
303- let M = value(p.payments[0].amount)
304- let av = parseIntValue(aB)
305- let aE = ((av / 1000) * 25)
306- let aF = (av + aE)
307- let aG = split(aA[0], "_")
308- let aH = split(aA[1], "_")
309- let aI = split(aA[2], "_")
310- let aJ = split(aA[3], "_")
311- let aK = split(aA[4], "_")
312- if ((aF > M))
313- then throw("your paying amount is wrong ")
314- else if ((M > aD))
315- then throw("Buyer does not have enough funds to complete the purchase.")
316- else if ((size(aA) == 1))
317- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit)]
318- else if ((size(aA) == 2))
319- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit)]
320- else if ((size(aA) == 3))
321- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit)]
322- else if ((size(aA) == 4))
323- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit), ScriptTransfer(Address(fromBase58String(aJ[1])), parseIntValue(aJ[2]), unit)]
324- else if ((size(aA) == 5))
325- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), StringEntry((((((("fifth_nft_Info=" + "nftId") + aK[0]) + "seller_address") + aK[1]) + "price") + aK[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(aC, 1, fromBase58String(aK[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit), ScriptTransfer(Address(fromBase58String(aJ[1])), parseIntValue(aJ[2]), unit), ScriptTransfer(Address(fromBase58String(aK[1])), parseIntValue(aK[2]), unit)]
326- else if ((size(aA) > 5))
327- then throw("sorry! maximum limit of your cart is 5 items")
328- else nil
217+@Callable(o)
218+func withdrawBid (at,Y) = {
219+ let U = o.caller.bytes
220+ let ag = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
221+ let A = toBase58String(o.transactionId)
222+ let ah = fromBase58String(Y)
223+ let au = getStringValue(this, (at + "_highest_bid"))
224+ let av = getStringValue(this, (at + "_winner"))
225+ let aw = getStringValue(this, (at + "_nft_id"))
226+ if ((Y == ag))
227+ then [StringEntry((at + "_nft_bid"), "WITHDRAW"), StringEntry((at + "_nft_id"), aw), StringEntry((at + "_bidding_price_refund_amount"), au), ScriptTransfer(o.caller, parseIntValue(au), ah)]
228+ else if ((Y == "WAVES"))
229+ then [StringEntry((at + "_nft_bid"), "WITHDRAW"), StringEntry((at + "_nft_id"), aw), StringEntry((at + "_bidding_price_refund_amount"), au), ScriptTransfer(o.caller, parseIntValue(au), unit)]
230+ else nil
329231 }
330232
331233
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_"
55
66 let b = "buy"
77
88 let c = "price"
99
1010 let d = "sell"
1111
1212 let e = 30
1313
1414 let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
1515
1616 let g = base58''
1717
1818 let h = "bid"
1919
20-let i = true
20+let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
2121
22-let j = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
22+let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
2323
24-let k = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
25-
26-func l (m) = {
27- let n = assetInfo(m)
28- if ($isInstanceOf(n, "Asset"))
24+func k (l) = {
25+ let m = assetInfo(l)
26+ if ($isInstanceOf(m, "Asset"))
2927 then {
30- let o = n
31- if (if ((o.decimals == 0))
32- then (o.quantity == 1)
28+ let n = m
29+ if (if ((n.decimals == 0))
30+ then (n.quantity == 1)
3331 else false)
34- then (o.reissuable == false)
32+ then (n.reissuable == false)
3533 else false
3634 }
3735 else false
3836 }
3937
4038
41-@Callable(p)
42-func createNft (q,r,s,t,u,v,w,x,y) = {
43- let z = Issue(q, w, 1, 0, false)
44- let A = calculateAssetId(z)
45- let B = p.transactionId
46-[z, ScriptTransfer(p.caller, 1, A), StringEntry(((toBase58String(A) + a) + "Owner"), toString(p.caller)), StringEntry(((toBase58String(A) + a) + "nft_type"), t), StringEntry(((toBase58String(A) + a) + "nft_tags"), u), StringEntry(((toBase58String(A) + a) + "nft_dAppAddress"), s), IntegerEntry(((toBase58String(A) + a) + "nft_selling_price"), v), StringEntry(((toBase58String(A) + a) + "nft_onSell"), x), StringEntry(((toBase58String(A) + a) + "nft_data"), y), StringEntry(((toBase58String(B) + a) + "issue_nft"), toBase58String(A))]
39+@Callable(o)
40+func createNft (p,q,r,s,t,u,v,w,x) = {
41+ let y = Issue(p, v, 1, 0, false)
42+ let z = calculateAssetId(y)
43+ let A = o.transactionId
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))]
4745 }
4846
4947
5048
51-@Callable(p)
52-func sellNFT (C,D) = {
53- let B = p.transactionId
54- let E = p.caller.bytes
55- let F = $Tuple2(value(p.payments[0].assetId), value(p.payments[0].amount))
56- let G = F._1
57- let H = F._2
58- if (!(l(G)))
49+@Callable(o)
50+func sellNFT (B,C) = {
51+ let A = o.transactionId
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)))
5957 then throw("Token is not NFT")
60- else [StringEntry(((c + a) + toBase58String(value(p.payments[0].assetId))), C), StringEntry(((toString(p.caller) + a) + d), (((toBase58String(G) + a) + toString(H)) + D))]
58+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))]
6159 }
6260
6361
6462
65-@Callable(p)
66-func buyNFT (I,J) = {
67- let m = fromBase58String(I)
63+@Callable(o)
64+func buyNFT (H,I) = {
65+ let l = fromBase58String(H)
66+ let J = value(o.payments[0].amount)
6867 let K = {
69- let n = getString(this, (("nft_" + J) + "_owner"))
70- if ($isInstanceOf(n, "String"))
68+ let m = getString(this, (("nft_" + I) + "_owner"))
69+ if ($isInstanceOf(m, "String"))
7170 then {
72- let L = n
71+ let L = m
7372 L
7473 }
7574 else false
7675 }
77- let C = getStringValue(((((c + a) + I) + "_") + J))
78- let M = value(p.payments[0].amount)
79- let N = (M - ((M / 1000) * 25))
80- let O = (M - N)
81- if ((J == toString(p.caller)))
76+ let B = getStringValue(((((c + a) + H) + "_") + I))
77+ let M = ((J / 1000) * 975)
78+ let N = ((J / 1000) * 25)
79+ if ((I == toString(o.caller)))
8280 then throw("current Owner of NFT not able to purchase")
83- else if ((p.payments[0].assetId == f))
84- then [ScriptTransfer(p.caller, 1, m), ScriptTransfer(Address(fromBase58String(J)), N, f), StringEntry((("nft_" + I) + "platform_fee"), toString(O)), StringEntry(((toString(p.caller) + a) + b), ((I + a) + toString(M))), DeleteEntry((("nft_" + J) + "_owner")), StringEntry((("nft_" + J) + "_owner"), toString(p.caller)), StringEntry(((I + a) + "_owner"), toString(p.caller))]
85- else if ((p.payments[0].assetId == unit))
86- then [ScriptTransfer(p.caller, 1, m), ScriptTransfer(Address(fromBase58String(J)), N, unit), StringEntry((("nft_" + I) + "platform_fee"), toString(O)), StringEntry(((toString(p.caller) + a) + b), ((I + a) + toString(M))), DeleteEntry((("nft_" + J) + "_owner")), StringEntry((("nft_" + J) + "_owner"), toString(p.caller)), StringEntry(((I + a) + "_owner"), toString(p.caller))]
81+ else if ((o.payments[0].assetId == f))
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))]
83+ else if ((o.payments[0].assetId == unit))
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))]
8785 else nil
8886 }
8987
9088
9189
92-@Callable(p)
93-func cancelSell (P) = {
94- let B = toBase58String(p.transactionId)
95- let E = p.caller.bytes
96-[StringEntry(((B + P) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(E), 1, fromBase58String(P))]
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))]
9795 }
9896
9997
10098
101-@Callable(p)
102-func addAuction (Q,R,S,T,D) = {
103- let B = toBase58String(p.transactionId)
104- let P = value(p.payments[0].assetId)
105- let C = value(S)
106- let U = (lastBlock.height + T)
107- let V = p.caller.bytes
108- let W = {
109- let n = getString(this, (((toBase58String(P) + a) + "nft_status_") + toBase58String(V)))
110- if ($isInstanceOf(n, "String"))
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"))
111109 then {
112- let L = n
110+ let L = m
113111 true
114112 }
115113 else false
116114 }
117- if ((W == true))
115+ if ((V == true))
118116 then throw("Already in auction list")
119- else if ((T > e))
120- then throw(("Duration is too long. Must be less than or equal to 30 " + toString(e)))
121- else if ((p.payments[0].assetId == unit))
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))
122120 then throw("NFT not attached")
123- else if ((p.payments[0].assetId == f))
121+ else if ((o.payments[0].assetId == f))
124122 then throw("NFT not attached")
125- else [StringEntry(((B + "nft_start_auction_date") + toBase58String(V)), Q), StringEntry(((B + "nft_end_auction_date") + toBase58String(V)), R), StringEntry((B + "_nft_start_price"), S), StringEntry((B + "_nft_owner"), toString(p.caller)), StringEntry((B + "_nft_on_auction"), toBase58String(P)), StringEntry((B + "_previous_bidder"), "none"), StringEntry((B + "_highest_bid"), "0"), StringEntry((B + "_winner_of_nft"), "0"), StringEntry((B + "_bidder_count"), "0"), StringEntry((B + "_nft_status"), "OPEN")]
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")]
126124 }
127125
128126
129127
130-@Callable(p)
131-func placeBid (X,P,r,Y,Z) = {
132- let B = toBase58String(p.transactionId)
133- let V = p.caller.bytes
134- let m = fromBase58String(P)
135- let aa = p.payments[0].assetId
136- let ab = p.payments[0].amount
137- let ac = getStringValue(this, (X + "_highest_bid"))
138- let ad = getString(this, (X + "_previous_bidder"))
139- let ae = getStringValue(this, (X + "_bidder_count"))
140- let af = getStringValue(this, (X + "_winner_of_nft"))
141- let W = getStringValue(this, (X + "_nft_status"))
142- if ((W != "OPEN"))
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].assetId
134+ let aa = o.payments[0].amount
135+ let ab = getStringValue(this, (W + "_highest_bid"))
136+ let ac = getString(this, (W + "_previous_bidder"))
137+ let ad = getStringValue(this, (W + "_bidder_count"))
138+ let ae = getStringValue(this, (W + "_winner_of_nft"))
139+ let V = getStringValue(this, (W + "_nft_status"))
140+ if ((V != "OPEN"))
143141 then throw("Not open for auction")
144- else if ((parseIntValue(ac) >= ab))
142+ else if ((parseIntValue(ab) >= aa))
145143 then throw("Bid is less then starting/highest Bid")
146- else if ((ac == "0"))
147- then [StringEntry((X + "_highest_bid"), toString(ab)), StringEntry((X + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((X + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((X + "_nft_id"), toBase58String(m)), StringEntry((X + "_nft_owner"), r), StringEntry((((B + "_") + X) + "_highest_bid"), toString(ab)), StringEntry((((B + "_") + X) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((B + "_") + X) + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((((B + "_") + X) + "_nft_id"), toBase58String(m)), StringEntry((((B + "_") + X) + "_nft_owner"), r), StringEntry((B + "_bid_for_nft_by"), toBase58String(V)), StringEntry((B + "_bid_price_place"), Y), StringEntry((B + "_previous_bid_amount_refund_to_address"), af), StringEntry((B + "_prevoius_bid_amount_refund"), ac)]
148- else if ((ac != "0"))
149- then [ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), aa), StringEntry((B + "_previous_bid_amount_refund_to_address"), af), StringEntry((B + "_prevoius_bid_amount_refund"), ac), StringEntry((X + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((X + "_highest_bid"), toString(ab)), StringEntry((X + "_winner_of_nft"), toBase58String(p.caller.bytes)), StringEntry((X + "_nft_id"), toBase58String(m)), StringEntry((X + "_nft_owner"), r), StringEntry((((B + "_") + X) + "_highest_bid"), toString(ab)), StringEntry((((B + "_") + X) + "_winner"), toBase58String(p.caller.bytes)), StringEntry((((B + "_") + X) + "_bidder_count"), toString((parseIntValue(ae) + 1))), StringEntry((((B + "_") + X) + "_nft_id"), toBase58String(m)), StringEntry((((B + "_") + X) + "_nft_owner"), r), StringEntry((B + "_bid_for_nft_by"), toBase58String(V)), StringEntry((B + "_bid_price_place"), Y)]
144+ else if ((ab == "0"))
145+ then [StringEntry((W + "_highest_bid"), toString(aa)), StringEntry((W + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((W + "_bidder_count"), toString((parseIntValue(ad) + 1))), StringEntry((W + "_nft_id"), toBase58String(l)), StringEntry((W + "_nft_owner"), q), StringEntry((((A + "_") + W) + "_highest_bid"), toString(aa)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ad) + 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"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ab)]
146+ else if ((ab != "0"))
147+ then [ScriptTransfer(Address(fromBase58String(ae)), parseIntValue(ab), Z), StringEntry((A + "_previous_bid_amount_refund_to_address"), ae), StringEntry((A + "_prevoius_bid_amount_refund"), ab), StringEntry((W + "_bidder_count"), toString((parseIntValue(ad) + 1))), StringEntry((W + "_highest_bid"), toString(aa)), 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(aa)), StringEntry((((A + "_") + W) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + W) + "_bidder_count"), toString((parseIntValue(ad) + 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)]
150148 else nil
151149 }
152150
153151
154152
155-@Callable(p)
156-func acceptBidOffer (X,P,ag,Z) = {
157- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
158- let B = toBase58String(p.transactionId)
159- let ai = fromBase58String(Z)
160- let V = p.caller.bytes
161- let m = fromBase58String(P)
162- let aj = getStringValue(this, (X + "_highest_bid"))
163- let ak = ((parseIntValue(aj) / 1000) * 975)
164- let O = ((parseIntValue(aj) / 1000) * 25)
165- let al = getStringValue(this, (X + "_winner_of_nft"))
166- if ((Z == ah))
167- then [ScriptTransfer(Address(V), ak, ai), ScriptTransfer(Address(fromBase58String(al)), 1, m), StringEntry((B + "_amount_paid_to_owner"), aj), StringEntry((B + "_nft_transfer_to"), al), StringEntry((B + "_nft_status"), "REWARDED"), StringEntry((X + "_amount_paid_to_owner"), aj), StringEntry((X + "_nft_transfer_to"), al), StringEntry((X + "_nft_status"), "REWARDED")]
168- else if ((Z == "WAVES"))
169- then [ScriptTransfer(Address(V), parseIntValue(aj), unit), ScriptTransfer(Address(fromBase58String(al)), 1, m), StringEntry((B + "_amount_paid_to_owner"), aj), StringEntry((B + "_nft_transfer_to"), al), StringEntry((B + "_nft_status"), "REWARDED"), StringEntry((X + "_amount_paid_to_owner"), aj), StringEntry((X + "_nft_transfer_to"), al), StringEntry((X + "_nft_status"), "REWARDED")]
153+@Callable(o)
154+func acceptBidOffer (W,O,af,Y) = {
155+ let ag = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
156+ let A = toBase58String(o.transactionId)
157+ let ah = fromBase58String(Y)
158+ let U = o.caller.bytes
159+ let l = fromBase58String(O)
160+ let ai = getStringValue(this, (W + "_highest_bid"))
161+ let aj = ((parseIntValue(ai) / 1000) * 975)
162+ let N = ((parseIntValue(ai) / 1000) * 25)
163+ let ak = getStringValue(this, (W + "_winner_of_nft"))
164+ if ((Y == ag))
165+ then [ScriptTransfer(Address(U), aj, ah), ScriptTransfer(Address(fromBase58String(ak)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), ai), StringEntry((A + "_nft_transfer_to"), ak), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), ai), StringEntry((W + "_nft_transfer_to"), ak), StringEntry((W + "_nft_status"), "REWARDED")]
166+ else if ((Y == "WAVES"))
167+ then [ScriptTransfer(Address(U), aj, unit), ScriptTransfer(Address(fromBase58String(ak)), 1, l), StringEntry("platform_fee", toString(N)), StringEntry((A + "_amount_paid_to_owner"), ai), StringEntry((A + "_nft_transfer_to"), ak), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((W + "_amount_paid_to_owner"), ai), StringEntry((W + "_nft_transfer_to"), ak), StringEntry((W + "_nft_status"), "REWARDED")]
170168 else nil
171169 }
172170
173171
174172
175-@Callable(p)
176-func cancelAuction (X,Z) = {
177- let B = toBase58String(p.transactionId)
178- let V = p.caller.bytes
179- let am = getStringValue(this, (X + "_nft_status"))
180- let an = getStringValue(this, (X + "_winner_of_nft"))
181- let ao = getStringValue(this, (X + "_nft_owner"))
182- let P = getStringValue(this, (X + "_nft_on_auction"))
183- let ap = getStringValue(this, (X + "_highest_bid"))
184- if ((an == "0"))
185- then [StringEntry(((B + X) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
186- else if ((an != "0"))
173+@Callable(o)
174+func cancelAuction (W,Y) = {
175+ let A = toBase58String(o.transactionId)
176+ let U = o.caller.bytes
177+ let al = getStringValue(this, (W + "_nft_status"))
178+ let am = getStringValue(this, (W + "_winner_of_nft"))
179+ let an = getStringValue(this, (W + "_nft_owner"))
180+ let O = getStringValue(this, (W + "_nft_on_auction"))
181+ let ao = getStringValue(this, (W + "_highest_bid"))
182+ if ((am == "0"))
183+ then [StringEntry(((A + W) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(an)), 1, fromBase58String(O))]
184+ else if ((am != "0"))
187185 then throw("soory you can't cancel it because already auction placed by someone")
188186 else nil
189187 }
190188
191189
192190
193-@Callable(p)
194-func manualFundTransfer (aq,ar) = {
195- let as = p.caller.bytes
196- let at = fromBase58String(aq)
197- let M = p.payments[0].amount
198- let au = parseIntValue(ar)
199- let O = ((M / 1000) * 25)
200- let av = (M + O)
201- if ((av != M))
202- then throw("please submit the sum of actual amount and platform")
203- else if ((p.payments[0].assetId == unit))
204- then [IntegerEntry((toBase58String(as) + "_transfer"), M), StringEntry("platform_fee", toString(O)), StringEntry((toBase58String(as) + "_transfer_to"), aq), ScriptTransfer(Address(at), au, unit)]
205- else if ((p.payments[0].assetId == f))
206- then [IntegerEntry((toBase58String(as) + "_transfer"), M), StringEntry("platform_fee", toString(O)), StringEntry((toBase58String(as) + "_transfer_to"), aq), ScriptTransfer(Address(at), au, f)]
207- else nil
208- }
209-
210-
211-
212-@Callable(p)
213-func backValue (X) = {
214- let V = p.caller.bytes
215- let P = getStringValue(this, (X + "_nft_on_auction"))
216- let ao = getStringValue(this, (X + "_nft_owner"))
217-[StringEntry((X + "_nft_status"), "Auction_time over"), ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
218- }
219-
220-
221-
222-@Callable(p)
223-func withdrawBid (aw,Z) = {
224- let V = p.caller.bytes
225- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
226- let B = toBase58String(p.transactionId)
227- let ai = fromBase58String(Z)
228- let ax = getStringValue(this, (aw + "_highest_bid"))
229- let ay = getStringValue(this, (aw + "_winner"))
230- let az = getStringValue(this, (aw + "_nft_id"))
231- if ((Z == ah))
232- then [StringEntry((aw + "_nft_bid"), "WITHDRAW"), StringEntry((aw + "_nft_id"), az), StringEntry((aw + "_bidding_price_refund_amount"), ax), ScriptTransfer(p.caller, parseIntValue(ax), ai)]
233- else if ((Z == "WAVES"))
234- then [StringEntry((aw + "_nft_bid"), "WITHDRAW"), StringEntry((aw + "_nft_id"), az), StringEntry((aw + "_bidding_price_refund_amount"), ax), ScriptTransfer(p.caller, parseIntValue(ax), unit)]
191+@Callable(o)
192+func manualFundTransfer (ap,aq) = {
193+ let U = o.caller.bytes
194+ let ar = fromBase58String(ap)
195+ let J = o.payments[0].amount
196+ let as = ((J / 1000) * 975)
197+ let N = ((J / 1000) * 25)
198+ if ((o.payments[0].assetId == unit))
199+ then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), ap), ScriptTransfer(Address(ar), as, unit)]
200+ else if ((o.payments[0].assetId == f))
201+ then [IntegerEntry((toBase58String(U) + "_transfer"), J), StringEntry("platform_fee", toString(N)), StringEntry((toBase58String(U) + "_transfer_to"), ap), ScriptTransfer(Address(ar), as, f)]
235202 else nil
236203 }
237204
238205
239206
240-@Callable(p)
241-func automateFunction (X,Z) = {
242- let V = p.caller.bytes
243- let P = getStringValue(this, (X + "_nft_on_auction"))
244- let ao = getStringValue(this, (X + "_nft_owner"))
245- let ah = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
246- let ai = fromBase58String(Z)
247- let ac = getStringValue(this, (X + "_highest_bid"))
248- let af = getStringValue(this, (X + "_winner_of_nft"))
249- let an = getStringValue(this, (X + "_winner_of_nft"))
250- if ((an == "0"))
251- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P))]
252- else if (if ((an != "0"))
253- then (Z == ah)
254- else false)
255- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), ai)]
256- else if (if ((an != "0"))
257- then (Z == "WAVES")
258- else false)
259- then [ScriptTransfer(Address(fromBase58String(ao)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ac), unit)]
260- else nil
207+@Callable(o)
208+func backValue (W) = {
209+ let U = o.caller.bytes
210+ let O = getStringValue(this, (W + "_nft_on_auction"))
211+ let an = getStringValue(this, (W + "_nft_owner"))
212+[StringEntry((W + "_nft_status"), "Auction_time over"), ScriptTransfer(Address(fromBase58String(an)), 1, fromBase58String(O))]
261213 }
262214
263215
264216
265-@Callable(p)
266-func buyAllProducts_asimi (aA,aB) = {
267- let aC = p.caller
268- let aD = assetBalance(aC, f)
269- let M = value(p.payments[0].amount)
270- let av = parseIntValue(aB)
271- let aE = ((av / 1000) * 25)
272- let aF = (av + aE)
273- let aG = split(aA[0], "_")
274- let aH = split(aA[1], "_")
275- let aI = split(aA[2], "_")
276- let aJ = split(aA[3], "_")
277- let aK = split(aA[4], "_")
278- if ((aF > M))
279- then throw("your paying amount is wrong ")
280- else if ((M > aD))
281- then throw("Buyer does not have enough funds to complete the purchase.")
282- else if ((size(aA) == 1))
283- then [StringEntry((("first_nft_Info=" + "nftId") + aG[0]), ("buyer" + toString(aC))), StringEntry((("first_nft_Info=" + "seller_address") + aG[1]), ("price" + aG[2])), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f)]
284- else if ((size(aA) == 2))
285- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f)]
286- else if ((size(aA) == 3))
287- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f)]
288- else if ((size(aA) == 4))
289- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aJ[1])), (parseIntValue(aJ[2]) * 100), f)]
290- else if ((size(aA) == 5))
291- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), StringEntry((((((("fifth_nft_Info=" + "nftId") + aK[0]) + "seller_address") + aK[1]) + "price") + aK[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(aC, 1, fromBase58String(aK[0])), ScriptTransfer(Address(fromBase58String(aG[1])), (parseIntValue(aG[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aH[1])), (parseIntValue(aH[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aI[1])), (parseIntValue(aI[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aJ[1])), (parseIntValue(aJ[2]) * 100), f), ScriptTransfer(Address(fromBase58String(aK[1])), (parseIntValue(aK[2]) * 100), f)]
292- else if ((size(aA) > 5))
293- then throw("sorry! maximum limit of your cart is 5 items")
294- else nil
295- }
296-
297-
298-
299-@Callable(p)
300-func buyAllProducts_waves (aA,aB) = {
301- let aC = p.caller
302- let aD = assetBalance(aC, g)
303- let M = value(p.payments[0].amount)
304- let av = parseIntValue(aB)
305- let aE = ((av / 1000) * 25)
306- let aF = (av + aE)
307- let aG = split(aA[0], "_")
308- let aH = split(aA[1], "_")
309- let aI = split(aA[2], "_")
310- let aJ = split(aA[3], "_")
311- let aK = split(aA[4], "_")
312- if ((aF > M))
313- then throw("your paying amount is wrong ")
314- else if ((M > aD))
315- then throw("Buyer does not have enough funds to complete the purchase.")
316- else if ((size(aA) == 1))
317- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit)]
318- else if ((size(aA) == 2))
319- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit)]
320- else if ((size(aA) == 3))
321- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit)]
322- else if ((size(aA) == 4))
323- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit), ScriptTransfer(Address(fromBase58String(aJ[1])), parseIntValue(aJ[2]), unit)]
324- else if ((size(aA) == 5))
325- then [StringEntry((((((("first_nft_Info=" + "nftId") + aG[0]) + "seller_address") + aG[1]) + "price") + aG[2]), ("buyer" + toString(aC))), StringEntry((((((("second_nft_Info=" + "nftId") + aH[0]) + "seller_address") + aH[1]) + "price") + aH[2]), ("buyer" + toString(aC))), StringEntry((((((("third_nft_Info=" + "nftId") + aI[0]) + "seller_address") + aI[1]) + "price") + aI[2]), ("buyer" + toString(aC))), StringEntry((((((("fourth_nft_Info=" + "nftId") + aJ[0]) + "seller_address") + aJ[1]) + "price") + aJ[2]), ("buyer" + toString(aC))), StringEntry((((((("fifth_nft_Info=" + "nftId") + aK[0]) + "seller_address") + aK[1]) + "price") + aK[2]), ("buyer" + toString(aC))), ScriptTransfer(aC, 1, fromBase58String(aG[0])), ScriptTransfer(aC, 1, fromBase58String(aH[0])), ScriptTransfer(aC, 1, fromBase58String(aI[0])), ScriptTransfer(aC, 1, fromBase58String(aJ[0])), ScriptTransfer(aC, 1, fromBase58String(aK[0])), ScriptTransfer(Address(fromBase58String(aG[1])), parseIntValue(aG[2]), unit), ScriptTransfer(Address(fromBase58String(aH[1])), parseIntValue(aH[2]), unit), ScriptTransfer(Address(fromBase58String(aI[1])), parseIntValue(aI[2]), unit), ScriptTransfer(Address(fromBase58String(aJ[1])), parseIntValue(aJ[2]), unit), ScriptTransfer(Address(fromBase58String(aK[1])), parseIntValue(aK[2]), unit)]
326- else if ((size(aA) > 5))
327- then throw("sorry! maximum limit of your cart is 5 items")
328- else nil
217+@Callable(o)
218+func withdrawBid (at,Y) = {
219+ let U = o.caller.bytes
220+ let ag = "9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq"
221+ let A = toBase58String(o.transactionId)
222+ let ah = fromBase58String(Y)
223+ let au = getStringValue(this, (at + "_highest_bid"))
224+ let av = getStringValue(this, (at + "_winner"))
225+ let aw = getStringValue(this, (at + "_nft_id"))
226+ if ((Y == ag))
227+ then [StringEntry((at + "_nft_bid"), "WITHDRAW"), StringEntry((at + "_nft_id"), aw), StringEntry((at + "_bidding_price_refund_amount"), au), ScriptTransfer(o.caller, parseIntValue(au), ah)]
228+ else if ((Y == "WAVES"))
229+ then [StringEntry((at + "_nft_bid"), "WITHDRAW"), StringEntry((at + "_nft_id"), aw), StringEntry((at + "_bidding_price_refund_amount"), au), ScriptTransfer(o.caller, parseIntValue(au), unit)]
230+ else nil
329231 }
330232
331233

github/deemru/w8io/169f3d6 
162.49 ms