tx · 3cJoW2DCyC8FA2cnPNw97txofMx188vqdkHWrEgK1oLs

3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F:  -0.01000000 Waves

2022.12.13 12:36 [2358375] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves

{ "type": 13, "id": "3cJoW2DCyC8FA2cnPNw97txofMx188vqdkHWrEgK1oLs", "fee": 1000000, "feeAssetId": null, "timestamp": 1670924286072, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "4Aahrh6fsksG7JQBsSFRqsomTAwNptpmeeCf3axkxCNaoJyYo4e1G8odeHMceoMYt9pGtaovD2d9Vm5KhtQLPm1U" ], "script": "base64:BgIZCAISCwoJCAgICAgBCAgIEgMKAQESAwoBCAkACXNlcGFyYXRvcgIBXwAEa0J1eQIDYnV5AAZrUHJpY2UCBXByaWNlAAVrU2VsbAIEc2VsbAASbWF4QXVjdGlvbkR1cmF0aW9uAAcABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMJAAACCAUFdG9rZW4IZGVjaW1hbHMAAAkAAAIIBQV0b2tlbghxdWFudGl0eQABBwkAAAIIBQV0b2tlbgpyZWlzc3VhYmxlBwcHAwFpAQljcmVhdGVOZnQJCG5mdF9uYW1lCW5mdF9vd25lcg9uZnRfZEFwcEFkZHJlc3MIbmZ0X3R5cGUIbmZ0X3RhZ3MRbmZ0X3Nlb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RpdmUoMTA1OCkBCQCsAgIJAKwCAgkArAICCQCsAgIFBmtQcmljZQUJc2VwYXJhdG9yBQVuZnRJRAIBXwUFb3duZXIEDWN1cnJlbnRfb3duZXIJARFAZXh0ck5hdGl2ZSgxMDU4KQEJAKwCAgkArAICBQVuZnRJRAUJc2VwYXJhdG9yAgVPd25lcgMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdW5pdAkAAgECDFBheSBpbiB3YXZlcwMJAAACBRBjaGVja093bmVySXNTYW1lCQClCAEIBQFpBmNhbGxlcgkAAgECIU93bmVyIG9mIE5GVCBub3QgYWJsZSB0byBwdXJjaGFzZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUHYXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUFb3duZXIFBmFtb3VudAUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkApQgBCAUBaQZjYWxsZXIFCXNlcGFyYXRvcgUEa0J1eQkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3IJAKQDAQUGYW1vdW50CQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkArAICAgRuZnRfBQVvd25lcgIGX293bmVyBQNuaWwApa8dLg==", "height": 2358375, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AuQwCUh6gu1EZfFDGtCb29Kd8P79YTWmWcebcYgpPb1f Next: 84UjADZjRJRewB83SCYu1bSzcG5GYU3WbA3Zpc37ZPxg Diff:
OldNewDifferences
5757
5858
5959 @Callable(m)
60-func buyNFT (E,F) = {
60+func buyNFT (E) = {
6161 let j = fromBase58String(E)
62+ let F = getStringValue(((E + a) + "Owner"))
6263 let G = value(m.payments[0].amount)
6364 let H = {
6465 let k = getString(this, (("nft_" + F) + "_owner"))
7071 else false
7172 }
7273 let z = getStringValue(((((c + a) + E) + "_") + F))
73- let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner")
74+ let J = getStringValue(((E + a) + "Owner"))
7475 if ((m.payments[0].assetId != unit))
7576 then throw("Pay in waves")
7677 else if ((H == toString(m.caller)))
7778 then throw("Owner of NFT not able to purchase")
78- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner"))]
79+ 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"))]
7980 }
80-
81-
82-
83-@Callable(m)
84-func addAuction (K,L,M,N) = {
85- let y = toBase58String(m.transactionId)
86- let O = value(m.payments[0].assetId)
87- let z = value(M)
88- let P = (lastBlock.height + N)
89- let Q = m.caller.bytes
90- let R = {
91- let k = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(Q)))
92- if ($isInstanceOf(k, "String"))
93- then {
94- let I = k
95- true
96- }
97- else false
98- }
99- if ((m.payments[0].assetId == unit))
100- then throw("NFT not attached")
101- else if ((R == true))
102- then throw("Already in auction list")
103- else if ((N > e))
104- then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
105- else [StringEntry(((y + "_nft_start_auction_date_") + toBase58String(Q)), K), StringEntry(((y + "_nft_end_auction_date_") + toBase58String(Q)), L), StringEntry((y + "_nft_start_price"), M), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(O)), StringEntry((y + "_previous_bidder"), "none"), StringEntry((y + "_highest_bid"), "0"), StringEntry((y + "_winner_of_nft"), "0"), StringEntry((y + "_bidder_count"), "0"), StringEntry((y + "_nft_status"), "OPEN")]
106- }
107-
108-
109-
110-@Callable(m)
111-func placeBid (S,O,o,T) = {
112- let y = toBase58String(m.transactionId)
113- let Q = m.caller.bytes
114- let j = fromBase58String(O)
115- let U = m.payments[0].amount
116- let V = getStringValue(this, (S + "_highest_bid"))
117- let W = getString(this, (S + "_previous_bidder"))
118- let X = getStringValue(this, (S + "_bidder_count"))
119- let Y = getStringValue(this, (S + "_winner_of_nft"))
120- let R = getStringValue(this, (S + "_nft_status"))
121- if ((m.payments[0].assetId != unit))
122- then throw("Pay in waves")
123- else if ((R != "OPEN"))
124- then throw("Not open for auction")
125- else if ((parseIntValue(V) >= U))
126- then throw("Bid is less then starting/highest Bid")
127- else if ((V == "0"))
128- then [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V)]
129- else [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V), ScriptTransfer(Address(fromBase58String(Y)), parseIntValue(V), unit)]
130- }
131-
132-
133-
134-@Callable(m)
135-func acceptBidOffer (S,O,Z) = {
136- let y = toBase58String(m.transactionId)
137- let Q = m.caller.bytes
138- let j = fromBase58String(O)
139- let aa = getStringValue(this, (S + "_highest_bid"))
140- let ab = getStringValue(this, (S + "_winner_of_nft"))
141-[ScriptTransfer(Address(Q), parseIntValue(aa), unit), ScriptTransfer(Address(fromBase58String(ab)), 1, j), StringEntry((y + "_amount_paid_to_owner"), aa), StringEntry((y + "_nft_transfer_to"), ab), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((S + "_amount_paid_to_owner"), aa), StringEntry((S + "_nft_transfer_to"), ab), StringEntry((S + "_nft_status"), "REWARDED")]
142- }
143-
144-
145-
146-@Callable(m)
147-func cancelAuction (S) = {
148- let y = toBase58String(m.transactionId)
149- let Q = m.caller.bytes
150- let ac = getStringValue(this, (S + "_nft_status"))
151- let ad = getStringValue(this, (S + "_winner_of_nft"))
152- let ae = getStringValue(this, (S + "_nft_owner"))
153- let O = getStringValue(this, (S + "_nft_on_auction"))
154- let af = getStringValue(this, (S + "_highest_bid"))
155- if ((ad == "0"))
156- then [StringEntry(((y + S) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O))]
157- else [StringEntry((S + "_nft_status"), "CANCELED"), StringEntry((S + "_previous_bid_amount_refund_to_address"), ad), StringEntry((S + "_prevoius_bid_amount_refund"), af), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ad), StringEntry((y + "_prevoius_bid_amount_refund"), af), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O)), ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(af), unit)]
158- }
159-
160-
161-
162-@Callable(m)
163-func withdrawBid (ag) = {
164- let Q = m.caller.bytes
165- let ah = getStringValue(this, (ag + "_highest_bid"))
166- let ai = getStringValue(this, (ag + "_winner"))
167- let aj = getStringValue(this, (ag + "_nft_id"))
168- if ((toBase58String(Q) != ai))
169- then throw("No bid")
170- else [StringEntry((ag + "_nft_bid"), "WITHDRAW"), StringEntry((ag + "_nft_id"), aj), StringEntry((ag + "_bidding_price_refund_amount"), ah), ScriptTransfer(m.caller, parseIntValue(ah), unit)]
171- }
172-
173-
174-
175-@Callable(m)
176-func testBid (ak) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
17781
17882
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(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))]
4141 }
4242
4343
4444
4545 @Callable(m)
4646 func sellNFT (z) = {
4747 let y = m.transactionId
4848 let A = m.caller.bytes
4949 let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
5050 let C = B._1
5151 let D = B._2
5252 if (!(i(C)))
5353 then throw("Token is not NFT")
5454 else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), toString(z)), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
5555 }
5656
5757
5858
5959 @Callable(m)
60-func buyNFT (E,F) = {
60+func buyNFT (E) = {
6161 let j = fromBase58String(E)
62+ let F = getStringValue(((E + a) + "Owner"))
6263 let G = value(m.payments[0].amount)
6364 let H = {
6465 let k = getString(this, (("nft_" + F) + "_owner"))
6566 if ($isInstanceOf(k, "String"))
6667 then {
6768 let I = k
6869 I
6970 }
7071 else false
7172 }
7273 let z = getStringValue(((((c + a) + E) + "_") + F))
73- let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner")
74+ let J = getStringValue(((E + a) + "Owner"))
7475 if ((m.payments[0].assetId != unit))
7576 then throw("Pay in waves")
7677 else if ((H == toString(m.caller)))
7778 then throw("Owner of NFT not able to purchase")
78- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner"))]
79+ 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"))]
7980 }
80-
81-
82-
83-@Callable(m)
84-func addAuction (K,L,M,N) = {
85- let y = toBase58String(m.transactionId)
86- let O = value(m.payments[0].assetId)
87- let z = value(M)
88- let P = (lastBlock.height + N)
89- let Q = m.caller.bytes
90- let R = {
91- let k = getString(this, (((toBase58String(O) + a) + "nft_status_") + toBase58String(Q)))
92- if ($isInstanceOf(k, "String"))
93- then {
94- let I = k
95- true
96- }
97- else false
98- }
99- if ((m.payments[0].assetId == unit))
100- then throw("NFT not attached")
101- else if ((R == true))
102- then throw("Already in auction list")
103- else if ((N > e))
104- then throw(("Duration is too long. Must be less than or equal to 7 " + toString(e)))
105- else [StringEntry(((y + "_nft_start_auction_date_") + toBase58String(Q)), K), StringEntry(((y + "_nft_end_auction_date_") + toBase58String(Q)), L), StringEntry((y + "_nft_start_price"), M), StringEntry((y + "_nft_owner"), toString(m.caller)), StringEntry((y + "_nft_on_auction"), toBase58String(O)), StringEntry((y + "_previous_bidder"), "none"), StringEntry((y + "_highest_bid"), "0"), StringEntry((y + "_winner_of_nft"), "0"), StringEntry((y + "_bidder_count"), "0"), StringEntry((y + "_nft_status"), "OPEN")]
106- }
107-
108-
109-
110-@Callable(m)
111-func placeBid (S,O,o,T) = {
112- let y = toBase58String(m.transactionId)
113- let Q = m.caller.bytes
114- let j = fromBase58String(O)
115- let U = m.payments[0].amount
116- let V = getStringValue(this, (S + "_highest_bid"))
117- let W = getString(this, (S + "_previous_bidder"))
118- let X = getStringValue(this, (S + "_bidder_count"))
119- let Y = getStringValue(this, (S + "_winner_of_nft"))
120- let R = getStringValue(this, (S + "_nft_status"))
121- if ((m.payments[0].assetId != unit))
122- then throw("Pay in waves")
123- else if ((R != "OPEN"))
124- then throw("Not open for auction")
125- else if ((parseIntValue(V) >= U))
126- then throw("Bid is less then starting/highest Bid")
127- else if ((V == "0"))
128- then [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V)]
129- else [StringEntry((S + "_highest_bid"), toString(U)), StringEntry((S + "_winner_of_nft"), toBase58String(m.caller.bytes)), StringEntry((S + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((S + "_nft_id"), toBase58String(j)), StringEntry((S + "_nft_owner"), o), StringEntry((((y + "_") + S) + "_highest_bid"), toString(U)), StringEntry((((y + "_") + S) + "_winner"), toBase58String(m.caller.bytes)), StringEntry((((y + "_") + S) + "_bidder_count"), toString((parseIntValue(X) + 1))), StringEntry((((y + "_") + S) + "_nft_id"), toBase58String(j)), StringEntry((((y + "_") + S) + "_nft_owner"), o), StringEntry((y + "_bid_for_nft_by"), toBase58String(Q)), StringEntry((y + "_bid_price_place"), T), StringEntry((y + "_previous_bid_amount_refund_to_address"), Y), StringEntry((y + "_prevoius_bid_amount_refund"), V), ScriptTransfer(Address(fromBase58String(Y)), parseIntValue(V), unit)]
130- }
131-
132-
133-
134-@Callable(m)
135-func acceptBidOffer (S,O,Z) = {
136- let y = toBase58String(m.transactionId)
137- let Q = m.caller.bytes
138- let j = fromBase58String(O)
139- let aa = getStringValue(this, (S + "_highest_bid"))
140- let ab = getStringValue(this, (S + "_winner_of_nft"))
141-[ScriptTransfer(Address(Q), parseIntValue(aa), unit), ScriptTransfer(Address(fromBase58String(ab)), 1, j), StringEntry((y + "_amount_paid_to_owner"), aa), StringEntry((y + "_nft_transfer_to"), ab), StringEntry((y + "_nft_status"), "REWARDED"), StringEntry((S + "_amount_paid_to_owner"), aa), StringEntry((S + "_nft_transfer_to"), ab), StringEntry((S + "_nft_status"), "REWARDED")]
142- }
143-
144-
145-
146-@Callable(m)
147-func cancelAuction (S) = {
148- let y = toBase58String(m.transactionId)
149- let Q = m.caller.bytes
150- let ac = getStringValue(this, (S + "_nft_status"))
151- let ad = getStringValue(this, (S + "_winner_of_nft"))
152- let ae = getStringValue(this, (S + "_nft_owner"))
153- let O = getStringValue(this, (S + "_nft_on_auction"))
154- let af = getStringValue(this, (S + "_highest_bid"))
155- if ((ad == "0"))
156- then [StringEntry(((y + S) + "_nft_status"), "CANCELED"), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O))]
157- else [StringEntry((S + "_nft_status"), "CANCELED"), StringEntry((S + "_previous_bid_amount_refund_to_address"), ad), StringEntry((S + "_prevoius_bid_amount_refund"), af), StringEntry((y + "_nft_status"), "CANCELED"), StringEntry((y + "_previous_bid_amount_refund_to_address"), ad), StringEntry((y + "_prevoius_bid_amount_refund"), af), ScriptTransfer(Address(fromBase58String(ae)), 1, fromBase58String(O)), ScriptTransfer(Address(fromBase58String(ad)), parseIntValue(af), unit)]
158- }
159-
160-
161-
162-@Callable(m)
163-func withdrawBid (ag) = {
164- let Q = m.caller.bytes
165- let ah = getStringValue(this, (ag + "_highest_bid"))
166- let ai = getStringValue(this, (ag + "_winner"))
167- let aj = getStringValue(this, (ag + "_nft_id"))
168- if ((toBase58String(Q) != ai))
169- then throw("No bid")
170- else [StringEntry((ag + "_nft_bid"), "WITHDRAW"), StringEntry((ag + "_nft_id"), aj), StringEntry((ag + "_bidding_price_refund_amount"), ah), ScriptTransfer(m.caller, parseIntValue(ah), unit)]
171- }
172-
173-
174-
175-@Callable(m)
176-func testBid (ak) = [StringEntry("E8kkFBYCy44JJaq6pAZ6KizsuResi5UKNhbD1WNZwhhY_highest_bid", "0")]
17781
17882

github/deemru/w8io/169f3d6 
115.72 ms