Skip to content

Commit

Permalink
Merge branch 'main' into chore/claim_hedge_op_rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
gosuto-inzasheru authored Dec 5, 2024
2 parents 549581f + 7a10690 commit 7c4aa1e
Show file tree
Hide file tree
Showing 126 changed files with 19,640 additions and 89 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge_json.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
commit-message: "Combined JSON Payloads ${{ github.event.inputs.runWeek }}"
title: "Combined JSON payloads ${{ github.event.inputs.runWeek }}"
assignees: tritium-vlk
branch: gha-payload-merge
branch: gha-payload-merge-${{ github.event.inputs.runWeek }}
delete-branch: true
labels: "Merged Payloads"

Expand All @@ -52,4 +52,4 @@ jobs:
secrets: inherit
with:
pr_number: ${{ needs.merge_jsons.outputs.pull-request-number }}
checkout_ref: "gha-payload-merge"
checkout_ref: "gha-payload-merge-${{ github.event.inputs.runWeek }}"
1 change: 1 addition & 0 deletions .github/workflows/poke_injectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
KEYWORDS: ${{ secrets.KEEPER_PRIVATE_WORDS }}
WEB3_INFURA_PROJECT_ID: ${{ secrets.WEB3_INFURA_PROJECT_ID }}
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}
FRAXSCAN_TOKEN: ${{ secrets.FRAXSCAN_TOKEN }}
ARBISCAN_TOKEN: ${{ secrets.ARBISCAN_TOKEN }}
GNOSISSCAN_TOKEN: ${{ secrets.GNOSISSCAN_TOKEN }}
POLYGONSCAN_TOKEN: ${{ secrets.POLYGONSCAN_TOKEN }}
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/recycle_paladin_bribes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Recycle Paladin Bribes

on:
workflow_dispatch:

jobs:
recycle_bribes:
runs-on: ubuntu-latest
outputs:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
pull-request-branch: ${{ steps.generate-branch-name.outputs.branch }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install -r tools/python/requirements.txt
- name: Run script
env:
DRPC_KEY: ${{ secrets.DRPC_KEY }}
run: |
python tools/python/paladin_claiming/recycle_bribes.py
- name: Generate branch name
id: generate-branch-name
run: |
echo "branch=paladin-bribes-$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
commit-message: "feat: recycle paladin bribes - ${{ steps.generate-branch-name.outputs.date }}"
title: "Recycle Paladin Bribes - ${{ steps.generate-branch-name.outputs.date }}"
body: |
Run result from [`tools/python/paladin_claiming/recycle_bribes.py`](../blob/main/tools/python/paladin_claiming/recycle_bribes.py)
Output CSV files:
* [Mainnet claimed bribes](../tree/${{ steps.generate-branch-name.outputs.branch }}/MaxiOps/paladin_bribes/${{ steps.generate-branch-name.outputs.date }}/mainnet/paladin_claims_mainnet_${{ steps.generate-branch-name.outputs.date }}.csv)
* [Mainnet tokens to sell](../tree/${{ steps.generate-branch-name.outputs.branch }}/MaxiOps/paladin_bribes/${{ steps.generate-branch-name.outputs.date }}/mainnet/paladin_tokens_to_sell_mainnet_${{ steps.generate-branch-name.outputs.date }}.csv)
* [Arbitrum claimed bribes](../tree/${{ steps.generate-branch-name.outputs.branch }}/MaxiOps/paladin_bribes/${{ steps.generate-branch-name.outputs.date }}/arbitrum/paladin_claims_arbitrum_${{ steps.generate-branch-name.outputs.date }}.csv)
* [Arbitrum tokens to sell](../tree/${{ steps.generate-branch-name.outputs.branch }}/MaxiOps/paladin_bribes/${{ steps.generate-branch-name.outputs.date }}/arbitrum/paladin_tokens_to_sell_arbitrum_${{ steps.generate-branch-name.outputs.date }}.csv)
branch: ${{ steps.generate-branch-name.outputs.branch }}
labels: "Automatic Payload"
delete-branch: true

run_reports:
needs: recycle_bribes
secrets: inherit
uses: "BalancerMaxis/multisig-ops/.github/workflows/run_reports_reusable.yaml@main"
with:
pr_number: ${{ needs.recycle_bribes.outputs.pull-request-number }}
checkout_ref: ${{ needs.recycle_bribes.outputs.pull-request-branch }}
36 changes: 23 additions & 13 deletions .github/workflows/review_aura_gauge_votes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
paths:
- 'MaxiOps/vlaura_voting/**/input/*.csv'
workflow_dispatch:
inputs:
week-string:
description: "The week to review like YYYY-W##"
required: true

jobs:
review_votes:
Expand All @@ -22,21 +27,25 @@ jobs:
- name: Determine week-string
id: week-string
run: |
# Get the path of the changed CSV file
CSV_PATH=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '/input/.*\.csv$' | head -n 1)
if [ -z "$CSV_PATH" ]; then
echo "No CSV file found in recent changes."
exit 1
fi
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "week-string=${{ github.event.inputs.week-string }}" >> $GITHUB_OUTPUT
else
# Get the path of the changed CSV file
CSV_PATH=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '/input/.*\.csv$' | head -n 1)
if [ -z "$CSV_PATH" ]; then
echo "No CSV file found in recent changes."
exit 1
fi
echo "CSV Path: $CSV_PATH"
YEAR=$(echo $CSV_PATH | cut -d'/' -f3)
WEEK=$(echo $CSV_PATH | cut -d'/' -f4)
WEEK_STRING="${YEAR}-${WEEK}"
echo "CSV Path: $CSV_PATH"
YEAR=$(echo $CSV_PATH | cut -d'/' -f3)
WEEK=$(echo $CSV_PATH | cut -d'/' -f4)
WEEK_STRING="${YEAR}-${WEEK}"
echo "week-string=$WEEK_STRING" >> $GITHUB_OUTPUT
echo "week-string=$WEEK_STRING" >> $GITHUB_OUTPUT
fi
- name: Review vLAURA Votes
run: |
Expand All @@ -47,6 +56,7 @@ jobs:
python3 $RUN_DIR/review_votes.py --week-string "${{ steps.week-string.outputs.week-string }}"
- name: Comment PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down
Loading

0 comments on commit 7c4aa1e

Please sign in to comment.