tx · BKfHe3yUMLawjCSgXckmgHFfsfPtnfahRkVb7ecp4mbj 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves 2023.03.29 15:30 [2511238] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{ "type": 13, "id": "BKfHe3yUMLawjCSgXckmgHFfsfPtnfahRkVb7ecp4mbj", "fee": 1000000, "feeAssetId": null, "timestamp": 1680093191182, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "62XfATPFUXif8Puh3p9htQGEntyEQKRcg1c4D5xqejcnLaK4amjnBkuxRHv5NzWieYkZoZ3EvwY67GgRxnWGHCdB" ], "script": "base64:BgIHCAISAwoBGAABAWkBFGJ1eUFsbFByb2R1Y3RzX2FzaW1pAQduZnRJbmZvBAVidXllcggFAWkGY2FsbGVyBAV0ZWFtcwEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EDGJ1eWVyQmFsYW5jZQkA8AcCBQVidXllcgEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EBmFtb3VudAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQECHJlYWxjb3N0CQBlAgUGYW1vdW50CQBoAgkAaQIFBmFtb3VudADoBwAZBAtwbGF0Zm9ybWZlZQkAZQIFBmFtb3VudAUIcmVhbGNvc3QEBG5mVDEJALUJAgkAkQMCBQduZnRJbmZvAAACAV8EBG5mVDIJALUJAgkAkQMCBQduZnRJbmZvAAECAV8EBG5mVDMJALUJAgkAkQMCBQduZnRJbmZvAAICAV8EBG5mVDQJALUJAgkAkQMCBQduZnRJbmZvAAMCAV8EBG5mVDUJALUJAgkAkQMCBQduZnRJbmZvAAQCAV8EBnZhbHVlMQkBDXBhcnNlSW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oAgkBDXBhcnNlSW50VmFsdWUBCQCRAwIFBG5mVDIAAgBkASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQRuZlQzAAEJAGgCCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUEbmZUMwACAGQBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBCQCRAwIFBG5mVDQAAQkAaAIJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQRuZlQ0AAIAZAEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4JAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEJAJEDAgUEbmZUNQABCQBoAgkBDXBhcnNlSW50VmFsdWUBCQCRAwIFBG5mVDUAAgBkASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgUDbmlsAwkAZgIJAJADAQUHbmZ0SW5mbwAFCQACAQItc29ycnkhIG1heGltdW0gbGltaXQgb2YgeW91ciAgY2FydCBpcyA1IGl0ZW1zBQNuaWwAvx211Q==", "height": 2511238, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GTukj6EZmXCtYGh5E3hYKEdyU2TajbHy2akR5jsBiJZA Next: EQjd6iC4gheajMmZsuLpMenT1zLPPZEZwmk5NyjrmSVr Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | if ((amount > buyerBalance)) | |
21 | 21 | then throw("Buyer does not have enough funds to complete the purchase.") | |
22 | 22 | else if ((size(nftInfo) == 1)) | |
23 | - | then [StringEntry((("first_nft_Info=" + "nftId") + nfT1[0]), ("buyer" + toString(buyer))), StringEntry(("seller_address" + nfT1[1]), ("price" + nfT1[2])), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), | |
23 | + | then [StringEntry((("first_nft_Info=" + "nftId") + nfT1[0]), ("buyer" + toString(buyer))), StringEntry(("seller_address" + nfT1[1]), ("price" + nfT1[2])), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), realcost, teams)] | |
24 | 24 | else if ((size(nftInfo) == 2)) | |
25 | - | 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( | |
25 | + | 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])), (realcost - parseIntValue(nfT2[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (realcost - parseIntValue(nfT1[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
26 | 26 | else if ((size(nftInfo) == 3)) | |
27 | 27 | 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))), StringEntry((((((("third_nft_Info=" + "nftId") + nfT3[0]) + "seller_address") + nfT3[1]) + "price") + nfT3[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT3[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (parseIntValue(nfT2[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT3[1])), (parseIntValue(nfT3[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
28 | 28 | else if ((size(nftInfo) == 4)) |
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_asimi (nftInfo) = { | |
8 | 8 | let buyer = i.caller | |
9 | 9 | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
10 | 10 | let buyerBalance = assetBalance(buyer, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') | |
11 | 11 | let amount = value(i.payments[0].amount) | |
12 | 12 | let realcost = (amount - ((amount / 1000) * 25)) | |
13 | 13 | let platformfee = (amount - realcost) | |
14 | 14 | let nfT1 = split(nftInfo[0], "_") | |
15 | 15 | let nfT2 = split(nftInfo[1], "_") | |
16 | 16 | let nfT3 = split(nftInfo[2], "_") | |
17 | 17 | let nfT4 = split(nftInfo[3], "_") | |
18 | 18 | let nfT5 = split(nftInfo[4], "_") | |
19 | 19 | let value1 = parseIntValue(nfT1[2]) | |
20 | 20 | if ((amount > buyerBalance)) | |
21 | 21 | then throw("Buyer does not have enough funds to complete the purchase.") | |
22 | 22 | else if ((size(nftInfo) == 1)) | |
23 | - | then [StringEntry((("first_nft_Info=" + "nftId") + nfT1[0]), ("buyer" + toString(buyer))), StringEntry(("seller_address" + nfT1[1]), ("price" + nfT1[2])), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), | |
23 | + | then [StringEntry((("first_nft_Info=" + "nftId") + nfT1[0]), ("buyer" + toString(buyer))), StringEntry(("seller_address" + nfT1[1]), ("price" + nfT1[2])), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), realcost, teams)] | |
24 | 24 | else if ((size(nftInfo) == 2)) | |
25 | - | 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( | |
25 | + | 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])), (realcost - parseIntValue(nfT2[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (realcost - parseIntValue(nfT1[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
26 | 26 | else if ((size(nftInfo) == 3)) | |
27 | 27 | 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))), StringEntry((((((("third_nft_Info=" + "nftId") + nfT3[0]) + "seller_address") + nfT3[1]) + "price") + nfT3[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT3[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (parseIntValue(nfT2[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT3[1])), (parseIntValue(nfT3[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
28 | 28 | else if ((size(nftInfo) == 4)) | |
29 | 29 | 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))), StringEntry((((((("third_nft_Info=" + "nftId") + nfT3[0]) + "seller_address") + nfT3[1]) + "price") + nfT3[2]), ("buyer" + toString(buyer))), StringEntry((((((("fourth_nft_Info=" + "nftId") + nfT4[0]) + "seller_address") + nfT4[1]) + "price") + nfT4[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT3[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT4[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (parseIntValue(nfT2[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT3[1])), (parseIntValue(nfT3[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT4[1])), (parseIntValue(nfT4[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
30 | 30 | else if ((size(nftInfo) == 5)) | |
31 | 31 | 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))), StringEntry((((((("third_nft_Info=" + "nftId") + nfT3[0]) + "seller_address") + nfT3[1]) + "price") + nfT3[2]), ("buyer" + toString(buyer))), StringEntry((((((("fourth_nft_Info=" + "nftId") + nfT4[0]) + "seller_address") + nfT4[1]) + "price") + nfT4[2]), ("buyer" + toString(buyer))), StringEntry((((((("fifth_nft_Info=" + "nftId") + nfT5[0]) + "seller_address") + nfT5[1]) + "price") + nfT5[2]), ("buyer" + toString(buyer))), ScriptTransfer(buyer, 1, fromBase58String(nfT1[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT2[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT3[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT4[0])), ScriptTransfer(buyer, 1, fromBase58String(nfT5[0])), ScriptTransfer(Address(fromBase58String(nfT1[1])), (parseIntValue(nfT1[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT2[1])), (parseIntValue(nfT2[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT3[1])), (parseIntValue(nfT3[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT4[1])), (parseIntValue(nfT4[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(nfT5[1])), (parseIntValue(nfT5[2]) * 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
32 | 32 | else if ((size(nftInfo) > 5)) | |
33 | 33 | then throw("sorry! maximum limit of your cart is 5 items") | |
34 | 34 | else nil | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 |
github/deemru/w8io/026f985 50.05 ms ◑