csm-dashboard 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/Dockerfile +8 -12
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/PKG-INFO +1 -1
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/pyproject.toml +2 -1
- csm_dashboard-0.2.2/src/abis/__init__.py +1 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/core/contracts.py +3 -4
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/.dockerignore +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/.env.example +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/.github/workflows/docker-publish.yaml +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/.github/workflows/release.yaml +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/.gitignore +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/README.md +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/docker-compose.yml +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/img/csm-dash-cli.png +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/img/csm-dash-web.png +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/img/logo.png +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/requirements.txt +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2/src}/abis/CSAccounting.json +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2/src}/abis/CSFeeDistributor.json +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2/src}/abis/CSModule.json +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2/src}/abis/stETH.json +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/cli/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/cli/commands.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/core/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/core/config.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/core/types.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/beacon.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/cache.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/etherscan.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/ipfs_logs.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/known_cids.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/lido_api.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/onchain.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/rewards_tree.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/data/strikes.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/main.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/services/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/services/operator_service.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/web/__init__.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/web/app.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/src/web/routes.py +0 -0
- {csm_dashboard-0.2.0 → csm_dashboard-0.2.2}/tests/__init__.py +0 -0
|
@@ -17,6 +17,11 @@ ENV PATH="/opt/venv/bin:$PATH"
|
|
|
17
17
|
RUN pip install --upgrade pip && \
|
|
18
18
|
pip install --no-cache-dir -r requirements.txt
|
|
19
19
|
|
|
20
|
+
# Copy package files and install
|
|
21
|
+
COPY pyproject.toml README.md ./
|
|
22
|
+
COPY src ./src
|
|
23
|
+
RUN pip install --no-cache-dir .
|
|
24
|
+
|
|
20
25
|
# Final stage
|
|
21
26
|
FROM python:3.11-slim
|
|
22
27
|
|
|
@@ -27,22 +32,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
27
32
|
curl \
|
|
28
33
|
&& rm -rf /var/lib/apt/lists/*
|
|
29
34
|
|
|
30
|
-
# Copy virtual environment from builder
|
|
35
|
+
# Copy virtual environment from builder (includes installed package)
|
|
31
36
|
COPY --from=builder /opt/venv /opt/venv
|
|
32
37
|
|
|
33
|
-
# Copy application code and ABIs
|
|
34
|
-
COPY src ./src
|
|
35
|
-
COPY abis ./abis
|
|
36
|
-
|
|
37
|
-
# Create csm alias script
|
|
38
|
-
RUN echo '#!/bin/sh\npython -m src.main "$@"' > /usr/local/bin/csm && \
|
|
39
|
-
chmod +x /usr/local/bin/csm
|
|
40
|
-
|
|
41
38
|
# Set environment variables
|
|
42
39
|
ENV PATH="/opt/venv/bin:$PATH" \
|
|
43
40
|
PYTHONUNBUFFERED=1 \
|
|
44
|
-
PYTHONDONTWRITEBYTECODE=1
|
|
45
|
-
PYTHONPATH=/app
|
|
41
|
+
PYTHONDONTWRITEBYTECODE=1
|
|
46
42
|
|
|
47
43
|
# Health check
|
|
48
44
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
|
@@ -51,5 +47,5 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
|
|
51
47
|
# Expose port for web dashboard
|
|
52
48
|
EXPOSE 3000
|
|
53
49
|
|
|
54
|
-
# Default command -
|
|
50
|
+
# Default command - csm is now a proper entry point from pip install
|
|
55
51
|
CMD ["csm", "serve", "--host", "0.0.0.0", "--port", "3000"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "csm-dashboard"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "Lido CSM Operator Dashboard for tracking validator earnings"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -32,3 +32,4 @@ build-backend = "hatchling.build"
|
|
|
32
32
|
|
|
33
33
|
[tool.hatch.build.targets.wheel]
|
|
34
34
|
packages = ["src"]
|
|
35
|
+
artifacts = ["src/abis/*.json"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ABI files package
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"""Contract ABIs and helpers."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
from
|
|
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
|
-
|
|
11
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|