-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
name: Update CSM rewards tree | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
description: branch to commit the changes | ||
required: true | ||
type: string | ||
distributor: | ||
description: CSFeeDistributor address | ||
required: true | ||
type: string | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
- 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.8.3 | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Generate types | ||
run: poetry run wake up pytypes | ||
|
||
- name: Run script | ||
run: poetry run wake run main.py | ||
id: script | ||
env: | ||
RPC_URL: ${{ inputs.branch == 'testnet' && secrets.RPC_URL_HOLESKY || secrets.RPC_URL_MAINNET }} | ||
GW3_ACCESS_KEY: ${{ secrets.GW3_ACCESS_KEY }} | ||
GW3_SECRET_KEY: ${{ secrets.GW3_SECRET_KEY }} | ||
DISTRIBUTOR_ADDRESS: ${{ inputs.distributor }} | ||
|
||
- name: Commit new artifacts | ||
if: ${{ steps.script.outputs.updated == 'True' }} | ||
run: | | ||
git config --global user.name "madlabman" | ||
git config --global user.email "[email protected]" | ||
git add "*.json" | ||
git commit -m "chore: update tree and proofs" -m "CID: ${{ steps.script.outputs.cid }}" | ||
git fetch origin | ||
git rebase --strategy-option=ours "origin/${{ inputs.branch }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Automated update | ||
|
||
on: | ||
schedule: | ||
- cron: "0 */1 * * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
testnet: | ||
uses: ./.github/workflows/_update.yml | ||
with: | ||
branch: testnet | ||
distributor: "0xD7ba648C8F72669C6aE649648B516ec03D07c8ED" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
**Latest [proofs](./proofs.json)** | ||
If you're a Node Operator in CSM, you get staking rewards as a part of Lido | ||
protocol fees. | ||
|
||
**Latest [tree](./tree.json)** | ||
The allocation of rewards for CSM operators using a Merkle tree is provided by | ||
CSM Performance Oracle once in a frame, making a new portion of the rewards | ||
available for claim. | ||
|
||
Here you can find the latest [rewards tree](./tree.json) as well as the | ||
pre-generated [proofs](./proofs.json) for your convenience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |