Skip to content

Commit

Permalink
Merge pull request #233 from lidofinance/feat/oracle-v3
Browse files Browse the repository at this point in the history
Grand Oracle V3 Upgrade!
  • Loading branch information
F4ever authored Apr 10, 2023
2 parents ea9b0c1 + 80c5eb8 commit 7c22b10
Show file tree
Hide file tree
Showing 256 changed files with 1,002,652 additions and 7,495 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ coverage.xml
.mypy_cache
.pytest_cache
.hypothesis
tests/*
fixtures/*
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONSENSUS_CLIENT_URI=http://...
EXECUTION_CLIENT_URI=http://...
KEYS_API_URI=https://...
LIDO_LOCATOR_ADDRESS=0x1...
MEMBER_PRIV_KEY=aaa...
45 changes: 0 additions & 45 deletions .github/workflows/linters.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Tests

on: [push]

permissions:
contents: read
security-events: write

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Setup poetry
run: >
curl -sSL https://install.python-poetry.org | python - &&
echo "$POETRY_HOME/bin" >> "$GITHUB_PATH"
env:
POETRY_HOME: "/opt/poetry"
POETRY_VERSION: 1.3.2

- name: Install dependencies
run: |
poetry install --no-interaction --with=dev
- name: Test with pytest
run: poetry run pytest -m "not integration and not e2e" --cov=src tests

linters:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Setup poetry
run: >
curl -sSL https://install.python-poetry.org | python - &&
echo "$POETRY_HOME/bin" >> "$GITHUB_PATH"
env:
POETRY_HOME: "/opt/poetry"
POETRY_VERSION: 1.3.2

- name: Install dependencies
run: |
poetry install --no-interaction --with=dev
- name: Lint with black
run: poetry run black --check tests

- name: Lint with pylint
run: poetry run pylint src tests

- name: Lint mypy
run: poetry run mypy src

security:
uses: lidofinance/linters/.github/workflows/security.yml@master
permissions:
security-events: write
contents: read

docker:
uses: lidofinance/linters/.github/workflows/docker.yml@master

actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master
131 changes: 125 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,137 @@
.idea
# Byte-compiled / optimized / DLL files
__pycache__/
*/__pycache__/
.pyc
!/.coverage
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
.direnv
env/
venv/
ENV/
env.bak/
venv.bak/
version.json

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE
.idea/

.vscode/
# vim
*.swp
.direnv
3 changes: 0 additions & 3 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
ignored:
- DL3048
- SC1091
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[comment]: <> (## [Unreleased]&#40;https://github.com/lidofinance/lido-oracle&#41; - 2021-09-15)

## [3.0.0](link) - 2023-01-01
## Lido v2 big upgrade. [Details!](https://blog.lido.fi/introducing-lido-v2/)

### Added
- Withdrawals support
- Staking router support

### Changes
- Oracle split in two separate modules: ejector and accounting

## [2.6.1](https://github.com/lidofinance/lido-oracle/releases/tag/2.6.1) - 2023-04-08
### Fixed
- Correctly handle missed slot.
Expand Down
Loading

0 comments on commit 7c22b10

Please sign in to comment.