tx · 2ahX4xouADVtE1NRxHmKuGHD7FLvGzJWiUTHcSkTKCjR

3NCnz63Wq3UgikV5jJfQpG5snnibGbfUHR1:  -0.01500000 Waves

2023.01.31 14:51 [2429087] smart account 3NCnz63Wq3UgikV5jJfQpG5snnibGbfUHR1 > SELF 0.00000000 Waves

{ "type": 13, "id": "2ahX4xouADVtE1NRxHmKuGHD7FLvGzJWiUTHcSkTKCjR", "fee": 1500000, "feeAssetId": null, "timestamp": 1675165854532, "version": 2, "chainId": 84, "sender": "3NCnz63Wq3UgikV5jJfQpG5snnibGbfUHR1", "senderPublicKey": "4aqyXQp8dTe3bcQoReatzejrngYuQvyooFPeNe8925zb", "proofs": [ "57ZgNyXxX9b729LWGqMLDU1oHcGap4DiD9MJKimCaY9EeZtwUsQfwvcQJhDmYqftMJAz7nyJhf7mXtDjQGcHTpbE" ], "script": "base64:BgJOCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgMKAQgSBwoFCAgIAQgSBwoFCAgICAgSBQoDCAgBEgMKAQgSAwoBCBIECgIICBIDCgEICwAJc2VwYXJhdG9yAgFfAARrQnV5AgNidXkABmtQcmljZQIFcHJpY2UABWtTZWxsAgRzZWxsABJtYXhBdWN0aW9uRHVyYXRpb24ABwAFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AAVXQVZFUwEAAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmVpc3N1YWJ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VlAQUIYmlkUHJpY2UFBHVuaXQFA25pbAFpARJtYW51YWxGdW5kVHJhbnNmZXICDXJlY2VwaWVudEFkZHIHbWVzc2FnZQQGY2FsbGVyCAgFAWkGY2FsbGVyBWJ5dGVzBAdyZWNpdmVyCQDZBAEFDXJlY2VwaWVudEFkZHIEBmFtb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQDCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQR1bml0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAglfdHJhbnNmZXIFBmFtb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAgxfdHJhbnNmZXJfdG8FDXJlY2VwaWVudEFkZHIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBBQdyZWNpdmVyBQZhbW91bnQFBHVuaXQFA25pbAMJAAACCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQFBXRlYW1zCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAglfdHJhbnNmZXIFBmFtb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAgxfdHJhbnNmZXJfdG8FDXJlY2VwaWVudEFkZHIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBBQdyZWNpdmVyBQZhbW91bnQFBXRlYW1zBQNuaWwFA25pbAFpAQd0ZXN0QmlkAQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQICOEU4a2tGQllDeTQ0SkphcTZwQVo2S2l6c3VSZXNpNVVLTmhiRDFXTlp3aGhZX2hpZ2hlc3RfYmlkAgEwBQNuaWwA3mHB/Q==", "height": 2429087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8QxzGX25TEocRwYBUKFYaefYipMLNTRH9JRQSYBSSaUa Next: HKuWBqEqxcrVDx1rMyKCq978L2pUUFcrFKGkQvoFKT78 Diff:
OldNewDifferences
1111
1212 let e = 7
1313
14-let f = "bid"
14+let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
1515
16-let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
16+let g = base58''
1717
18-let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
18+let h = "bid"
1919
20-func i (j) = {
21- let k = assetInfo(j)
22- if ($isInstanceOf(k, "Asset"))
20+let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
21+
22+let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
23+
24+func k (l) = {
25+ let m = assetInfo(l)
26+ if ($isInstanceOf(m, "Asset"))
2327 then {
24- let l = k
25- if (if ((l.decimals == 0))
26- then (l.quantity == 1)
28+ let n = m
29+ if (if ((n.decimals == 0))
30+ then (n.quantity == 1)
2731 else false)
28- then (l.reissuable == false)
32+ then (n.reissuable == false)
2933 else false
3034 }
3135 else false
3236 }
3337
3438
35-@Callable(m)
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))]
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))]
4145 }
4246
4347
4448
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)))
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)))
5357 then throw("Token is not NFT")
54- else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
58+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), (B + C)), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))]
5559 }
5660
5761
5862
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"))
63+@Callable(o)
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+ if ($isInstanceOf(m, "String"))
6670 then {
67- let I = k
68- I
71+ let L = m
72+ L
6973 }
7074 else false
7175 }
72- let z = getStringValue(((((c + a) + E) + "_") + F))
73- if ((m.payments[0].assetId != unit))
74- then throw("Pay in waves")
75- else if ((F == toString(m.caller)))
76- then throw("current Owner of NFT not able to purchase")
77- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(F)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner")), StringEntry((("nft_" + F) + "_owner"), toString(m.caller)), StringEntry(((E + a) + "_owner"), toString(m.caller))]
76+ let B = getStringValue(((((c + a) + H) + "_") + I))
77+ if ((I == toString(o.caller)))
78+ then throw("current Owner of NFT not able to purchase")
79+ else if ((o.payments[0].assetId == f))
80+ then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(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+ else if ((o.payments[0].assetId == unit))
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+ else nil
7884 }
7985
8086
8187
82-@Callable(m)
83-func addAuction (J,K,L,M) = {
84- let y = toBase58String(m.transactionId)
85- let N = value(m.payments[0].assetId)
86- let z = value(L)
87- let O = (lastBlock.height + M)
88- let P = m.caller.bytes
89- let Q = {
90- let k = getString(this, (((toBase58String(N) + a) + "nft_status_") + toBase58String(P)))
91- if ($isInstanceOf(k, "String"))
88+@Callable(o)
89+func cancelSell (M) = {
90+ let A = toBase58String(o.transactionId)
91+ let D = o.caller.bytes
92+[StringEntry(((A + M) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(M))]
93+ }
94+
95+
96+
97+@Callable(o)
98+func addAuction (N,O,P,Q,C) = {
99+ let A = toBase58String(o.transactionId)
100+ let M = value(o.payments[0].assetId)
101+ let B = value(P)
102+ let R = (lastBlock.height + Q)
103+ let S = o.caller.bytes
104+ let T = {
105+ let m = getString(this, (((toBase58String(M) + a) + "nft_status_") + toBase58String(S)))
106+ if ($isInstanceOf(m, "String"))
92107 then {
93- let I = k
108+ let L = m
94109 true
95110 }
96111 else false
97112 }
98- if ((m.payments[0].assetId == unit))
99- then throw("NFT not attached")
100- else if ((Q == true))
101- then throw("Already in auction list")
102- else if ((M > e))
103- then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
104- else [StringEntry(((y + "nft_start_auction_date") + toBase58String(P)), J), StringEntry(((y + "nft_end_auction_date") + toBase58String(P)), K), StringEntry((y + "_nft_start_price"), L), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(N)), 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")]
113+ if ((T == true))
114+ then throw("Already in auction list")
115+ else if ((Q > e))
116+ then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
117+ else if ((o.payments[0].assetId == unit))
118+ then throw("NFT not attached")
119+ else if ((o.payments[0].assetId == f))
120+ then throw("NFT not attached")
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 + C)), 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")]
105122 }
106123
107124
108125
109-@Callable(m)
110-func placeBid (R,N,o,S) = {
111- let y = toBase58String(m.transactionId)
112- let P = m.caller.bytes
113- let j = fromBase58String(N)
114- let T = m.payments[0].amount
115- let U = getStringValue(this, (R + "_highest_bid"))
116- let V = getString(this, (R + "_previous_bidder"))
117- let W = getStringValue(this, (R + "_bidder_count"))
118- let X = getStringValue(this, (R + "_winner_of_nft"))
119- let Q = getStringValue(this, (R + "_nft_status"))
120- if ((m.payments[0].assetId != unit))
121- then throw("Pay in waves")
122- else if ((Q != "OPEN"))
123- then throw("Not open for auction")
124- else if ((parseIntValue(U) >= T))
125- then throw("Bid is less then starting/highest Bid")
126- else if ((U == "0"))
127- then [StringEntry((R + "_highest_bid"), toString(T)), StringEntry((R + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((R + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((R + "_nft_id"), toBase58String(j)), StringEntry((R + "_nft_owner"), o), StringEntry((((y + "_") + R) + "_highest_bid"), toString(T)), StringEntry((((y + "_") + R) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + R) + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((((y + "_") + R) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + R) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(P)), StringEntry((y + "_bid_price_place"), S), StringEntry((y + "_previous_bid_amount_refund_to_address"), X), StringEntry((y + "_prevoius_bid_amount_refund"), U)]
128- else [StringEntry((R + "_highest_bid"), toString(T)), StringEntry((R + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((R + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((R + "_nft_id"), toBase58String(j)), StringEntry((R + "_nft_owner"), o), StringEntry((((y + "_") + R) + "_highest_bid"), toString(T)), StringEntry((((y + "_") + R) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + R) + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((((y + "_") + R) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + R) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(P)), StringEntry((y + "_bid_price_place"), S), StringEntry((y + "_previous_bid_amount_refund_to_address"), X), StringEntry((y + "_prevoius_bid_amount_refund"), U), ScriptTransfer(Address(fromBase58String(X)), parseIntValue(U), unit)]
126+@Callable(o)
127+func placeBid (U,M,q,P,V) = {
128+ let A = toBase58String(o.transactionId)
129+ let S = o.caller.bytes
130+ let l = fromBase58String(M)
131+ let W = o.payments[0].amount
132+ let X = getStringValue(this, (U + "_highest_bid"))
133+ let Y = getString(this, (U + "_previous_bidder"))
134+ let Z = getStringValue(this, (U + "_bidder_count"))
135+ let aa = getStringValue(this, (U + "_winner_of_nft"))
136+ let T = getStringValue(this, (U + "_nft_status"))
137+ if ((T != "OPEN"))
138+ then throw("Not open for auction")
139+ else if ((parseIntValue(X) >= W))
140+ then throw("Bid is less then starting/highest Bid")
141+ else if ((X == "0"))
142+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X)]
143+ else if ((o.payments[0].assetId == unit))
144+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
145+ else if ((o.payments[0].assetId == f))
146+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), f)]
147+ else nil
129148 }
130149
131150
132151
133-@Callable(m)
134-func acceptBidOffer (R,N,Y) = {
135- let y = toBase58String(m.transactionId)
136- let P = m.caller.bytes
137- let j = fromBase58String(N)
138- let Z = getStringValue(this, (R + "_highest_bid"))
139- let aa = getStringValue(this, (R + "_winner_of_nft"))
140-[ScriptTransfer(Address(P), parseIntValue(Z), unit), ScriptTransfer(Address(fromBase58String(aa)), 1, j), StringEntry((y + "_amount_paid_to_owner"), Z), StringEntry((y + "_nft_transfer_to"), aa), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((R + "_amount_paid_to_owner"), Z), StringEntry((R + "_nft_transfer_to"), aa), StringEntry((R + "_nft_status"), "REWARDED")]
152+@Callable(o)
153+func acceptBidOffer (U,M,ab) = {
154+ let A = toBase58String(o.transactionId)
155+ let S = o.caller.bytes
156+ let l = fromBase58String(M)
157+ let ac = getStringValue(this, (U + "_highest_bid"))
158+ let ad = getStringValue(this, (U + "_winner_of_nft"))
159+[ScriptTransfer(Address(S), parseIntValue(ac), f), ScriptTransfer(Address(fromBase58String(ad)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ac), StringEntry((A + "_nft_transfer_to"), ad), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
141160 }
142161
143162
144163
145-@Callable(m)
146-func cancelAuction (R) = {
147- let y = toBase58String(m.transactionId)
148- let P = m.caller.bytes
149- let ab = getStringValue(this, (R + "_nft_status"))
150- let ac = getStringValue(this, (R + "_winner_of_nft"))
151- let ad = getStringValue(this, (R + "_nft_owner"))
152- let N = getStringValue(this, (R + "_nft_on_auction"))
153- let ae = getStringValue(this, (R + "_highest_bid"))
154- if ((ac == "0"))
155- then [StringEntry(((y + R) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ad)), 1, fromBase58String(N))]
156- else [StringEntry((R + "_nft_status"), "CANCELED"), StringEntry((R + "_previous_bid_amount_refund_to_address"), ac), StringEntry((R + "_prevoius_bid_amount_refund"), ae), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ac), StringEntry((y + "_prevoius_bid_amount_refund"), ae), ScriptTransfer(Address(fromBase58String(ad)), 1, fromBase58String(N)), ScriptTransfer(Address(fromBase58String(ac)), parseIntValue(ae), unit)]
164+@Callable(o)
165+func cancelAuction (U) = {
166+ let A = toBase58String(o.transactionId)
167+ let S = o.caller.bytes
168+ let ae = getStringValue(this, (U + "_nft_status"))
169+ let af = getStringValue(this, (U + "_winner_of_nft"))
170+ let ag = getStringValue(this, (U + "_nft_owner"))
171+ let M = getStringValue(this, (U + "_nft_on_auction"))
172+ let ah = getStringValue(this, (U + "_highest_bid"))
173+ if ((af == "0"))
174+ then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M))]
175+ else if ((o.payments[0].assetId == unit))
176+ then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), af), StringEntry((A + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
177+ else if ((o.payments[0].assetId == f))
178+ then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), af), StringEntry((A + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), f)]
179+ else nil
157180 }
158181
159182
160183
161-@Callable(m)
162-func withdrawBid (af) = {
163- let P = m.caller.bytes
164- let ag = getStringValue(this, (af + "_highest_bid"))
165- let ah = getStringValue(this, (af + "_winner"))
166- let ai = getStringValue(this, (af + "_nft_id"))
167- if ((toBase58String(P) != ah))
184+@Callable(o)
185+func withdrawBid (ai) = {
186+ let S = o.caller.bytes
187+ let aj = getStringValue(this, (ai + "_highest_bid"))
188+ let ak = getStringValue(this, (ai + "_winner"))
189+ let al = getStringValue(this, (ai + "_nft_id"))
190+ if ((toBase58String(S) != ak))
168191 then throw("No bid")
169- else [StringEntry((af + "_nft_bid"), "WITHDRAW"), StringEntry((af + "_nft_id"), ai), StringEntry((af + "_bidding_price_refund_amount"), ag), ScriptTransfer(m.caller, parseIntValue(ag), unit)]
192+ else [StringEntry((ai + "_nft_bid"), "WITHDRAW"), StringEntry((ai + "_nft_id"), al), StringEntry((ai + "_bidding_price_refund_amount"), aj), ScriptTransfer(o.caller, parseIntValue(aj), unit)]
170193 }
171194
172195
173196
174-@Callable(m)
175-func manualFundTransfer (aj,ak) = {
176- let P = m.caller.bytes
177- let al = fromBase58String(aj)
178- let G = m.payments[0].amount
179- let am = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
180- if ((toString(G) == ""))
181- then throw("Payment is not attached or empty")
182- else [IntegerEntry((toBase58String(P) + "_transfer"), G), StringEntry((toBase58String(P) + "_transfer_to"), aj), ScriptTransfer(Address(al), G, am)]
197+@Callable(o)
198+func manualFundTransfer (am,an) = {
199+ let S = o.caller.bytes
200+ let ao = fromBase58String(am)
201+ let J = o.payments[0].amount
202+ if ((o.payments[0].assetId == unit))
203+ then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), am), ScriptTransfer(Address(ao), J, unit)]
204+ else if ((o.payments[0].assetId == f))
205+ then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), am), ScriptTransfer(Address(ao), J, f)]
206+ else nil
183207 }
184208
185209
186210
187-@Callable(m)
188-func testBid (an) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
211+@Callable(o)
212+func testBid (ap) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
189213
190214
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 = 7
1313
14-let f = "bid"
14+let f = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
1515
16-let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
16+let g = base58''
1717
18-let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
18+let h = "bid"
1919
20-func i (j) = {
21- let k = assetInfo(j)
22- if ($isInstanceOf(k, "Asset"))
20+let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
21+
22+let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
23+
24+func k (l) = {
25+ let m = assetInfo(l)
26+ if ($isInstanceOf(m, "Asset"))
2327 then {
24- let l = k
25- if (if ((l.decimals == 0))
26- then (l.quantity == 1)
28+ let n = m
29+ if (if ((n.decimals == 0))
30+ then (n.quantity == 1)
2731 else false)
28- then (l.reissuable == false)
32+ then (n.reissuable == false)
2933 else false
3034 }
3135 else false
3236 }
3337
3438
35-@Callable(m)
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))]
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))]
4145 }
4246
4347
4448
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)))
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)))
5357 then throw("Token is not NFT")
54- else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
58+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), (B + C)), StringEntry(((toString(o.caller) + a) + d), (((toBase58String(F) + a) + toString(G)) + C))]
5559 }
5660
5761
5862
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"))
63+@Callable(o)
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+ if ($isInstanceOf(m, "String"))
6670 then {
67- let I = k
68- I
71+ let L = m
72+ L
6973 }
7074 else false
7175 }
72- let z = getStringValue(((((c + a) + E) + "_") + F))
73- if ((m.payments[0].assetId != unit))
74- then throw("Pay in waves")
75- else if ((F == toString(m.caller)))
76- then throw("current Owner of NFT not able to purchase")
77- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(F)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner")), StringEntry((("nft_" + F) + "_owner"), toString(m.caller)), StringEntry(((E + a) + "_owner"), toString(m.caller))]
76+ let B = getStringValue(((((c + a) + H) + "_") + I))
77+ if ((I == toString(o.caller)))
78+ then throw("current Owner of NFT not able to purchase")
79+ else if ((o.payments[0].assetId == f))
80+ then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(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+ else if ((o.payments[0].assetId == unit))
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+ else nil
7884 }
7985
8086
8187
82-@Callable(m)
83-func addAuction (J,K,L,M) = {
84- let y = toBase58String(m.transactionId)
85- let N = value(m.payments[0].assetId)
86- let z = value(L)
87- let O = (lastBlock.height + M)
88- let P = m.caller.bytes
89- let Q = {
90- let k = getString(this, (((toBase58String(N) + a) + "nft_status_") + toBase58String(P)))
91- if ($isInstanceOf(k, "String"))
88+@Callable(o)
89+func cancelSell (M) = {
90+ let A = toBase58String(o.transactionId)
91+ let D = o.caller.bytes
92+[StringEntry(((A + M) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(D), 1, fromBase58String(M))]
93+ }
94+
95+
96+
97+@Callable(o)
98+func addAuction (N,O,P,Q,C) = {
99+ let A = toBase58String(o.transactionId)
100+ let M = value(o.payments[0].assetId)
101+ let B = value(P)
102+ let R = (lastBlock.height + Q)
103+ let S = o.caller.bytes
104+ let T = {
105+ let m = getString(this, (((toBase58String(M) + a) + "nft_status_") + toBase58String(S)))
106+ if ($isInstanceOf(m, "String"))
92107 then {
93- let I = k
108+ let L = m
94109 true
95110 }
96111 else false
97112 }
98- if ((m.payments[0].assetId == unit))
99- then throw("NFT not attached")
100- else if ((Q == true))
101- then throw("Already in auction list")
102- else if ((M > e))
103- then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
104- else [StringEntry(((y + "nft_start_auction_date") + toBase58String(P)), J), StringEntry(((y + "nft_end_auction_date") + toBase58String(P)), K), StringEntry((y + "_nft_start_price"), L), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(N)), 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")]
113+ if ((T == true))
114+ then throw("Already in auction list")
115+ else if ((Q > e))
116+ then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
117+ else if ((o.payments[0].assetId == unit))
118+ then throw("NFT not attached")
119+ else if ((o.payments[0].assetId == f))
120+ then throw("NFT not attached")
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 + C)), 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")]
105122 }
106123
107124
108125
109-@Callable(m)
110-func placeBid (R,N,o,S) = {
111- let y = toBase58String(m.transactionId)
112- let P = m.caller.bytes
113- let j = fromBase58String(N)
114- let T = m.payments[0].amount
115- let U = getStringValue(this, (R + "_highest_bid"))
116- let V = getString(this, (R + "_previous_bidder"))
117- let W = getStringValue(this, (R + "_bidder_count"))
118- let X = getStringValue(this, (R + "_winner_of_nft"))
119- let Q = getStringValue(this, (R + "_nft_status"))
120- if ((m.payments[0].assetId != unit))
121- then throw("Pay in waves")
122- else if ((Q != "OPEN"))
123- then throw("Not open for auction")
124- else if ((parseIntValue(U) >= T))
125- then throw("Bid is less then starting/highest Bid")
126- else if ((U == "0"))
127- then [StringEntry((R + "_highest_bid"), toString(T)), StringEntry((R + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((R + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((R + "_nft_id"), toBase58String(j)), StringEntry((R + "_nft_owner"), o), StringEntry((((y + "_") + R) + "_highest_bid"), toString(T)), StringEntry((((y + "_") + R) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + R) + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((((y + "_") + R) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + R) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(P)), StringEntry((y + "_bid_price_place"), S), StringEntry((y + "_previous_bid_amount_refund_to_address"), X), StringEntry((y + "_prevoius_bid_amount_refund"), U)]
128- else [StringEntry((R + "_highest_bid"), toString(T)), StringEntry((R + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((R + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((R + "_nft_id"), toBase58String(j)), StringEntry((R + "_nft_owner"), o), StringEntry((((y + "_") + R) + "_highest_bid"), toString(T)), StringEntry((((y + "_") + R) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + R) + "_bidder_count"), toString((parseIntValue(W) + 1))), StringEntry((((y + "_") + R) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + R) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(P)), StringEntry((y + "_bid_price_place"), S), StringEntry((y + "_previous_bid_amount_refund_to_address"), X), StringEntry((y + "_prevoius_bid_amount_refund"), U), ScriptTransfer(Address(fromBase58String(X)), parseIntValue(U), unit)]
126+@Callable(o)
127+func placeBid (U,M,q,P,V) = {
128+ let A = toBase58String(o.transactionId)
129+ let S = o.caller.bytes
130+ let l = fromBase58String(M)
131+ let W = o.payments[0].amount
132+ let X = getStringValue(this, (U + "_highest_bid"))
133+ let Y = getString(this, (U + "_previous_bidder"))
134+ let Z = getStringValue(this, (U + "_bidder_count"))
135+ let aa = getStringValue(this, (U + "_winner_of_nft"))
136+ let T = getStringValue(this, (U + "_nft_status"))
137+ if ((T != "OPEN"))
138+ then throw("Not open for auction")
139+ else if ((parseIntValue(X) >= W))
140+ then throw("Bid is less then starting/highest Bid")
141+ else if ((X == "0"))
142+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X)]
143+ else if ((o.payments[0].assetId == unit))
144+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
145+ else if ((o.payments[0].assetId == f))
146+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(o.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(l)), StringEntry((U + "_nft_owner"), q), StringEntry((((A + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((A + "_") + U) + "_winner"), toBase58String(o.caller.bytes)), StringEntry((((A + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 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"), aa), StringEntry((A + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), f)]
147+ else nil
129148 }
130149
131150
132151
133-@Callable(m)
134-func acceptBidOffer (R,N,Y) = {
135- let y = toBase58String(m.transactionId)
136- let P = m.caller.bytes
137- let j = fromBase58String(N)
138- let Z = getStringValue(this, (R + "_highest_bid"))
139- let aa = getStringValue(this, (R + "_winner_of_nft"))
140-[ScriptTransfer(Address(P), parseIntValue(Z), unit), ScriptTransfer(Address(fromBase58String(aa)), 1, j), StringEntry((y + "_amount_paid_to_owner"), Z), StringEntry((y + "_nft_transfer_to"), aa), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((R + "_amount_paid_to_owner"), Z), StringEntry((R + "_nft_transfer_to"), aa), StringEntry((R + "_nft_status"), "REWARDED")]
152+@Callable(o)
153+func acceptBidOffer (U,M,ab) = {
154+ let A = toBase58String(o.transactionId)
155+ let S = o.caller.bytes
156+ let l = fromBase58String(M)
157+ let ac = getStringValue(this, (U + "_highest_bid"))
158+ let ad = getStringValue(this, (U + "_winner_of_nft"))
159+[ScriptTransfer(Address(S), parseIntValue(ac), f), ScriptTransfer(Address(fromBase58String(ad)), 1, l), StringEntry((A + "_amount_paid_to_owner"), ac), StringEntry((A + "_nft_transfer_to"), ad), StringEntry((A + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
141160 }
142161
143162
144163
145-@Callable(m)
146-func cancelAuction (R) = {
147- let y = toBase58String(m.transactionId)
148- let P = m.caller.bytes
149- let ab = getStringValue(this, (R + "_nft_status"))
150- let ac = getStringValue(this, (R + "_winner_of_nft"))
151- let ad = getStringValue(this, (R + "_nft_owner"))
152- let N = getStringValue(this, (R + "_nft_on_auction"))
153- let ae = getStringValue(this, (R + "_highest_bid"))
154- if ((ac == "0"))
155- then [StringEntry(((y + R) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ad)), 1, fromBase58String(N))]
156- else [StringEntry((R + "_nft_status"), "CANCELED"), StringEntry((R + "_previous_bid_amount_refund_to_address"), ac), StringEntry((R + "_prevoius_bid_amount_refund"), ae), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ac), StringEntry((y + "_prevoius_bid_amount_refund"), ae), ScriptTransfer(Address(fromBase58String(ad)), 1, fromBase58String(N)), ScriptTransfer(Address(fromBase58String(ac)), parseIntValue(ae), unit)]
164+@Callable(o)
165+func cancelAuction (U) = {
166+ let A = toBase58String(o.transactionId)
167+ let S = o.caller.bytes
168+ let ae = getStringValue(this, (U + "_nft_status"))
169+ let af = getStringValue(this, (U + "_winner_of_nft"))
170+ let ag = getStringValue(this, (U + "_nft_owner"))
171+ let M = getStringValue(this, (U + "_nft_on_auction"))
172+ let ah = getStringValue(this, (U + "_highest_bid"))
173+ if ((af == "0"))
174+ then [StringEntry(((A + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M))]
175+ else if ((o.payments[0].assetId == unit))
176+ then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), af), StringEntry((A + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
177+ else if ((o.payments[0].assetId == f))
178+ then [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((A + "_nft_status"), "CANCELED"), StringEntry((A + "_previous_bid_amount_refund_to_address"), af), StringEntry((A + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(M)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), f)]
179+ else nil
157180 }
158181
159182
160183
161-@Callable(m)
162-func withdrawBid (af) = {
163- let P = m.caller.bytes
164- let ag = getStringValue(this, (af + "_highest_bid"))
165- let ah = getStringValue(this, (af + "_winner"))
166- let ai = getStringValue(this, (af + "_nft_id"))
167- if ((toBase58String(P) != ah))
184+@Callable(o)
185+func withdrawBid (ai) = {
186+ let S = o.caller.bytes
187+ let aj = getStringValue(this, (ai + "_highest_bid"))
188+ let ak = getStringValue(this, (ai + "_winner"))
189+ let al = getStringValue(this, (ai + "_nft_id"))
190+ if ((toBase58String(S) != ak))
168191 then throw("No bid")
169- else [StringEntry((af + "_nft_bid"), "WITHDRAW"), StringEntry((af + "_nft_id"), ai), StringEntry((af + "_bidding_price_refund_amount"), ag), ScriptTransfer(m.caller, parseIntValue(ag), unit)]
192+ else [StringEntry((ai + "_nft_bid"), "WITHDRAW"), StringEntry((ai + "_nft_id"), al), StringEntry((ai + "_bidding_price_refund_amount"), aj), ScriptTransfer(o.caller, parseIntValue(aj), unit)]
170193 }
171194
172195
173196
174-@Callable(m)
175-func manualFundTransfer (aj,ak) = {
176- let P = m.caller.bytes
177- let al = fromBase58String(aj)
178- let G = m.payments[0].amount
179- let am = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
180- if ((toString(G) == ""))
181- then throw("Payment is not attached or empty")
182- else [IntegerEntry((toBase58String(P) + "_transfer"), G), StringEntry((toBase58String(P) + "_transfer_to"), aj), ScriptTransfer(Address(al), G, am)]
197+@Callable(o)
198+func manualFundTransfer (am,an) = {
199+ let S = o.caller.bytes
200+ let ao = fromBase58String(am)
201+ let J = o.payments[0].amount
202+ if ((o.payments[0].assetId == unit))
203+ then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), am), ScriptTransfer(Address(ao), J, unit)]
204+ else if ((o.payments[0].assetId == f))
205+ then [IntegerEntry((toBase58String(S) + "_transfer"), J), StringEntry((toBase58String(S) + "_transfer_to"), am), ScriptTransfer(Address(ao), J, f)]
206+ else nil
183207 }
184208
185209
186210
187-@Callable(m)
188-func testBid (an) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
211+@Callable(o)
212+func testBid (ap) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
189213
190214

github/deemru/w8io/169f3d6 
75.52 ms