tx · 6HCt4U7tmp9zB7tqJ3ZafukEeanwfLbPvtHRSbsUSEyz

3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq:  -0.01000000 Waves

2022.11.22 08:06 [2327887] smart account 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq > SELF 0.00000000 Waves

{ "type": 13, "id": "6HCt4U7tmp9zB7tqJ3ZafukEeanwfLbPvtHRSbsUSEyz", "fee": 1000000, "feeAssetId": null, "timestamp": 1669093586981, "version": 2, "chainId": 84, "sender": "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq", "senderPublicKey": "H6UqxUDcJamDRg1uykVcWMn4zhAMTV7i1nfPq1moLWmJ", "proofs": [ "2wUyWkXq1Sif48mbLGgKUFX91CfTMVaVriDUu5yF8gWMDWRBTC9XzsQzonjj9NsnFhsWaPVTtBCLWyu9cAjvzhS9" ], "script": "base64:BgIfCAISCwoJCAgICAgBCAgIEgQKAggIEgMKAQgSAwoBAQUACXNlcGFyYXRvcgIBXwAEa0J1eQIDYnV5AAVrU2VsbAIEc2VsbAAGa1ByaWNlAgVwcmljZQEFaXNOZnQBB2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgVBc3NldAQFdG9rZW4FByRtYXRjaDADAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwcEAWkBCWNyZWF0ZU5mdAkIbmZ0X25hbWUJbmZ0X293bmVyD25mdF9kQXBwQWRkcmVzcwhuZnRfdHlwZQhuZnRfdGFncxFuZnRfc2VsbGluZ19wcmljZQ9uZnRfZGVzY3JpcHRpb24KbmZ0X29uU2VsbAhuZnRfZGF0YQQIbmV3VG9rZW4JAMIIBQUIbmZ0X25hbWUFD25mdF9kZXNjcmlwdGlvbgABAAAHBAR0eElkCAUBaQ10cmFuc2FjdGlvbklkBAdpc3N1Z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DbmlsAWkBB3NlbGxORlQBBXByaWNlBAskdDAyNDkzMjU3OAkAlAoCCQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BAZ0b2tlbjAIBQskdDAyNDkzMjU3OAJfMQQHYW1vdW50MAgFCyR0MDI0OTMyNTc4Al8yAwkBASEBCQEFaXNOZnQBBQZ0b2tlbjAJAAIBAhBUb2tlbiBpcyBub3QgTkZUCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICBQZrUHJpY2UFCXNlcGFyYXRvcgkA2AQBCQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQJAKQDAQUFcHJpY2UJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKUIAQgFAWkGY2FsbGVyBQlzZXBhcmF0b3IFBWtTZWxsCQCsAgIJAKwCAgkA2AQBBQZ0b2tlbjAFCXNlcGFyYXRvcgkApAMBBQdhbW91bnQwBQNuaWwA/PH7PQ==", "height": 2327887, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JC2J2Zg3MfDDUpdDn7JszMujNB7G3peGGjuCLZEe2qQ2 Next: DYmRVkeAQJmBXqecPUeJKjXYaSHiYFwZ7jfwERixLUf5 Diff:
OldNewDifferences
88 let kSell = "sell"
99
1010 let kPrice = "price"
11-
12-let dAppOwner = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
1311
1412 func isNft (assetId) = match assetInfo(assetId) {
1513 case token: Asset =>
2422
2523
2624 @Callable(i)
27-func issueNft (nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_image) = {
25+func createNft (nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_data) = {
26+ let newToken = Issue(nft_name, nft_description, 1, 0, false)
2827 let txId = i.transactionId
29- let creator = toBase58String(i.caller.bytes)
30- let creator_name = nft_owner
31- let issueMetadata = (((((((("{creator: " + creator) + ",") + ("creator_name: " + creator_name)) + ",") + ("description: " + nft_description)) + ",") + ("nft_art_id" + toBase58String(txId))) + "}")
32- let newToken = Issue(nft_name, issueMetadata, 1, 0, false)
3328 let issueId = calculateAssetId(newToken)
34-[newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_type"), nft_type), StringEntry(((toBase58String(issueId) + separator) + "nft_tags"), nft_tags), IntegerEntry(((toBase58String(issueId) + separator) + "nft_selling_price"), nft_selling_price), StringEntry(((toBase58String(issueId) + separator) + "nft_onSell"), nft_onSell), StringEntry(((toBase58String(issueId) + separator) + "nft_image"), nft_image), StringEntry(((toBase58String(issueId) + separator) + "nft_data"), issueMetadata), StringEntry(((toBase58String(i.caller.bytes) + separator) + "nft_owner"), creator), StringEntry(((toBase58String(txId) + separator) + "issue_nft"), toBase58String(issueId))]
29+[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))]
3530 }
3631
3732
3833
3934 @Callable(i)
40-func sellNFT (price) = {
41- let token = i.payments[0].assetId
42- let assetid = value(i.payments[0].assetId)
43- let amount0 = value(i.payments[0].amount)
44- if (!(isNft(assetid)))
45- then throw("Token is not NFT")
46- else [StringEntry((toBase58String(assetid) + "_owner"), toString(i.caller)), StringEntry((toBase58String(assetid) + "_nft_selling_price"), toString(price)), StringEntry((toBase58String(assetid) + "_onsell"), "true"), StringEntry(((kPrice + separator) + toBase58String(value(i.payments[0].assetId))), toString(price)), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(assetid) + separator) + toString(amount0)))]
47- }
48-
49-
50-
51-@Callable(i)
52-func buyNFTTesting (nftID) = {
53- let caller = toBase64String(i.caller.bytes)
54- let assetId = fromBase58String(nftID)
55- let amount = value(i.payments[0].amount)
56- let nftOwner = getStringValue((toBase58String(assetId) + "_owner"))
57- let price = match getString(this, (toBase58String(assetId) + "_nft_selling_price")) {
58- case a: String =>
59- a
60- case _ =>
61- "0"
62- }
63- let issell = match getString(this, (toBase58String(assetId) + "_onsell")) {
64- case a: String =>
65- a
66- case _ =>
67- "false"
68- }
69- if ((i.payments[0].assetId != unit))
70- then throw("Pay in waves")
71- else if (if ((parseIntValue(price) != amount))
72- then (parseIntValue(price) == 0)
73- else false)
74- then throw("Invalid payment")
75- else if ((caller == nftOwner))
76- then throw("NFT owner will not able to buy this")
77- else if ((caller == toBase58String(dAppOwner)))
78- then throw("You are not eligible due to owner account of app")
79- else if ((issell != "true"))
80- then throw("Not on sell")
81- else [StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount))), StringEntry((((toString(i.caller) + separator) + kBuy) + "_from"), nftOwner), DeleteEntry((toBase58String(assetId) + "_owner")), DeleteEntry((toBase58String(assetId) + "_onsell")), ScriptTransfer(addressFromStringValue(nftOwner), parseIntValue(price), unit), ScriptTransfer(i.caller, 1, assetId)]
35+func issueNft (name,meta) = {
36+ let newToken = Issue(name, meta, 1, 0, false)
37+ let issueId = calculateAssetId(newToken)
38+[newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller))]
8239 }
8340
8441
8845 let assetId = fromBase58String(nftID)
8946 let amount = value(i.payments[0].amount)
9047 let price = valueOrErrorMessage(getString(((kPrice + separator) + nftID)), "There is no price for this NFT")
91- let issell = match getString(this, (toBase58String(assetId) + "_onsell")) {
92- case a: String =>
93- a
94- case _ =>
95- "false"
96- }
9748 let owner = valueOrErrorMessage(getStringValue(((nftID + separator) + "Owner")), "No owner")
9849 if ((i.payments[0].assetId != unit))
9950 then throw("Pay in waves")
10051 else if ((parseIntValue(price) > amount))
10152 then throw("Invalid payment")
102- else if ((issell != "true"))
103- then throw("Not on sell")
104- else [StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount))), DeleteEntry((toBase58String(assetId) + "_owner")), DeleteEntry((toBase58String(assetId) + "_onsell")), ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(value(addressFromString(owner)), parseIntValue(price), unit)]
53+ else [ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(value(addressFromString(owner)), parseIntValue(price), unit), StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount)))]
10554 }
10655
10756
10857
10958 @Callable(i)
110-func deleteNFT () = {
111- let token0 = i.payments[0].assetId
112-[StringEntry(("delete_" + toBase58String(value(i.payments[0].assetId))), "token burn"), Burn(value(token0), 1)]
59+func sellNFT (price) = {
60+ let $t024932578 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
61+ let token0 = $t024932578._1
62+ let amount0 = $t024932578._2
63+ if (!(isNft(token0)))
64+ then throw("Token is not NFT")
65+ else [StringEntry(((kPrice + separator) + toBase58String(value(i.payments[0].assetId))), toString(price)), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(token0) + separator) + toString(amount0)))]
11366 }
11467
11568
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "_"
55
66 let kBuy = "buy"
77
88 let kSell = "sell"
99
1010 let kPrice = "price"
11-
12-let dAppOwner = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
1311
1412 func isNft (assetId) = match assetInfo(assetId) {
1513 case token: Asset =>
1614 if (if ((token.decimals == 0))
1715 then (token.quantity == 1)
1816 else false)
1917 then (token.reissuable == false)
2018 else false
2119 case _ =>
2220 false
2321 }
2422
2523
2624 @Callable(i)
27-func issueNft (nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_image) = {
25+func createNft (nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_data) = {
26+ let newToken = Issue(nft_name, nft_description, 1, 0, false)
2827 let txId = i.transactionId
29- let creator = toBase58String(i.caller.bytes)
30- let creator_name = nft_owner
31- let issueMetadata = (((((((("{creator: " + creator) + ",") + ("creator_name: " + creator_name)) + ",") + ("description: " + nft_description)) + ",") + ("nft_art_id" + toBase58String(txId))) + "}")
32- let newToken = Issue(nft_name, issueMetadata, 1, 0, false)
3328 let issueId = calculateAssetId(newToken)
34-[newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_type"), nft_type), StringEntry(((toBase58String(issueId) + separator) + "nft_tags"), nft_tags), IntegerEntry(((toBase58String(issueId) + separator) + "nft_selling_price"), nft_selling_price), StringEntry(((toBase58String(issueId) + separator) + "nft_onSell"), nft_onSell), StringEntry(((toBase58String(issueId) + separator) + "nft_image"), nft_image), StringEntry(((toBase58String(issueId) + separator) + "nft_data"), issueMetadata), StringEntry(((toBase58String(i.caller.bytes) + separator) + "nft_owner"), creator), StringEntry(((toBase58String(txId) + separator) + "issue_nft"), toBase58String(issueId))]
29+[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))]
3530 }
3631
3732
3833
3934 @Callable(i)
40-func sellNFT (price) = {
41- let token = i.payments[0].assetId
42- let assetid = value(i.payments[0].assetId)
43- let amount0 = value(i.payments[0].amount)
44- if (!(isNft(assetid)))
45- then throw("Token is not NFT")
46- else [StringEntry((toBase58String(assetid) + "_owner"), toString(i.caller)), StringEntry((toBase58String(assetid) + "_nft_selling_price"), toString(price)), StringEntry((toBase58String(assetid) + "_onsell"), "true"), StringEntry(((kPrice + separator) + toBase58String(value(i.payments[0].assetId))), toString(price)), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(assetid) + separator) + toString(amount0)))]
47- }
48-
49-
50-
51-@Callable(i)
52-func buyNFTTesting (nftID) = {
53- let caller = toBase64String(i.caller.bytes)
54- let assetId = fromBase58String(nftID)
55- let amount = value(i.payments[0].amount)
56- let nftOwner = getStringValue((toBase58String(assetId) + "_owner"))
57- let price = match getString(this, (toBase58String(assetId) + "_nft_selling_price")) {
58- case a: String =>
59- a
60- case _ =>
61- "0"
62- }
63- let issell = match getString(this, (toBase58String(assetId) + "_onsell")) {
64- case a: String =>
65- a
66- case _ =>
67- "false"
68- }
69- if ((i.payments[0].assetId != unit))
70- then throw("Pay in waves")
71- else if (if ((parseIntValue(price) != amount))
72- then (parseIntValue(price) == 0)
73- else false)
74- then throw("Invalid payment")
75- else if ((caller == nftOwner))
76- then throw("NFT owner will not able to buy this")
77- else if ((caller == toBase58String(dAppOwner)))
78- then throw("You are not eligible due to owner account of app")
79- else if ((issell != "true"))
80- then throw("Not on sell")
81- else [StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount))), StringEntry((((toString(i.caller) + separator) + kBuy) + "_from"), nftOwner), DeleteEntry((toBase58String(assetId) + "_owner")), DeleteEntry((toBase58String(assetId) + "_onsell")), ScriptTransfer(addressFromStringValue(nftOwner), parseIntValue(price), unit), ScriptTransfer(i.caller, 1, assetId)]
35+func issueNft (name,meta) = {
36+ let newToken = Issue(name, meta, 1, 0, false)
37+ let issueId = calculateAssetId(newToken)
38+[newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller))]
8239 }
8340
8441
8542
8643 @Callable(i)
8744 func buyNFT (nftID) = {
8845 let assetId = fromBase58String(nftID)
8946 let amount = value(i.payments[0].amount)
9047 let price = valueOrErrorMessage(getString(((kPrice + separator) + nftID)), "There is no price for this NFT")
91- let issell = match getString(this, (toBase58String(assetId) + "_onsell")) {
92- case a: String =>
93- a
94- case _ =>
95- "false"
96- }
9748 let owner = valueOrErrorMessage(getStringValue(((nftID + separator) + "Owner")), "No owner")
9849 if ((i.payments[0].assetId != unit))
9950 then throw("Pay in waves")
10051 else if ((parseIntValue(price) > amount))
10152 then throw("Invalid payment")
102- else if ((issell != "true"))
103- then throw("Not on sell")
104- else [StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount))), DeleteEntry((toBase58String(assetId) + "_owner")), DeleteEntry((toBase58String(assetId) + "_onsell")), ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(value(addressFromString(owner)), parseIntValue(price), unit)]
53+ else [ScriptTransfer(i.caller, 1, assetId), ScriptTransfer(value(addressFromString(owner)), parseIntValue(price), unit), StringEntry(((toString(i.caller) + separator) + kBuy), ((nftID + separator) + toString(amount)))]
10554 }
10655
10756
10857
10958 @Callable(i)
110-func deleteNFT () = {
111- let token0 = i.payments[0].assetId
112-[StringEntry(("delete_" + toBase58String(value(i.payments[0].assetId))), "token burn"), Burn(value(token0), 1)]
59+func sellNFT (price) = {
60+ let $t024932578 = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
61+ let token0 = $t024932578._1
62+ let amount0 = $t024932578._2
63+ if (!(isNft(token0)))
64+ then throw("Token is not NFT")
65+ else [StringEntry(((kPrice + separator) + toBase58String(value(i.payments[0].assetId))), toString(price)), StringEntry(((toString(i.caller) + separator) + kSell), ((toBase58String(token0) + separator) + toString(amount0)))]
11366 }
11467
11568

github/deemru/w8io/026f985 
39.19 ms