tx · FNriYGb4pRehpjCUDKqf44gCWpGx6FcfUfU39ZL6KoAR

3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X:  -0.00800000 Waves

2022.11.09 18:47 [2309796] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves

{ "type": 13, "id": "FNriYGb4pRehpjCUDKqf44gCWpGx6FcfUfU39ZL6KoAR", "fee": 800000, "feeAssetId": null, "timestamp": 1668008873872, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "4Ny7hrvj4yY5gAG6eDuiYNL6C2NATbdJpx1SSSve6RtXXXwY5XFQgxLHr53hMyjAVBTyHX4p1ggZQMw5qeGtnYiA" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEAEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgENdHJ5R2V0SW50ZWdlcgEDa2V5BAN2YWwEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAABQN2YWwBDHRyeUdldFN0cmluZwEDa2V5BAN2YWwEByRtYXRjaDAJAJ0IAgU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IBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleWsELJE=", "height": 2309796, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: r1mreRf3JWnHZU67hFdsignLTHeeRC2MpLPLM8pPZGn Next: 9ZuGYzAhsFYbt9KpzkWJKto5CyMNfaMJdKTrZiEchsMV Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func priceKey (asset) = (asset + "_price")
55
66
77 func ownerKey (asset) = (asset + "_owner")
88
99
1010 func issuerKey (asset) = (asset + "_issuer")
1111
1212
1313 func nameKey (asset) = (asset + "_name")
1414
1515
1616 func descriptionKey (asset) = (asset + "_description")
1717
1818
1919 func assetAccess (asset) = (asset + "_assetBuy")
2020
2121
2222 func assetOffer (asset) = (asset + "_offer")
2323
2424
2525 func tryGetInteger (key) = {
2626 let val = match getInteger(this, key) {
2727 case b: Int =>
2828 b
2929 case _ =>
3030 0
3131 }
3232 val
3333 }
3434
3535
3636 func tryGetString (key) = {
3737 let val = match getString(this, key) {
3838 case b: String =>
3939 b
4040 case _ =>
4141 ""
4242 }
4343 val
4444 }
4545
4646
4747 func tryGetBool (key) = {
4848 let val = match getBoolean(this, key) {
4949 case b: Boolean =>
5050 b
5151 case _ =>
5252 false
5353 }
5454 val
5555 }
5656
5757
5858 func isPaymentOk (i,acceptableAssetId,price) = if ((size(i.payments) == 0))
5959 then throw("Payment not attached")
6060 else {
6161 let p = value(i.payments[0])
6262 let val = match p.assetId {
6363 case assetId: ByteVector =>
6464 if ((toBase58String(assetId) == acceptableAssetId))
6565 then (p.amount >= price)
6666 else false
6767 case waves: Unit =>
6868 (p.amount >= price)
6969 case _ =>
7070 throw("Match error")
7171 }
7272 val
7373 }
7474
7575
7676 func isAcceptableNft (status,assetSale) = {
7777 let idAsset = match assetSale.assetId {
7878 case b: ByteVector =>
7979 b
8080 case b: Unit =>
8181 base58'2CsAf'
8282 case _ =>
8383 throw("Match error")
8484 }
8585 let asset = match assetInfo(idAsset) {
8686 case b: Asset =>
8787 toBase58String(b.issuer.bytes)
8888 case waves: Unit =>
8989 "WAVES"
9090 case _ =>
9191 throw("Match error")
9292 }
9393 if (tryGetBool(asset))
9494 then status
9595 else false
9696 }
9797
9898
9999 func getAssetId (status,assetSale) = {
100100 let idAsset = match assetSale.assetId {
101101 case b: ByteVector =>
102102 toBase58String(b)
103103 case b: Unit =>
104104 "WAVES"
105105 case _ =>
106106 throw("Match error")
107107 }
108108 ((status + "_") + idAsset)
109109 }
110110
111111
112112 func getAssetPrice (status,assetSale) = {
113113 let price = toString(assetSale.amount)
114114 ((status + "_") + price)
115115 }
116116
117117
118118 func getAssetIssuer (status,assetSale) = {
119119 let idAsset = match assetSale.assetId {
120120 case b: ByteVector =>
121121 b
122122 case b: Unit =>
123123 base58'2CsAf'
124124 case _ =>
125125 throw("Match error")
126126 }
127127 let issuer = match assetInfo(idAsset) {
128128 case b: Asset =>
129129 toBase58String(b.issuer.bytes)
130130 case b: Unit =>
131131 "WAVES"
132132 case _ =>
133133 throw("Match error")
134134 }
135135 ((status + "_") + issuer)
136136 }
137137
138138
139139 func getTransferAsset (status,data) = {
140140 let transferAddress = match addressFromString(data._1) {
141141 case b: Address =>
142142 b
143143 case b: Unit =>
144144 this
145145 case _ =>
146146 throw("Match error")
147147 }
148148 if ((data._3 != "WAVES"))
149149 then (status :+ ScriptTransfer(transferAddress, data._2, fromBase58String(data._3)))
150150 else (status :+ ScriptTransfer(transferAddress, data._2, unit))
151151 }
152152
153153
154154 @Callable(i)
155155 func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice)))
156156 then (price > 0)
157157 else false))
158158 then throw("Sale Asset incorrect")
159159 else {
160160 let firstPayment = value(i.payments[0])
161161 let assetId = match firstPayment.assetId {
162162 case id: ByteVector =>
163163 id
164164 case w: Unit =>
165165 throw("Asset is not NFT")
166166 case _ =>
167167 throw("Match error")
168168 }
169169 let assetIdStr = toBase58String(assetId)
170170 let asset = match assetInfo(assetId) {
171171 case a: Asset =>
172172 a
173173 case _ =>
174174 throw("Error getting information about asset")
175175 }
176176 if (if (if ((asset.quantity != 1))
177177 then (asset.decimals != 0)
178178 else false)
179179 then asset.reissuable
180180 else false)
181181 then throw("Asset is not NFT")
182182 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)]
183183 }
184184
185185
186186
187187 @Callable(i)
188188 func offerForSwap (assetIdPrice) = {
189189 let countPay = size(i.payments)
190190 let status = {
191191 let $l = i.payments
192192 let $s = size($l)
193193 let $acc0 = true
194194 func $f0_1 ($a,$i) = if (($i >= $s))
195195 then $a
196196 else isAcceptableNft($a, $l[$i])
197197
198198 func $f0_2 ($a,$i) = if (($i >= $s))
199199 then $a
200200 else throw("List size exceeds 2")
201201
202202 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
203203 }
204204 if (!(status))
205205 then throw("Payments incorrect")
206206 else if ((tryGetInteger("commission") > i.payments[1].amount))
207207 then throw("No minimum commission")
208208 else {
209209 let paymentAll = {
210210 let $l = i.payments
211211 let $s = size($l)
212212 let $acc0 = ""
213213 func $f1_1 ($a,$i) = if (($i >= $s))
214214 then $a
215215 else getAssetId($a, $l[$i])
216216
217217 func $f1_2 ($a,$i) = if (($i >= $s))
218218 then $a
219219 else throw("List size exceeds 2")
220220
221221 $f1_2($f1_1($f1_1($acc0, 0), 1), 2)
222222 }
223223 let issuer = {
224224 let $l = i.payments
225225 let $s = size($l)
226226 let $acc0 = ""
227227 func $f2_1 ($a,$i) = if (($i >= $s))
228228 then $a
229229 else getAssetIssuer($a, $l[$i])
230230
231231 func $f2_2 ($a,$i) = if (($i >= $s))
232232 then $a
233233 else throw("List size exceeds 2")
234234
235235 $f2_2($f2_1($f2_1($acc0, 0), 1), 2)
236236 }
237237 let price = {
238238 let $l = i.payments
239239 let $s = size($l)
240240 let $acc0 = ""
241241 func $f3_1 ($a,$i) = if (($i >= $s))
242242 then $a
243243 else getAssetPrice($a, $l[$i])
244244
245245 func $f3_2 ($a,$i) = if (($i >= $s))
246246 then $a
247247 else throw("List size exceeds 2")
248248
249249 $f3_2($f3_1($f3_1($acc0, 0), 1), 2)
250250 }
251251 [StringEntry(priceKey(paymentAll), price), StringEntry(ownerKey(paymentAll), toBase58String(i.caller.bytes)), StringEntry(issuerKey(paymentAll), issuer), StringEntry(assetOffer(paymentAll), assetIdPrice)]
252252 }
253253 }
254254
255255
256256
257257 @Callable(i)
258258 func buy (assetStr) = {
259259 let price = tryGetInteger(priceKey(assetStr))
260260 let acceptableAssetId = tryGetString(assetOffer(assetStr))
261261 let ownerStr = tryGetString(ownerKey(assetStr))
262262 let owner = match addressFromString(ownerStr) {
263263 case a: Address =>
264264 a
265265 case _ =>
266266 throw("Address parsing error")
267267 }
268268 if (!(isPaymentOk(i, acceptableAssetId, price)))
269269 then throw("Wrong payment amount or asset")
270270 else if ((ownerStr == toBase58String(i.caller.bytes)))
271271 then throw("Owner cannot buy his NTF")
272272 else if ((price == 0))
273273 then throw("This NFT is not for sale")
274274 else {
275275 let fee = ((price / 100) * 5)
276276 [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))]
277277 }
278278 }
279279
280280
281281
282282 @Callable(i)
283283 func swapDone (offerId) = {
284284 let price = tryGetString(priceKey(offerId))
285285 let offer = tryGetString(assetOffer(offerId))
286286 let ownerOffer = tryGetString(ownerKey(offerId))
287287 let ownerNft = tryGetString(ownerKey(offerId))
288288 if ((ownerNft != toBase58String(i.caller.bytes)))
289289 then throw("The calling address is not the owner of the NFT token")
290290 else if ((price == ""))
291291 then throw("This NFT is not for sale")
292292 else {
293293 let fee = tryGetInteger("commission")
294294 let listAsset = split(offerId, "_")
295295 let listPrice = split(price, "_")
296296 [ScriptTransfer(addressFromStringValue(ownerNft), parseIntValue(listPrice[0]), fromBase58String(listAsset[0])), ScriptTransfer(addressFromStringValue(ownerNft), (parseIntValue(listPrice[1]) - fee), unit), ScriptTransfer(addressFromStringValue(ownerOffer), 1, fromBase58String(tryGetString(offerId))), DeleteEntry(priceKey(listAsset[0])), DeleteEntry(ownerKey(listAsset[0])), DeleteEntry(issuerKey(listAsset[0])), DeleteEntry(nameKey(listAsset[0])), DeleteEntry(descriptionKey(listAsset[0])), DeleteEntry(priceKey(offerId)), DeleteEntry(ownerKey(offerId)), DeleteEntry(issuerKey(offerId))]
297297 }
298298 }
299299
300300
301301
302302 @Callable(i)
303303 func cancelSelling (assetStr) = {
304304 let ownerStr = tryGetString(ownerKey(assetStr))
305305 let owner = match addressFromString(ownerStr) {
306306 case a: Address =>
307307 a
308308 case _ =>
309309 throw("Address parsing error")
310310 }
311311 if ((ownerStr != toBase58String(i.caller.bytes)))
312312 then throw("The calling address is not the owner of the NFT token")
313313 else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))]
314314 }
315315
316316
317317
318318 @Callable(i)
319319 func swapCancel (offerId) = {
320320 let ownerOffer = tryGetString(ownerKey(offerId))
321321 let price = tryGetString(priceKey(offerId))
322322 if ((ownerOffer != toBase58String(i.caller.bytes)))
323323 then throw("The calling address is not the owner of the NFT token")
324324 else {
325325 let listAsset = split(offerId, "_")
326326 let listPrice = split(price, "_")
327327 [ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[0]), fromBase58String(listAsset[0])), ScriptTransfer(addressFromStringValue(ownerOffer), parseIntValue(listPrice[1]), unit), DeleteEntry(priceKey(offerId)), DeleteEntry(ownerKey(offerId)), DeleteEntry(issuerKey(offerId))]
328328 }
329329 }
330330
331331
332332 @Verifier(tx)
333333 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
334334

github/deemru/w8io/169f3d6 
39.86 ms