tx · 2vitsdrcZh8gm5uZy6Foi8P1VxAD6UNKGq7NcfyfFPeS

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.03.27 14:04 [2508295] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "2vitsdrcZh8gm5uZy6Foi8P1VxAD6UNKGq7NcfyfFPeS", "fee": 1000000, "feeAssetId": null, "timestamp": 1679915192197, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "ak1wXjz8Jx7Kdm1BAzbaM6w5MThtjzrHKAfBcTNCTRMn94gBeVkR1nwRViNtTHCkWTMy6SCzM3Q8DuqPHAjJvWK" ], "script": "base64:BgIKCAISBgoEGBgRAQEABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgEBaQEGYnV5TmZ0BAZzZWxsZXIEbmZ0cwVwcmljZQt0b3RhbGFtb3VudAQFYnV5ZXIIBQFpBmNhbGxlcgQDbmZ0CQCQAwEFBG5mdHMEDGJ1eWVyQmFsYW5jZQkA8AcCBQVidXllcgUFdGVhbXMEBmFtb3VudAkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQDCQBmAgULdG90YWxhbW91bnQFBmFtb3VudAkAAgECHXlvdXIgcGF5aW5nIGFtbW91bnQgaXMgd3JvbmcgAwMJAQIhPQIJAJADAQUEbmZ0cwkAkAMBBQZzZWxsZXIGCQECIT0CCQCQAwEFBnNlbGxlcgkAkAMBBQVwcmljZQkAAgECTEludmFsaWQgaW5wdXQ6IE51bWJlciBvZiBORlRzLCBzZWxsZXIgYWRkcmVzc2VzLCBhbmQgY29zdHMgbXVzdCBiZSB0aGUgc2FtZS4DCQBmAgUGYW1vdW50BQxidXllckJhbGFuY2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QEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQkAkQMCBQZzZWxsZXIAAAkAkQMCBQVwcmljZQAABQR1bml0CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQkA2QQBCQCRAwIFBnNlbGxlcgABCQCRAwIFBXByaWNlAAEFBHVuaXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEJAJEDAgUGc2VsbGVyAAIJAJEDAgUFcHJpY2UAAgUEdW5pdAUDbmlsBQNuaWwAuhnKoQ==", "height": 2508295, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5Hwyc725iPcw68nQF23TSJiozzApnMPGGiKWm4xGTxNz Next: 79JCZFSyNtVnuyy4wQ5EzuactLCnnwNYgdAEs5MXpnr6 Diff:
OldNewDifferences
1818 else if ((j > i))
1919 then throw("Buyer does not have enough funds to complete the purchase.")
2020 else if ((b.payments[0].assetId == a))
21- 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])), e[0], a), ScriptTransfer(Address(fromBase58String(c[1])), e[1], a), ScriptTransfer(Address(fromBase58String(c[1])), e[2], a)]
21+ 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])), e[0], a), ScriptTransfer(Address(fromBase58String(c[1])), e[1], a), ScriptTransfer(Address(fromBase58String(c[2])), e[2], a)]
2222 else if ((b.payments[0].assetId == unit))
23- 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])), e[0], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[1], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[2], unit)]
23+ 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])), e[0], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[1], unit), ScriptTransfer(Address(fromBase58String(c[2])), e[2], unit)]
2424 else nil
2525 }
2626
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
55
66 @Callable(b)
77 func buyNft (c,d,e,f) = {
88 let g = b.caller
99 let h = size(d)
1010 let i = assetBalance(g, a)
1111 let j = value(b.payments[0].amount)
1212 if ((f > j))
1313 then throw("your paying ammount is wrong ")
1414 else if (if ((size(d) != size(c)))
1515 then true
1616 else (size(c) != size(e)))
1717 then throw("Invalid input: Number of NFTs, seller addresses, and costs must be the same.")
1818 else if ((j > i))
1919 then throw("Buyer does not have enough funds to complete the purchase.")
2020 else if ((b.payments[0].assetId == a))
21- 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])), e[0], a), ScriptTransfer(Address(fromBase58String(c[1])), e[1], a), ScriptTransfer(Address(fromBase58String(c[1])), e[2], a)]
21+ 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])), e[0], a), ScriptTransfer(Address(fromBase58String(c[1])), e[1], a), ScriptTransfer(Address(fromBase58String(c[2])), e[2], a)]
2222 else if ((b.payments[0].assetId == unit))
23- 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])), e[0], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[1], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[2], unit)]
23+ 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])), e[0], unit), ScriptTransfer(Address(fromBase58String(c[1])), e[1], unit), ScriptTransfer(Address(fromBase58String(c[2])), e[2], unit)]
2424 else nil
2525 }
2626
2727

github/deemru/w8io/169f3d6 
33.12 ms