tx · EmYEvjKctDahNWVDr3enj5J6dLyXEert4aRPb43c1PSU 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves 2023.03.28 09:23 [2509436] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{ "type": 13, "id": "EmYEvjKctDahNWVDr3enj5J6dLyXEert4aRPb43c1PSU", "fee": 1000000, "feeAssetId": null, "timestamp": 1679984741309, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "24eyi3JUBSfEh5vjEknV9EkjDadGDpr5zYdM9MvbwM41tdU1M98VYzaunjAg4aQWbTXvi5mjw3bWmGuMDHhFJZv4" ], "script": "base64:BgIICAISBAoCGAEAAQFpAQ5idXlBbGxQcm9kdWN0cwIHbmZ0SW5mbwt0b3RhbGFtb3VudAQFYnV5ZXIIBQFpBmNhbGxlcgQFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+BAxidXllckJhbGFuY2UJAPAHAgUFYnV5ZXIFBXRlYW1zBAZhbW91bnQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BARuZlQxCQC1CQIJAJEDAgUHbmZ0SW5mbwAAAgFfBARuZlQyCQC1CQIJAJEDAgUHbmZ0SW5mbwABAgFfBARuZlQzCQC1CQIJAJEDAgUHbmZ0SW5mbwACAgFfBARuZlQ0CQC1CQIJAJEDAgUHbmZ0SW5mbwADAgFfBARuZlQ1CQC1CQIJAJEDAgUHbmZ0SW5mbwAEAgFfAwkAZgIFC3RvdGFsYW1vdW50BQZhbW91bnQJAAIBAhx5b3VyIHBheWluZyBhbW91bnQgaXMgd3JvbmcgAwkAZgIFBmFtb3VudAUMYnV5ZXJCYWxhbmNlCQACAQI6QnV5ZXIgZG9lcyBub3Qga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AwIFBG5mVDEAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQVidXllcgABCQDZBAEJAJEDAgUEbmZUMgAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBCQCRAwIFBG5mVDEAAQkBDXBhcnNlSW50VmFsdWUBCQCRAwIFBG5mVDEAAgkA2QQBCQCRAwIFBG5mVDEAAwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQRuZlQyAAEJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQRuZlQyAAIJANkEAQkAkQMCBQRuZlQyAAMFA25pbAUDbmlsAHnjZ4Q=", "height": 2509436, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6vmGXXdaKTBTBftFackmQZMCz9EYndAJxEyScHR9v4Ae Next: 24jF4pDyg7kFTqAn9NKxoc28K135hh2VaTtKQY9kBq8D Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | else if ((amount > buyerBalance)) | |
20 | 20 | then throw("Buyer does not have enough funds to complete the purchase.") | |
21 | 21 | else if ((size(nftInfo) == 1)) | |
22 | - | then [StringEntry((((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]) + "currency") + nfT1[3]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), parseIntValue(nfT1[2]), teams)] | |
22 | + | then [StringEntry((((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]) + "currency") + nfT1[3]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), teams)] | |
23 | 23 | else if ((size(nftInfo) == 2)) | |
24 | 24 | then [StringEntry((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]), ("buyer" + toString(buyer))), StringEntry((((((("second_nft_Info=" + "nftId") + nfT2[0]) + "seller_address") + nfT2[1]) + "price") + nfT2[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), parseIntValue(nfT1[2]), fromBase58String(nfT1[3])), ScriptTransfer(Address(fromBase58String(nfT2[1])), parseIntValue(nfT2[2]), fromBase58String(nfT2[3]))] | |
25 | 25 | else nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func buyAllProducts (nftInfo,totalamount) = { | |
8 | 8 | let buyer = i.caller | |
9 | 9 | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
10 | 10 | let buyerBalance = assetBalance(buyer, teams) | |
11 | 11 | let amount = value(i.payments[0].amount) | |
12 | 12 | let nfT1 = split(nftInfo[0], "_") | |
13 | 13 | let nfT2 = split(nftInfo[1], "_") | |
14 | 14 | let nfT3 = split(nftInfo[2], "_") | |
15 | 15 | let nfT4 = split(nftInfo[3], "_") | |
16 | 16 | let nfT5 = split(nftInfo[4], "_") | |
17 | 17 | if ((totalamount > amount)) | |
18 | 18 | then throw("your paying amount is wrong ") | |
19 | 19 | else if ((amount > buyerBalance)) | |
20 | 20 | then throw("Buyer does not have enough funds to complete the purchase.") | |
21 | 21 | else if ((size(nftInfo) == 1)) | |
22 | - | then [StringEntry((((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]) + "currency") + nfT1[3]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), parseIntValue(nfT1[2]), teams)] | |
22 | + | then [StringEntry((((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]) + "currency") + nfT1[3]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), teams)] | |
23 | 23 | else if ((size(nftInfo) == 2)) | |
24 | 24 | then [StringEntry((((((("first_nft_Info=" + "nftId") + nfT1[0]) + "seller_address") + nfT1[1]) + "price") + nfT1[2]), ("buyer" + toString(buyer))), StringEntry((((((("second_nft_Info=" + "nftId") + nfT2[0]) + "seller_address") + nfT2[1]) + "price") + nfT2[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), parseIntValue(nfT1[2]), fromBase58String(nfT1[3])), ScriptTransfer(Address(fromBase58String(nfT2[1])), parseIntValue(nfT2[2]), fromBase58String(nfT2[3]))] | |
25 | 25 | else nil | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 |
github/deemru/w8io/026f985 40.88 ms ◑