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 |
---|
5 | 5 | | case a: Int => |
---|
6 | 6 | | a |
---|
7 | 7 | | case _ => |
---|
8 | | - | 2 |
---|
| 8 | + | 200 |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
|
29 | 29 | | @Callable(i) |
---|
30 | 30 | | func FromBtfcToWaves () = { |
---|
31 | 31 | | let sum = { |
---|
32 | | - | let $list765799 = i.payments |
---|
33 | | - | let $size765799 = size($list765799) |
---|
34 | | - | let $acc0765799 = 0 |
---|
35 | | - | if (($size765799 == 0)) |
---|
36 | | - | then $acc0765799 |
---|
| 32 | + | let $list767801 = i.payments |
---|
| 33 | + | let $size767801 = size($list767801) |
---|
| 34 | + | let $acc0767801 = 0 |
---|
| 35 | + | if (($size767801 == 0)) |
---|
| 36 | + | then $acc0767801 |
---|
37 | 37 | | else { |
---|
38 | | - | let $acc1765799 = acceptBtfc($acc0765799, $list765799[0]) |
---|
39 | | - | if (($size765799 == 1)) |
---|
40 | | - | then $acc1765799 |
---|
| 38 | + | let $acc1767801 = acceptBtfc($acc0767801, $list767801[0]) |
---|
| 39 | + | if (($size767801 == 1)) |
---|
| 40 | + | then $acc1767801 |
---|
41 | 41 | | else { |
---|
42 | | - | let $acc2765799 = acceptBtfc($acc1765799, $list765799[1]) |
---|
43 | | - | if (($size765799 == 2)) |
---|
44 | | - | then $acc2765799 |
---|
| 42 | + | let $acc2767801 = acceptBtfc($acc1767801, $list767801[1]) |
---|
| 43 | + | if (($size767801 == 2)) |
---|
| 44 | + | then $acc2767801 |
---|
45 | 45 | | else { |
---|
46 | | - | let $acc3765799 = acceptBtfc($acc2765799, $list765799[2]) |
---|
| 46 | + | let $acc3767801 = acceptBtfc($acc2767801, $list767801[2]) |
---|
47 | 47 | | throw("List size exceed 2") |
---|
48 | 48 | | } |
---|
49 | 49 | | } |
---|
50 | 50 | | } |
---|
51 | 51 | | } |
---|
52 | | - | [ScriptTransfer(Address(i.caller.bytes), (sum * getPrice()), Unit())] |
---|
| 52 | + | [ScriptTransfer(Address(i.caller.bytes), ((sum * getPrice()) / 100), Unit())] |
---|
53 | 53 | | } |
---|
54 | 54 | | |
---|
55 | 55 | | |
---|
|
57 | 57 | | @Callable(i) |
---|
58 | 58 | | func FromWavesToBtfc () = { |
---|
59 | 59 | | let sum = { |
---|
60 | | - | let $list924959 = i.payments |
---|
61 | | - | let $size924959 = size($list924959) |
---|
62 | | - | let $acc0924959 = 0 |
---|
63 | | - | if (($size924959 == 0)) |
---|
64 | | - | then $acc0924959 |
---|
| 60 | + | let $list932967 = i.payments |
---|
| 61 | + | let $size932967 = size($list932967) |
---|
| 62 | + | let $acc0932967 = 0 |
---|
| 63 | + | if (($size932967 == 0)) |
---|
| 64 | + | then $acc0932967 |
---|
65 | 65 | | else { |
---|
66 | | - | let $acc1924959 = acceptWaves($acc0924959, $list924959[0]) |
---|
67 | | - | if (($size924959 == 1)) |
---|
68 | | - | then $acc1924959 |
---|
| 66 | + | let $acc1932967 = acceptWaves($acc0932967, $list932967[0]) |
---|
| 67 | + | if (($size932967 == 1)) |
---|
| 68 | + | then $acc1932967 |
---|
69 | 69 | | else { |
---|
70 | | - | let $acc2924959 = acceptWaves($acc1924959, $list924959[1]) |
---|
71 | | - | if (($size924959 == 2)) |
---|
72 | | - | then $acc2924959 |
---|
| 70 | + | let $acc2932967 = acceptWaves($acc1932967, $list932967[1]) |
---|
| 71 | + | if (($size932967 == 2)) |
---|
| 72 | + | then $acc2932967 |
---|
73 | 73 | | else { |
---|
74 | | - | let $acc3924959 = acceptWaves($acc2924959, $list924959[2]) |
---|
| 74 | + | let $acc3932967 = acceptWaves($acc2932967, $list932967[2]) |
---|
75 | 75 | | throw("List size exceed 2") |
---|
76 | 76 | | } |
---|
77 | 77 | | } |
---|
78 | 78 | | } |
---|
79 | 79 | | } |
---|
80 | | - | [ScriptTransfer(Address(i.caller.bytes), (sum / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')] |
---|
| 80 | + | [ScriptTransfer(Address(i.caller.bytes), ((sum * 100) / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')] |
---|
81 | 81 | | } |
---|
82 | 82 | | |
---|
83 | 83 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getPrice () = match getInteger(this, "WavesPerBtfc") { |
---|
5 | 5 | | case a: Int => |
---|
6 | 6 | | a |
---|
7 | 7 | | case _ => |
---|
8 | | - | 2 |
---|
| 8 | + | 200 |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | func acceptBtfc (sum,e) = if ((e.assetId != base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')) |
---|
13 | 13 | | then throw("WAVES<->BTFC Swap accepts only WAVES") |
---|
14 | 14 | | else (sum + e.amount) |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | func acceptWaves (sum,e) = if (isDefined(e.assetId)) |
---|
18 | 18 | | then throw("BTFC<->WAVES Swap accepts only BTFC") |
---|
19 | 19 | | else (sum + e.amount) |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(i) |
---|
23 | 23 | | func setPrice (price) = if ((Address(i.caller.bytes) != this)) |
---|
24 | 24 | | then throw("Non-administrators cannot set price") |
---|
25 | 25 | | else [IntegerEntry("WavesPerBtfc", price)] |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | @Callable(i) |
---|
30 | 30 | | func FromBtfcToWaves () = { |
---|
31 | 31 | | let sum = { |
---|
32 | | - | let $list765799 = i.payments |
---|
33 | | - | let $size765799 = size($list765799) |
---|
34 | | - | let $acc0765799 = 0 |
---|
35 | | - | if (($size765799 == 0)) |
---|
36 | | - | then $acc0765799 |
---|
| 32 | + | let $list767801 = i.payments |
---|
| 33 | + | let $size767801 = size($list767801) |
---|
| 34 | + | let $acc0767801 = 0 |
---|
| 35 | + | if (($size767801 == 0)) |
---|
| 36 | + | then $acc0767801 |
---|
37 | 37 | | else { |
---|
38 | | - | let $acc1765799 = acceptBtfc($acc0765799, $list765799[0]) |
---|
39 | | - | if (($size765799 == 1)) |
---|
40 | | - | then $acc1765799 |
---|
| 38 | + | let $acc1767801 = acceptBtfc($acc0767801, $list767801[0]) |
---|
| 39 | + | if (($size767801 == 1)) |
---|
| 40 | + | then $acc1767801 |
---|
41 | 41 | | else { |
---|
42 | | - | let $acc2765799 = acceptBtfc($acc1765799, $list765799[1]) |
---|
43 | | - | if (($size765799 == 2)) |
---|
44 | | - | then $acc2765799 |
---|
| 42 | + | let $acc2767801 = acceptBtfc($acc1767801, $list767801[1]) |
---|
| 43 | + | if (($size767801 == 2)) |
---|
| 44 | + | then $acc2767801 |
---|
45 | 45 | | else { |
---|
46 | | - | let $acc3765799 = acceptBtfc($acc2765799, $list765799[2]) |
---|
| 46 | + | let $acc3767801 = acceptBtfc($acc2767801, $list767801[2]) |
---|
47 | 47 | | throw("List size exceed 2") |
---|
48 | 48 | | } |
---|
49 | 49 | | } |
---|
50 | 50 | | } |
---|
51 | 51 | | } |
---|
52 | | - | [ScriptTransfer(Address(i.caller.bytes), (sum * getPrice()), Unit())] |
---|
| 52 | + | [ScriptTransfer(Address(i.caller.bytes), ((sum * getPrice()) / 100), Unit())] |
---|
53 | 53 | | } |
---|
54 | 54 | | |
---|
55 | 55 | | |
---|
56 | 56 | | |
---|
57 | 57 | | @Callable(i) |
---|
58 | 58 | | func FromWavesToBtfc () = { |
---|
59 | 59 | | let sum = { |
---|
60 | | - | let $list924959 = i.payments |
---|
61 | | - | let $size924959 = size($list924959) |
---|
62 | | - | let $acc0924959 = 0 |
---|
63 | | - | if (($size924959 == 0)) |
---|
64 | | - | then $acc0924959 |
---|
| 60 | + | let $list932967 = i.payments |
---|
| 61 | + | let $size932967 = size($list932967) |
---|
| 62 | + | let $acc0932967 = 0 |
---|
| 63 | + | if (($size932967 == 0)) |
---|
| 64 | + | then $acc0932967 |
---|
65 | 65 | | else { |
---|
66 | | - | let $acc1924959 = acceptWaves($acc0924959, $list924959[0]) |
---|
67 | | - | if (($size924959 == 1)) |
---|
68 | | - | then $acc1924959 |
---|
| 66 | + | let $acc1932967 = acceptWaves($acc0932967, $list932967[0]) |
---|
| 67 | + | if (($size932967 == 1)) |
---|
| 68 | + | then $acc1932967 |
---|
69 | 69 | | else { |
---|
70 | | - | let $acc2924959 = acceptWaves($acc1924959, $list924959[1]) |
---|
71 | | - | if (($size924959 == 2)) |
---|
72 | | - | then $acc2924959 |
---|
| 70 | + | let $acc2932967 = acceptWaves($acc1932967, $list932967[1]) |
---|
| 71 | + | if (($size932967 == 2)) |
---|
| 72 | + | then $acc2932967 |
---|
73 | 73 | | else { |
---|
74 | | - | let $acc3924959 = acceptWaves($acc2924959, $list924959[2]) |
---|
| 74 | + | let $acc3932967 = acceptWaves($acc2932967, $list932967[2]) |
---|
75 | 75 | | throw("List size exceed 2") |
---|
76 | 76 | | } |
---|
77 | 77 | | } |
---|
78 | 78 | | } |
---|
79 | 79 | | } |
---|
80 | | - | [ScriptTransfer(Address(i.caller.bytes), (sum / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')] |
---|
| 80 | + | [ScriptTransfer(Address(i.caller.bytes), ((sum * 100) / getPrice()), base58'2RJawE14PWhu2XYg1zsmDM46K595DdA2QQHXg9avsrTU')] |
---|
81 | 81 | | } |
---|
82 | 82 | | |
---|
83 | 83 | | |
---|