csm-dashboard 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csm-dashboard
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Lido CSM Operator Dashboard for tracking validator earnings
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: fastapi>=0.104
@@ -1,10 +1,15 @@
1
1
  src/__init__.py,sha256=Bfqpjo9Q1XaV8DNqkf1sADzWg2ACpfZWSGLtahZE3iU,35
2
2
  src/main.py,sha256=tj7C09FVBGBVyjKYwmElpX5M92xfydDm8RJ6-MSFdMk,951
3
+ src/abis/CSAccounting.json,sha256=FSZ4SyT9XMxPLBezcs77LCfJBKkrO9r_rCavD-uKm8A,815
4
+ src/abis/CSFeeDistributor.json,sha256=unLBacJcCHq4xsmB4xOPlVXcOrxGWNf6KDmC3Ld5u-c,1517
5
+ src/abis/CSModule.json,sha256=T6D6aInBoqVH3ZD6U6p3lrPa3t_ucA9V83IwE80kOuU,1687
6
+ src/abis/__init__.py,sha256=9HV2hKMGSoNAi8evsjzymTr4V4kowITNsX1-LPu6l98,20
7
+ src/abis/stETH.json,sha256=wZobN-RDcYbLs4byBs1e5A8ML6CgfihuXhEPTByB-H0,827
3
8
  src/cli/__init__.py,sha256=mgHAwomqzAhOHJnlWrWtCguhGzhDWlkCvkzKsfoFsds,35
4
9
  src/cli/commands.py,sha256=kSioEDzBf85MKEEWb_wq9DbRUyEtQYnHPJ9dxi-nPvk,23929
5
10
  src/core/__init__.py,sha256=ZDHZojANK1ZFpn5lQROERTo97MYQFAxqA9APvs7ruEQ,57
6
11
  src/core/config.py,sha256=UD4-LVHdeQeT6n9BtLXh2zZcXfX0-ZhrMVZx93E2BGk,1429
7
- src/core/contracts.py,sha256=BjPrywRZd6qQfT9HMtuI0cUIxAuouoUATuxGpDVT4KM,541
12
+ src/core/contracts.py,sha256=8Y72h5uUTaIMLWYdtu5O2Bjw1hTyIHOegaDs0W8r74g,525
8
13
  src/core/types.py,sha256=dzTdZiOOzxwj4oh0ZLEWqb4jbVsA0TVm6Rqkod7yUMg,4551
9
14
  src/data/__init__.py,sha256=DItA8aEp8Lbr0uFlJVppMaTtVEEznoA1hkRpH-vfHhk,57
10
15
  src/data/beacon.py,sha256=9oaR7TO2WcP_D3jVTzcd9WE6NbF2WnqQDW_y5M8GsZ0,13511
@@ -21,7 +26,7 @@ src/services/operator_service.py,sha256=Y6rXYdJzv7V3Nix99iiyC7NcDRfShdvDTcRtXbp_
21
26
  src/web/__init__.py,sha256=iI2c5xxXmzsNxIetm0P2qE3uVsT-ClsMfzn620r5YTU,40
22
27
  src/web/app.py,sha256=qEIB05J0sKEeZkfHkJwotltsL-d2j1KTDS56cQl2_IU,32129
23
28
  src/web/routes.py,sha256=z0cmH4mA3IxlHYQ-8FFYQrXCRVsi3PvUG_8ZWLixfwg,6204
