tx · 3VssaqgX31BCvDCi9fx94qky9wAkU14okyZzEMJJuAko

3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq:  -0.05000000 Waves

2022.12.15 10:21 [2361115] smart account 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq > SELF 0.00000000 Waves

{ "type": 13, "id": "3VssaqgX31BCvDCi9fx94qky9wAkU14okyZzEMJJuAko", "fee": 5000000, "feeAssetId": null, "timestamp": 1671088909663, "version": 2, "chainId": 84, "sender": "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq", "senderPublicKey": "H6UqxUDcJamDRg1uykVcWMn4zhAMTV7i1nfPq1moLWmJ", "proofs": [ "5ebZV6RZx94MGoHH4E8xnZzXwBMA3CMnL8phrZT9RsJdgN3zTh2AQSnJFAzYrwusALXGaYWsP5ZoB9UoSzwdUvmk" ], "script": "base64:BgJBCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggIEgYKBAgICAESBgoECAgICBIFCgMICAESAwoBCBIDCgEIEgMKAQgJAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwAEm1heEF1Y3Rpb25EdXJhdGlvbgAHAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmVpc3N1YWJsZQcHBwkBaQEJY3JlYXRlTmZ0CQhuZnRfbmFtZQluZnRfb3duZXIPbmZ0X2RBcHBBZGRyZX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IAgkBC1N0cmluZ0VudHJ5AgkArAICBQdiaWRUeElkAhxfYmlkZGluZ19wcmljZV9yZWZ1bmRfYW1vdW50BQhiaWRQcmljZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIJAQ1wYXJzZUludFZhbHVlAQUIYmlkUHJpY2UFBHVuaXQFA25pbAFpAQd0ZXN0QmlkAQRkYXRhCQDMCAIJAQtTdHJpbmdFbnRyeQICOEU4a2tGQllDeTQ0SkphcTZwQVo2S2l6c3VSZXNpNVVLTmhiRDFXTlp3aGhZX2hpZ2hlc3RfYmlkAgEwBQNuaWwAIcNXKQ==", "height": 2361115, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6MTypCYKNsJew3s8rUUzXw7EBG6VRAxA3QDjJzYr3C1x Next: 8ERcviQkRa4qnQft6YLqYV4eYBQPb7wrTHrF2Ve61Ked Diff:
OldNewDifferences
5858
5959
6060 @Callable(m)
61-func buyNFT (F,G) = {
61+func buyNFT (A,F) = {
6262 let j = fromBase58String(F)
63- let H = value(m.payments[0].amount)
64- let I = {
65- let k = getString(this, (("nft_" + G) + "_owner"))
66- if ($isInstanceOf(k, "String"))
67- then {
68- let J = k
69- J
70- }
71- else false
72- }
73- let z = getStringValue(((((c + a) + F) + "_") + G))
74- let K = valueOrErrorMessage(getStringValue(((F + a) + "Owner")), "No owner")
63+ let G = m.transactionId
64+ let H = getStringValue(this, (A + "_owner"))
65+ let I = value(m.payments[0].amount)
66+ let z = getStringValue(((((c + a) + F) + "_") + H))
67+ let J = valueOrErrorMessage(getStringValue(((F + a) + "Owner")), "No owner")
7568 if ((m.payments[0].assetId != unit))
7669 then throw("Pay in waves")
77- else if ((G == toString(m.caller)))
78- then throw("current Owner of NFT not able to purchase")
79- else if ((K == toString(m.caller)))
80- then throw("owner never buy after sell")
81- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(K)), H, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(H))), DeleteEntry((("nft_" + G) + "_owner")), StringEntry((("nft_" + G) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
70+ else if ((H == toString(m.caller)))
71+ then throw("Not eligible to buy as you are owner")
72+ else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), I, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
8273 }
8374
8475
8576
8677 @Callable(m)
87-func addAuction (L,M,N,O) = {
88- let P = toBase58String(m.transactionId)
89- let Q = value(m.payments[0].assetId)
90- let z = value(N)
91- let R = (lastBlock.height + O)
92- let S = m.caller.bytes
93- let T = {
94- let k = getString(this, (((toBase58String(Q) + a) + "nft_status_") + toBase58String(S)))
78+func addAuction (K,L,M,N) = {
79+ let O = toBase58String(m.transactionId)
80+ let P = value(m.payments[0].assetId)
81+ let z = value(M)
82+ let Q = (lastBlock.height + N)
83+ let R = m.caller.bytes
84+ let S = {
85+ let k = getString(this, (((toBase58String(P) + a) + "nft_status_") + toBase58String(R)))
9586 if ($isInstanceOf(k, "String"))
9687 then {
97- let J = k
88+ let T = k
9889 true
9990 }
10091 else false
10192 }
10293 if ((m.payments[0].assetId == unit))
10394 then throw("NFT not attached")
104- else if ((T == true))
95+ else if ((S == true))
10596 then throw("Already in auction list")
106- else if ((O > e))
97+ else if ((N > e))
10798 then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
108- else [StringEntry(((P + "nft_start_auction_date") + toBase58String(S)), L), StringEntry(((P + "nft_end_auction_date") + toBase58String(S)), M), StringEntry((P + "_nft_start_price"), N), StringEntry((P + "_nft_owner"), toString(m.caller)), StringEntry((P + "_nft_on_auction"), toBase58String(Q)), StringEntry((P + "_previous_bidder"), "none"), StringEntry((P + "_highest_bid"), "0"), StringEntry((P + "_winner_of_nft"), "0"), StringEntry((P + "_bidder_count"), "0"), StringEntry((P + "_nft_status"), "OPEN")]
99+ else [StringEntry(((O + "nft_start_auction_date") + toBase58String(R)), K), StringEntry(((O + "nft_end_auction_date") + toBase58String(R)), L), StringEntry((O + "_nft_start_price"), M), StringEntry((O + "_nft_owner"), toString(m.caller)), StringEntry((O + "_nft_on_auction"), toBase58String(P)), StringEntry((O + "_previous_bidder"), "none"), StringEntry((O + "_highest_bid"), "0"), StringEntry((O + "_winner_of_nft"), "0"), StringEntry((O + "_bidder_count"), "0"), StringEntry((O + "_nft_status"), "OPEN")]
109100 }
110101
111102
112103
113104 @Callable(m)
114-func placeBid (U,Q,o,V) = {
115- let P = toBase58String(m.transactionId)
116- let S = m.caller.bytes
117- let j = fromBase58String(Q)
105+func placeBid (U,P,o,V) = {
106+ let O = toBase58String(m.transactionId)
107+ let R = m.caller.bytes
108+ let j = fromBase58String(P)
118109 let W = m.payments[0].amount
119110 let X = getStringValue(this, (U + "_highest_bid"))
120111 let Y = getString(this, (U + "_previous_bidder"))
121112 let Z = getStringValue(this, (U + "_bidder_count"))
122113 let aa = getStringValue(this, (U + "_winner_of_nft"))
123- let T = getStringValue(this, (U + "_nft_status"))
114+ let S = getStringValue(this, (U + "_nft_status"))
124115 if ((m.payments[0].assetId != unit))
125116 then throw("Pay in waves")
126- else if ((T != "OPEN"))
117+ else if ((S != "OPEN"))
127118 then throw("Not open for auction")
128119 else if ((parseIntValue(X) >= W))
129120 then throw("Bid is less then starting/highest Bid")
130121 else if ((X == "0"))
131- then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((P + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((P + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((P + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((P + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((P + "_") + U) + "_nft_owner"), o), StringEntry((P + "_bid_for_nft_by"), toBase58String(S)), StringEntry((P + "_bid_price_place"), V), StringEntry((P + "_previous_bid_amount_refund_to_address"), aa), StringEntry((P + "_prevoius_bid_amount_refund"), X)]
132- else [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((P + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((P + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((P + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((P + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((P + "_") + U) + "_nft_owner"), o), StringEntry((P + "_bid_for_nft_by"), toBase58String(S)), StringEntry((P + "_bid_price_place"), V), StringEntry((P + "_previous_bid_amount_refund_to_address"), aa), StringEntry((P + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
122+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((O + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((O + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((O + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((O + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((O + "_") + U) + "_nft_owner"), o), StringEntry((O + "_bid_for_nft_by"), toBase58String(R)), StringEntry((O + "_bid_price_place"), V), StringEntry((O + "_previous_bid_amount_refund_to_address"), aa), StringEntry((O + "_prevoius_bid_amount_refund"), X)]
123+ else [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((O + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((O + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((O + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((O + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((O + "_") + U) + "_nft_owner"), o), StringEntry((O + "_bid_for_nft_by"), toBase58String(R)), StringEntry((O + "_bid_price_place"), V), StringEntry((O + "_previous_bid_amount_refund_to_address"), aa), StringEntry((O + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
133124 }
134125
135126
136127
137128 @Callable(m)
138-func acceptBidOffer (U,Q,ab) = {
139- let P = toBase58String(m.transactionId)
140- let S = m.caller.bytes
141- let j = fromBase58String(Q)
129+func acceptBidOffer (U,P,ab) = {
130+ let O = toBase58String(m.transactionId)
131+ let R = m.caller.bytes
132+ let j = fromBase58String(P)
142133 let ac = getStringValue(this, (U + "_highest_bid"))
143134 let ad = getStringValue(this, (U + "_winner_of_nft"))
144-[ScriptTransfer(Address(S), parseIntValue(ac), unit), ScriptTransfer(Address(fromBase58String(ad)), 1, j), StringEntry((P + "_amount_paid_to_owner"), ac), StringEntry((P + "_nft_transfer_to"), ad), StringEntry((P + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
135+[ScriptTransfer(Address(R), parseIntValue(ac), unit), ScriptTransfer(Address(fromBase58String(ad)), 1, j), StringEntry((O + "_amount_paid_to_owner"), ac), StringEntry((O + "_nft_transfer_to"), ad), StringEntry((O + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
145136 }
146137
147138
148139
149140 @Callable(m)
150141 func cancelAuction (U) = {
151- let P = toBase58String(m.transactionId)
152- let S = m.caller.bytes
142+ let O = toBase58String(m.transactionId)
143+ let R = m.caller.bytes
153144 let ae = getStringValue(this, (U + "_nft_status"))
154145 let af = getStringValue(this, (U + "_winner_of_nft"))
155146 let ag = getStringValue(this, (U + "_nft_owner"))
156- let Q = getStringValue(this, (U + "_nft_on_auction"))
147+ let P = getStringValue(this, (U + "_nft_on_auction"))
157148 let ah = getStringValue(this, (U + "_highest_bid"))
158149 if ((af == "0"))
159- then [StringEntry(((P + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(Q))]
160- else [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((P + "_nft_status"), "CANCELED"), StringEntry((P + "_previous_bid_amount_refund_to_address"), af), StringEntry((P + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(Q)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
150+ then [StringEntry(((O + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(P))]
151+ else [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((O + "_nft_status"), "CANCELED"), StringEntry((O + "_previous_bid_amount_refund_to_address"), af), StringEntry((O + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
161152 }
162153
163154
164155
165156 @Callable(m)
166157 func withdrawBid (ai) = {
167- let S = m.caller.bytes
158+ let R = m.caller.bytes
168159 let aj = getStringValue(this, (ai + "_highest_bid"))
169160 let ak = getStringValue(this, (ai + "_winner"))
170161 let al = getStringValue(this, (ai + "_nft_id"))
171- if ((toBase58String(S) != ak))
162+ if ((toBase58String(R) != ak))
172163 then throw("No bid")
173164 else [StringEntry((ai + "_nft_bid"), "WITHDRAW"), StringEntry((ai + "_nft_id"), al), StringEntry((ai + "_bidding_price_refund_amount"), aj), ScriptTransfer(m.caller, parseIntValue(aj), unit)]
174165 }
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
1414 let f = "bid"
1515
1616 let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
1717
1818 let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
1919
2020 func i (j) = {
2121 let k = assetInfo(j)
2222 if ($isInstanceOf(k, "Asset"))
2323 then {
2424 let l = k
2525 if (if ((l.decimals == 0))
2626 then (l.quantity == 1)
2727 else false)
2828 then (l.reissuable == false)
2929 else false
3030 }
3131 else false
3232 }
3333
3434
3535 @Callable(m)
3636 func createNft (n,o,p,q,r,s,t,u,v) = {
3737 let w = Issue(n, t, 1, 0, false)
3838 let x = calculateAssetId(w)
3939 let y = m.transactionId
4040 [w, ScriptTransfer(m.caller, 1, x), StringEntry(((toBase58String(y) + a) + "owner"), toString(m.caller)), StringEntry((toBase58String(x) + "_owner"), toString(m.caller)), StringEntry(((toBase58String(y) + a) + "nft_type"), q), StringEntry(((toBase58String(y) + a) + "nft_tags"), r), StringEntry(((toBase58String(y) + a) + "nft_dAppAddress"), p), IntegerEntry(((toBase58String(y) + a) + "nft_selling_price"), s), StringEntry(((toBase58String(y) + a) + "nft_onSell"), u), StringEntry(((toBase58String(y) + a) + "nft_data"), v), StringEntry(((toBase58String(y) + a) + "issue_nft"), toBase58String(x))]
4141 }
4242
4343
4444
4545 @Callable(m)
4646 func sellNFT (y,z) = {
4747 let A = m.transactionId
4848 let j = getStringValue(this, (y + "_owner"))
4949 let B = m.caller.bytes
5050 let C = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
5151 let D = C._1
5252 let E = C._2
5353 if (!(i(D)))
5454 then throw("Token is not NFT")
5555 else [StringEntry((toBase58String(A) + "_owner"), toString(m.caller)), StringEntry((toBase58String(A) + "_nft_selling_price"), z), StringEntry((toBase58String(A) + "_nft_puton_sell"), j), StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(D) + a) + toString(E)))]
5656 }
5757
5858
5959
6060 @Callable(m)
61-func buyNFT (F,G) = {
61+func buyNFT (A,F) = {
6262 let j = fromBase58String(F)
63- let H = value(m.payments[0].amount)
64- let I = {
65- let k = getString(this, (("nft_" + G) + "_owner"))
66- if ($isInstanceOf(k, "String"))
67- then {
68- let J = k
69- J
70- }
71- else false
72- }
73- let z = getStringValue(((((c + a) + F) + "_") + G))
74- let K = valueOrErrorMessage(getStringValue(((F + a) + "Owner")), "No owner")
63+ let G = m.transactionId
64+ let H = getStringValue(this, (A + "_owner"))
65+ let I = value(m.payments[0].amount)
66+ let z = getStringValue(((((c + a) + F) + "_") + H))
67+ let J = valueOrErrorMessage(getStringValue(((F + a) + "Owner")), "No owner")
7568 if ((m.payments[0].assetId != unit))
7669 then throw("Pay in waves")
77- else if ((G == toString(m.caller)))
78- then throw("current Owner of NFT not able to purchase")
79- else if ((K == toString(m.caller)))
80- then throw("owner never buy after sell")
81- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(K)), H, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(H))), DeleteEntry((("nft_" + G) + "_owner")), StringEntry((("nft_" + G) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
70+ else if ((H == toString(m.caller)))
71+ then throw("Not eligible to buy as you are owner")
72+ else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), I, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
8273 }
8374
8475
8576
8677 @Callable(m)
87-func addAuction (L,M,N,O) = {
88- let P = toBase58String(m.transactionId)
89- let Q = value(m.payments[0].assetId)
90- let z = value(N)
91- let R = (lastBlock.height + O)
92- let S = m.caller.bytes
93- let T = {
94- let k = getString(this, (((toBase58String(Q) + a) + "nft_status_") + toBase58String(S)))
78+func addAuction (K,L,M,N) = {
79+ let O = toBase58String(m.transactionId)
80+ let P = value(m.payments[0].assetId)
81+ let z = value(M)
82+ let Q = (lastBlock.height + N)
83+ let R = m.caller.bytes
84+ let S = {
85+ let k = getString(this, (((toBase58String(P) + a) + "nft_status_") + toBase58String(R)))
9586 if ($isInstanceOf(k, "String"))
9687 then {
97- let J = k
88+ let T = k
9889 true
9990 }
10091 else false
10192 }
10293 if ((m.payments[0].assetId == unit))
10394 then throw("NFT not attached")
104- else if ((T == true))
95+ else if ((S == true))
10596 then throw("Already in auction list")
106- else if ((O > e))
97+ else if ((N > e))
10798 then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
108- else [StringEntry(((P + "nft_start_auction_date") + toBase58String(S)), L), StringEntry(((P + "nft_end_auction_date") + toBase58String(S)), M), StringEntry((P + "_nft_start_price"), N), StringEntry((P + "_nft_owner"), toString(m.caller)), StringEntry((P + "_nft_on_auction"), toBase58String(Q)), StringEntry((P + "_previous_bidder"), "none"), StringEntry((P + "_highest_bid"), "0"), StringEntry((P + "_winner_of_nft"), "0"), StringEntry((P + "_bidder_count"), "0"), StringEntry((P + "_nft_status"), "OPEN")]
99+ else [StringEntry(((O + "nft_start_auction_date") + toBase58String(R)), K), StringEntry(((O + "nft_end_auction_date") + toBase58String(R)), L), StringEntry((O + "_nft_start_price"), M), StringEntry((O + "_nft_owner"), toString(m.caller)), StringEntry((O + "_nft_on_auction"), toBase58String(P)), StringEntry((O + "_previous_bidder"), "none"), StringEntry((O + "_highest_bid"), "0"), StringEntry((O + "_winner_of_nft"), "0"), StringEntry((O + "_bidder_count"), "0"), StringEntry((O + "_nft_status"), "OPEN")]
109100 }
110101
111102
112103
113104 @Callable(m)
114-func placeBid (U,Q,o,V) = {
115- let P = toBase58String(m.transactionId)
116- let S = m.caller.bytes
117- let j = fromBase58String(Q)
105+func placeBid (U,P,o,V) = {
106+ let O = toBase58String(m.transactionId)
107+ let R = m.caller.bytes
108+ let j = fromBase58String(P)
118109 let W = m.payments[0].amount
119110 let X = getStringValue(this, (U + "_highest_bid"))
120111 let Y = getString(this, (U + "_previous_bidder"))
121112 let Z = getStringValue(this, (U + "_bidder_count"))
122113 let aa = getStringValue(this, (U + "_winner_of_nft"))
123- let T = getStringValue(this, (U + "_nft_status"))
114+ let S = getStringValue(this, (U + "_nft_status"))
124115 if ((m.payments[0].assetId != unit))
125116 then throw("Pay in waves")
126- else if ((T != "OPEN"))
117+ else if ((S != "OPEN"))
127118 then throw("Not open for auction")
128119 else if ((parseIntValue(X) >= W))
129120 then throw("Bid is less then starting/highest Bid")
130121 else if ((X == "0"))
131- then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((P + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((P + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((P + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((P + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((P + "_") + U) + "_nft_owner"), o), StringEntry((P + "_bid_for_nft_by"), toBase58String(S)), StringEntry((P + "_bid_price_place"), V), StringEntry((P + "_previous_bid_amount_refund_to_address"), aa), StringEntry((P + "_prevoius_bid_amount_refund"), X)]
132- else [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((P + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((P + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((P + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((P + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((P + "_") + U) + "_nft_owner"), o), StringEntry((P + "_bid_for_nft_by"), toBase58String(S)), StringEntry((P + "_bid_price_place"), V), StringEntry((P + "_previous_bid_amount_refund_to_address"), aa), StringEntry((P + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
122+ then [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((O + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((O + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((O + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((O + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((O + "_") + U) + "_nft_owner"), o), StringEntry((O + "_bid_for_nft_by"), toBase58String(R)), StringEntry((O + "_bid_price_place"), V), StringEntry((O + "_previous_bid_amount_refund_to_address"), aa), StringEntry((O + "_prevoius_bid_amount_refund"), X)]
123+ else [StringEntry((U + "_highest_bid"), toString(W)), StringEntry((U + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((U + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((U + "_nft_id"), toBase58String(j)), StringEntry((U + "_nft_owner"), o), StringEntry((((O + "_") + U) + "_highest_bid"), toString(W)), StringEntry((((O + "_") + U) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((O + "_") + U) + "_bidder_count"), toString((parseIntValue(Z) + 1))), StringEntry((((O + "_") + U) + "_nft_id"), toBase58String(j)), StringEntry((((O + "_") + U) + "_nft_owner"), o), StringEntry((O + "_bid_for_nft_by"), toBase58String(R)), StringEntry((O + "_bid_price_place"), V), StringEntry((O + "_previous_bid_amount_refund_to_address"), aa), StringEntry((O + "_prevoius_bid_amount_refund"), X), ScriptTransfer(Address(fromBase58String(aa)), parseIntValue(X), unit)]
133124 }
134125
135126
136127
137128 @Callable(m)
138-func acceptBidOffer (U,Q,ab) = {
139- let P = toBase58String(m.transactionId)
140- let S = m.caller.bytes
141- let j = fromBase58String(Q)
129+func acceptBidOffer (U,P,ab) = {
130+ let O = toBase58String(m.transactionId)
131+ let R = m.caller.bytes
132+ let j = fromBase58String(P)
142133 let ac = getStringValue(this, (U + "_highest_bid"))
143134 let ad = getStringValue(this, (U + "_winner_of_nft"))
144-[ScriptTransfer(Address(S), parseIntValue(ac), unit), ScriptTransfer(Address(fromBase58String(ad)), 1, j), StringEntry((P + "_amount_paid_to_owner"), ac), StringEntry((P + "_nft_transfer_to"), ad), StringEntry((P + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
135+[ScriptTransfer(Address(R), parseIntValue(ac), unit), ScriptTransfer(Address(fromBase58String(ad)), 1, j), StringEntry((O + "_amount_paid_to_owner"), ac), StringEntry((O + "_nft_transfer_to"), ad), StringEntry((O + "_nft_status"), "REWARDED"), StringEntry((U + "_amount_paid_to_owner"), ac), StringEntry((U + "_nft_transfer_to"), ad), StringEntry((U + "_nft_status"), "REWARDED")]
145136 }
146137
147138
148139
149140 @Callable(m)
150141 func cancelAuction (U) = {
151- let P = toBase58String(m.transactionId)
152- let S = m.caller.bytes
142+ let O = toBase58String(m.transactionId)
143+ let R = m.caller.bytes
153144 let ae = getStringValue(this, (U + "_nft_status"))
154145 let af = getStringValue(this, (U + "_winner_of_nft"))
155146 let ag = getStringValue(this, (U + "_nft_owner"))
156- let Q = getStringValue(this, (U + "_nft_on_auction"))
147+ let P = getStringValue(this, (U + "_nft_on_auction"))
157148 let ah = getStringValue(this, (U + "_highest_bid"))
158149 if ((af == "0"))
159- then [StringEntry(((P + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(Q))]
160- else [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((P + "_nft_status"), "CANCELED"), StringEntry((P + "_previous_bid_amount_refund_to_address"), af), StringEntry((P + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(Q)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
150+ then [StringEntry(((O + U) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(P))]
151+ else [StringEntry((U + "_nft_status"), "CANCELED"), StringEntry((U + "_previous_bid_amount_refund_to_address"), af), StringEntry((U + "_prevoius_bid_amount_refund"), ah), StringEntry((O + "_nft_status"), "CANCELED"), StringEntry((O + "_previous_bid_amount_refund_to_address"), af), StringEntry((O + "_prevoius_bid_amount_refund"), ah), ScriptTransfer(Address(fromBase58String(ag)), 1, fromBase58String(P)), ScriptTransfer(Address(fromBase58String(af)), parseIntValue(ah), unit)]
161152 }
162153
163154
164155
165156 @Callable(m)
166157 func withdrawBid (ai) = {
167- let S = m.caller.bytes
158+ let R = m.caller.bytes
168159 let aj = getStringValue(this, (ai + "_highest_bid"))
169160 let ak = getStringValue(this, (ai + "_winner"))
170161 let al = getStringValue(this, (ai + "_nft_id"))
171- if ((toBase58String(S) != ak))
162+ if ((toBase58String(R) != ak))
172163 then throw("No bid")
173164 else [StringEntry((ai + "_nft_bid"), "WITHDRAW"), StringEntry((ai + "_nft_id"), al), StringEntry((ai + "_bidding_price_refund_amount"), aj), ScriptTransfer(m.caller, parseIntValue(aj), unit)]
174165 }
175166
176167
177168
178169 @Callable(m)
179170 func testBid (am) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
180171
181172

github/deemru/w8io/169f3d6 
123.66 ms