tx · J7KZs43MScEnSHLptzWoHV99BoyYVXHiwRsQFPm6JLZJ

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.23 12:01 [2502454] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "J7KZs43MScEnSHLptzWoHV99BoyYVXHiwRsQFPm6JLZJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1679562180023, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "2Pcac4eRNWjbrLUG2BmUzvXJjHuk2UPYLRnmk4gnj5ce3WKF2m9DMxqjxtpsSGwxmXAMQZPW6XfPAGZfZsBT1eip" ], "script": "base64:BgIJCAISBQoDGBgRAAEBaQEGYnV5TmZ0AwZzZWxsZXIEbmZ0cwVwcmljZQQFYnV5ZXIIBQFpBmNhbGxlcgQMYnV5ZXJCYWxhbmNlCQDwBwIFBWJ1eWVyASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgQGYW1vdW50CQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQGbGVuZ3RoCQCxAgECBW5mdElkAwMJAQIhPQIJAJADAQUEbmZ0cwkAkAMBBQZzZWxsZXIGCQECIT0CCQCQAwEFBnNlbGxlcgkAkAMBBQVwcmljZQkAAgECTEludmFsaWQgaW5wdXQ6IE51bWJlciBvZiBORlRzLCBzZWxsZXIgYWRkcmVzc2VzLCBhbmQgY29zdHMgbXVzdCBiZSB0aGUgc2FtZS4DCQBmAgUGYW1vdW50BQxidXllckJhbGFuY2UJAAIBAjpCdXllciBkb2VzIG5vdCBoYXZlIGVub3VnaCBmdW5kcyB0byBjb21wbGV0ZSB0aGUgcHVyY2hhc2UuCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKUIAQgFAWkGY2FsbGVyCQCkAwEFBmFtb3VudAUDbmlsAIpn0sQ=", "height": 2502454, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Eg4U5FNoZirPVxUoGzWrB5qBJTEnsmbMNVKpE5nYYTg Next: BCvKXonzm7qpH38oEoDcbJZ7HZt8LYzY5Gzso4HTLWKU Diff:
OldNewDifferences
77 func buyNft (seller,nfts,price) = {
88 let buyer = i.caller
99 let buyerBalance = assetBalance(buyer, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
10- let totalcost = value(i.payments[0].amount)
10+ let amount = value(i.payments[0].amount)
1111 let length = size("nftId")
1212 if (if ((size(nfts) != size(seller)))
1313 then true
1414 else (size(seller) != size(price)))
1515 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
16- else if ((totalcost > buyerBalance))
16+ else if ((amount > buyerBalance))
1717 then throw("Buyer does not have enough funds to complete the purchase.")
18- else nil
18+ else [StringEntry(toString(i.caller), toString(amount))]
1919 }
2020
2121
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func buyNft (seller,nfts,price) = {
88 let buyer = i.caller
99 let buyerBalance = assetBalance(buyer, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
10- let totalcost = value(i.payments[0].amount)
10+ let amount = value(i.payments[0].amount)
1111 let length = size("nftId")
1212 if (if ((size(nfts) != size(seller)))
1313 then true
1414 else (size(seller) != size(price)))
1515 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
16- else if ((totalcost > buyerBalance))
16+ else if ((amount > buyerBalance))
1717 then throw("Buyer does not have enough funds to complete the purchase.")
18- else nil
18+ else [StringEntry(toString(i.caller), toString(amount))]
1919 }
2020
2121

github/deemru/w8io/169f3d6 
28.34 ms