Skip to content

Commit

Permalink
fix: agToken update (#205)
Browse files Browse the repository at this point in the history
* first batch of test done

* update final hash of vaultManager implementation

* fix: file update

* fix: agToken contract cleaned

* setup for upgraded agToken contract

* fixing agToken names and stuff

* changing some comments

* fix rebase

* feat: last rebase fix

* feat: agToken update

* remove silo

* feat: remove useless files

* feat: reorg contracts

* fix: foundry tests

* feat: gov scripts update

* feat: continuing deployment scripts

* deployment script agUSD

* script resilience

* deploymnt script

* feat: deployment script for agUSD

* feat: oracle testing

* deleting utils file

* feat: update constants file

* add vanity to package

* feat: deployment

* fix: lz bridge token

* feat: deployment of lz-agEUR

* fix: ci of the repo

* fix: build action

* fix: tests

* chore: update ci to load from cache node_modules

* chore: compile directly in the ci for slither

* chore: clean cache files before compiling foundry in slither ci

---------

Co-authored-by: gs8nrv <[email protected]>
Co-authored-by: 0xtekgrinder <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent 53c0990 commit 0a857de
Show file tree
Hide file tree
Showing 157 changed files with 25,937 additions and 2,965 deletions.
35 changes: 35 additions & 0 deletions .github/actions/setup-repo/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Setup repo
description: Runs all steps to setup the repo (install node_modules, build, etc...)
inputs:
registry-token:
description: 'PAT to access registries'
runs:
using: 'composite'
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: |
echo "::set-output name=dir::$(yarn cache dir)"
echo "::set-output name=version::$(yarn -v)"
- uses: actions/setup-node@v3
with:
node-version: '20'

- uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
shell: bash
run: echo "//npm.pkg.github.com/:_authToken=$GH_REGISTRY_ACCESS_TOKEN" >> .npmrc && yarn install --frozen-lockfile --verbose && rm -f .npmrc
env:
GH_REGISTRY_ACCESS_TOKEN: ${{ inputs.registry-token }}
File renamed without changes
60 changes: 35 additions & 25 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: "CI Deep"
name: 'CI Deep'

on:
schedule:
- cron: "0 3 * * 0" # at 3:00am UTC every Sunday
- cron: '0 3 * * 0' # at 3:00am UTC every Sunday
workflow_dispatch:
inputs:
fuzzRuns:
default: "10000"
description: "Unit: number of fuzz runs."
default: '10000'
description: 'Unit: number of fuzz runs.'
required: false

jobs:
Expand All @@ -19,15 +19,20 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: 'yarn'

- name: Setup repo
uses: ./.github/actions/setup-repo
with:
registry-token: ${{ secrets.GH_REGISTRY_ACCESS_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Run solhint
run: yarn lint:check

- name: "Add lint summary"
- name: 'Add lint summary'
run: |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
Expand All @@ -37,12 +42,17 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
submodules: 'recursive'

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: 'yarn'

- name: Setup repo
uses: ./.github/actions/setup-repo
with:
registry-token: ${{ secrets.GH_REGISTRY_ACCESS_TOKEN }}

- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -58,10 +68,10 @@ jobs:
- name: Compile foundry
run: yarn foundry:compile --sizes

- name: "Cache the build so that it can be re-used by the other jobs"
uses: "actions/cache/save@v3"
- name: 'Cache the build so that it can be re-used by the other jobs'
uses: 'actions/cache/save@v3'
with:
key: "build-${{ github.sha }}"
key: 'build-${{ github.sha }}'
path: |
cache-forge
out
Expand All @@ -70,27 +80,27 @@ jobs:
typechain
node_modules
- name: "Add build summary"
- name: 'Add build summary'
run: |
echo "## Build result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
hardhat-tests:
needs: ["build", "lint"]
needs: ['build', 'lint']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache: 'yarn'

- name: "Restore the cached build"
uses: "actions/cache/restore@v3"
- name: 'Restore the cached build'
uses: 'actions/cache/restore@v3'
with:
fail-on-cache-miss: true
key: "build-${{ github.sha }}"
key: 'build-${{ github.sha }}'
path: |
cache-forge
out
Expand All @@ -110,29 +120,29 @@ jobs:
ETH_NODE_URI_FORK: ${{ secrets.ETH_NODE_URI_FORK }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}

- name: "Add test summary"
- name: 'Add test summary'
run: |
echo "## Hardhat Unit tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
foundry-tests:
needs: ["build", "lint"]
needs: ['build', 'lint']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
submodules: 'recursive'

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: "Restore the cached build"
uses: "actions/cache/restore@v3"
- name: 'Restore the cached build'
uses: 'actions/cache/restore@v3'
with:
fail-on-cache-miss: true
key: "build-${{ github.sha }}"
key: 'build-${{ github.sha }}'
path: |
cache-forge
out
Expand All @@ -150,7 +160,7 @@ jobs:
ETH_NODE_URI_FANTOM: ${{ secrets.ETH_NODE_URI_FANTOM }}
FOUNDRY_FUZZ_RUNS: ${{ github.event.inputs.fuzzRuns || '10000' }}

- name: "Add test summary"
- name: 'Add test summary'
run: |
echo "## Foundry Unit tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
Loading

0 comments on commit 0a857de

Please sign in to comment.