tx · CJMC798sppdVJUnUYJZd7ezytHcU4XXzg1t8i6UusZHb

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.30 15:41 [2512690] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "CJMC798sppdVJUnUYJZd7ezytHcU4XXzg1t8i6UusZHb", "fee": 1000000, "feeAssetId": null, "timestamp": 1680180241770, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "2tFHa6aH77XD97sVt8KPYVLM3vwcrEb9qiw9b8tDuXHb1V4KPEzxHdatUC2GC26Mbe9Pr5oz3295SZeYHEQKifC5" ], "script": "base64:BgIHCAISAwoBGAABAWkBFGJ1eUFsbFByb2R1Y3RzX2FzaW1pAQduZnRJbmZvBAVidXllcggFAWkGY2FsbGVyBAV0ZWFtcwEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EDGJ1eWVyQmFsYW5jZQkA8AcCBQVidXllcgEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EBmFtb3VudAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQECHJlYWxjb3N0CQBlAgUGYW1vdW50CQBoAgkAaQIFBmFtb3VudADoBwAZBAtwbGF0Zm9ybWZlZQkAZQIFBmFtb3VudAUIcmVhbGNvc3QEB2Ftb3VudDEJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAEGYW1vdW50BAlyZWFsY29zdDEJAGUCBQZhbW91bnQJAGgCCQBpAgUGYW1vdW50AOgHABkEDHBsYXRmb3JtZmVlMQkAZQIFBmFtb3VudAUIcmVhbGNvc3QEBG5mVDEJALUJAgkAkQMCBQduZnRJbmZvAAACAV8EBG5mVDIJALUJ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VDIAAQIFcHJpY2UJAJEDAgUEbmZUMgACCQCsAgICBWJ1eWVyCQClCAEFBWJ1eWVyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFBWJ1eWVyAAEJANkEAQkAkQMCBQRuZlQxAAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUFYnV5ZXIAAQkA2QQBCQCRAwIFBG5mVDIAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQRuZlQxAAEFCHJlYWxjb3N0ASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQRuZlQyAAEFCXJlYWxjb3N0MQEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4FA25pbAMJAGYCCQCQAwEFB25mdEluZm8AAwkAAgECLXNvcnJ5ISBtYXhpbXVtIGxpbWl0IG9mIHlvdXIgIGNhcnQgaXMgMyBpdGVtcwUDbmlsABGnEXg=", "height": 2512690, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J4rTJcQh7o9dKuG6dmqQtJvXVjpe4qo9A7rPdEddAkg1 Next: 3UcBA4GZkzCWeY8ohmesPfm1Yv9s7DKnzLtPyc6MNiER Diff:
OldNewDifferences
44
55
66 @Callable(a)
7-func buyAllProducts_asimi (b,c) = {
8- let d = a.caller
9- let e = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
10- let f = assetBalance(d, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
11- let g = value(a.payments[0].amount)
12- let h = (g - ((g / 1000) * 25))
13- let i = (g - h)
14- let j = split(b[0], "_")
15- let k = split(b[1], "_")
16- let l = split(b[2], "_")
17- let m = split(b[3], "_")
18- let n = split(b[4], "_")
19- if ((g > f))
7+func buyAllProducts_asimi (b) = {
8+ let c = a.caller
9+ let d = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
10+ let e = assetBalance(c, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
11+ let f = value(a.payments[0].amount)
12+ let g = (f - ((f / 1000) * 25))
13+ let h = (f - g)
14+ let i = value(a.payments[1].amount)
15+ let j = (f - ((f / 1000) * 25))
16+ let k = (f - g)
17+ let l = split(b[0], "_")
18+ let m = split(b[1], "_")
19+ let n = split(b[2], "_")
20+ let o = split(b[3], "_")
21+ let p = split(b[4], "_")
22+ if ((f > e))
2023 then throw("Buyer does not have enough funds to complete the purchase.")
2124 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])), parseIntValue(c[0]), e)]
25+ then [StringEntry((("first_nft_Info=" + "nftId") + l[0]), ("buyer" + toString(c))), StringEntry(("seller_address" + l[1]), ("price" + l[2])), ScriptTransfer(c, 1, fromBase58String(l[0])), ScriptTransfer(Address(fromBase58String(l[1])), g, d)]
2326 else if ((size(b) == 2))
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')]
27+ then [StringEntry((((((("first_nft_Info=" + "nftId") + l[0]) + "seller_address") + l[1]) + "price") + l[2]), ("buyer" + toString(c))), StringEntry((((((("second_nft_Info=" + "nftId") + m[0]) + "seller_address") + m[1]) + "price") + m[2]), ("buyer" + toString(c))), ScriptTransfer(c, 1, fromBase58String(l[0])), ScriptTransfer(c, 1, fromBase58String(m[0])), ScriptTransfer(Address(fromBase58String(l[1])), g, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(m[1])), j, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
2528 else if ((size(b) > 3))
26- then throw("sorry! maximum limit of your cart is 5 items")
29+ then throw("sorry! maximum limit of your cart is 3 items")
2730 else nil
2831 }
2932
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
7-func buyAllProducts_asimi (b,c) = {
8- let d = a.caller
9- let e = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
10- let f = assetBalance(d, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
11- let g = value(a.payments[0].amount)
12- let h = (g - ((g / 1000) * 25))
13- let i = (g - h)
14- let j = split(b[0], "_")
15- let k = split(b[1], "_")
16- let l = split(b[2], "_")
17- let m = split(b[3], "_")
18- let n = split(b[4], "_")
19- if ((g > f))
7+func buyAllProducts_asimi (b) = {
8+ let c = a.caller
9+ let d = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
10+ let e = assetBalance(c, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
11+ let f = value(a.payments[0].amount)
12+ let g = (f - ((f / 1000) * 25))
13+ let h = (f - g)
14+ let i = value(a.payments[1].amount)
15+ let j = (f - ((f / 1000) * 25))
16+ let k = (f - g)
17+ let l = split(b[0], "_")
18+ let m = split(b[1], "_")
19+ let n = split(b[2], "_")
20+ let o = split(b[3], "_")
21+ let p = split(b[4], "_")
22+ if ((f > e))
2023 then throw("Buyer does not have enough funds to complete the purchase.")
2124 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])), parseIntValue(c[0]), e)]
25+ then [StringEntry((("first_nft_Info=" + "nftId") + l[0]), ("buyer" + toString(c))), StringEntry(("seller_address" + l[1]), ("price" + l[2])), ScriptTransfer(c, 1, fromBase58String(l[0])), ScriptTransfer(Address(fromBase58String(l[1])), g, d)]
2326 else if ((size(b) == 2))
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')]
27+ then [StringEntry((((((("first_nft_Info=" + "nftId") + l[0]) + "seller_address") + l[1]) + "price") + l[2]), ("buyer" + toString(c))), StringEntry((((((("second_nft_Info=" + "nftId") + m[0]) + "seller_address") + m[1]) + "price") + m[2]), ("buyer" + toString(c))), ScriptTransfer(c, 1, fromBase58String(l[0])), ScriptTransfer(c, 1, fromBase58String(m[0])), ScriptTransfer(Address(fromBase58String(l[1])), g, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(m[1])), j, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
2528 else if ((size(b) > 3))
26- then throw("sorry! maximum limit of your cart is 5 items")
29+ then throw("sorry! maximum limit of your cart is 3 items")
2730 else nil
2831 }
2932
3033

github/deemru/w8io/169f3d6 
35.36 ms