tx · 2mYwm2HrdcSBAERgcTJRVpkJQy9iDa58sRsPUtyhuMyU
3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp: -0.01000000 Waves
2021.07.16 17:47 [1616301] smart account 3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp > SELF 0.00000000 Waves
{
"type": 13,
"id": "2mYwm2HrdcSBAERgcTJRVpkJQy9iDa58sRsPUtyhuMyU",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1626446917261,
"version": 2,
"chainId": 84,
"sender": "3N58U7hA1kzMTCUqHiJGdcPdjxAKspMgGNp",
"senderPublicKey": "85gydchvWB9gMPFCKM6kfLPWFSATbtGog2Y6rUjhtQKT",
"proofs": [
"56dz6kP2RCGSikxFyiQMS37AdHxZzNjkNyNtvu8aqfVs28WZqQG5A6wBPQt6zPLTq8YfPvybvLvjF15X3THyHas9"
],
"script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAAAAAAAgAAAAFpAQAAABFidXlUb2tlbldpdGhXYXZlcwAAAAAEAAAACXN3YXBUb2tlbgEAAAAgb43vwMVF3NniH29QbTemn52wAqbd0CJjn9c5H5QYbCgEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAABmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAACXN3YXBUb2tlbgUAAAADbmlsAAAAAWkBAAAAEXNlbGxUb2tlbkZvcldhdmVzAAAAAAQAAAAJc3dhcFRva2VuAQAAACBvje/AxUXc2eIfb1BtN6afnbACpt3QImOf1zkflBhsKAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAACXN3YXBUb2tlbgkAAAIAAAABAgAAABljYW4gaG9kbCBTd2FwIFRva2VuIG9ubHkuBAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAlzd2FwVG9rZW4FAAAAA25pbAAAAAA1e8yq",
"height": 1616301,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: E5KdkibjJL43e5yndhL8a1D1H5DxjMtiwr9rYtthRyMF
Next: D5NVaF36NCs9vv7115Wtr8RyDDJ8tG5gGVyvCDQ8Z41n
Diff:
Old | New | | Differences |
---|
21 | 21 | | func sellTokenForWaves () = { |
---|
22 | 22 | | let swapToken = base58'8WTnTr8QxFYKhMo7tkjLigfw2zAFFQYzjpoNdSFruTL3' |
---|
23 | 23 | | let pmt = extract(i.payment) |
---|
24 | | - | if ((pmt.assetId == swapToken)) |
---|
| 24 | + | if ((pmt.assetId != swapToken)) |
---|
25 | 25 | | then throw("can hodl Swap Token only.") |
---|
26 | 26 | | else { |
---|
27 | 27 | | let amount = pmt.amount |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func buyTokenWithWaves () = { |
---|
8 | 8 | | let swapToken = base58'8WTnTr8QxFYKhMo7tkjLigfw2zAFFQYzjpoNdSFruTL3' |
---|
9 | 9 | | let pmt = extract(i.payment) |
---|
10 | 10 | | if (isDefined(pmt.assetId)) |
---|
11 | 11 | | then throw("can hodl waves only at the moment") |
---|
12 | 12 | | else { |
---|
13 | 13 | | let amount = pmt.amount |
---|
14 | 14 | | TransferSet([ScriptTransfer(i.caller, amount, swapToken)]) |
---|
15 | 15 | | } |
---|
16 | 16 | | } |
---|
17 | 17 | | |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(i) |
---|
21 | 21 | | func sellTokenForWaves () = { |
---|
22 | 22 | | let swapToken = base58'8WTnTr8QxFYKhMo7tkjLigfw2zAFFQYzjpoNdSFruTL3' |
---|
23 | 23 | | let pmt = extract(i.payment) |
---|
24 | | - | if ((pmt.assetId == swapToken)) |
---|
| 24 | + | if ((pmt.assetId != swapToken)) |
---|
25 | 25 | | then throw("can hodl Swap Token only.") |
---|
26 | 26 | | else { |
---|
27 | 27 | | let amount = pmt.amount |
---|
28 | 28 | | TransferSet([ScriptTransfer(i.caller, amount, swapToken)]) |
---|
29 | 29 | | } |
---|
30 | 30 | | } |
---|
31 | 31 | | |
---|
32 | 32 | | |
---|