tx · ToazMKzqkAYLFkehrACHYoFpYjLyKCv4HNiWkiSTAHL

3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx:  -0.01000000 Waves

2023.05.24 12:25 [2591879] smart account 3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx > SELF 0.00000000 Waves

{ "type": 13, "id": "ToazMKzqkAYLFkehrACHYoFpYjLyKCv4HNiWkiSTAHL", "fee": 1000000, "feeAssetId": null, "timestamp": 1684920541312, "version": 2, "chainId": 84, "sender": "3N5BTH4bjnXn7AAKoj4sswxytsPGmdXUuTx", "senderPublicKey": "DyeDJ3fgwVVux2WRkxpLU9BbVjTM96AyV58b7bRFzCBx", "proofs": [ "4m553nJYpvCVPK9qT77xtNAiviyxeAyZZkAi5z1m1aaVFQ5KbETzyTwdL3PXY7JQUeZBVU8DJCDWKpyGx9JM5Yax" ], "script": "base64:BgIHCAISAwoBCAIABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgAFV0FWRVMBAAEBaQEMd2F2ZVRyYW5zZmVyAQ1yZWNlcGllbnRBZGRyBAZjYWxsZXIICAUBaQZjYWxsZXIFYnl0ZXMEB3JlY2l2ZXIJANkEAQUNcmVjZXBpZW50QWRkcgQGYW1vdW50CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAQNc2VuZGVyQmFsYW5jZQkA8AcCCAUBaQZjYWxsZXIBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AwkAZgIFBmFtb3VudAUNc2VuZGVyQmFsYW5jZQkAAgECOkJ1eWVyIGRvZXMgbm90IGhhdmUgZW5vdWdoIGZ1bmRzIHRvIGNvbXBsZXRlIHRoZSBwdXJjaGFzZS4DCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQR1bml0CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQUHcmVjaXZlcgUGYW1vdW50BQR1bml0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAglfdHJhbnNmZXIFBmFtb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAgxfdHJhbnNmZXJfdG8FDXJlY2VwaWVudEFkZHIFA25pbAUDbmlsANSiSA8=", "height": 2591879, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ANLKwHZk63M5pHZknpuxNRfV1tJ9uENA3t9kio9xSahi Next: 5eZn7cBWSyBjtPyUJXgSCTCuu1BmbRJLkL8hyuWwuBKz Diff:
OldNewDifferences
66 let WAVES = base58''
77
88 @Callable(i)
9-func asimiTransfer (recepientAddr) = {
9+func waveTransfer (recepientAddr) = {
1010 let caller = i.caller.bytes
1111 let reciver = fromBase58String(recepientAddr)
1212 let amount = i.payments[0].amount
1313 let senderBalance = assetBalance(i.caller, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
14- if ((i.payments[0].assetId == teams))
15- then [ScriptTransfer(Address(reciver), amount, teams), IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr)]
16- else nil
14+ if ((amount > senderBalance))
15+ then throw("Buyer does not have enough funds to complete the purchase.")
16+ else if ((i.payments[0].assetId == unit))
17+ then [ScriptTransfer(Address(reciver), amount, unit), IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr)]
18+ else nil
1719 }
1820
1921
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
55
66 let WAVES = base58''
77
88 @Callable(i)
9-func asimiTransfer (recepientAddr) = {
9+func waveTransfer (recepientAddr) = {
1010 let caller = i.caller.bytes
1111 let reciver = fromBase58String(recepientAddr)
1212 let amount = i.payments[0].amount
1313 let senderBalance = assetBalance(i.caller, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq')
14- if ((i.payments[0].assetId == teams))
15- then [ScriptTransfer(Address(reciver), amount, teams), IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr)]
16- else nil
14+ if ((amount > senderBalance))
15+ then throw("Buyer does not have enough funds to complete the purchase.")
16+ else if ((i.payments[0].assetId == unit))
17+ then [ScriptTransfer(Address(reciver), amount, unit), IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr)]
18+ else nil
1719 }
1820
1921

github/deemru/w8io/169f3d6 
27.71 ms