tx · 2Udp9CKgWM17xc5ZqbBL9J2yKf6amseveuj8AzcqwFsQ

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.27 09:54 [2508046] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "2Udp9CKgWM17xc5ZqbBL9J2yKf6amseveuj8AzcqwFsQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1679900222948, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "3xYtyBPHESfNLPtwoxMyNnb6wTGGjTovuatEVkuaKvLX85Xfd19T7aLFMPZxp9Tbcvo86UtV43cM191yvbUBb2ma" ], "script": "base64:BgIKCAISBgoEGBgRAQEABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgEBaQEGYnV5TmZ0BAZzZWxsZXIEbmZ0cwVwcmljZQt0b3RhbGFtb3VudAQFYnV5ZXIIBQFpBmNhbGxlcgQDbmZ0CQCQAwEFBG5mdHMEDGJ1eWVyQmFsYW5jZQkA8AcCBQVidXllcgEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EBmFtb3VudAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQKAQNzdW0CBWFjY3VtBG5leHQJAGQCBQVhY2N1bQUEbmV4dAQDYXJyBQVwcmljZQQJdG90YWxDb3N0CgACJGwFA2FycgoAAiRzCQCQAwEFAiRsCgAFJGFjYzAAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEDc3VtAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA1C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CCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQZzZWxsZXIAAQkAkQMCBQVwcmljZQACASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgUDbmlsAJenysA=", "height": 2508046, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3vSppiy9vnnjPuLNXvv5YJBBdxAtQQZRHLm7HWMA6Fw9 Next: JCkYpSGCuTKgEgc9LeGGXN3zJFB4kgg1g6jkj96e4S3G Diff:
OldNewDifferences
2626
2727 v(s(s(s(s(s(r, 0), 1), 2), 3), 4), 5)
2828 }
29- func w (x,y) = y
30-
31- let z = d
32- let A = {
33- let p = z
34- let q = size(p)
35- let r = nil
36- func B (t,u) = if ((u >= q))
37- then t
38- else w(t, p[u])
39-
40- func C (t,u) = if ((u >= q))
41- then t
42- else throw("List size exceeds 5")
43-
44- C(B(B(B(B(B(r, 0), 1), 2), 3), 4), 5)
45- }
4629 if (if ((o > j))
4730 then true
4831 else (f > j))
5336 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
5437 else if ((j > i))
5538 then throw("Buyer does not have enough funds to complete the purchase.")
56- else [StringEntry(toString(b.caller), toString(j)), ScriptTransfer(g, 1, toBytes(A[0])), ScriptTransfer(Address(fromBase58String(c[0])), e[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[1], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[2], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
39+ else [StringEntry(toString(b.caller), toString(j)), ScriptTransfer(g, 1, fromBase58String(d[0])), ScriptTransfer(g, 1, fromBase58String(d[1])), ScriptTransfer(g, 1, fromBase58String(d[2])), ScriptTransfer(Address(fromBase58String(c[0])), e[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[1], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[2], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
5740 }
5841
5942
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
55
66 @Callable(b)
77 func buyNft (c,d,e,f) = {
88 let g = b.caller
99 let h = size(d)
1010 let i = assetBalance(g, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
1111 let j = value(b.payments[0].amount)
1212 func k (l,m) = (l + m)
1313
1414 let n = e
1515 let o = {
1616 let p = n
1717 let q = size(p)
1818 let r = 0
1919 func s (t,u) = if ((u >= q))
2020 then t
2121 else k(t, p[u])
2222
2323 func v (t,u) = if ((u >= q))
2424 then t
2525 else throw("List size exceeds 5")
2626
2727 v(s(s(s(s(s(r, 0), 1), 2), 3), 4), 5)
2828 }
29- func w (x,y) = y
30-
31- let z = d
32- let A = {
33- let p = z
34- let q = size(p)
35- let r = nil
36- func B (t,u) = if ((u >= q))
37- then t
38- else w(t, p[u])
39-
40- func C (t,u) = if ((u >= q))
41- then t
42- else throw("List size exceeds 5")
43-
44- C(B(B(B(B(B(r, 0), 1), 2), 3), 4), 5)
45- }
4629 if (if ((o > j))
4730 then true
4831 else (f > j))
4932 then throw("your paying ammount is wrong ")
5033 else if (if ((size(d) != size(c)))
5134 then true
5235 else (size(c) != size(e)))
5336 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
5437 else if ((j > i))
5538 then throw("Buyer does not have enough funds to complete the purchase.")
56- else [StringEntry(toString(b.caller), toString(j)), ScriptTransfer(g, 1, toBytes(A[0])), ScriptTransfer(Address(fromBase58String(c[0])), e[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[1], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[2], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
39+ else [StringEntry(toString(b.caller), toString(j)), ScriptTransfer(g, 1, fromBase58String(d[0])), ScriptTransfer(g, 1, fromBase58String(d[1])), ScriptTransfer(g, 1, fromBase58String(d[2])), ScriptTransfer(Address(fromBase58String(c[0])), e[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[1], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'), ScriptTransfer(Address(fromBase58String(c[1])), e[2], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
5740 }
5841
5942

github/deemru/w8io/169f3d6 
43.70 ms