24
- csm_dashboard-0.2.0.dist-info/METADATA,sha256=fEsfIq2oOP6SA2aSCefK21P0Q-OUj9G5GgvdY6I-h8s,10003
25
- csm_dashboard-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
26
- csm_dashboard-0.2.0.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
27
- csm_dashboard-0.2.0.dist-info/RECORD,,
29
+ csm_dashboard-0.2.1.dist-info/METADATA,sha256=fR4maC0v5QfmkBa9_tDeMSMFQTyrKnB4mMyJUcix7VA,10003
30
+ csm_dashboard-0.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
+ csm_dashboard-0.2.1.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
32
+ csm_dashboard-0.2.1.dist-info/RECORD,,
@@ -0,0 +1,37 @@
1
+ [
2
+ {
3
+ "name": "getBondSummary",
4
+ "type": "function",
5
+ "stateMutability": "view",
6
+ "inputs": [
7
+ {"name": "nodeOperatorId", "type": "uint256"}
8
+ ],
9
+ "outputs": [
10
+ {"name": "current", "type": "uint256"},
11
+ {"name": "required", "type": "uint256"}
12
+ ]
13
+ },
14
+ {
15
+ "name": "getBondSummaryShares",
16
+ "type": "function",
17
+ "stateMutability": "view",
18
+ "inputs": [
19
+ {"name": "nodeOperatorId", "type": "uint256"}
20
+ ],
21
+ "outputs": [
22
+ {"name": "current", "type": "uint256"},
23
+ {"name": "required", "type": "uint256"}
24
+ ]
25
+ },
26
+ {
27
+ "name": "getClaimableBondShares",
28
+ "type": "function",
29
+ "stateMutability": "view",
30
+ "inputs": [
31
+ {"name": "nodeOperatorId", "type": "uint256"}
32
+ ],
33
+ "outputs": [
34
+ {"name": "", "type": "uint256"}
35
+ ]
36
+ }
37
+ ]
@@ -0,0 +1,69 @@
1
+ [
2
+ {
3
+ "name": "treeCid",
4
+ "type": "function",
5
+ "stateMutability": "view",
6
+ "inputs": [],
7
+ "outputs": [
8
+ {"name": "", "type": "string"}
9
+ ]
10
+ },
11
+ {
12
+ "name": "logCid",
13
+ "type": "function",
14
+ "stateMutability": "view",
15
+ "inputs": [],
16
+ "outputs": [
17
+ {"name": "", "type": "string"}
18
+ ]
19
+ },
20
+ {
21
+ "name": "DistributionLogUpdated",
22
+ "type": "event",
23
+ "inputs": [
24
+ {"name": "logCid", "type": "string", "indexed": false}
25
+ ]
26
+ },
27
+ {
28
+ "name": "DistributionDataUpdated",
29
+ "type": "event",
30
+ "inputs": [
31
+ {"name": "totalClaimableShares", "type": "uint256", "indexed": false},
32
+ {"name": "treeRoot", "type": "bytes32", "indexed": false},
33
+ {"name": "treeCid", "type": "string", "indexed": false}
34
+ ]
35
+ },
36
+ {
37
+ "name": "distributedShares",
38
+ "type": "function",
39
+ "stateMutability": "view",
40
+ "inputs": [
41
+ {"name": "nodeOperatorId", "type": "uint256"}
42
+ ],
43
+ "outputs": [
44
+ {"name": "", "type": "uint256"}
45
+ ]
46
+ },
47
+ {
48
+ "name": "getFeesToDistribute",
49
+ "type": "function",
50
+ "stateMutability": "view",
51
+ "inputs": [
52
+ {"name": "nodeOperatorId", "type": "uint256"},
53
+ {"name": "cumulativeFeeShares", "type": "uint256"},
54
+ {"name": "proof", "type": "bytes32[]"}
55
+ ],
56
+ "outputs": [
57
+ {"name": "", "type": "uint256"}
58
+ ]
59
+ },
60
+ {
61
+ "name": "treeRoot",
62
+ "type": "function",
63
+ "stateMutability": "view",
64
+ "inputs": [],
65
+ "outputs": [
66
+ {"name": "", "type": "bytes32"}
67
+ ]
68
+ }
69
+ ]
src/abis/CSModule.json ADDED
@@ -0,0 +1,55 @@
1
+ [
2
+ {
3
+ "name": "getNodeOperator",
4
+ "type": "function",
5
+ "stateMutability": "view",
6
+ "inputs": [
7
+ {"name": "nodeOperatorId", "type": "uint256"}
8
+ ],
9
+ "outputs": [
10
+ {
11
+ "name": "",
12
+ "type": "tuple",
13
+ "components": [
14
+ {"name": "totalAddedKeys", "type": "uint32"},
15
+ {"name": "totalWithdrawnKeys", "type": "uint32"},
16
+ {"name": "totalDepositedKeys", "type": "uint32"},
17
+ {"name": "totalVettedKeys", "type": "uint32"},
18
+ {"name": "stuckValidatorsCount", "type": "uint32"},
19
+ {"name": "depositableValidatorsCount", "type": "uint32"},
20
+ {"name": "targetLimit", "type": "uint32"},
21
+ {"name": "targetLimitMode", "type": "uint8"},
22
+ {"name": "totalExitedKeys", "type": "uint32"},
23
+ {"name": "enqueuedCount", "type": "uint32"},
24
+ {"name": "managerAddress", "type": "address"},
25
+ {"name": "proposedManagerAddress", "type": "address"},
26
+ {"name": "rewardAddress", "type": "address"},
27
+ {"name": "proposedRewardAddress", "type": "address"},
28
+ {"name": "extendedManagerPermissions", "type": "bool"}
29
+ ]
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "name": "getNodeOperatorsCount",
35
+ "type": "function",
36
+ "stateMutability": "view",
37
+ "inputs": [],
38
+ "outputs": [
39
+ {"name": "", "type": "uint256"}
40
+ ]
41
+ },
42
+ {
43
+ "name": "getSigningKeys",
44
+ "type": "function",
45
+ "stateMutability": "view",
46
+ "inputs": [
47
+ {"name": "nodeOperatorId", "type": "uint256"},
48
+ {"name": "startIndex", "type": "uint256"},
49
+ {"name": "keysCount", "type": "uint256"}
50
+ ],
51
+ "outputs": [
52
+ {"name": "", "type": "bytes"}
53
+ ]
54
+ }
55
+ ]
src/abis/__init__.py ADDED
@@ -0,0 +1 @@
1
+ # ABI files package
src/abis/stETH.json ADDED
@@ -0,0 +1,42 @@
1
+ [
2
+ {
3
+ "name": "getPooledEthByShares",
4
+ "type": "function",
5
+ "stateMutability": "view",
6
+ "inputs": [
7
+ {"name": "_sharesAmount", "type": "uint256"}
8
+ ],
9
+ "outputs": [
10
+ {"name": "", "type": "uint256"}
11
+ ]
12
+ },
13
+ {
14
+ "name": "getSharesByPooledEth",
15
+ "type": "function",
16
+ "stateMutability": "view",
17
+ "inputs": [
18
+ {"name": "_pooledEthAmount", "type": "uint256"}
19
+ ],
20
+ "outputs": [
21
+ {"name": "", "type": "uint256"}
22
+ ]
23
+ },
24
+ {
25
+ "name": "getTotalPooledEther",
26
+ "type": "function",
27
+ "stateMutability": "view",
28
+ "inputs": [],
29
+ "outputs": [
30
+ {"name": "", "type": "uint256"}
31
+ ]
32
+ },
33
+ {
34
+ "name": "getTotalShares",
35
+ "type": "function",
36
+ "stateMutability": "view",
37
+ "inputs": [],
38
+ "outputs": [
39
+ {"name": "", "type": "uint256"}
40
+ ]
41
+ }
42
+ ]
src/core/contracts.py CHANGED
@@ -1,15 +1,14 @@
1
1
  """Contract ABIs and helpers."""
2
2
 
3
3
  import json
4
- from pathlib import Path
4
+ from importlib import resources
5
5
  from typing import Any
6
6
 
7
7
 
8
8
  def load_abi(name: str) -> list[dict[str, Any]]:
9
9
  """Load ABI from JSON file in abis directory."""
10
- abi_path = Path(__file__).parent.parent.parent / "abis" / f"{name}.json"
11
- with open(abi_path) as f:
12
- return json.load(f)
10
+ abi_file = resources.files("src.abis").joinpath(f"{name}.json")
11
+ return json.loads(abi_file.read_text())
13
12
 
14
13
 
15
14
  # Load ABIs at module level for easy import