Skip to content

Commit

Permalink
Fix APR calculation (#574) (#575)
Browse files Browse the repository at this point in the history
* [Bug]: Fix calculate discount and add more tests (#570)

* add calculate discount test and bug fix

* get asset by denom

* ci: use post-upgrade-snapshot-generator (#571)

* ci: use post-upgrade-snapshot-generator

* ci: update delete snapshot CI to use post upgrade snapshot gen binary

* fix 24hr apr tracking

* fix rewards query

* query rewards fix

* Update version

* fix rewards query description

---------

Co-authored-by: jelysn <129082781+jelysn@users.noreply.github.com>
Co-authored-by: Amit Yadav <amy29981@gmail.com>
Co-authored-by: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com>
Co-authored-by: Warao Gil <wari@elys.network>
  • Loading branch information
5 people committed Jun 18, 2024
1 parent 85e9ff7 commit aba2abd
Show file tree
Hide file tree
Showing 66 changed files with 103 additions and 3,927 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/delete-branch-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,12 @@ jobs:
runs-on: ubuntu-latest

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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: Cache delete-snapshot binary
id: cache-delete-snapshot
uses: actions/cache@v4
with:
path: |
./build
key: ${{ runner.os }}-delete-snapshot-${{ hashFiles('cmd/delete-snapshot/*.go') }}

- name: Build delete-snapshot binary
if: steps.cache-delete-snapshot.outputs.cache-hit != 'true'
- name: Retrieve post upgrade snapshot generator binary
run: |
make build-delete-snapshot
DOWNLOAD_URL=https://github.com/elys-network/post-upgrade-snapshot-generator/releases/download/v0.1.0/post-upgrade-snapshot-generator-v0.1.0-linux-amd64
POST_UPGRADE_SNAPSHOT_GENERATOR_PATH=/tmp/post-upgrade-snapshot-generator-v0.1.0
curl -L $DOWNLOAD_URL -o $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH && chmod +x $POST_UPGRADE_SNAPSHOT_GENERATOR_PATH
echo "POST_UPGRADE_SNAPSHOT_GENERATOR_PATH=$POST_UPGRADE_SNAPSHOT_GENERATOR_PATH" >> $GITHUB_ENV
- name: Run delete-snapshot
env:
Expand All @@ -40,4 +26,4 @@ jobs:
run: |
SANITIZED_EVENT_REF=${{ github.event.ref }}
SANITIZED_EVENT_REF=$(echo "$SANITIZED_EVENT_REF" | sed 's|refs/heads/||; s|/|_|g')
./build/delete-snapshot "$SANITIZED_EVENT_REF"
${POST_UPGRADE_SNAPSHOT_GENERATOR_PATH} delete-snapshot "$SANITIZED_EVENT_REF"
Loading

0 comments on commit aba2abd

Please sign in to comment.