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