tx · 256CytguiNn2keXFFbB1MLtMaZftDzTpX4TvpcpccRJN
3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo: -0.01400000 Waves
2020.01.28 19:38 [874408] smart account 3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo > SELF 0.00000000 Waves
{
"type": 13,
"id": "256CytguiNn2keXFFbB1MLtMaZftDzTpX4TvpcpccRJN",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1580229539308,
"version": 1,
"sender": "3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo",
"senderPublicKey": "EhCmodhxJjatTxgb9GAq7PtSfEZbg4nTyMtcM6j3BWDQ",
"proofs": [
"5bL2wj4n58R2ryzmLqiB74ko4MDb4wN2cyDXqKdqFv4mDGjjnJqSoGE8S1yYNxy84LLZJR5cZXeg4MDxncYjMhsp"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAgAAAAAKYXNzZXRPbmVJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAACmFzc2V0VHdvSWQBAAAAIJf5Ph+UiGkJ5s4B+Hal+oKr3ITS7HfAYQTXGMowCIXNAAAAAQAAAAFpAQAAAARzd2FwAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABnNlbmRUbwgFAAAAAWkAAAAGY2FsbGVyBAAAAAxhbW91bnRUb1NlbmQJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAoEAAAAE2RhcHBBc3NldFR3b0JhbGFuY2UJAAPrAAAAAgUAAAAEdGhpcwUAAAAKYXNzZXRUd29JZAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAKYXNzZXRPbmVJZAkAAAIAAAABAgAAACBhc3NldE9uZSB0b2tlbiBvbmx5IGZvciB0aGUgc3dhcAMJAAAAAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAAJAAACAAAAAQIAAAAbVGhlcmUgaXMgbm90aGluZyB0byBzd2FwIDopAwkAAGYAAAACBQAAAAxhbW91bnRUb1NlbmQFAAAAE2RhcHBBc3NldFR3b0JhbGFuY2UJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAuU29ycnkgd2UgZG9uJ3QgaGF2ZSBlbm91Z2ggdG9rZW4gdG8gc3dhcCB5b3VycwkAAaQAAAABBQAAABNkYXBwQXNzZXRUd29CYWxhbmNlAgAAAAEtCQABpAAAAAEFAAAADGFtb3VudFRvU2VuZAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAZzZW5kVG8FAAAADGFtb3VudFRvU2VuZAUAAAAKYXNzZXRUd29JZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFzBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQckW6oB",
"chainId": 84,
"height": 874408,
"spentComplexity": 0
}
View: original | compacted
Prev: 6AXetQuLmJ9Jrg4c45AeTJR8CvB69h6DoAqdfAH2NH6h
Next: AX2tb4M1pMV2fYiiUHkrgsfuiQSoJ1Bi9bUTj8Sx57DA
Diff:
Old | New | | Differences |
---|
16 | 16 | | else if ((pmt.amount == 0)) |
---|
17 | 17 | | then throw("There is nothing to swap :)") |
---|
18 | 18 | | else if ((amountToSend > dappAssetTwoBalance)) |
---|
19 | | - | then throw(("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance))) |
---|
| 19 | + | then throw(((("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance)) + "-") + toString(amountToSend))) |
---|
20 | 20 | | else TransferSet([ScriptTransfer(sendTo, amountToSend, assetTwoId)]) |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let assetOneId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' |
---|
5 | 5 | | |
---|
6 | 6 | | let assetTwoId = base58'BEEzeHYrCXucTHQYFkNPMdeWdcVfFQoDtFMGUWfteA1J' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | 9 | | func swap () = { |
---|
10 | 10 | | let pmt = extract(i.payment) |
---|
11 | 11 | | let sendTo = i.caller |
---|
12 | 12 | | let amountToSend = (pmt.amount / 10) |
---|
13 | 13 | | let dappAssetTwoBalance = assetBalance(this, assetTwoId) |
---|
14 | 14 | | if ((pmt.assetId != assetOneId)) |
---|
15 | 15 | | then throw("assetOne token only for the swap") |
---|
16 | 16 | | else if ((pmt.amount == 0)) |
---|
17 | 17 | | then throw("There is nothing to swap :)") |
---|
18 | 18 | | else if ((amountToSend > dappAssetTwoBalance)) |
---|
19 | | - | then throw(("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance))) |
---|
| 19 | + | then throw(((("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance)) + "-") + toString(amountToSend))) |
---|
20 | 20 | | else TransferSet([ScriptTransfer(sendTo, amountToSend, assetTwoId)]) |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | @Verifier(tx) |
---|
25 | 25 | | func verify () = match tx { |
---|
26 | 26 | | case s: SetScriptTransaction => |
---|
27 | 27 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
28 | 28 | | case _ => |
---|
29 | 29 | | false |
---|
30 | 30 | | } |
---|
31 | 31 | | |
---|