tx · 6AXetQuLmJ9Jrg4c45AeTJR8CvB69h6DoAqdfAH2NH6h
3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo: -0.01400000 Waves
2020.01.28 19:36 [874406] smart account 3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo > SELF 0.00000000 Waves
{
"type": 13,
"id": "6AXetQuLmJ9Jrg4c45AeTJR8CvB69h6DoAqdfAH2NH6h",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1580229398069,
"version": 1,
"sender": "3MxoCj9LnZLz3qrLdue3o1eLgBUAPmGyxuo",
"senderPublicKey": "EhCmodhxJjatTxgb9GAq7PtSfEZbg4nTyMtcM6j3BWDQ",
"proofs": [
"62L8w217mswokwBo3tYLfqKk7hzJom6r1EXrorw7YpGVAZ5FAfAuJinG3L2Jz7yjLySQXCTah2fpM7n3KbsDKmES"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAgAAAAAKYXNzZXRPbmVJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresAAAAACmFzc2V0VHdvSWQBAAAAIJf5Ph+UiGkJ5s4B+Hal+oKr3ITS7HfAYQTXGMowCIXNAAAAAQAAAAFpAQAAAARzd2FwAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABnNlbmRUbwgFAAAAAWkAAAAGY2FsbGVyBAAAAAxhbW91bnRUb1NlbmQJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAoEAAAAE2RhcHBBc3NldFR3b0JhbGFuY2UJAAPrAAAAAgUAAAAEdGhpcwUAAAAKYXNzZXRUd29JZAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAKYXNzZXRPbmVJZAkAAAIAAAABAgAAACBhc3NldE9uZSB0b2tlbiBvbmx5IGZvciB0aGUgc3dhcAMJAAAAAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAAAAAJAAACAAAAAQIAAAAbVGhlcmUgaXMgbm90aGluZyB0byBzd2FwIDopAwkAAGYAAAACBQAAAAxhbW91bnRUb1NlbmQFAAAAE2RhcHBBc3NldFR3b0JhbGFuY2UJAAACAAAAAQkAASwAAAACAgAAAC5Tb3JyeSB3ZSBkb24ndCBoYXZlIGVub3VnaCB0b2tlbiB0byBzd2FwIHlvdXJzCQABpAAAAAEFAAAAE2RhcHBBc3NldFR3b0JhbGFuY2UJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAGc2VuZFRvBQAAAAxhbW91bnRUb1NlbmQFAAAACmFzc2V0VHdvSWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHQ66M+A==",
"chainId": 84,
"height": 874406,
"spentComplexity": 0
}
View: original | compacted
Prev: 73r4rqoarAyv53Aj8rSWuta1rxTvpxdPm9dp6Pi6rA3Z
Next: 256CytguiNn2keXFFbB1MLtMaZftDzTpX4TvpcpccRJN
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") |
---|
| 19 | + | then throw(("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance))) |
---|
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") |
---|
| 19 | + | then throw(("Sorry we don't have enough token to swap yours" + toString(dappAssetTwoBalance))) |
---|
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 | | |
---|