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:
Old | New | | Differences |
---|
6 | 6 | | let WAVES = base58'' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func asimiTransfer (recepientAddr) = { |
---|
| 9 | + | func waveTransfer (recepientAddr) = { |
---|
10 | 10 | | let caller = i.caller.bytes |
---|
11 | 11 | | let reciver = fromBase58String(recepientAddr) |
---|
12 | 12 | | let amount = i.payments[0].amount |
---|
13 | 13 | | 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 |
---|
17 | 19 | | } |
---|
18 | 20 | | |
---|
19 | 21 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' |
---|
5 | 5 | | |
---|
6 | 6 | | let WAVES = base58'' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func asimiTransfer (recepientAddr) = { |
---|
| 9 | + | func waveTransfer (recepientAddr) = { |
---|
10 | 10 | | let caller = i.caller.bytes |
---|
11 | 11 | | let reciver = fromBase58String(recepientAddr) |
---|
12 | 12 | | let amount = i.payments[0].amount |
---|
13 | 13 | | 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 |
---|
17 | 19 | | } |
---|
18 | 20 | | |
---|
19 | 21 | | |
---|