tx · DsLK41YqGE8UZSXvp73ZVCyTRDhrMcg4EJ9orwQQUrgW

3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX:  -0.01400000 Waves

2022.03.13 16:47 [1962266] smart account 3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX > SELF 0.00000000 Waves

{ "type": 13, "id": "DsLK41YqGE8UZSXvp73ZVCyTRDhrMcg4EJ9orwQQUrgW", "fee": 1400000, "feeAssetId": null, "timestamp": 1647179273827, "version": 2, "chainId": 84, "sender": "3MyafuLWBUqVEv5VcaJJPBVJvTwTxNh4tPX", "senderPublicKey": "4cHkGAqfd5S8yGnVB6eHDYTeE5ciLkQ7PuGAXFzjf7z5", "proofs": [ "KfWKHnH1CjzbWAoJqfg4WAVuq96hHLTZhWjbwvYsrKE6MnxUuDh39ebqU7cgS7j5t5q95XssjjpmL8jDUFb6gCn" ], "script": "base64:AAIFAAAAAAAAAC4IAhIDCgEIEgQKAggIEgQKAgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgQKAggIAAAAGgAAAAATTkZUSXNzdWVyZmVlUGVyY2VudAAAAAAAAAAAAwAAAAANc2NvbmV4RGFwcEtleQIAAAAKc2NvbmV4RGFwcAAAAAAJb3JhY2xlS2V5AgAAAAlvcmFjbGVLZXkBAAAABmdldFN0cgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAAAAAABm9yYWNsZQkBAAAABmdldFN0cgAAAAEFAAAACW9yYWNsZUtleQAAAAAJb3JhY2xlRmVlCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQmAAAAAQUAAAAGb3JhY2xlAgAAACtDb2xsZWN0aW9ucyBkYXBwIGRvZXNudCBoYXZlIG9yYWNsZSBkZWZpbmVkAAAAAApzY29uZXhEYXB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AAA5uZXdSZWNvcmRQcmljZQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAIYWRkcmVzc18FAAAACWJpZEF1dGhvcgIAAAAJX2F1Y3Rpb25fBQAAAAlhdWN0aW9uSWQCAAAABV9iaWRfBQAAAAViaWRJZAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACGFkZHJlc3NfBQAAAAxhdWN0aW9uT3duZXICAAAACV9hdWN0aW9uXwUAAAAJYXVjdGlvbklkAgAAAApfbG9ja2VkTkZUBQAAAANuaWwEAAAAA3JlcwkAA/wAAAAECQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAhjZXJ0RGFwcAIAAAAKY3JlYXRlQ2VydAkABEwAAAACBQAAAAliaWRBdXRob3IJAARMAAAAAgUAAAAHYXNzZXRJZAkABEwAAAACBQAAAA1BcnRpc3RBZGRyZXNzBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAADcmVzBQAAAANyZXMFAAAABmJ1eVJlcwkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ObnROg==", "height": 1962266, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: sQ5ADYC1m8uYixyXeq6WuB4EmdyBQdcKLxvrrborwWA Next: 6imF2cj8FpceMEELLeGuR8TY6QWAQeNcWQ2nb3tsgUNG Diff:
OldNewDifferences
2727
2828 let certDapp = valueOrErrorMessage(getString(oracleFee, "certDapp"), "certDapp not found")
2929
30+let feeDapp = valueOrErrorMessage(getString(oracleFee, "feeDapp"), "feeDapp not found")
31+
3032 let userDapp = value(addressFromString(valueOrErrorMessage(getString(oracleFee, "userDapp"), "userdapp not found")))
3133
3234 let USDNAssetId = fromBase58String(getStringValue(oracleFee, "USDNAssetId"))
4143
4244
4345 func keyAuctionType (auctionId) = (("auction_" + auctionId) + "_actionType")
44-
45-
46-func keyRoyalty (caller,artId) = ((("art_royalty_" + artId) + "_") + caller)
4746
4847
4948 func getStrfromMain (key) = match getString(addressFromStringValue(sconexDapp), key) {
114113 }
115114
116115
117-func getArtistRoyalty (artist,artId) = {
118- let royaltyVal = getIntfromMain(keyRoyalty(artist, artId))
119- if (if ((royaltyVal > 0))
120- then (85 >= royaltyVal)
121- else false)
122- then throw("Artist royalty incorrect")
123- else royaltyVal
124- }
125-
126-
127116 func acceptedAssetIds (assetId) = if ((assetId != toBase58String(USDNAssetId)))
128117 then throw("Only USDN accepted")
129118 else true
152141 then throw("No payment attached")
153142 else if ((size(i.payments) >= 2))
154143 then throw("Too many payments attached")
155- else {
156- let pmt = value(i.payments[0])
157- let assetId = value(pmt.assetId)
158- let asset = getNFTIssuer(assetId)
159- if ((asset == ""))
160- then throw("You can only sell an NFT created on SCONE Marketplace")
161- else if (!(containsElement([auctionType1, auctionType3], auctionType)))
162- then throw("We don't know this auction type")
163- else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))]
164- }
144+ else if ((i.payments[0].amount != 1))
145+ then throw("No nft attached to the payment")
146+ else {
147+ let pmt = value(i.payments[0])
148+ let assetId = value(pmt.assetId)
149+ let asset = getNFTIssuer(assetId)
150+ if ((asset == ""))
151+ then throw("You can only sell an NFT created on SCONE Marketplace")
152+ else if (!(containsElement([auctionType1, auctionType3], auctionType)))
153+ then throw("We don't know this auction type")
154+ else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))]
155+ }
165156 }
166157
167158
230221 let newRecordPrice = max([recordPrice, bidAmount])
231222 let ArtistAddress = getNFTArtist(assetId)
232223 let artId = getArtId(assetId)
233- let ArtistfeePercent = getArtistRoyalty(ArtistAddress, artId)
234- if ((ArtistAddress == ""))
224+ let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
225+ if ((transferres == transferres))
235226 then {
236- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
237- if ((transferres == transferres))
227+ let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId], [AttachedPayment(USDNAssetId, amount)])
228+ if ((invokeTeamFeeSplit == invokeTeamFeeSplit))
238229 then {
239- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(auctionOwner), fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
240- let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ""], nil)
241- if ((res == res))
242- then buyRes
243- else throw("Strict value is not equal to itself.")
244- }
245- else throw("Strict value is not equal to itself.")
246- }
247- else {
248- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
249- if ((transferres == transferres))
250- then {
251- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(auctionOwner), fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(Address(fromBase58String(ArtistAddress)), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
230+ let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))]
252231 let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil)
253232 if ((res == res))
254233 then buyRes
256235 }
257236 else throw("Strict value is not equal to itself.")
258237 }
238+ else throw("Strict value is not equal to itself.")
259239 }
260240 else throw("Not a directBuy auction!")
261241 }
296276 let newRecordPrice = max([recordPrice, bidAmount])
297277 let ArtistAddress = getNFTArtist(assetId)
298278 let artId = getArtId(assetId)
299- let ArtistfeePercent = getArtistRoyalty(ArtistAddress, artId)
300- if ((ArtistAddress == ""))
279+ let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId], [AttachedPayment(USDNAssetId, bidAmount)])
280+ if ((invokeTeamFeeSplit == invokeTeamFeeSplit))
301281 then {
302282 let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
303283 if ((transferres == transferres))
304284 then {
305- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
306- let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ""], nil)
307- if ((res == res))
308- then buyRes
309- else throw("Strict value is not equal to itself.")
310- }
311- else throw("Strict value is not equal to itself.")
312- }
313- else {
314- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
315- if ((transferres == transferres))
316- then {
317- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(Address(fromBase58String(ArtistAddress)), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
285+ let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))]
318286 let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil)
319287 if ((res == res))
320288 then buyRes
322290 }
323291 else throw("Strict value is not equal to itself.")
324292 }
293+ else throw("Strict value is not equal to itself.")
325294 }
326295 }
327296
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NFTIssuerfeePercent = 3
55
66 let sconexDappKey = "sconexDapp"
77
88 let oracleKey = "oracleKey"
99
1010 func getStr (key) = match getString(this, key) {
1111 case b: String =>
1212 b
1313 case _ =>
1414 ""
1515 }
1616
1717
1818 let oracle = getStr(oracleKey)
1919
2020 let oracleFee = valueOrErrorMessage(addressFromString(oracle), "Collections dapp doesnt have oracle defined")
2121
2222 let sconexDapp = getStringValue(oracleFee, sconexDappKey)
2323
2424 let collectionsDapp = valueOrErrorMessage(getString(oracleFee, "collectionsDapp"), "collectionDapp not found")
2525
2626 let feeReceiver = valueOrErrorMessage(getString(oracleFee, "feeReceiver"), "feeReceiver not found")
2727
2828 let certDapp = valueOrErrorMessage(getString(oracleFee, "certDapp"), "certDapp not found")
2929
30+let feeDapp = valueOrErrorMessage(getString(oracleFee, "feeDapp"), "feeDapp not found")
31+
3032 let userDapp = value(addressFromString(valueOrErrorMessage(getString(oracleFee, "userDapp"), "userdapp not found")))
3133
3234 let USDNAssetId = fromBase58String(getStringValue(oracleFee, "USDNAssetId"))
3335
3436 let auctionType1 = "BIDTYPE"
3537
3638 let auctionType2 = "TRADITIONAL"
3739
3840 let auctionType3 = "DIRECT"
3941
4042 func getStringByKey (key) = valueOrElse(getString(this, key), "")
4143
4244
4345 func keyAuctionType (auctionId) = (("auction_" + auctionId) + "_actionType")
44-
45-
46-func keyRoyalty (caller,artId) = ((("art_royalty_" + artId) + "_") + caller)
4746
4847
4948 func getStrfromMain (key) = match getString(addressFromStringValue(sconexDapp), key) {
5049 case b: String =>
5150 b
5251 case _ =>
5352 ""
5453 }
5554
5655
5756 func getIntfromMain (key) = match getInteger(addressFromStringValue(sconexDapp), key) {
5857 case b: Int =>
5958 b
6059 case _ =>
6160 0
6261 }
6362
6463
6564 func tryGetInteger (key) = {
6665 let val = match getInteger(this, key) {
6766 case b: Int =>
6867 b
6968 case _ =>
7069 0
7170 }
7271 val
7372 }
7473
7574
7675 func tryGetString (key) = {
7776 let val = match getString(this, key) {
7877 case b: String =>
7978 b
8079 case _ =>
8180 ""
8281 }
8382 val
8483 }
8584
8685
8786 func getNFTIssuer (assetId) = {
8887 let myassetinfo = value(assetInfo(assetId))
8988 if ((myassetinfo.issuer == addressFromStringValue(sconexDapp)))
9089 then "true"
9190 else ""
9291 }
9392
9493
9594 func getNFTArtist (assetId) = {
9695 let ArtistAddress = match getString(addressFromStringValue(sconexDapp), ("nft_issued_" + assetId)) {
9796 case b: String =>
9897 b
9998 case _ =>
10099 ""
101100 }
102101 ArtistAddress
103102 }
104103
105104
106105 func getArtId (assetId) = {
107106 let ArtistAddress = match getString(addressFromStringValue(sconexDapp), ("nft_artId_" + assetId)) {
108107 case b: String =>
109108 b
110109 case _ =>
111110 ""
112111 }
113112 ArtistAddress
114113 }
115114
116115
117-func getArtistRoyalty (artist,artId) = {
118- let royaltyVal = getIntfromMain(keyRoyalty(artist, artId))
119- if (if ((royaltyVal > 0))
120- then (85 >= royaltyVal)
121- else false)
122- then throw("Artist royalty incorrect")
123- else royaltyVal
124- }
125-
126-
127116 func acceptedAssetIds (assetId) = if ((assetId != toBase58String(USDNAssetId)))
128117 then throw("Only USDN accepted")
129118 else true
130119
131120
132121 @Callable(i)
133122 func initDapp (dappKey) = if ((i.caller != this))
134123 then throw("You cannot do this action")
135124 else if ((oracle != ""))
136125 then throw("oracle already set, you can't override!")
137126 else [StringEntry(oracleKey, dappKey)]
138127
139128
140129
141130 @Callable(i)
142131 func transferNft (nftID,receiveNFT) = if ((i.caller == this))
143132 then [ScriptTransfer(addressFromStringValue(receiveNFT), 1, fromBase58String(nftID))]
144133 else throw("Only the dApp can transfer NFT's")
145134
146135
147136
148137 @Callable(i)
149138 func initAuction (startPrice,auctionType) = {
150139 let auctionId = toBase58String(i.transactionId)
151140 if ((size(i.payments) == 0))
152141 then throw("No payment attached")
153142 else if ((size(i.payments) >= 2))
154143 then throw("Too many payments attached")
155- else {
156- let pmt = value(i.payments[0])
157- let assetId = value(pmt.assetId)
158- let asset = getNFTIssuer(assetId)
159- if ((asset == ""))
160- then throw("You can only sell an NFT created on SCONE Marketplace")
161- else if (!(containsElement([auctionType1, auctionType3], auctionType)))
162- then throw("We don't know this auction type")
163- else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))]
164- }
144+ else if ((i.payments[0].amount != 1))
145+ then throw("No nft attached to the payment")
146+ else {
147+ let pmt = value(i.payments[0])
148+ let assetId = value(pmt.assetId)
149+ let asset = getNFTIssuer(assetId)
150+ if ((asset == ""))
151+ then throw("You can only sell an NFT created on SCONE Marketplace")
152+ else if (!(containsElement([auctionType1, auctionType3], auctionType)))
153+ then throw("We don't know this auction type")
154+ else [StringEntry((("auction_" + auctionId) + "_status"), "open"), StringEntry((("auction_" + toBase58String(assetId)) + "_last"), auctionId), StringEntry((("auction_" + auctionId) + "_assetName"), asset), StringEntry((("auction_" + auctionId) + "_assetId"), toBase58String(assetId)), IntegerEntry((("auction_" + auctionId) + "_startedAt"), lastBlock.timestamp), StringEntry((("auction_" + auctionId) + "_owner"), toString(i.caller)), IntegerEntry((("auction_" + auctionId) + "_startPrice"), startPrice), StringEntry(keyAuctionType(auctionId), auctionType), StringEntry((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_lockedNFT"), toBase58String(assetId))]
155+ }
165156 }
166157
167158
168159
169160 @Callable(i)
170161 func cancelAuction (auctionId) = {
171162 let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner"))
172163 if ((toString(i.caller) != auctionOwner))
173164 then throw("Only allowed to auction owner")
174165 else if ((tryGetString((("auction_" + auctionId) + "_status")) != "open"))
175166 then throw("auction is close")
176167 else [StringEntry((("auction_" + auctionId) + "_status"), "cancelled"), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, 1, fromBase58String(getStringValue(this, (("auction_" + auctionId) + "_assetId"))))]
177168 }
178169
179170
180171
181172 @Callable(i)
182173 func placeBid (auctionId) = {
183174 let pmt = value(i.payments[0])
184175 let amount = pmt.amount
185176 let bidId = toBase58String(i.transactionId)
186177 let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId"))
187178 let PayAssetId = if (!(isDefined(pmt.assetId)))
188179 then throw("Only USDN is accepted!")
189180 else toBase58String(value(pmt.assetId))
190181 if (!(acceptedAssetIds(PayAssetId)))
191182 then throw("Auction does only support USDN payments")
192183 else {
193184 let minPrice = tryGetInteger((("auction_" + auctionId) + "_startPrice"))
194185 if ((minPrice > amount))
195186 then throw(("The minimal initial price is set as " + toString(minPrice)))
196187 else {
197188 let auctionType = getStringByKey(keyAuctionType(auctionId))
198189 if ((auctionType == auctionType1))
199190 then [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(amount)) + "\", \"status\": \"open\"}")), IntegerEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"), amount), StringEntry(((((("address_" + toString(i.caller)) + "_auction_") + auctionId) + "_bid_") + bidId), assetId), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "open")]
200191 else throw("Not a BidType auction!")
201192 }
202193 }
203194 }
204195
205196
206197
207198 @Callable(i)
208199 func directBuy (auctionId) = {
209200 let pmt = value(i.payments[0])
210201 let amount = pmt.amount
211202 let bidId = toBase58String(i.transactionId)
212203 let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId"))
213204 let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner"))
214205 let bidAmount = amount
215206 let bidAuthor = toString(i.caller)
216207 let PayAssetId = if (!(isDefined(pmt.assetId)))
217208 then throw("Only USDN is accepted!")
218209 else toBase58String(value(pmt.assetId))
219210 if (!(acceptedAssetIds(PayAssetId)))
220211 then throw("Auction does only support USDN payments")
221212 else {
222213 let minPrice = tryGetInteger((("auction_" + auctionId) + "_startPrice"))
223214 if ((minPrice != amount))
224215 then throw(("The exact price is set as " + toString(minPrice)))
225216 else {
226217 let auctionType = getStringByKey(keyAuctionType(auctionId))
227218 if ((auctionType == auctionType3))
228219 then {
229220 let recordPrice = tryGetInteger((assetId + "_recordPrice"))
230221 let newRecordPrice = max([recordPrice, bidAmount])
231222 let ArtistAddress = getNFTArtist(assetId)
232223 let artId = getArtId(assetId)
233- let ArtistfeePercent = getArtistRoyalty(ArtistAddress, artId)
234- if ((ArtistAddress == ""))
224+ let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
225+ if ((transferres == transferres))
235226 then {
236- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
237- if ((transferres == transferres))
227+ let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId], [AttachedPayment(USDNAssetId, amount)])
228+ if ((invokeTeamFeeSplit == invokeTeamFeeSplit))
238229 then {
239- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(auctionOwner), fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
240- let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ""], nil)
241- if ((res == res))
242- then buyRes
243- else throw("Strict value is not equal to itself.")
244- }
245- else throw("Strict value is not equal to itself.")
246- }
247- else {
248- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
249- if ((transferres == transferres))
250- then {
251- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(addressFromStringValue(auctionOwner), fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(Address(fromBase58String(ArtistAddress)), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
230+ let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"), toString(i.caller)), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))]
252231 let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil)
253232 if ((res == res))
254233 then buyRes
255234 else throw("Strict value is not equal to itself.")
256235 }
257236 else throw("Strict value is not equal to itself.")
258237 }
238+ else throw("Strict value is not equal to itself.")
259239 }
260240 else throw("Not a directBuy auction!")
261241 }
262242 }
263243 }
264244
265245
266246
267247 @Callable(i)
268248 func cancelBid (auctionId,bidId) = {
269249 let assetId = getStringValue(this, (("auction_" + auctionId) + "_assetId"))
270250 let bidAuthor = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"))
271251 let bidAmount = tryGetInteger((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"))
272252 if (if ((toString(i.caller) != bidAuthor))
273253 then (i.caller != this)
274254 else false)
275255 then throw("Only allowed to the bid author or admin")
276256 else if ((tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_status")) != "open"))
277257 then throw("bid is not open")
278258 else [StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"cancelled\"}")), StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "cancelled"), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), ScriptTransfer(Address(fromBase58String(bidAuthor)), bidAmount, USDNAssetId)]
279259 }
280260
281261
282262
283263 @Callable(i)
284264 func acceptBid (auctionId,bidId) = {
285265 let auctionOwner = tryGetString((("auction_" + auctionId) + "_owner"))
286266 let bidAuthor = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_author"))
287267 let bidAmount = tryGetInteger((((("auction_" + auctionId) + "_bid_") + bidId) + "_amount"))
288268 let bidStatus = tryGetString((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"))
289269 let assetId = tryGetString((("auction_" + auctionId) + "_assetId"))
290270 if ((toString(i.caller) != auctionOwner))
291271 then throw("Only allowed to auction owner")
292272 else if ((bidStatus != "open"))
293273 then throw("Bid was cancelled and cannot be accepted")
294274 else {
295275 let recordPrice = tryGetInteger((assetId + "_recordPrice"))
296276 let newRecordPrice = max([recordPrice, bidAmount])
297277 let ArtistAddress = getNFTArtist(assetId)
298278 let artId = getArtId(assetId)
299- let ArtistfeePercent = getArtistRoyalty(ArtistAddress, artId)
300- if ((ArtistAddress == ""))
279+ let invokeTeamFeeSplit = invoke(valueOrErrorMessage(addressFromString(feeDapp), (feeDapp + " not found")), "payFeeResell", [artId], [AttachedPayment(USDNAssetId, bidAmount)])
280+ if ((invokeTeamFeeSplit == invokeTeamFeeSplit))
301281 then {
302282 let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
303283 if ((transferres == transferres))
304284 then {
305- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
306- let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ""], nil)
307- if ((res == res))
308- then buyRes
309- else throw("Strict value is not equal to itself.")
310- }
311- else throw("Strict value is not equal to itself.")
312- }
313- else {
314- let transferres = invoke(this, "transferNft", [assetId, bidAuthor], nil)
315- if ((transferres == transferres))
316- then {
317- let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT")), ScriptTransfer(i.caller, fraction(bidAmount, ((100 - NFTIssuerfeePercent) - ArtistfeePercent), 100), USDNAssetId), ScriptTransfer(Address(fromBase58String(ArtistAddress)), fraction(bidAmount, ArtistfeePercent, 100), USDNAssetId), ScriptTransfer(addressFromStringValue(feeReceiver), fraction(bidAmount, NFTIssuerfeePercent, 100), USDNAssetId)]
285+ let buyRes = [StringEntry((((("auction_" + auctionId) + "_bid_") + bidId) + "_status"), "finished"), StringEntry((("auction_" + auctionId) + "_status"), "finished"), StringEntry((((("assetId_" + assetId) + "_bid_") + bidId) + "_data"), (((((("{\"auctionId\": \"" + auctionId) + "\", \"author\": \"") + toString(i.caller)) + "\", \"amount\": \"") + toString(bidAmount)) + "\", \"status\": \"finished\"}")), IntegerEntry((("auction_" + auctionId) + "_finalPrice"), bidAmount), IntegerEntry((assetId + "_recordPrice"), newRecordPrice), DeleteEntry(((((("address_" + bidAuthor) + "_auction_") + auctionId) + "_bid_") + bidId)), DeleteEntry((((("address_" + auctionOwner) + "_auction_") + auctionId) + "_lockedNFT"))]
318286 let res = invoke(addressFromStringValue(certDapp), "createCert", [bidAuthor, assetId, ArtistAddress], nil)
319287 if ((res == res))
320288 then buyRes
321289 else throw("Strict value is not equal to itself.")
322290 }
323291 else throw("Strict value is not equal to itself.")
324292 }
293+ else throw("Strict value is not equal to itself.")
325294 }
326295 }
327296
328297
329298 @Verifier(tx)
330299 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
331300

github/deemru/w8io/169f3d6 
172.75 ms