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