tx · 2DwtqPaLHE3bdr7sfArN4r2kt4fSLuGafQgpMuF4y1RD 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves 2023.03.24 12:55 [2503933] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{ "type": 13, "id": "2DwtqPaLHE3bdr7sfArN4r2kt4fSLuGafQgpMuF4y1RD", "fee": 1000000, "feeAssetId": null, "timestamp": 1679651902196, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "4PfQoHq61hezv6LbfbQGLJ8wQsv872DqY2D3daP7aawzLG5tDjz6ZpDuYSoia4HVrQC4TAaKGWzKKGKKY5AL6s9W" ], "script": "base64:BgIJCAISBQoDGBgRAAEBaQEGYnV5TmZ0AwZzZWxsZXIEbmZ0cwVwcmljZQQFYnV5ZXIIBQFpBmNhbGxlcgQDbmZ0CQCQAwEFBG5mdHMEDGJ1eWVyQmFsYW5jZQkA8AcCBQVidXllcgEghWOVo/OIjrDeDBeOCE6/mj+SuybbOuh2jhbcFCIqSH4EBmFtb3VudAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQEBmxlbmd0aAkAsQIBAgVuZnRJZAoBA3N1bQIFYWNjdW0EbmV4dAkAZAIFBWFjY3VtBQRuZXh0BANhcnIFBXByaWNlBAl0b3RhbENvc3QKAAIkbAUDYXJyCgACJHMJAJADAQUCJGwKAAUkYWNjMAAACgEFJGYwXzECAiRhAiRpAwkAZwIFAiRpBQIkcwUCJGEJAQNzdW0CBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECE0xpc3Qgc2l6ZSBleGNlZWRzIDUJAQUkZjBfMgIJAQUkZjBfMQIJAQUkZjBfMQIJAQUk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uaWwA0DPo0Q==", "height": 2503933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BCvKXonzm7qpH38oEoDcbJZ7HZt8LYzY5Gzso4HTLWKU Next: 9GQCDoXgThMGC7DbsnRw88ZDQr4Evgk6LgfueY1Dvva Diff:
Old | New | Differences | |
---|---|---|---|
46 | 46 | } | |
47 | 47 | let A = fromBase58String(x[0]) | |
48 | 48 | let B = fromBase58String(x[1]) | |
49 | - | if ((h | |
49 | + | if ((n > h)) | |
50 | 50 | then throw("your paying ammount is wrong ") | |
51 | 51 | else if (if ((size(c) != size(b))) | |
52 | 52 | then true |
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 buyNft (b,c,d) = { | |
8 | 8 | let e = a.caller | |
9 | 9 | let f = size(c) | |
10 | 10 | let g = assetBalance(e, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') | |
11 | 11 | let h = value(a.payments[0].amount) | |
12 | 12 | let i = size("nftId") | |
13 | 13 | func j (k,l) = (k + l) | |
14 | 14 | ||
15 | 15 | let m = d | |
16 | 16 | let n = { | |
17 | 17 | let o = m | |
18 | 18 | let p = size(o) | |
19 | 19 | let q = 0 | |
20 | 20 | func r (s,t) = if ((t >= p)) | |
21 | 21 | then s | |
22 | 22 | else j(s, o[t]) | |
23 | 23 | ||
24 | 24 | func u (s,t) = if ((t >= p)) | |
25 | 25 | then s | |
26 | 26 | else throw("List size exceeds 5") | |
27 | 27 | ||
28 | 28 | u(r(r(r(r(r(q, 0), 1), 2), 3), 4), 5) | |
29 | 29 | } | |
30 | 30 | func v (k,l) = (k :+ l) | |
31 | 31 | ||
32 | 32 | let w = c | |
33 | 33 | let x = { | |
34 | 34 | let o = w | |
35 | 35 | let p = size(o) | |
36 | 36 | let q = nil | |
37 | 37 | func y (s,t) = if ((t >= p)) | |
38 | 38 | then s | |
39 | 39 | else v(s, o[t]) | |
40 | 40 | ||
41 | 41 | func z (s,t) = if ((t >= p)) | |
42 | 42 | then s | |
43 | 43 | else throw("List size exceeds 5") | |
44 | 44 | ||
45 | 45 | z(y(y(y(y(y(q, 0), 1), 2), 3), 4), 5) | |
46 | 46 | } | |
47 | 47 | let A = fromBase58String(x[0]) | |
48 | 48 | let B = fromBase58String(x[1]) | |
49 | - | if ((h | |
49 | + | if ((n > h)) | |
50 | 50 | then throw("your paying ammount is wrong ") | |
51 | 51 | else if (if ((size(c) != size(b))) | |
52 | 52 | then true | |
53 | 53 | else (size(b) != size(d))) | |
54 | 54 | then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.") | |
55 | 55 | else if ((h > g)) | |
56 | 56 | then throw("Buyer does not have enough funds to complete the purchase.") | |
57 | 57 | else [StringEntry(toString(a.caller), toString(h)), ScriptTransfer(e, 1, A), ScriptTransfer(e, 1, B)] | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 |
github/deemru/w8io/169f3d6 170.07 ms ◑