tx · J4rTJcQh7o9dKuG6dmqQtJvXVjpe4qo9A7rPdEddAkg1 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves 2023.03.30 11:42 [2512461] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{ "type": 13, "id": "J4rTJcQh7o9dKuG6dmqQtJvXVjpe4qo9A7rPdEddAkg1", "fee": 1000000, "feeAssetId": null, "timestamp": 1680165877363, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "311K4Akv2wCuZD7N3ghnh9cb936TW28go3nDw5npyFsCxXcjtmfF7YDoDDgbZr22XvAMX2CgRxjRpJjTUA2odeE6" ], "script": "base64:BgIICAISBAoCGBgAAQFpARRidXlBbGxQcm9kdWN0c19hc2ltaQIHbmZ0SW5mbwVwcmljZQQFYnV5ZXIIBQFpBmNhbGxlcgQFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+BAxidXllckJhbGFuY2UJAPAHAgUFYnV5ZXIBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+BAZhbW91bnQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BAhyZWFsY29zdAkAZQIFBmFtb3VudAkAaAIJAGkCBQZhbW91bnQA6AcAGQQLcGxhdGZvcm1mZWUJAGUCBQZhbW91bnQFCHJlYWxjb3N0BARuZlQxCQC1CQIJAJEDAgUHbmZ0SW5mbwAAAgFfBARuZlQyCQC1CQIJAJEDAgUHbmZ0SW5mbwABAgFfBARuZlQzCQC1CQIJAJEDAgUHbmZ0SW5mbwACAgFfBARuZlQ0CQC1CQIJAJEDAgUHbmZ0SW5mbwADAgFfBARuZlQ1CQC1CQIJAJEDAgUHbmZ0SW5mbwAEAgFfAwk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XllcgABCQDZBAEJAJEDAgUEbmZUMQAACQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFBWJ1eWVyAAEJANkEAQkAkQMCBQRuZlQyAAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEJAJEDAgUEbmZUMQABCQBlAgUIcmVhbGNvc3QJAQ1wYXJzZUludFZhbHVlAQkAkQMCBQRuZlQyAAIBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBCQCRAwIFBG5mVDIAAQkAZQIFCHJlYWxjb3N0CQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUEbmZUMQACASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgUDbmlsAwkAZgIJAJADAQUHbmZ0SW5mbwADCQACAQItc29ycnkhIG1heGltdW0gbGltaXQgb2YgeW91ciAgY2FydCBpcyA1IGl0ZW1zBQNuaWwAi/Hk1g==", "height": 2512461, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2Fcpc2YgArXSQ9c9YuCP7bGD6XNGFGoFK9ULxS8niM2a Next: CJMC798sppdVJUnUYJZd7ezytHcU4XXzg1t8i6UusZHb Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | if ((g > f)) | |
20 | 20 | then throw("Buyer does not have enough funds to complete the purchase.") | |
21 | 21 | else if ((size(b) == 1)) | |
22 | - | then [StringEntry((("first_nft_Info=" + "nftId") + j[0]), ("buyer" + toString(d))), StringEntry(("seller_address" + j[1]), ("price" + j[2])), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(Address(fromBase58String(j[1])), c[0], e)] | |
22 | + | then [StringEntry((("first_nft_Info=" + "nftId") + j[0]), ("buyer" + toString(d))), StringEntry(("seller_address" + j[1]), ("price" + j[2])), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(Address(fromBase58String(j[1])), parseIntValue(c[0]), e)] | |
23 | 23 | else if ((size(b) == 2)) | |
24 | 24 | then [StringEntry((((((("first_nft_Info=" + "nftId") + j[0]) + "seller_address") + j[1]) + "price") + j[2]), ("buyer" + toString(d))), StringEntry((((((("second_nft_Info=" + "nftId") + k[0]) + "seller_address") + k[1]) + "price") + k[2]), ("buyer" + toString(d))), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(d, 1, fromBase58String(k[0])), ScriptTransfer(Address(fromBase58String(j[1])), (h - parseIntValue(k[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(k[1])), (h - parseIntValue(j[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
25 | 25 | else if ((size(b) > 3)) |
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(a) | |
7 | 7 | func buyAllProducts_asimi (b,c) = { | |
8 | 8 | let d = a.caller | |
9 | 9 | let e = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
10 | 10 | let f = assetBalance(d, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') | |
11 | 11 | let g = value(a.payments[0].amount) | |
12 | 12 | let h = (g - ((g / 1000) * 25)) | |
13 | 13 | let i = (g - h) | |
14 | 14 | let j = split(b[0], "_") | |
15 | 15 | let k = split(b[1], "_") | |
16 | 16 | let l = split(b[2], "_") | |
17 | 17 | let m = split(b[3], "_") | |
18 | 18 | let n = split(b[4], "_") | |
19 | 19 | if ((g > f)) | |
20 | 20 | then throw("Buyer does not have enough funds to complete the purchase.") | |
21 | 21 | else if ((size(b) == 1)) | |
22 | - | then [StringEntry((("first_nft_Info=" + "nftId") + j[0]), ("buyer" + toString(d))), StringEntry(("seller_address" + j[1]), ("price" + j[2])), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(Address(fromBase58String(j[1])), c[0], e)] | |
22 | + | then [StringEntry((("first_nft_Info=" + "nftId") + j[0]), ("buyer" + toString(d))), StringEntry(("seller_address" + j[1]), ("price" + j[2])), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(Address(fromBase58String(j[1])), parseIntValue(c[0]), e)] | |
23 | 23 | else if ((size(b) == 2)) | |
24 | 24 | then [StringEntry((((((("first_nft_Info=" + "nftId") + j[0]) + "seller_address") + j[1]) + "price") + j[2]), ("buyer" + toString(d))), StringEntry((((((("second_nft_Info=" + "nftId") + k[0]) + "seller_address") + k[1]) + "price") + k[2]), ("buyer" + toString(d))), ScriptTransfer(d, 1, fromBase58String(j[0])), ScriptTransfer(d, 1, fromBase58String(k[0])), ScriptTransfer(Address(fromBase58String(j[1])), (h - parseIntValue(k[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(k[1])), (h - parseIntValue(j[2])), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')] | |
25 | 25 | else if ((size(b) > 3)) | |
26 | 26 | then throw("sorry! maximum limit of your cart is 5 items") | |
27 | 27 | else nil | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 |
github/deemru/w8io/169f3d6 32.68 ms ◑