tx · 4E2K6Thw3YNavQiuE6qyEVWEwd8mtjFiqYcKHi56K8ef

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.25 14:27 [2505460] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "4E2K6Thw3YNavQiuE6qyEVWEwd8mtjFiqYcKHi56K8ef", "fee": 1000000, "feeAssetId": null, "timestamp": 1679743784842, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "2d1NyTiacdBzE9bcRhqCik3v13qvsx54S78eVsF43TN3mq6nMStVNnwuhHvqrwV6DQpznjhedsvguKAsjxVPDrtV" ], "script": "base64:BgIKCAISBgoEGBgRAQABAWkBBmJ1eU5mdAQGc2VsbGVyBG5mdHMFcHJpY2ULdG90YWxhbW91bnQEBWJ1eWVyCAUBaQZjYWxsZXIEA25mdAkAkAMBBQRuZnRzBAxidXllckJhbGFuY2UJAPAHAgUFYnV5ZXIBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+BAZhbW91bnQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BAV0ZWFtcwEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4KAQNzdW0CBWFjY3VtBG5leHQJAGQCBQVhY2N1bQUEbmV4dAQDYXJyBQVwcmljZQQJdG90YWxDb3N0CgACJGwFA2FycgoAAiRzCQCQAwEFAiRsCgAFJGFjYzAAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEDc3VtAgUCJGEJAJEDAgUCJGwFAiRpCgEFJGYwXzICAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAAIBAhNMaXN0IHNpemUgZXhjZWVkcyA1CQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQMDCQBmAgUJdG90YWxDb3N0BQZhbW91bnQGCQBmAgULdG90YWxhbW91bnQFBmFtb3VudAkAAgECHHlvdXIgcGF5aW5nIGFtbW91bnQgaXMgd3JvbmcDAwkBAiE9AgkAkAMBBQRuZnRzCQCQAwEFBnNlbGxlcgYJAQIhPQIJAJADAQUGc2VsbGVyCQCQAwEFBXByaWNlCQACAQJMSW52YWxpZCBpbnB1dDogTnVtYmVyIG9mIE5GVHMsIHNlbGxlciBhZGRyZXNzZXMsIGFuZCBjb3N0cyBtdXN0IGJlIHRoZSBzYW1lLgMJAGYCBQZhbW91bnQFDGJ1eWVyQmFsYW5jZQkAAgECOkJ1eWVyIGRvZXMgbm90IGhhdmUgZW5vdWdoIGZ1bmRzIHRvIGNvbXBsZXRlIHRoZSBwdXJjaGFzZS4JAMwIAgkBC1N0cmluZ0VudHJ5AgkApQgBCAUBaQZjYWxsZXIJAKQDAQUGYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFBWJ1eWVyAAEJANkEAQkAkQMCBQRuZnRzAAAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEJAJEDAgUGc2VsbGVyAAAJAJEDAgUFcHJpY2UAAAEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4FA25pbABgyhNe", "height": 2505460, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4i1EoEWTxjs75pN8rGZwyKKAciK3NcUevoajdeB9o248 Next: DNZnDZ4qMEztuQ4GcRnW58DsifTqoJZtWY69e4qspvbt Diff:
OldNewDifferences
3737 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
3838 else if ((i > h))
3939 then throw("Buyer does not have enough funds to complete the purchase.")
40- else [StringEntry(toString(a.caller), toString(i)), ScriptTransfer(f, 1, fromBase58String(c[0])), ScriptTransfer(Address(fromBase58String(b[0])), (d[0] / 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
40+ else [StringEntry(toString(a.caller), toString(i)), ScriptTransfer(f, 1, fromBase58String(c[0])), ScriptTransfer(Address(fromBase58String(b[0])), d[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
4141 }
4242
4343
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func buyNft (b,c,d,e) = {
88 let f = a.caller
99 let g = size(c)
1010 let h = assetBalance(f, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
1111 let i = value(a.payments[0].amount)
1212 let j = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
1313 func k (l,m) = (l + m)
1414
1515 let n = d
1616 let o = {
1717 let p = n
1818 let q = size(p)
1919 let r = 0
2020 func s (t,u) = if ((u >= q))
2121 then t
2222 else k(t, p[u])
2323
2424 func v (t,u) = if ((u >= q))
2525 then t
2626 else throw("List size exceeds 5")
2727
2828 v(s(s(s(s(s(r, 0), 1), 2), 3), 4), 5)
2929 }
3030 if (if ((o > i))
3131 then true
3232 else (e > i))
3333 then throw("your paying ammount is wrong")
3434 else if (if ((size(c) != size(b)))
3535 then true
3636 else (size(b) != size(d)))
3737 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
3838 else if ((i > h))
3939 then throw("Buyer does not have enough funds to complete the purchase.")
40- else [StringEntry(toString(a.caller), toString(i)), ScriptTransfer(f, 1, fromBase58String(c[0])), ScriptTransfer(Address(fromBase58String(b[0])), (d[0] / 100), base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
40+ else [StringEntry(toString(a.caller), toString(i)), ScriptTransfer(f, 1, fromBase58String(c[0])), ScriptTransfer(Address(fromBase58String(b[0])), d[0], base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')]
4141 }
4242
4343

github/deemru/w8io/03bedc9 
21.46 ms