tx · 55oMu4eD352bskvYN3MWwMd8EptY8B4qqwJxDwobsFqo

3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq:  -0.50000000 Waves

2022.11.30 20:55 [2340165] smart account 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq > SELF 0.00000000 Waves

{ "type": 13, "id": "55oMu4eD352bskvYN3MWwMd8EptY8B4qqwJxDwobsFqo", "fee": 50000000, "feeAssetId": null, "timestamp": 1669830938554, "version": 2, "chainId": 84, "sender": "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq", "senderPublicKey": "H6UqxUDcJamDRg1uykVcWMn4zhAMTV7i1nfPq1moLWmJ", "proofs": [ "3SqNfsmTT3e2Fk9t1aJF7JWatyjwYgmyRj4rNV8KLseErCbRFYU8fSQsicJcirrdH11CdTaSBTDifLGzkMbhYyRZ" ], "script": "base64:BgJRCAISBgoECAgBARIAEgQKAggIEgsKCQgICAgIAQgICBIECgIICBIECgIICBIDCgEIEgMKAQESBQoDCAgBEgMKAQgSAwoBCBIDCgEIEgQKAggBKQAJc2VwYXJhdG9yAgFfAAhrQXVjdGlvbgIHYXVjdGlvbgAFa1NlbGwCBHNlbGwACGtUcnVzdGVkAgd0cnVzdGVkAAZrUHJpY2UCBXByaWNlAQpnZXRTbG90S2V5AgZwcmVmaXgFbmZ0SWQJAKwCAgkArAICBQZwcmVmaXgFCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAELZ2V0UHJpY2VLZXkBBW5mdElkCQCsAgIJAKwCAgUGa1ByaWNlBQlzZXBhcmF0b3IJANgEAQUFbmZ0SWQBCmdldFNlbGxLZXkBBW5mdElkCQCsAgIJAKwCAgUFa1NlbGwFCXNlcGFyYXRvcgkA2AQBBQVuZnRJZAENZ2V0QXVjdGlvbktleQEFbmZ0SWQJAKwCAgkArAICBQhrQXVjdGlvbgUJc2VwYXJhdG9yCQDYBAEFBW5mdElkAQ1nZXRUcnVzdGVkS2V5AQZpc3N1ZXIJAKwC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XRQcmljZUF0Q3VycmVudE1vbWVudAIFbmZ0SWQGbW9tZW50BAdhc3NldElkCQDZBAEFBW5mdElkBA0kdDAxMzcwMzEzNzY2CQEYY2FsY1ByaWNlQXRDdXJyZW50TW9tZW50AgUHYXNzZXRJZAUGbW9tZW50BAZzZWxsZXIIBQ0kdDAxMzcwMzEzNzY2Al8xBAVwcmljZQgFDSR0MDEzNzAzMTM3NjYCXzIJAMwIAgkBDEludGVnZXJFbnRyeQIJAQtnZXRQcmljZUtleQEFB2Fzc2V0SWQFBXByaWNlBQNuaWwA0aVA6Q==", "height": 2340165, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7ouLxP7JGnRPUXNTmBXosf5Sr9Mmys6k6Vz1vUXwvv3u Next: GS242w5FPwizbCZmP6j8e8XP294HVypQrs8gTuWS7v5a Diff:
OldNewDifferences
269269 then throw("Pay in waves")
270270 else if ((checkNftAuctioned != statusForNFT._1))
271271 then throw("Not open in auction list")
272- else [StringEntry(((("nft_id_" + nftId) + "_") + toBase58String(caller.bytes)), nftId), StringEntry(((("nft_owner_" + nftId) + "_") + toBase58String(caller.bytes)), nft_owner), StringEntry(((("bidding_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), ((nftId + "_") + toBase58String(caller.bytes))), StringEntry(((("min_price_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(min_price)), StringEntry(((("bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(bid_price)), StringEntry(((("transfer_bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toBase58String(dAppAddress))]
272+ else [StringEntry(((("nft_id_" + nftId) + "_") + toBase58String(caller.bytes)), nftId), StringEntry(((("nft_owner_" + nftId) + "_") + toBase58String(caller.bytes)), nft_owner), StringEntry(((("bidding_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), ((nftId + "_") + toBase58String(caller.bytes))), StringEntry(((("min_price_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(min_price)), StringEntry(((("bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(bid_price)), StringEntry(((("nft_bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toBase58String(dAppAddress))]
273273 }
274274
275275
332332 @Callable(i)
333333 func sellNFT (price) = {
334334 let seller = i.caller.bytes
335- let $t094419526 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
336- let token0 = $t094419526._1
337- let amount0 = $t094419526._2
335+ let $t094369521 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
336+ let token0 = $t094369521._1
337+ let amount0 = $t094369521._2
338338 if (!(isNft(token0)))
339339 then throw("Token is not NFT")
340340 else [StringEntry((("nft_" + toBase58String(seller)) + "_owner"), toBase58String(seller)), StringEntry(((((kPrice + separator) + toBase58String(value(i.payments[0].assetId))) + "_") + toString(i.caller)), price), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(token0) + separator) + toString(amount0)))]
373373
374374 @Callable(i)
375375 func buyFromSlot (nftId) = {
376- let $t01141811507 = $Tuple2(i.payments[0].assetId, value(i.payments[0].amount))
377- let paymentAsset = $t01141811507._1
378- let paymentAmount = $t01141811507._2
376+ let $t01141311502 = $Tuple2(i.payments[0].assetId, value(i.payments[0].amount))
377+ let paymentAsset = $t01141311502._1
378+ let paymentAmount = $t01141311502._2
379379 let assetId = fromBase58String(nftId)
380- let $t01155111589 = getSlot(assetId)
381- let type = $t01155111589._1
382- let details = $t01155111589._2
380+ let $t01154611584 = getSlot(assetId)
381+ let type = $t01154611584._1
382+ let details = $t01154611584._2
383383 let baseRes = [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(getSlotKey(type, assetId))]
384384 if ((type == kSell))
385385 then {
386- let $t01173111778 = parseAsSell(details)
387- let seller = $t01173111778._1
388- let priceValue = $t01173111778._2
386+ let $t01172611773 = parseAsSell(details)
387+ let seller = $t01172611773._1
388+ let priceValue = $t01172611773._2
389389 valueOrElse(isCorrectPayments(paymentAsset, paymentAmount, priceValue), {
390- let $t01186311965 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, priceValue)
391- let sellerAmount = $t01186311965._1
392- let buyerAmount = $t01186311965._2
390+ let $t01185811960 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, priceValue)
391+ let sellerAmount = $t01185811960._1
392+ let buyerAmount = $t01185811960._2
393393 let updatedRes = (baseRes ++ [ScriptTransfer(seller, sellerAmount, unit)])
394394 if ((buyerAmount > 0))
395395 then (updatedRes ++ [ScriptTransfer(i.caller, buyerAmount, unit)])
397397 })
398398 }
399399 else {
400- let $t01218212251 = calcPriceAtCurrentMoment(assetId, height)
401- let seller = $t01218212251._1
402- let actualPrice = $t01218212251._2
400+ let $t01217712246 = calcPriceAtCurrentMoment(assetId, height)
401+ let seller = $t01217712246._1
402+ let actualPrice = $t01217712246._2
403403 valueOrElse(isCorrectPayments(paymentAsset, paymentAmount, actualPrice), {
404- let $t01233712440 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, actualPrice)
405- let sellerAmount = $t01233712440._1
406- let buyerAmount = $t01233712440._2
404+ let $t01233212435 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, actualPrice)
405+ let sellerAmount = $t01233212435._1
406+ let buyerAmount = $t01233212435._2
407407 let updatedRes = (baseRes ++ [ScriptTransfer(seller, sellerAmount, unit)])
408408 if ((buyerAmount > 0))
409409 then (updatedRes ++ [ScriptTransfer(i.caller, buyerAmount, unit)])
417417 @Callable(i)
418418 func declineSlot (nftId) = {
419419 let assetId = fromBase58String(nftId)
420- let $t01274112779 = getSlot(assetId)
421- let type = $t01274112779._1
422- let details = $t01274112779._2
420+ let $t01273612774 = getSlot(assetId)
421+ let type = $t01273612774._1
422+ let details = $t01273612774._2
423423 let baseRes = [DeleteEntry(getSlotKey(type, assetId))]
424424 if ((type == kSell))
425425 then {
426- let $t01287112918 = parseAsSell(details)
427- let seller = $t01287112918._1
428- let priceValue = $t01287112918._2
426+ let $t01286612913 = parseAsSell(details)
427+ let seller = $t01286612913._1
428+ let priceValue = $t01286612913._2
429429 if (!(isValidCaller(i.caller, seller)))
430430 then throw("Invalid caller")
431431 else (baseRes ++ [ScriptTransfer(seller, 1, assetId)])
432432 }
433433 else {
434- let $t01306313167 = parseAsAuction(details)
435- let seller = $t01306313167._1
436- let startPriceValue = $t01306313167._2
437- let endPriceValue = $t01306313167._3
438- let startPeriodValue = $t01306313167._4
439- let endPeriodValue = $t01306313167._5
434+ let $t01305813162 = parseAsAuction(details)
435+ let seller = $t01305813162._1
436+ let startPriceValue = $t01305813162._2
437+ let endPriceValue = $t01305813162._3
438+ let startPeriodValue = $t01305813162._4
439+ let endPeriodValue = $t01305813162._5
440440 if (!(isValidCaller(i.caller, seller)))
441441 then throw("Invalid caller")
442442 else if (!(isAuctionEnded(height, endPeriodValue)))
457457 @Callable(i)
458458 func getPriceAtCurrentMoment (nftId,moment) = {
459459 let assetId = fromBase58String(nftId)
460- let $t01370813771 = calcPriceAtCurrentMoment(assetId, moment)
461- let seller = $t01370813771._1
462- let price = $t01370813771._2
460+ let $t01370313766 = calcPriceAtCurrentMoment(assetId, moment)
461+ let seller = $t01370313766._1
462+ let price = $t01370313766._2
463463 [IntegerEntry(getPriceKey(assetId), price)]
464464 }
465465
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "_"
55
66 let kAuction = "auction"
77
88 let kSell = "sell"
99
1010 let kTrusted = "trusted"
1111
1212 let kPrice = "price"
1313
1414 func getSlotKey (prefix,nftId) = ((prefix + separator) + toBase58String(nftId))
1515
1616
1717 func getPriceKey (nftId) = ((kPrice + separator) + toBase58String(nftId))
1818
1919
2020 func getSellKey (nftId) = ((kSell + separator) + toBase58String(nftId))
2121
2222
2323 func getAuctionKey (nftId) = ((kAuction + separator) + toBase58String(nftId))
2424
2525
2626 func getTrustedKey (issuer) = ((kTrusted + separator) + toString(issuer))
2727
2828
2929 func addToList (accum,nextValue) = (accum ++ [nextValue])
3030
3131
3232 func joinString (params) = {
3333 let length = size(params)
3434 if ((length == 0))
3535 then throw("Empty params")
3636 else if ((length == 1))
3737 then makeString({
3838 let $l = params
3939 let $s = size($l)
4040 let $acc0 = nil
4141 func $f0_1 ($a,$i) = if (($i >= $s))
4242 then $a
4343 else addToList($a, $l[$i])
4444
4545 func $f0_2 ($a,$i) = if (($i >= $s))
4646 then $a
4747 else throw("List size exceeds 1")
4848
4949 $f0_2($f0_1($acc0, 0), 1)
5050 }, separator)
5151 else if ((length == 2))
5252 then makeString({
5353 let $l = params
5454 let $s = size($l)
5555 let $acc0 = nil
5656 func $f0_1 ($a,$i) = if (($i >= $s))
5757 then $a
5858 else addToList($a, $l[$i])
5959
6060 func $f0_2 ($a,$i) = if (($i >= $s))
6161 then $a
6262 else throw("List size exceeds 2")
6363
6464 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
6565 }, separator)
6666 else if ((length == 3))
6767 then makeString({
6868 let $l = params
6969 let $s = size($l)
7070 let $acc0 = nil
7171 func $f0_1 ($a,$i) = if (($i >= $s))
7272 then $a
7373 else addToList($a, $l[$i])
7474
7575 func $f0_2 ($a,$i) = if (($i >= $s))
7676 then $a
7777 else throw("List size exceeds 3")
7878
7979 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
8080 }, separator)
8181 else if ((length == 4))
8282 then makeString({
8383 let $l = params
8484 let $s = size($l)
8585 let $acc0 = nil
8686 func $f0_1 ($a,$i) = if (($i >= $s))
8787 then $a
8888 else addToList($a, $l[$i])
8989
9090 func $f0_2 ($a,$i) = if (($i >= $s))
9191 then $a
9292 else throw("List size exceeds 4")
9393
9494 $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4)
9595 }, separator)
9696 else if ((length == 5))
9797 then makeString({
9898 let $l = params
9999 let $s = size($l)
100100 let $acc0 = nil
101101 func $f0_1 ($a,$i) = if (($i >= $s))
102102 then $a
103103 else addToList($a, $l[$i])
104104
105105 func $f0_2 ($a,$i) = if (($i >= $s))
106106 then $a
107107 else throw("List size exceeds 5")
108108
109109 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
110110 }, separator)
111111 else throw("Max number of parameters exceeded")
112112 }
113113
114114
115115 func parseAsAuction (details) = {
116116 let res = split(details, separator)
117117 $Tuple5(addressFromStringValue(res[0]), parseIntValue(res[1]), parseIntValue(res[2]), parseIntValue(res[3]), parseIntValue(res[4]))
118118 }
119119
120120
121121 func parseAsSell (details) = {
122122 let res = split(details, separator)
123123 $Tuple2(addressFromStringValue(res[0]), parseIntValue(res[1]))
124124 }
125125
126126
127127 func joinStruct (params) = match params {
128128 case auction: (Address, Int, String, String) =>
129129 joinString([toString(auction._1), toString(auction._2), auction._3, auction._4])
130130 case sell: (Address, Int) =>
131131 joinString([toString(sell._1), toString(sell._2)])
132132 case _ =>
133133 throw("Wrong params tupple")
134134 }
135135
136136
137137 func setAuction (seller,nftId,startPrice,start,end) = StringEntry(getAuctionKey(nftId), joinStruct($Tuple4(seller, startPrice, start, end)))
138138
139139
140140 func setSell (nftId,celler,price) = StringEntry(getSellKey(nftId), joinStruct($Tuple2(celler, price)))
141141
142142
143143 func getAuction (nftId) = value(getString(this, getAuctionKey(nftId)))
144144
145145
146146 func getSell (nftId) = value(getString(this, getSellKey(nftId)))
147147
148148
149149 func calcPriceAtCurrentMoment (assetId,moment) = {
150150 let details = getAuction(assetId)
151151 let $t027552859 = parseAsAuction(details)
152152 let seller = $t027552859._1
153153 let startPriceValue = $t027552859._2
154154 let endPriceValue = $t027552859._3
155155 let startPeriodValue = $t027552859._4
156156 let endPeriodValue = $t027552859._5
157157 if ((moment >= endPeriodValue))
158158 then $Tuple2(seller, endPriceValue)
159159 else {
160160 let deltaPrice = (startPriceValue - endPriceValue)
161161 let period = (endPeriodValue - startPeriodValue)
162162 let spended = (moment - startPeriodValue)
163163 $Tuple2(seller, (startPriceValue - fraction(spended, deltaPrice, period)))
164164 }
165165 }
166166
167167
168168 func isNft (assetId) = match assetInfo(assetId) {
169169 case token: Asset =>
170170 if (if ((token.decimals == 0))
171171 then (token.quantity == 1)
172172 else false)
173173 then (token.reissuable == false)
174174 else false
175175 case _ =>
176176 false
177177 }
178178
179179
180180 func isTrustedNft (assetId) = {
181181 let issuer = value(assetInfo(assetId)).issuer
182182 valueOrElse(getBoolean(this, getTrustedKey(issuer)), false)
183183 }
184184
185185
186186 func isSellExist (assetId) = isDefined(getString(this, getSellKey(assetId)))
187187
188188
189189 func isAuctionExist (assetId) = isDefined(getString(this, getAuctionKey(assetId)))
190190
191191
192192 func isCorrectSellPrice (price) = (price > 0)
193193
194194
195195 func isCorrectAuctionPrices (startPrice,endPrice) = (startPrice > endPrice)
196196
197197
198198 func isAdmin (caller) = (caller == this)
199199
200200
201201 func isValidCaller (caller,seller) = if ((caller == this))
202202 then true
203203 else (caller == seller)
204204
205205
206206 func isAuctionEnded (now,end) = (now > end)
207207
208208
209209 func isEnoughFunds (payment,currentMomentPrice) = (payment >= currentMomentPrice)
210210
211211
212212 func isWawes (assetId) = (assetId == unit)
213213
214214
215215 func isCorrectNft (nftId) = if (!(isNft(nftId)))
216216 then throw("Token is not Nft")
217217 else if (isSellExist(nftId))
218218 then throw("Sell already exists")
219219 else if (isAuctionExist(nftId))
220220 then throw("Auction already exists")
221221 else unit
222222
223223
224224 func isCorrectPayments (paymentAsset,paymentAmount,price) = if (!(isWawes(paymentAsset)))
225225 then throw("Payment must be at WAVES")
226226 else if (!(isEnoughFunds(paymentAmount, price)))
227227 then throw("Not enough funds")
228228 else unit
229229
230230
231231 func calcFee () = 0
232232
233233
234234 func calcTrustedFee () = 0
235235
236236
237237 func resultFundsAmounts (isTrusted,paymentAmount,actualPrice) = if (isTrusted)
238238 then $Tuple2((actualPrice - calcTrustedFee()), (paymentAmount - actualPrice))
239239 else $Tuple2((actualPrice - calcFee()), (paymentAmount - actualPrice))
240240
241241
242242 func getSlot (nftId) = if (isSellExist(nftId))
243243 then $Tuple2(kSell, getSell(nftId))
244244 else if (isAuctionExist(nftId))
245245 then $Tuple2(kAuction, getAuction(nftId))
246246 else throw("Slot doesn`t exist")
247247
248248
249249 let kBuy = "buy"
250250
251251 let kBid = "bid"
252252
253253 let statusForNFT = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
254254
255255 let dAppAddress = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
256256
257257 @Callable(i)
258258 func placeBid (nftId,nft_owner,min_price,bid_price) = {
259259 let caller = i.caller
260260 let assetId = fromBase58String(nftId)
261261 let amount = value(i.payments[0].amount)
262262 let checkNftAuctioned = match getString(this, (((nftId + separator) + "nft_status_") + nft_owner)) {
263263 case a: String =>
264264 a
265265 case _ =>
266266 false
267267 }
268268 if ((i.payments[0].assetId != unit))
269269 then throw("Pay in waves")
270270 else if ((checkNftAuctioned != statusForNFT._1))
271271 then throw("Not open in auction list")
272- else [StringEntry(((("nft_id_" + nftId) + "_") + toBase58String(caller.bytes)), nftId), StringEntry(((("nft_owner_" + nftId) + "_") + toBase58String(caller.bytes)), nft_owner), StringEntry(((("bidding_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), ((nftId + "_") + toBase58String(caller.bytes))), StringEntry(((("min_price_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(min_price)), StringEntry(((("bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(bid_price)), StringEntry(((("transfer_bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toBase58String(dAppAddress))]
272+ else [StringEntry(((("nft_id_" + nftId) + "_") + toBase58String(caller.bytes)), nftId), StringEntry(((("nft_owner_" + nftId) + "_") + toBase58String(caller.bytes)), nft_owner), StringEntry(((("bidding_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), ((nftId + "_") + toBase58String(caller.bytes))), StringEntry(((("min_price_for_" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(min_price)), StringEntry(((("bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toString(bid_price)), StringEntry(((("nft_bid_price_for" + nftId) + "_by_") + toBase58String(caller.bytes)), toBase58String(dAppAddress))]
273273 }
274274
275275
276276
277277 @Callable(i)
278278 func pay () = {
279279 let amount = value(i.payments[0].amount)
280280 if ((i.payments[0].assetId != unit))
281281 then throw("Pay in waves")
282282 else nil
283283 }
284284
285285
286286
287287 @Callable(i)
288288 func confirmBid (nftId,userAddress) = [StringEntry("bid_winner", userAddress)]
289289
290290
291291
292292 @Callable(i)
293293 func createNft (nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_data) = {
294294 let newToken = Issue(nft_name, nft_description, 1, 0, false)
295295 let issueId = calculateAssetId(newToken)
296296 let txId = i.transactionId
297297 [newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_type"), nft_type), StringEntry(((toBase58String(issueId) + separator) + "nft_tags"), nft_tags), StringEntry(((toBase58String(issueId) + separator) + "nft_dAppAddress"), nft_dAppAddress), IntegerEntry(((toBase58String(issueId) + separator) + "nft_selling_price"), nft_selling_price), StringEntry(((toBase58String(issueId) + separator) + "nft_onSell"), nft_onSell), StringEntry(((toBase58String(issueId) + separator) + "nft_data"), nft_data), StringEntry(((toBase58String(txId) + separator) + "issue_nft"), toBase58String(issueId))]
298298 }
299299
300300
301301
302302 @Callable(i)
303303 func issueNft (name,meta) = {
304304 let newToken = Issue(name, meta, 1, 0, false)
305305 let issueId = calculateAssetId(newToken)
306306 [newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller))]
307307 }
308308
309309
310310
311311 @Callable(i)
312312 func buyNFT (nftID,current_nft_owner) = {
313313 let assetId = fromBase58String(nftID)
314314 let amount = value(i.payments[0].amount)
315315 let checkOwnerIsSame = match getString(this, (("nft_" + current_nft_owner) + "_owner")) {
316316 case a: String =>
317317 a
318318 case _ =>
319319 false
320320 }
321321 let price = getStringValue(((((kPrice + separator) + nftID) + "_") + current_nft_owner))
322322 let owner = valueOrErrorMessage(getStringValue(((nftID + separator) + "Owner")), "No owner")
323323 if ((i.payments[0].assetId != unit))
324324 then throw("Pay in waves")
325325 else if ((checkOwnerIsSame == toString(i.caller)))
326326 then throw("Owner of NFT not able to purchase")
327327 else [ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(Address(fromBase58String(owner)), amount, unit), StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount))), DeleteEntry((("nft_" + current_nft_owner) + "_owner"))]
328328 }
329329
330330
331331
332332 @Callable(i)
333333 func sellNFT (price) = {
334334 let seller = i.caller.bytes
335- let $t094419526 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
336- let token0 = $t094419526._1
337- let amount0 = $t094419526._2
335+ let $t094369521 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
336+ let token0 = $t094369521._1
337+ let amount0 = $t094369521._2
338338 if (!(isNft(token0)))
339339 then throw("Token is not NFT")
340340 else [StringEntry((("nft_" + toBase58String(seller)) + "_owner"), toBase58String(seller)), StringEntry(((((kPrice + separator) + toBase58String(value(i.payments[0].assetId))) + "_") + toString(i.caller)), price), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(token0) + separator) + toString(amount0)))]
341341 }
342342
343343
344344
345345 @Callable(i)
346346 func addSell (price) = {
347347 let nftId = value(i.payments[0].assetId)
348348 valueOrElse(isCorrectNft(nftId), if (!(isCorrectSellPrice(price)))
349349 then throw("Price must be > 0")
350350 else [setSell(nftId, i.caller, price)])
351351 }
352352
353353
354354
355355 @Callable(i)
356356 func addAuction (start,end,startPrice) = {
357357 let nftId = value(i.payments[0].assetId)
358358 let price = value(startPrice)
359359 let auction = $Tuple4(i.caller, price, start, end)
360360 let caller = i.caller.bytes
361361 let checkNftAuctioned = match getString(this, (((toBase58String(nftId) + separator) + "nft_status_") + toBase58String(caller))) {
362362 case a: String =>
363363 a
364364 case _ =>
365365 false
366366 }
367367 if ((checkNftAuctioned == statusForNFT._1))
368368 then throw("Already in Auction list")
369369 else [StringEntry(((toBase58String(nftId) + "_nft_start_auction_date_") + toBase58String(caller)), start), StringEntry(((toBase58String(nftId) + "_nft_end_auction_date_") + toBase58String(caller)), end), IntegerEntry(((toBase58String(nftId) + "_nft_start_price_") + toBase58String(caller)), startPrice), StringEntry(((toBase58String(nftId) + separator) + "nft_owner"), toString(i.caller)), StringEntry((((toBase58String(nftId) + separator) + "nft_status_") + toBase58String(caller)), statusForNFT._1)]
370370 }
371371
372372
373373
374374 @Callable(i)
375375 func buyFromSlot (nftId) = {
376- let $t01141811507 = $Tuple2(i.payments[0].assetId, value(i.payments[0].amount))
377- let paymentAsset = $t01141811507._1
378- let paymentAmount = $t01141811507._2
376+ let $t01141311502 = $Tuple2(i.payments[0].assetId, value(i.payments[0].amount))
377+ let paymentAsset = $t01141311502._1
378+ let paymentAmount = $t01141311502._2
379379 let assetId = fromBase58String(nftId)
380- let $t01155111589 = getSlot(assetId)
381- let type = $t01155111589._1
382- let details = $t01155111589._2
380+ let $t01154611584 = getSlot(assetId)
381+ let type = $t01154611584._1
382+ let details = $t01154611584._2
383383 let baseRes = [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(getSlotKey(type, assetId))]
384384 if ((type == kSell))
385385 then {
386- let $t01173111778 = parseAsSell(details)
387- let seller = $t01173111778._1
388- let priceValue = $t01173111778._2
386+ let $t01172611773 = parseAsSell(details)
387+ let seller = $t01172611773._1
388+ let priceValue = $t01172611773._2
389389 valueOrElse(isCorrectPayments(paymentAsset, paymentAmount, priceValue), {
390- let $t01186311965 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, priceValue)
391- let sellerAmount = $t01186311965._1
392- let buyerAmount = $t01186311965._2
390+ let $t01185811960 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, priceValue)
391+ let sellerAmount = $t01185811960._1
392+ let buyerAmount = $t01185811960._2
393393 let updatedRes = (baseRes ++ [ScriptTransfer(seller, sellerAmount, unit)])
394394 if ((buyerAmount > 0))
395395 then (updatedRes ++ [ScriptTransfer(i.caller, buyerAmount, unit)])
396396 else updatedRes
397397 })
398398 }
399399 else {
400- let $t01218212251 = calcPriceAtCurrentMoment(assetId, height)
401- let seller = $t01218212251._1
402- let actualPrice = $t01218212251._2
400+ let $t01217712246 = calcPriceAtCurrentMoment(assetId, height)
401+ let seller = $t01217712246._1
402+ let actualPrice = $t01217712246._2
403403 valueOrElse(isCorrectPayments(paymentAsset, paymentAmount, actualPrice), {
404- let $t01233712440 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, actualPrice)
405- let sellerAmount = $t01233712440._1
406- let buyerAmount = $t01233712440._2
404+ let $t01233212435 = resultFundsAmounts(isTrustedNft(assetId), paymentAmount, actualPrice)
405+ let sellerAmount = $t01233212435._1
406+ let buyerAmount = $t01233212435._2
407407 let updatedRes = (baseRes ++ [ScriptTransfer(seller, sellerAmount, unit)])
408408 if ((buyerAmount > 0))
409409 then (updatedRes ++ [ScriptTransfer(i.caller, buyerAmount, unit)])
410410 else updatedRes
411411 })
412412 }
413413 }
414414
415415
416416
417417 @Callable(i)
418418 func declineSlot (nftId) = {
419419 let assetId = fromBase58String(nftId)
420- let $t01274112779 = getSlot(assetId)
421- let type = $t01274112779._1
422- let details = $t01274112779._2
420+ let $t01273612774 = getSlot(assetId)
421+ let type = $t01273612774._1
422+ let details = $t01273612774._2
423423 let baseRes = [DeleteEntry(getSlotKey(type, assetId))]
424424 if ((type == kSell))
425425 then {
426- let $t01287112918 = parseAsSell(details)
427- let seller = $t01287112918._1
428- let priceValue = $t01287112918._2
426+ let $t01286612913 = parseAsSell(details)
427+ let seller = $t01286612913._1
428+ let priceValue = $t01286612913._2
429429 if (!(isValidCaller(i.caller, seller)))
430430 then throw("Invalid caller")
431431 else (baseRes ++ [ScriptTransfer(seller, 1, assetId)])
432432 }
433433 else {
434- let $t01306313167 = parseAsAuction(details)
435- let seller = $t01306313167._1
436- let startPriceValue = $t01306313167._2
437- let endPriceValue = $t01306313167._3
438- let startPeriodValue = $t01306313167._4
439- let endPeriodValue = $t01306313167._5
434+ let $t01305813162 = parseAsAuction(details)
435+ let seller = $t01305813162._1
436+ let startPriceValue = $t01305813162._2
437+ let endPriceValue = $t01305813162._3
438+ let startPeriodValue = $t01305813162._4
439+ let endPeriodValue = $t01305813162._5
440440 if (!(isValidCaller(i.caller, seller)))
441441 then throw("Invalid caller")
442442 else if (!(isAuctionEnded(height, endPeriodValue)))
443443 then throw("Wait for end of auction")
444444 else (baseRes ++ [ScriptTransfer(seller, 1, assetId)])
445445 }
446446 }
447447
448448
449449
450450 @Callable(i)
451451 func setTrustedIssuer (trustedAddr) = if (!(isAdmin(i.caller)))
452452 then throw("Only admin")
453453 else [BooleanEntry(getTrustedKey(addressFromStringValue(trustedAddr)), true)]
454454
455455
456456
457457 @Callable(i)
458458 func getPriceAtCurrentMoment (nftId,moment) = {
459459 let assetId = fromBase58String(nftId)
460- let $t01370813771 = calcPriceAtCurrentMoment(assetId, moment)
461- let seller = $t01370813771._1
462- let price = $t01370813771._2
460+ let $t01370313766 = calcPriceAtCurrentMoment(assetId, moment)
461+ let seller = $t01370313766._1
462+ let price = $t01370313766._2
463463 [IntegerEntry(getPriceKey(assetId), price)]
464464 }
465465
466466

github/deemru/w8io/026f985 
74.72 ms