tx · UkZrAGSUy2tYySqA9HdkZTEoP6vdtRZYQvvDnTR3gPq
3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr: -0.01000000 Waves
2023.05.03 10:44 [2561294] smart account 3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr > SELF 0.00000000 Waves
{
"type": 13,
"id": "UkZrAGSUy2tYySqA9HdkZTEoP6vdtRZYQvvDnTR3gPq",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1683099958365,
"version": 2,
"chainId": 84,
"sender": "3N1jUC4jdR81nVTUX6LkZsWxBwEGXBLMTzr",
"senderPublicKey": "FDZa2xgu4cguexFSg1X8LsKUrqcYEcLGDpixvT2hNxE5",
"proofs": [
"4vpqMwsab3xj552rW9PHi8Lw2difPSnpJbWuviSzpJ2EyvxoqopgXV9uMPiCttSZ3wG83ZGbZJ3CqgiGxaHJkFRJ"
],
"script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAACAAAAAAh4dG5hcHlJZAEAAAAgxlIegU7qbuM8wJewDl8s8mrp7Z2yhtGaQnioYH0+G7EAAAAABXh0bklkAQAAACAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAAAAAIAAAABaQEAAAAPYnV5WFROQVBZZm9yWFROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAV4dG5JZAkAAAIAAAABAgAAABVhdHRhY2ggWFROIHRva2VuIG9ubHkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAABmFtb3VudAAAAAAAAAAAZAUAAAAIeHRuYXB5SWQFAAAAA25pbAAAAAFpAQAAABBzZWxsWFROQVBZZm9yWFROAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAh4dG5hcHlJZAkAAAIAAAABAgAAABhhdHRhY2ggWFROQVBZIHRva2VuIG9ubHkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaQAAAAIFAAAABmFtb3VudAAAAAAAAAAAZAUAAAAFeHRuSWQFAAAAA25pbAAAAABFOPJ3",
"height": 2561294,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 7H6UZtvP9KzJmodBMWpgzK41qdHMdJnEazjnohA1kEA6
Next: FVYPwp58zh59ZJgFJyosFoWCZgcrDsr6kX4832uYDjN8
Diff:
Old | New | | Differences |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' |
---|
7 | 7 | | |
---|
8 | | - | let c = false |
---|
9 | | - | |
---|
10 | | - | @Callable(d) |
---|
| 8 | + | @Callable(c) |
---|
11 | 9 | | func buyXTNAPYforXTN () = { |
---|
12 | | - | let e = value(d.payments[0]) |
---|
13 | | - | let f = e.amount |
---|
14 | | - | if ((e.assetId != b)) |
---|
| 10 | + | let d = value(c.payments[0]) |
---|
| 11 | + | let e = d.amount |
---|
| 12 | + | if ((d.assetId != b)) |
---|
15 | 13 | | then throw("attach XTN token only") |
---|
16 | | - | else if (c) |
---|
17 | | - | then throw("smart contract is on lock") |
---|
18 | | - | else [ScriptTransfer(d.caller, f, a)] |
---|
| 14 | + | else [ScriptTransfer(c.caller, (e * 100), a)] |
---|
19 | 15 | | } |
---|
20 | 16 | | |
---|
21 | 17 | | |
---|
22 | 18 | | |
---|
23 | | - | @Callable(d) |
---|
| 19 | + | @Callable(c) |
---|
24 | 20 | | func sellXTNAPYforXTN () = { |
---|
25 | | - | let e = value(d.payments[0]) |
---|
26 | | - | let f = e.amount |
---|
27 | | - | if ((e.assetId != a)) |
---|
| 21 | + | let d = value(c.payments[0]) |
---|
| 22 | + | let e = d.amount |
---|
| 23 | + | if ((d.assetId != a)) |
---|
28 | 24 | | then throw("attach XTNAPY token only") |
---|
29 | | - | else if (c) |
---|
30 | | - | then throw("smart contract is on lock") |
---|
31 | | - | else [ScriptTransfer(d.caller, f, b)] |
---|
| 25 | + | else [ScriptTransfer(c.caller, (e / 100), b)] |
---|
32 | 26 | | } |
---|
33 | 27 | | |
---|
34 | 28 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' |
---|
7 | 7 | | |
---|
8 | | - | let c = false |
---|
9 | | - | |
---|
10 | | - | @Callable(d) |
---|
| 8 | + | @Callable(c) |
---|
11 | 9 | | func buyXTNAPYforXTN () = { |
---|
12 | | - | let e = value(d.payments[0]) |
---|
13 | | - | let f = e.amount |
---|
14 | | - | if ((e.assetId != b)) |
---|
| 10 | + | let d = value(c.payments[0]) |
---|
| 11 | + | let e = d.amount |
---|
| 12 | + | if ((d.assetId != b)) |
---|
15 | 13 | | then throw("attach XTN token only") |
---|
16 | | - | else if (c) |
---|
17 | | - | then throw("smart contract is on lock") |
---|
18 | | - | else [ScriptTransfer(d.caller, f, a)] |
---|
| 14 | + | else [ScriptTransfer(c.caller, (e * 100), a)] |
---|
19 | 15 | | } |
---|
20 | 16 | | |
---|
21 | 17 | | |
---|
22 | 18 | | |
---|
23 | | - | @Callable(d) |
---|
| 19 | + | @Callable(c) |
---|
24 | 20 | | func sellXTNAPYforXTN () = { |
---|
25 | | - | let e = value(d.payments[0]) |
---|
26 | | - | let f = e.amount |
---|
27 | | - | if ((e.assetId != a)) |
---|
| 21 | + | let d = value(c.payments[0]) |
---|
| 22 | + | let e = d.amount |
---|
| 23 | + | if ((d.assetId != a)) |
---|
28 | 24 | | then throw("attach XTNAPY token only") |
---|
29 | | - | else if (c) |
---|
30 | | - | then throw("smart contract is on lock") |
---|
31 | | - | else [ScriptTransfer(d.caller, f, b)] |
---|
| 25 | + | else [ScriptTransfer(c.caller, (e / 100), b)] |
---|
32 | 26 | | } |
---|
33 | 27 | | |
---|
34 | 28 | | |
---|