tx · Eg4U5FNoZirPVxUoGzWrB5qBJTEnsmbMNVKpE5nYYTg
3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx: -0.01000000 Waves
2023.03.23 11:53 [2502448] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves
{
"type": 13,
"id": "Eg4U5FNoZirPVxUoGzWrB5qBJTEnsmbMNVKpE5nYYTg",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1679561748041,
"version": 2,
"chainId": 84,
"sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx",
"senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx",
"proofs": [
"5LhWjmEptarkRAdZ3bvEfmXTFq1Q67BFeDSZABP23o3GSvyX5k9QWhwM8qGPbm1XHXPP3EHWqqh3wKLcpC8oo6WL"
],
"script": "base64:BgIJCAISBQoDGBgRAAEBaQEGYnV5TmZ0AwZzZWxsZXIEbmZ0cwVwcmljZQQFYnV5ZXIIBQFpBmNhbGxlcgQMYnV5ZXJCYWxhbmNlCQDwBwIFBWJ1eWVyASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgQJdG90YWxjb3N0CQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQGbGVuZ3RoCQCxAgECBW5mdElkAwMJAQIhPQIJAJADAQUEbmZ0cwkAkAMBBQZzZWxsZXIGCQECIT0CCQCQAwEFBnNlbGxlcgkAkAMBBQVwcmljZQkAAgECTEludmFsaWQgaW5wdXQ6IE51bWJlciBvZiBORlRzLCBzZWxsZXIgYWRkcmVzc2VzLCBhbmQgY29zdHMgbXVzdCBiZSB0aGUgc2FtZS4DCQBmAgUJdG90YWxjb3N0BQxidXllckJhbGFuY2UJAAIBAjpCdXllciBkb2VzIG5vdCBoYXZlIGVub3VnaCBmdW5kcyB0byBjb21wbGV0ZSB0aGUgcHVyY2hhc2UuBQNuaWwAtE/WXQ==",
"height": 2502448,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: GvXjxaPocTf18QXdaC5ziYCHe8bRKJ8YvnLyKu1Ks1uf
Next: J7KZs43MScEnSHLptzWoHV99BoyYVXHiwRsQFPm6JLZJ
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyNft (seller,nfts,price) = { |
---|
8 | 8 | | let buyer = i.caller |
---|
9 | | - | let buyerBalance = assetBalance(buyer, base58'') |
---|
| 9 | + | let buyerBalance = assetBalance(buyer, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') |
---|
10 | 10 | | let totalcost = value(i.payments[0].amount) |
---|
11 | 11 | | let length = size("nftId") |
---|
12 | 12 | | if (if ((size(nfts) != size(seller))) |
---|
Full:
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(i) |
---|
7 | 7 | | func buyNft (seller,nfts,price) = { |
---|
8 | 8 | | let buyer = i.caller |
---|
9 | | - | let buyerBalance = assetBalance(buyer, base58'') |
---|
| 9 | + | let buyerBalance = assetBalance(buyer, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') |
---|
10 | 10 | | let totalcost = value(i.payments[0].amount) |
---|
11 | 11 | | let length = size("nftId") |
---|
12 | 12 | | if (if ((size(nfts) != size(seller))) |
---|
13 | 13 | | then true |
---|
14 | 14 | | else (size(seller) != size(price))) |
---|
15 | 15 | | then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.") |
---|
16 | 16 | | else if ((totalcost > buyerBalance)) |
---|
17 | 17 | | then throw("Buyer does not have enough funds to complete the purchase.") |
---|
18 | 18 | | else nil |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|