tx · 2bRQqjGHuFXSJ8PMg2zpoSvK8SqaeDRstw2m6N2xM3KY

3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X:  -0.00800000 Waves

2022.11.09 18:45 [2309793] smart account 3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X > SELF 0.00000000 Waves

{ "type": 13, "id": "2bRQqjGHuFXSJ8PMg2zpoSvK8SqaeDRstw2m6N2xM3KY", "fee": 800000, "feeAssetId": null, "timestamp": 1668008750632, "version": 2, "chainId": 84, "sender": "3N8VMRDjjw6kAuCviYwFq4yDWyctRuHPN7X", "senderPublicKey": "SrcQexq2T9cnMXmLqfJtc8AnQ91ZjeaJtXoi1HwDsx9", "proofs": [ "4JQgTEmFi7eCPwDPtLyEhj4tG3wj2Gh1rvkiihDTdFT3XT149ku1L3R7dMshwYvMxpEvFi2GTdsXjcsTpqURK9fc" ], "script": "base64:BgIhCAISBAoCCAESAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEAEIcHJpY2VLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgZfcHJpY2UBCG93bmVyS2V5AQVhc3NldAkArAICBQVhc3NldAIGX293bmVyAQlpc3N1ZXJLZXkBBWFzc2V0CQCsAgIFBWFzc2V0AgdfaXNzdWVyAQduYW1lS2V5AQVhc3NldAkArAICBQVhc3NldAIFX25hbWUBDmRlc2NyaXB0aW9uS2V5AQVhc3NldAkArAICBQVhc3NldAIMX2Rlc2NyaXB0aW9uAQthc3NldEFjY2VzcwEFYXNzZXQJAKwCAgUFYXNzZXQCCV9hc3NldEJ1eQEKYXNzZXRPZmZlcgEFYXNzZXQJAKwCAgUFYXNzZXQCBl9vZmZlcgENdHJ5R2V0SW50ZWdlcgEDa2V5BAN2YWwEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAABQN2YWwBDHRyeUdldFN0cmluZwEDa2V5BAN2YWwEByRtYXRjaDAJAJ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": 2309793, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 27Sa57jwtqw3QsaPtgtTdw2AzAsjA89SReEx1FGaJLtQ Next: r1mreRf3JWnHZU67hFdsignLTHeeRC2MpLPLM8pPZGn Diff:
OldNewDifferences
152152
153153
154154 @Callable(i)
155-func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice)))
156- then (price > 0)
157- else false))
155+func offerForSale (assetIdPrice,price) = if (!((price > 0)))
158156 then throw("Sale Asset incorrect")
159157 else {
160158 let firstPayment = value(i.payments[0])
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)
155-func offerForSale (assetIdPrice,price) = if (!(if (tryGetBool(assetAccess(assetIdPrice)))
156- then (price > 0)
157- else false))
155+func offerForSale (assetIdPrice,price) = if (!((price > 0)))
158156 then throw("Sale Asset incorrect")
159157 else {
160158 let firstPayment = value(i.payments[0])
161159 let assetId = match firstPayment.assetId {
162160 case id: ByteVector =>
163161 id
164162 case w: Unit =>
165163 throw("Asset is not NFT")
166164 case _ =>
167165 throw("Match error")
168166 }
169167 let assetIdStr = toBase58String(assetId)
170168 let asset = match assetInfo(assetId) {
171169 case a: Asset =>
172170 a
173171 case _ =>
174172 throw("Error getting information about asset")
175173 }
176174 if (if (if ((asset.quantity != 1))
177175 then (asset.decimals != 0)
178176 else false)
179177 then asset.reissuable
180178 else false)
181179 then throw("Asset is not NFT")
182180 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)]
183181 }
184182
185183
186184
187185 @Callable(i)
188186 func offerForSwap (assetIdPrice) = {
189187 let countPay = size(i.payments)
190188 let status = {
191189 let $l = i.payments
192190 let $s = size($l)
193191 let $acc0 = true
194192 func $f0_1 ($a,$i) = if (($i >= $s))
195193 then $a
196194 else isAcceptableNft($a, $l[$i])
197195
198196 func $f0_2 ($a,$i) = if (($i >= $s))
199197 then $a
200198 else throw("List size exceeds 2")
201199
202200 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
203201 }
204202 if (!(status))
205203 then throw("Payments incorrect")
206204 else if ((tryGetInteger("commission") > i.payments[1].amount))
207205 then throw("No minimum commission")
208206 else {
209207 let paymentAll = {
210208 let $l = i.payments
211209 let $s = size($l)
212210 let $acc0 = ""
213211 func $f1_1 ($a,$i) = if (($i >= $s))
214212 then $a
215213 else getAssetId($a, $l[$i])
216214
217215 func $f1_2 ($a,$i) = if (($i >= $s))
218216 then $a
219217 else throw("List size exceeds 2")
220218
221219 $f1_2($f1_1($f1_1($acc0, 0), 1), 2)
222220 }
223221 let issuer = {
224222 let $l = i.payments
225223 let $s = size($l)
226224 let $acc0 = ""
227225 func $f2_1 ($a,$i) = if (($i >= $s))
228226 then $a
229227 else getAssetIssuer($a, $l[$i])
230228
231229 func $f2_2 ($a,$i) = if (($i >= $s))
232230 then $a
233231 else throw("List size exceeds 2")
234232
235233 $f2_2($f2_1($f2_1($acc0, 0), 1), 2)
236234 }
237235 let price = {
238236 let $l = i.payments
239237 let $s = size($l)
240238 let $acc0 = ""
241239 func $f3_1 ($a,$i) = if (($i >= $s))
242240 then $a
243241 else getAssetPrice($a, $l[$i])
244242
245243 func $f3_2 ($a,$i) = if (($i >= $s))
246244 then $a
247245 else throw("List size exceeds 2")
248246
249247 $f3_2($f3_1($f3_1($acc0, 0), 1), 2)
250248 }
251249 [StringEntry(priceKey(paymentAll), price), StringEntry(ownerKey(paymentAll), toBase58String(i.caller.bytes)), StringEntry(issuerKey(paymentAll), issuer), StringEntry(assetOffer(paymentAll), assetIdPrice)]
252250 }
253251 }
254252
255253
256254
257255 @Callable(i)
258256 func buy (assetStr) = {
259257 let price = tryGetInteger(priceKey(assetStr))
260258 let acceptableAssetId = tryGetString(assetOffer(assetStr))
261259 let ownerStr = tryGetString(ownerKey(assetStr))
262260 let owner = match addressFromString(ownerStr) {
263261 case a: Address =>
264262 a
265263 case _ =>
266264 throw("Address parsing error")
267265 }
268266 if (!(isPaymentOk(i, acceptableAssetId, price)))
269267 then throw("Wrong payment amount or asset")
270268 else if ((ownerStr == toBase58String(i.caller.bytes)))
271269 then throw("Owner cannot buy his NTF")
272270 else if ((price == 0))
273271 then throw("This NFT is not for sale")
274272 else {
275273 let fee = ((price / 100) * 5)
276274 [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))]
277275 }
278276 }
279277
280278
281279
282280 @Callable(i)
283281 func swapDone (offerId) = {
284282 let price = tryGetString(priceKey(offerId))
285283 let offer = tryGetString(assetOffer(offerId))
286284 let ownerOffer = tryGetString(ownerKey(offerId))
287285 let ownerNft = tryGetString(ownerKey(offerId))
288286 if ((ownerNft != toBase58String(i.caller.bytes)))
289287 then throw("The calling address is not the owner of the NFT token")
290288 else if ((price == ""))
291289 then throw("This NFT is not for sale")
292290 else {
293291 let fee = tryGetInteger("commission")
294292 let listAsset = split(offerId, "_")
295293 let listPrice = split(price, "_")
296294 [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))]
297295 }
298296 }
299297
300298
301299
302300 @Callable(i)
303301 func cancelSelling (assetStr) = {
304302 let ownerStr = tryGetString(ownerKey(assetStr))
305303 let owner = match addressFromString(ownerStr) {
306304 case a: Address =>
307305 a
308306 case _ =>
309307 throw("Address parsing error")
310308 }
311309 if ((ownerStr != toBase58String(i.caller.bytes)))
312310 then throw("The calling address is not the owner of the NFT token")
313311 else [ScriptTransfer(i.caller, 1, fromBase58String(assetStr)), DeleteEntry(priceKey(assetStr)), DeleteEntry(ownerKey(assetStr)), DeleteEntry(issuerKey(assetStr)), DeleteEntry(nameKey(assetStr)), DeleteEntry(descriptionKey(assetStr))]
314312 }
315313
316314
317315
318316 @Callable(i)
319317 func swapCancel (offerId) = {
320318 let ownerOffer = tryGetString(ownerKey(offerId))
321319 let price = tryGetString(priceKey(offerId))
322320 if ((ownerOffer != toBase58String(i.caller.bytes)))
323321 then throw("The calling address is not the owner of the NFT token")
324322 else {
325323 let listAsset = split(offerId, "_")
326324 let listPrice = split(price, "_")
327325 [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))]
328326 }
329327 }
330328
331329
332330 @Verifier(tx)
333331 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
334332

github/deemru/w8io/026f985 
33.22 ms