tx · EucoipR4ifJfHGygWnKvd2ZwraPAb4PDsBfrajXnkTdS

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.25 12:47 [2505366] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "EucoipR4ifJfHGygWnKvd2ZwraPAb4PDsBfrajXnkTdS", "fee": 1000000, "feeAssetId": null, "timestamp": 1679737735856, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "65bKy1Nybky1ExufjuZ6gfz6jkXcr88RykZ8JgUFUpcb6F7ox4pWnxK47dBQCob38frYJjcaijcSKymxLU1uyH3D" ], "script": "base64:BgIJCAISBQoDCAgBAAEBaQEGYnV5TmZ0AwZzZWxsZXIEbmZ0cwVwcmljZQQFYnV5ZXIIBQFpBmNhbGxlcgQGYW1vdW50CQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQVidXllcgUFcHJpY2UFBHVuaXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUFYnV5ZXIAAQkA2QQBBQRuZnRzBQNuaWwA9gilbQ==", "height": 2505366, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DwFWPbzX6oQRGuwjHw9JokHNv3GwHpzMUR48YVsYp57A Next: 9FdhTdZerXPHWJ22Pt4U6iv2eeJaz7HXJcDEz7Qapwuk Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
54
6-@Callable(b)
7-func buyNft (c,d,e,f) = {
8- let g = b.caller
9- let h = size(d)
10- let i = assetBalance(g, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
11- let j = value(b.payments[0].amount)
12- let k = ((e[0] / 1000) * 975)
13- let l = ((e[1] / 1000) * 975)
14- let m = ((e[2] / 1000) * 975)
15- func n (o,p) = (o + p)
165
17- let q = e
18- let r = {
19- let s = q
20- let t = size(s)
21- let u = 0
22- func v (w,x) = if ((x >= t))
23- then w
24- else n(w, s[x])
25-
26- func y (w,x) = if ((x >= t))
27- then w
28- else throw("List size exceeds 5")
29-
30- y(v(v(v(v(v(u, 0), 1), 2), 3), 4), 5)
31- }
32- if (if ((r > j))
33- then true
34- else (f > j))
35- then throw("your paying ammount is wrong ")
36- else if (if ((size(d) != size(c)))
37- then true
38- else (size(c) != size(e)))
39- then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
40- else if ((j > i))
41- then throw("Buyer does not have enough funds to complete the purchase.")
42- else if ((b.payments[0].assetId == a))
43- then [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])), k, a), ScriptTransfer(Address(fromBase58String(c[1])), l, a), ScriptTransfer(Address(fromBase58String(c[1])), m, a)]
44- else nil
6+@Callable(a)
7+func buyNft (b,c,d) = {
8+ let e = a.caller
9+ let f = value(a.payments[0].amount)
10+[ScriptTransfer(e, d, unit), ScriptTransfer(e, 1, fromBase58String(c))]
4511 }
4612
4713

github/deemru/w8io/169f3d6 
39.32 ms