tx · 13RnVyQLGTozxdiJ5qB8gJH8PRFTsXwSzt1fCp67HjNx

3MxHSGZtCpBmRNR31f5C1D4nBckhA8SmfHQ:  -0.01400000 Waves

2021.05.12 14:33 [1522402] smart account 3MxHSGZtCpBmRNR31f5C1D4nBckhA8SmfHQ > SELF 0.00000000 Waves

{ "type": 13, "id": "13RnVyQLGTozxdiJ5qB8gJH8PRFTsXwSzt1fCp67HjNx", "fee": 1400000, "feeAssetId": null, "timestamp": 1620819277040, "version": 2, "chainId": 84, "sender": "3MxHSGZtCpBmRNR31f5C1D4nBckhA8SmfHQ", "senderPublicKey": "8u2gfQd56H2iqajtAR9bsVn22hT4jz1Yn6iyktyTHP51", "proofs": [ "211svGQSYrXNpVQ7oEVo3sAMwUNWziiU5QG81qPJvNeU3JRXTaPmXVU177EYNjyVytgCE1qbaQLSnJNPfdhNK7jL" ], "script": "base64:AAIEAAAAAAAAACkIAhIECgIBCBIDCgEIEgMKAQgSAwoBCBIFCgMICAgSBAoCCAgSAwoBCAAAACIAAAAACHVuaXRUZXN0BwAAAAAJb3JhY2xlRmVlCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOMnM1UnRhSFBCZW5Dc3gyRUNjb0ZSYllIeDNub1poWFcxAAAAAAhzaWduRGFwcAkBAAAABXZhbHVlAAAAAQkABCYAAAABAgAAACMzTkMyOGhTaXZybXNUVVhhWUQxeDZMMzYySjRacFVub1RkQgAAAAAMYXJ0d29ya3NEYXBwCQEAAAAFdmFsdWUAAAABCQAEJgAAAAECAAAAIzNOQnluZmJYQzJLYXN0VXhodWtjTVVhRTU4SzljQmRCOVVZAAAAAAtmZWVSZWNlaXZlcgIAAAAjM04xRTZ0WGRkUm9WYVJmUTlkUTN2ZzVMYVcyZnNkOEhLdWIAAAAACHVzZXJEYXBwAwUAAAAIdW5pdFRlc3QJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQIAAAAjM010NFJHTUV5alNXWUFvY1RQcWQ1NXdkSFFRQjNQV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AAAAgUAAAAKYmlkRGF0YUtleQIAAAAFX09QRU4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAACmJpZERhdGFLZXkCAAAAAV8FAAAACWJpZFN0YXR1cwkAASwAAAACCQABLAAAAAIFAAAAB2JpZERhdGECAAAAAV8JAAGkAAAAAQUAAAAEZGF0ZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAAGY2FsbGVyCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgUAAAAKYmlkRGF0YUFycgAAAAAAAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAAGY2FsbGVyCQAEJQAAAAEJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAAAAAAAAAgUAAAAGY2FsbGVyBQAAAAVjaHJpcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAC//DOM=", "height": 1522402, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AdNStbfotW9WGcBf5JSeTekPtnEMHyzZdwueZA5XrRMs Next: A3imqQHcxcw5ZmUR58PWAZNjA82BLxrT7NvpZPamiPBn Diff:
OldNewDifferences
254254 if ((caller != saleOwner))
255255 then throw("You cannot do this action")
256256 else {
257- let offerExist = getStrByK((((((((("offer_" + nftid) + "_") + saleOwner) + "_") + offerOwner) + "_") + offerId) + "_OPEN"))
257+ let offerExist = getStrByK((((((((("offer_" + saleOwner) + "_") + nftid) + "_") + offerOwner) + "_") + offerId) + "_OPEN"))
258258 if ((offerExist == ""))
259259 then throw("Offer not found or not for sale")
260260 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let unitTest = false
55
66 let oracleFee = value(addressFromString("3N2s5RtaHPBenCsx2ECcoFRbYHx3noZhXW1"))
77
88 let signDapp = value(addressFromString("3NC28hSivrmsTUXaYD1x6L362J4ZpUnoTdB"))
99
1010 let artworksDapp = value(addressFromString("3NBynfbXC2KastUxhukcMUaE58K9cBdB9UY"))
1111
1212 let feeReceiver = "3N1E6tXddRoVaRfQ9dQ3vg5LaW2fsd8HKub"
1313
1414 let userDapp = if (unitTest)
1515 then value(addressFromString("3Mt4RGMEyjSWYAocTPqd55wdHQQB3PU2UCm"))
1616 else value(addressFromString("3N8xXaYjE27Aa79d5hHrhHu9HaFoTBmhDEj"))
1717
1818 let whitelistDapp = value(addressFromString("3N6BaV1dCB4zg43goNNHaCtvR13BcyJ5Gsq"))
1919
2020 let signAssetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
2121
2222 let usdnAssetId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
2323
2424 let wavesAssetId = base58''
2525
2626 let chris = "3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp"
2727
2828 let joep = "3Mzm4VLwsN9uZwbTMzPj3XuxV6kEfAR8UDN"
2929
3030 let signCut = 3
3131
3232 let originlaArtistCut = 10
3333
3434 let dappRunning = valueOrElse(getBoolean(userDapp, "conf_dapp_is_running"), true)
3535
3636 let maintenanceMSG = valueOrElse(getString(userDapp, "conf_maintenance_msg"), "")
3737
3838 let userSuspended = "SUSPENDED"
3939
4040 let userRemoved = "REMOVED"
4141
4242 let artIllegal = "ILLEGAL"
4343
4444 func getUserStrByK (key) = valueOrElse(getString(userDapp, key), "Error")
4545
4646
4747 func getArtStrByK (key) = valueOrElse(getString(artworksDapp, key), "")
4848
4949
5050 func getStrByK (key) = valueOrElse(getString(this, key), "")
5151
5252
5353 func getIntByK (key) = valueOrElse(getInteger(this, key), 0)
5454
5555
5656 func keyUserStatus (addr) = ("user_status_" + addr)
5757
5858
5959 func keySignID (artistAddr,artId) = ((("art_signid_" + artId) + "_") + artistAddr)
6060
6161
6262 func keyFlag (artistAddr,artId) = ((("art_flag_" + artId) + "_") + artistAddr)
6363
6464
6565 func keyNFTData (id) = ("nft_" + id)
6666
6767
6868 func idCallerDate (i) = if (!(dappRunning))
6969 then throw(maintenanceMSG)
7070 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
7171
7272
7373 func isPayment (i) = if ((size(i.payments) == 0))
7474 then throw("No payment attached")
7575 else {
7676 let payment = value(i.payments[0])
7777 let amount = value(payment.amount)
7878 $Tuple2(payment, amount)
7979 }
8080
8181
8282 func isSignArtNFT (id) = {
8383 let assetDetails = value(assetInfo(id))
8484 if (if (if (if ((assetDetails.quantity != 1))
8585 then true
8686 else (assetDetails.decimals != 0))
8787 then true
8888 else (assetDetails.reissuable != false))
8989 then true
9090 else (assetDetails.issuer != artworksDapp))
9191 then false
9292 else true
9393 }
9494
9595
9696 func acceptedAssetIds (assetId) = if (if (if (if ((assetId != toBase58String(signAssetId)))
9797 then (assetId != toBase58String(wavesAssetId))
9898 else false)
9999 then (assetId != "WAVES")
100100 else false)
101101 then (assetId != toBase58String(usdnAssetId))
102102 else false)
103103 then false
104104 else true
105105
106106
107107 func getBidAssetId (assetId) = if ((assetId == "WAVES"))
108108 then unit
109109 else fromBase58String(assetId)
110110
111111
112112 func getSaleOwnerAndStatus (nftid) = {
113113 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
114114 if ((saleOwner == "none"))
115115 then throw("NFT not found")
116116 else {
117117 let saleStatus = getStrByK(((("sale2nd_status_" + saleOwner) + "_") + nftid))
118118 if ((saleStatus != "OPEN"))
119119 then throw("NFT not for sale")
120120 else saleOwner
121121 }
122122 }
123123
124124
125125 func getBidData (key) = {
126126 let bidData = getStrByK((key + "_OPEN"))
127127 if ((bidData == ""))
128128 then throw("Offer not found")
129129 else {
130130 let bidDataArr = split(bidData, "_")
131131 let assetId = getBidAssetId(bidDataArr[0])
132132 $Tuple3(bidDataArr, assetId, bidData)
133133 }
134134 }
135135
136136
137137 @Callable(i)
138138 func sellNFT (price,asset) = {
139139 let $t048374876 = idCallerDate(i)
140140 let id = $t048374876._1
141141 let caller = $t048374876._2
142142 let date = $t048374876._3
143143 let $t048814917 = isPayment(i)
144144 let payment = $t048814917._1
145145 let amount = $t048814917._2
146146 let assetId = if (if (isDefined(payment.assetId))
147147 then isSignArtNFT(value(payment.assetId))
148148 else false)
149149 then payment.assetId
150150 else throw("No NFT found")
151151 if (!(acceptedAssetIds(asset)))
152152 then throw("Only SIGN, USDN or WAVES accepted")
153153 else {
154154 let nftData = split(getArtStrByK(keyNFTData(toBase58String(value(assetId)))), "_")
155155 let artSignID = getArtStrByK(keySignID(nftData[6], nftData[5]))
156156 if ((size(artSignID) == 0))
157157 then throw("Artwork not found on SIGN Art")
158158 else {
159159 let artStatus = getArtStrByK(keyFlag(nftData[6], nftData[5]))
160160 if ((artStatus == artIllegal))
161161 then throw("Original Artwork flagged as ILLEGAL")
162162 else {
163163 let artistStatus = getUserStrByK(keyUserStatus(nftData[6]))
164164 if (containsElement([userSuspended, userRemoved], artistStatus))
165165 then throw(("Original Artist " + artistStatus))
166166 else [StringEntry((((("sale2nd_info_" + caller) + "_") + toBase58String(value(payment.assetId))) + "_OPEN"), ((((toString(date) + "_") + toString(price)) + "_") + asset)), StringEntry(((("sale2nd_status_" + caller) + "_") + toBase58String(value(payment.assetId))), "OPEN"), StringEntry(("current_owner_on_dapp_" + toBase58String(value(payment.assetId))), caller)]
167167 }
168168 }
169169 }
170170 }
171171
172172
173173
174174 @Callable(i)
175175 func cancelSale (nftid) = {
176176 let $t067526791 = idCallerDate(i)
177177 let id = $t067526791._1
178178 let caller = $t067526791._2
179179 let date = $t067526791._3
180180 let saleOwner = getStrByK(("current_owner_on_dapp_" + nftid))
181181 if ((saleOwner != caller))
182182 then throw("You don't own this NFT")
183183 else {
184184 let saleStatus = getStrByK(((("sale2nd_status_" + caller) + "_") + nftid))
185185 if ((saleStatus != "OPEN"))
186186 then throw("Sale not active")
187187 else {
188188 let saleInfo = getStrByK(((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + saleStatus))
189189 [DeleteEntry((((("sale2nd_info_" + caller) + "_") + nftid) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + caller) + "_") + nftid)), StringEntry((((((((("sale2nd_info_" + caller) + "_") + nftid) + "_") + toString(date)) + "_") + id) + "_CANCELLED"), saleInfo), StringEntry(("current_owner_on_dapp_" + nftid), "none"), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))]
190190 }
191191 }
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func buyNFT (nftid) = {
198198 let $t076527723 = idCallerDate(i)
199199 let id = $t076527723._1
200200 let caller = $t076527723._2
201201 let date = $t076527723._3
202202 let saleOwner = getSaleOwnerAndStatus(nftid)
203203 let saleInfo = getStrByK((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_OPEN"))
204204 if ((size(saleInfo) == 0))
205205 then throw("Sale Not found!")
206206 else {
207207 let saleInfoArray = split(saleInfo, "_")
208208 let $t079607996 = isPayment(i)
209209 let payment = $t079607996._1
210210 let amount = $t079607996._2
211211 if (if ((saleInfoArray[1] != toString(amount)))
212212 then true
213213 else (saleInfoArray[2] != toBase58String(value(payment.assetId))))
214214 then throw("Payment infos don't match.")
215215 else {
216216 let amountForSign = fraction(amount, signCut, 100)
217217 let amountForOwner = (amount - amountForSign)
218218 [DeleteEntry((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), StringEntry((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(payment.assetId))) + "_to_") + caller)), StringEntry(("current_owner_on_dapp_" + nftid), "none"), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, payment.assetId), ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, payment.assetId), ScriptTransfer(Address(fromBase58String(caller)), 1, fromBase58String(nftid))]
219219 }
220220 }
221221 }
222222
223223
224224
225225 @Callable(i)
226226 func setOffer (nftid) = {
227227 let $t089749012 = idCallerDate(i)
228228 let id = $t089749012._1
229229 let caller = $t089749012._2
230230 let date = $t089749012._3
231231 let $t090179053 = isPayment(i)
232232 let payment = $t090179053._1
233233 let amount = $t090179053._2
234234 let assetId = if (!(isDefined(payment.assetId)))
235235 then "WAVES"
236236 else toBase58String(value(payment.assetId))
237237 if (!(acceptedAssetIds(assetId)))
238238 then throw("asset not accepted")
239239 else {
240240 let saleOwner = getSaleOwnerAndStatus(nftid)
241241 [StringEntry((((((((("offer2nd_" + saleOwner) + "_") + nftid) + "_") + caller) + "_") + id) + "_OPEN"), ((((((((assetId + "_") + toString(amount)) + "_") + toString(date)) + "_") + caller) + "_") + id))]
242242 }
243243 }
244244
245245
246246
247247 @Callable(i)
248248 func acceptOffer (nftid,offerId,offerOwner) = {
249249 let $t097639837 = idCallerDate(i)
250250 let id = $t097639837._1
251251 let caller = $t097639837._2
252252 let date = $t097639837._3
253253 let saleOwner = getSaleOwnerAndStatus(nftid)
254254 if ((caller != saleOwner))
255255 then throw("You cannot do this action")
256256 else {
257- let offerExist = getStrByK((((((((("offer_" + nftid) + "_") + saleOwner) + "_") + offerOwner) + "_") + offerId) + "_OPEN"))
257+ let offerExist = getStrByK((((((((("offer_" + saleOwner) + "_") + nftid) + "_") + offerOwner) + "_") + offerId) + "_OPEN"))
258258 if ((offerExist == ""))
259259 then throw("Offer not found or not for sale")
260260 else {
261261 let saleInfo = getStrByK((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_OPEN"))
262262 if ((size(saleInfo) == 0))
263263 then throw("Sale Not found!")
264264 else {
265265 let bidDataKey = ((((((("offer2nd_" + saleOwner) + "_") + nftid) + "_") + offerOwner) + "_") + offerId)
266266 let $t01045010509 = getBidData(bidDataKey)
267267 let bidDataArr = $t01045010509._1
268268 let assetId = $t01045010509._2
269269 let bidData = $t01045010509._3
270270 let amount = value(parseInt(bidDataArr[1]))
271271 let amountForSign = fraction(amount, signCut, 100)
272272 let amountForOwner = (amount - amountForSign)
273273 [DeleteEntry((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_OPEN")), DeleteEntry((bidDataKey + "_OPEN")), DeleteEntry(((("sale2nd_status_" + saleOwner) + "_") + nftid)), StringEntry((bidDataKey + "_CLOSED"), ((((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(assetId))) + "_to_") + offerOwner) + "_") + offerId)), StringEntry((((((((("sale2nd_info_" + saleOwner) + "_") + nftid) + "_") + toString(date)) + "_") + id) + "_CLOSED"), ((((((toString(date) + "_") + toString(amount)) + "_") + toBase58String(value(assetId))) + "_to_") + offerOwner)), StringEntry(("current_owner_on_dapp_" + nftid), "none"), ScriptTransfer(Address(fromBase58String(feeReceiver)), amountForSign, assetId), ScriptTransfer(Address(fromBase58String(saleOwner)), amountForOwner, assetId), ScriptTransfer(Address(fromBase58String(bidDataArr[3])), 1, fromBase58String(nftid))]
274274 }
275275 }
276276 }
277277 }
278278
279279
280280
281281 @Callable(i)
282282 func cancelOffer (nftid,offerId) = {
283283 let $t01158111811 = idCallerDate(i)
284284 let id = $t01158111811._1
285285 let caller = $t01158111811._2
286286 let date = $t01158111811._3
287287 let saleOwner = getSaleOwnerAndStatus(nftid)
288288 let bidDataKey = ((((((("offer2nd_" + saleOwner) + "_") + nftid) + "_") + caller) + "_") + offerId)
289289 let $t01194712047 = getBidData(((((((("offer_" + nftid) + "_") + saleOwner) + "_") + caller) + "_") + offerId))
290290 let bidDataArr = $t01194712047._1
291291 let assetId = $t01194712047._2
292292 let bidData = $t01194712047._3
293293 let bidStatus = "CANCELLED"
294294 [DeleteEntry((bidDataKey + "_OPEN")), StringEntry(((bidDataKey + "_") + bidStatus), ((bidData + "_") + toString(date))), ScriptTransfer(Address(fromBase58String(caller)), parseIntValue(bidDataArr[1]), assetId)]
295295 }
296296
297297
298298
299299 @Callable(i)
300300 func deleteEntry (entry) = {
301301 let caller = toString(addressFromPublicKey(i.callerPublicKey))
302302 if ((caller == chris))
303303 then [DeleteEntry(entry)]
304304 else throw("no")
305305 }
306306
307307

github/deemru/w8io/169f3d6 
42.14 ms