tx · 9ABMTRP1HPMDzPZ3Cwpkvv2osy3AqKV6ZAMqcVp3jipL
3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD: -0.10000000 Waves
2021.02.01 15:25 [1379096] smart account 3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD > SELF 0.00000000 Waves
{
"type": 13,
"id": "9ABMTRP1HPMDzPZ3Cwpkvv2osy3AqKV6ZAMqcVp3jipL",
"fee": 10000000,
"feeAssetId": null,
"timestamp": 1612182377300,
"version": 2,
"chainId": 84,
"sender": "3NCdyrMGZ5jfKPu79jjNiUejWRdQtEwKduD",
"senderPublicKey": "GHCcpQWhq3KPA8MHcLKffvcHoJFXk6bdo67cHXjbpKy1",
"proofs": [
"xwAPRpgcvgJDFZ6WkEeGUc12YSuz24fM2qZ9Lb6aWgP6dWGbRqn6kqaFq13bP1GHhhrVVT6YpJs7jKBTnm39naU"
],
"script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAADAQAAAAphY2NlcHRCdGZjAAAAAgAAAANzdW0AAAABZQMJAQAAAAIhPQAAAAIIBQAAAAFlAAAAB2Fzc2V0SWQBAAAAIBUVgoZaLToHoF7JWTbYfTPPIZn5jsOYG4nZknFTL9EjCQAAAgAAAAECAAAAJFdBVkVTPC0+QlRGQyBTd2FwIGFjY2VwdHMgb25seSBXQVZFUwkAAGQAAAACBQAAAANzdW0IBQAAAAFlAAAABmFtb3VudAEAAAALYWNjZXB0V2F2ZXMAAAACAAAAA3N1bQAAAAFlAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFlAAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAjQlRGQzwtPldBVkVTIFN3YXAgYWNjZXB0cyBvbmx5IEJURkMJAABkAAAAAgUAAAADc3VtCAUAAAABZQAAAAZhbW91bnQAAAAADFdhdmVzUGVyQnRmYwAAAAAAAAAAAgAAAAIAAAABaQEAAAAPRnJvbUJ0ZmNUb1dhdmVzAAAAAAQAAAADc3VtBAAAAAskbGlzdD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AAAAAAAACBQAAAAskc2l6ZTY3NDcwOQAAAAAAAAAAAAUAAAALJGFjYzA2NzQ3MDkEAAAACyRhY2MxNjc0NzA5CQEAAAALYWNjZXB0V2F2ZXMAAAACBQAAAAskYWNjMDY3NDcwOQkAAZEAAAACBQAAAAskbGlzdDY3NDcwOQAAAAAAAAAAAAMJAAAAAAAAAgUAAAALJHNpemU2NzQ3MDkAAAAAAAAAAAEFAAAACyRhY2MxNjc0NzA5BAAAAAskYWNjMjY3NDcwOQkBAAAAC2FjY2VwdFdhdmVzAAAAAgUAAAALJGFjYzE2NzQ3MDkJAAGRAAAAAgUAAAALJGxpc3Q2NzQ3MDkAAAAAAAAAAAEDCQAAAAAAAAIFAAAACyRzaXplNjc0NzA5AAAAAAAAAAACBQAAAAskYWNjMjY3NDcwOQQAAAALJGFjYzM2NzQ3MDkJAQAAAAthY2NlcHRXYXZlcwAAAAIFAAAACyRhY2MyNjc0NzA5CQABkQAAAAIFAAAACyRsaXN0Njc0NzA5AAAAAAAAAAACCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgMgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAABpAAAAAgUAAAADc3VtBQAAAAxXYXZlc1BlckJ0ZmMJAQAAAARVbml0AAAAAAUAAAADbmlsAAAAADLI4Jc=",
"height": 1379096,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9yqZD7WnMwD5vhdrApMGf9YejRs7L5CHnLs9RJVPArAM
Next: Co2fRZ6kWXBRQ3LLkf1M6JwCjj2Cv9QVKSjzqN2E5dbt
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | func a (b,c) = if (isDefined(c.assetId)) |
---|
5 | | - | then throw("BTFC<->WAVES Swap accepts only BTFC") |
---|
| 4 | + | func a (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')) |
---|
| 5 | + | then throw("WAVES<->BTFC Swap accepts only WAVES") |
---|
6 | 6 | | else (b + c.amount) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | | - | func d (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')) |
---|
10 | | - | then throw("WAVES<->BTFC Swap accepts only WAVES") |
---|
| 9 | + | func d (b,c) = if (isDefined(c.assetId)) |
---|
| 10 | + | then throw("BTFC<->WAVES Swap accepts only BTFC") |
---|
11 | 11 | | else (b + c.amount) |
---|
12 | 12 | | |
---|
13 | 13 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | func a (b,c) = if (isDefined(c.assetId)) |
---|
5 | | - | then throw("BTFC<->WAVES Swap accepts only BTFC") |
---|
| 4 | + | func a (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')) |
---|
| 5 | + | then throw("WAVES<->BTFC Swap accepts only WAVES") |
---|
6 | 6 | | else (b + c.amount) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | | - | func d (b,c) = if ((c.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')) |
---|
10 | | - | then throw("WAVES<->BTFC Swap accepts only WAVES") |
---|
| 9 | + | func d (b,c) = if (isDefined(c.assetId)) |
---|
| 10 | + | then throw("BTFC<->WAVES Swap accepts only BTFC") |
---|
11 | 11 | | else (b + c.amount) |
---|
12 | 12 | | |
---|
13 | 13 | | |
---|
14 | 14 | | let e = 2 |
---|
15 | 15 | | |
---|
16 | 16 | | @Callable(f) |
---|
17 | 17 | | func FromBtfcToWaves () = { |
---|
18 | 18 | | let b = { |
---|
19 | 19 | | let g = f.payments |
---|
20 | 20 | | let h = size(g) |
---|
21 | 21 | | let i = 0 |
---|
22 | 22 | | if ((h == 0)) |
---|
23 | 23 | | then i |
---|
24 | 24 | | else { |
---|
25 | 25 | | let j = a(i, g[0]) |
---|
26 | 26 | | if ((h == 1)) |
---|
27 | 27 | | then j |
---|
28 | 28 | | else { |
---|
29 | 29 | | let k = a(j, g[1]) |
---|
30 | 30 | | if ((h == 2)) |
---|
31 | 31 | | then k |
---|
32 | 32 | | else { |
---|
33 | 33 | | let l = a(k, g[2]) |
---|
34 | 34 | | throw("List size exceed 2") |
---|
35 | 35 | | } |
---|
36 | 36 | | } |
---|
37 | 37 | | } |
---|
38 | 38 | | } |
---|
39 | 39 | | [ScriptTransfer(Address(f.caller.bytes), (b * e), Unit())] |
---|
40 | 40 | | } |
---|
41 | 41 | | |
---|
42 | 42 | | |
---|
43 | 43 | | |
---|
44 | 44 | | @Callable(f) |
---|
45 | 45 | | func FromWavesToBtfc () = { |
---|
46 | 46 | | let b = { |
---|
47 | 47 | | let m = f.payments |
---|
48 | 48 | | let n = size(m) |
---|
49 | 49 | | let o = 0 |
---|
50 | 50 | | if ((n == 0)) |
---|
51 | 51 | | then o |
---|
52 | 52 | | else { |
---|
53 | 53 | | let p = d(o, m[0]) |
---|
54 | 54 | | if ((n == 1)) |
---|
55 | 55 | | then p |
---|
56 | 56 | | else { |
---|
57 | 57 | | let q = d(p, m[1]) |
---|
58 | 58 | | if ((n == 2)) |
---|
59 | 59 | | then q |
---|
60 | 60 | | else { |
---|
61 | 61 | | let r = d(q, m[2]) |
---|
62 | 62 | | throw("List size exceed 2") |
---|
63 | 63 | | } |
---|
64 | 64 | | } |
---|
65 | 65 | | } |
---|
66 | 66 | | } |
---|
67 | 67 | | [ScriptTransfer(Address(f.caller.bytes), (b / e), Unit())] |
---|
68 | 68 | | } |
---|
69 | 69 | | |
---|
70 | 70 | | |
---|