tx · 9UPrANKmT9wy8jAg7C5hfNfCQr4WNXBxGxw8J93QCt94

3NC2359r28GxfTsUuRbA4fyPuoWuqqc7EUj:  -0.00800000 Waves

2022.11.10 14:30 [2310995] smart account 3NC2359r28GxfTsUuRbA4fyPuoWuqqc7EUj > SELF 0.00000000 Waves

{ "type": 13, "id": "9UPrANKmT9wy8jAg7C5hfNfCQr4WNXBxGxw8J93QCt94", "fee": 800000, "feeAssetId": null, "timestamp": 1668079975878, "version": 2, "chainId": 84, "sender": "3NC2359r28GxfTsUuRbA4fyPuoWuqqc7EUj", "senderPublicKey": "27RWtsg8K9Ap3FQoM1o5UWJR2qxovyc7E18YG5TDqAms", "proofs": [ "b11p24wSCQJaLZxNszsuyhjG6KRp8wJBBhNMGywWWdJbneeaRcgKH6mecKoDQn6P69nKaMJN6up1YvbLJ7WDMzV" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEQEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgEOYXNzZXRPZmZlclN3YXABBWFzc2V0CQCsAgIFBWFzc2V0AgZfb2ZmZXIBDXRyeUdldEludGVnZXIBA2tleQQDdmFsBAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAUDdmFsAQx0cn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QtEZWxldGVFbnRyeQEJAKwCAgkBCHByaWNlS2V5AQUHb2ZmZXJJZAIEU3dhcAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgIJAQhvd25lcktleQEFB29mZmVySWQCBFN3YXAJAMwIAgkBC0RlbGV0ZUVudHJ5AQkArAICCQEJaXNzdWVyS2V5AQUHb2ZmZXJJZAIEU3dhcAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgIJAQphc3NldE9mZmVyAQUHb2ZmZXJJZAIEU3dhcAUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledxzwr8=", "height": 2310995, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func priceKey (asset) = (asset + "_price")
5+
6+
7+func ownerKey (asset) = (asset + "_owner")
8+
9+
10+func issuerKey (asset) = (asset + "_issuer")
11+
12+
13+func nameKey (asset) = (asset + "_name")
14+
15+
16+func descriptionKey (asset) = (asset + "_description")
17+
18+
19+func assetAccess (asset) = (asset + "_assetBuy")
20+
21+
22+func assetOffer (asset) = (asset + "_offer")
23+
24+
25+func assetOfferSwap (asset) = (asset + "_offer")
26+
27+
28+func tryGetInteger (key) = {
29+ let val = match getInteger(this, key) {
30+ case b: Int =>
31+ b
32+ case _ =>
33+ 0
34+ }
35+ val
36+ }
37+
38+
39+func tryGetString (key) = {
40+ let val = match getString(this, key) {
41+ case b: String =>
42+ b
43+ case _ =>
44+ ""
45+ }
46+ val
47+ }
48+
49+
50+func tryGetBool (key) = {
51+ let val = match getBoolean(this, key) {
52+ case b: Boolean =>
53+ b
54+ case _ =>
55+ false
56+ }
57+ val
58+ }
59+
60+
61+func isPaymentOk (i,acceptableAssetId,price) = if ((size(i.payments) == 0))
62+ then throw("Payment not attached")
63+ else {
64+ let p = value(i.payments[0])
65+ let val = match p.assetId {
66+ case assetId: ByteVector =>
67+ if ((toBase58String(assetId) == acceptableAssetId))
68+ then (p.amount >= price)
69+ else false
70+ case waves: Unit =>
71+ (p.amount >= price)
72+ case _ =>
73+ throw("Match error")
74+ }
75+ val
76+ }
77+
78+
79+func isAcceptableNft (status,assetSale) = {
80+ let idAsset = match assetSale.assetId {
81+ case b: ByteVector =>
82+ b
83+ case b: Unit =>
84+ base58'2CsAf'
85+ case _ =>
86+ throw("Match error")
87+ }
88+ let asset = match assetInfo(idAsset) {
89+ case b: Asset =>
90+ toBase58String(b.issuer.bytes)
91+ case waves: Unit =>
92+ "WAVES"
93+ case _ =>
94+ throw("Match error")
95+ }
96+ if (tryGetBool(asset))
97+ then status
98+ else false
99+ }
100+
101+
102+func getAssetId (status,assetSale) = {
103+ let idAsset = match assetSale.assetId {
104+ case b: ByteVector =>
105+ toBase58String(b)
106+ case b: Unit =>
107+ "WAVES"
108+ case _ =>
109+ throw("Match error")
110+ }
111+ ((status + "_") + idAsset)
112+ }
113+
114+
115+func getAssetPrice (status,assetSale) = {
116+ let price = toString(assetSale.amount)
117+ ((status + "_") + price)
118+ }
119+
120+
121+func getAssetIssuer (status,assetSale) = {
122+ let idAsset = match assetSale.assetId {
123+ case b: ByteVector =>
124+ b
125+ case b: Unit =>
126+ base58'2CsAf'
127+ case _ =>
128+ throw("Match error")
129+ }
130+ let issuer = match assetInfo(idAsset) {
131+ case b: Asset =>
132+ toBase58String(b.issuer.bytes)
133+ case b: Unit =>
134+ "WAVES"
135+ case _ =>
136+ throw("Match error")
137+ }
138+ ((status + "_") + issuer)
139+ }
140+
141+
142+func getTransferAsset (status,data) = {
143+ let transferAddress = match addressFromString(data._1) {
144+ case b: Address =>
145+ b
146+ case b: Unit =>
147+ this
148+ case _ =>
149+ throw("Match error")
150+ }
151+ if ((data._3 != "WAVES"))
152+ then (status :+ ScriptTransfer(transferAddress, data._2, fromBase58String(data._3)))
153+ else (status :+ ScriptTransfer(transferAddress, data._2, unit))
154+ }
155+
156+
157+@Callable(i)
158+func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice)))
159+ then (price > 0)
160+ else false))
161+ then throw("Sale Asset incorrect")
162+ else {
163+ let firstPayment = value(i.payments[0])
164+ let assetId = match firstPayment.assetId {
165+ case id: ByteVector =>
166+ id
167+ case w: Unit =>
168+ throw("Asset is not NFT")
169+ case _ =>
170+ throw("Match error")
171+ }
172+ let assetIdStr = toBase58String(assetId)
173+ let asset = match assetInfo(assetId) {
174+ case a: Asset =>
175+ a
176+ case _ =>
177+ throw("Error getting information about asset")
178+ }
179+ if (if (if ((asset.quantity != 1))
180+ then (asset.decimals != 0)
181+ else false)
182+ then asset.reissuable
183+ else false)
184+ then throw("Asset is not NFT")
185+ else [IntegerEntry(priceKey(assetIdStr), price), StringEntry(ownerKey(assetIdStr), toBase58String(i.caller.bytes)), StringEntry(issuerKey(assetIdStr), toBase58String(asset.issuer.bytes)), StringEntry(nameKey(assetIdStr), asset.name), StringEntry(descriptionKey(assetIdStr), asset.description), StringEntry(assetOffer(assetIdStr), assetIdPrice)]
186+ }
187+
188+
189+
190+@Callable(i)
191+func offerForSwap (assetIdPrice) = {
192+ let countPay = size(i.payments)
193+ let status = {
194+ let $l = i.payments
195+ let $s = size($l)
196+ let $acc0 = true
197+ func $f0_1 ($a,$i) = if (($i >= $s))
198+ then $a
199+ else isAcceptableNft($a, $l[$i])
200+
201+ func $f0_2 ($a,$i) = if (($i >= $s))
202+ then $a
203+ else throw("List size exceeds 2")
204+
205+ $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
206+ }
207+ if (!(status))
208+ then throw("Payments incorrect")
209+ else if ((tryGetInteger("commission") > i.payments[1].amount))
210+ then throw("No minimum commission")
211+ else {
212+ let paymentAll = {
213+ let $l = i.payments
214+ let $s = size($l)
215+ let $acc0 = "Swap"
216+ func $f1_1 ($a,$i) = if (($i >= $s))
217+ then $a
218+ else getAssetId($a, $l[$i])
219+
220+ func $f1_2 ($a,$i) = if (($i >= $s))
221+ then $a
222+ else throw("List size exceeds 2")
223+
224+ $f1_2($f1_1($f1_1($acc0, 0), 1), 2)
225+ }
226+ let issuer = {
227+ let $l = i.payments
228+ let $s = size($l)
229+ let $acc0 = "Swap"
230+ func $f2_1 ($a,$i) = if (($i >= $s))
231+ then $a
232+ else getAssetIssuer($a, $l[$i])
233+
234+ func $f2_2 ($a,$i) = if (($i >= $s))
235+ then $a
236+ else throw("List size exceeds 2")
237+
238+ $f2_2($f2_1($f2_1($acc0, 0), 1), 2)
239+ }
240+ let price = {
241+ let $l = i.payments
242+ let $s = size($l)
243+ let $acc0 = "Swap"
244+ func $f3_1 ($a,$i) = if (($i >= $s))
245+ then $a
246+ else getAssetPrice($a, $l[$i])
247+
248+ func $f3_2 ($a,$i) = if (($i >= $s))
249+ then $a
250+ else throw("List size exceeds 2")
251+
252+ $f3_2($f3_1($f3_1($acc0, 0), 1), 2)
253+ }
254+[StringEntry((priceKey(paymentAll) + "Swap"), price), StringEntry((ownerKey(paymentAll) + "Swap"), toBase58String(i.caller.bytes)), StringEntry((issuerKey(paymentAll) + "Swap"), issuer), StringEntry((assetOffer(paymentAll) + "Swap"), assetIdPrice)]
255+ }
256+ }
257+
258+
259+
260+@Callable(i)
261+func buy (assetStr) = {
262+ let price = tryGetInteger(priceKey(assetStr))
263+ let acceptableAssetId = tryGetString(assetOffer(assetStr))
264+ let ownerStr = tryGetString(ownerKey(assetStr))
265+ let owner = match addressFromString(ownerStr) {
266+ case a: Address =>
267+ a
268+ case _ =>
269+ throw("Address parsing error")
270+ }
271+ if (!(isPaymentOk(i, acceptableAssetId, price)))
272+ then throw("Wrong payment amount or asset")
273+ else if ((ownerStr == toBase58String(i.caller.bytes)))
274+ then throw("Owner cannot buy his NTF")
275+ else if ((price == 0))
276+ then throw("This NFT is not for sale")
277+ else {
278+ let fee = ((price / 100) * 5)
279+[ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), ScriptTransfer(owner, (price - fee), unit), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr)), DeleteEntry(assetOffer(assetStr))]
280+ }
281+ }
282+
283+
284+
285+@Callable(i)
286+func swapDone (offerId) = {
287+ let price = tryGetString(priceKey(offerId))
288+ let offer = tryGetString((assetOffer(offerId) + "Swap"))
289+ let ownerOffer = tryGetString(ownerKey(offerId))
290+ let ownerNft = tryGetString(ownerKey(offer))
291+ let offerOnAsset = tryGetString((assetOffer(offerId) + "Swap"))
292+ if ((ownerNft != toBase58String(i.caller.bytes)))
293+ then throw("The calling address is not the owner of the NFT token")
294+ else if ((price == ""))
295+ then throw("This NFT is not for sale")
296+ else {
297+ let fee = tryGetInteger("commission")
298+ let listAsset = split(offerId, "_")
299+ let listPrice = split(price, "_")
300+[ScriptTransfer(addressFromStringValue(ownerNft), parseIntValue(listPrice[1]), fromBase58String(listAsset[1])), ScriptTransfer(addressFromStringValue(ownerNft), (parseIntValue(listPrice[2]) - fee), unit), ScriptTransfer(addressFromStringValue(ownerOffer), 1, fromBase58String(tryGetString(offerId))), DeleteEntry(priceKey(offerOnAsset)), DeleteEntry(ownerKey(offerOnAsset)), DeleteEntry(issuerKey(offerOnAsset)), DeleteEntry(nameKey(offerOnAsset)), DeleteEntry(descriptionKey(offerOnAsset)), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap"))]
301+ }
302+ }
303+
304+
305+
306+@Callable(i)
307+func cancelSelling (assetStr) = {
308+ let ownerStr = tryGetString(ownerKey(assetStr))
309+ let owner = match addressFromString(ownerStr) {
310+ case a: Address =>
311+ a
312+ case _ =>
313+ throw("Address parsing error")
314+ }
315+ if ((ownerStr != toBase58String(i.caller.bytes)))
316+ then throw("The calling address is not the owner of the NFT token")
317+ else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))]
318+ }
319+
320+
321+
322+@Callable(i)
323+func swapCancel (offerId) = {
324+ let ownerOffer = tryGetString((ownerKey(offerId) + "Swap"))
325+ let price = tryGetString((priceKey(offerId) + "Swap"))
326+ if ((ownerOffer != toBase58String(i.caller.bytes)))
327+ then throw("The calling address is not the owner of the NFT token")
328+ else {
329+ let listAsset = split(offerId, "_")
330+ let listPrice = split(price, "_")
331+[ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[1]), fromBase58String(listAsset[1])), ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[2]), unit), DeleteEntry((priceKey(offerId) + "Swap")), DeleteEntry((ownerKey(offerId) + "Swap")), DeleteEntry((issuerKey(offerId) + "Swap")), DeleteEntry((assetOffer(offerId) + "Swap"))]
332+ }
333+ }
334+
335+
336+@Verifier(tx)
337+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
338+

github/deemru/w8io/026f985 
37.14 ms