Skip to content

Commit

Permalink
Merge pull request #1096 from reserve-protocol/3.4.0
Browse files Browse the repository at this point in the history
3.4.0
  • Loading branch information
tbrent authored May 30, 2024
2 parents 8045fe6 + 78152ed commit db80197
Show file tree
Hide file tree
Showing 278 changed files with 18,320 additions and 4,287 deletions.
13 changes: 11 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ MAINNET_RPC_URL="https://eth-mainnet.alchemyapi.io/v2/your_mainnet_api_key"
# Base Mainnet URL, used for Base Mainnet forking (Alchemy)
BASE_RPC_URL="https://base-mainnet.g.alchemy.com/v2/your_base_mainnet_api_key"

# Arbitrum One URL
ARBITRUM_RPC_URL="https://arb-mainnet.g.alchemy.com/v2/your_arbitrum_one_api_key"

# Arbitrum Sepolia URL
ARBITRUM_SEPOLIA_RPC_URL="https://arb-sepolia.g.alchemy.com/v2/your_arbitrum_sepolia_api_key"

# Mnemonic, first address will be used for deployments
MNEMONIC='copy here your mnemonic words'

# Etherscan API - for contract verification
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
BASESCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
ARBISCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1

# WARNING: all of the following will make SLOW a truthy value:
# SLOW=0
Expand Down Expand Up @@ -45,8 +52,10 @@ PROTO_IMPL=0
# Run gas reporter and specific gas tests, if truthy
# REPORT_GAS=1

# Subgraph url to make queries to The Graph
# SUBGRAPH_URL=
# Subgraph URLs to make queries to The Graph (by network)
# MAINNET_SUBGRAPH_URL=
# BASE_SUBGRAPH_URL=
# ARBITRUM_SUBGRAPH_URL=

# RPC URL to interact with a tenderly forked network
# TENDERLY_RPC_URL="https://rpc.tenderly.co/fork/15af2920-4719-4e62-a5ea-ab8b9e90a258"
Expand Down
98 changes: 78 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
env:
SKIP_PROMPT: 1

lint:
static-analyses:
name: 'Lint Checks'
runs-on: ubuntu-latest
steps:
Expand All @@ -38,9 +38,14 @@ jobs:
cache: 'yarn'
- run: yarn install --immutable
- run: yarn lint
- run: pip3 install solc-select slither-analyzer
- run: pip3 install slitherin
- run: solc-select install 0.8.19
- run: solc-select use 0.8.19
- run: yarn slither

plugin-tests-mainnet:
name: 'Plugin Tests (Mainnet)'
plugin-unit-tests:
name: 'Plugin Unit Tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -50,6 +55,44 @@ jobs:
cache: 'yarn'
- run: yarn install --immutable
- run: yarn test:plugins

plugin-tests-mainnet-1:
name: 'Plugin Integration Tests (Mainnet) - 1/2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --immutable
- name: 'Cache hardhat network fork'
uses: actions/cache@v3
with:
path: cache/hardhat-network-fork
key: hardhat-network-fork-${{ runner.os }}-${{ hashFiles('test/integration/fork-block-numbers.ts') }}
restore-keys: |
hardhat-network-fork-${{ runner.os }}-
hardhat-network-fork-
- run: yarn hardhat test ./test/plugins/individual-collateral/[A-Ca-c]*/*.test.ts ./test/plugins/individual-collateral/[A-Ca-c]*/*/*.test.ts
env:
NODE_OPTIONS: '--max-old-space-size=8192'
TS_NODE_SKIP_IGNORE: true
MAINNET_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_MAINNET_KEY }}
FORK_NETWORK: mainnet
PROTO_IMPL: 1
FORK: 1

plugin-tests-mainnet-2:
name: 'Plugin Integration Tests (Mainnet) - 2/2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --immutable
- name: 'Cache hardhat network fork'
uses: actions/cache@v3
with:
Expand All @@ -58,15 +101,17 @@ jobs:
restore-keys: |
hardhat-network-fork-${{ runner.os }}-
hardhat-network-fork-
- run: yarn test:plugins:integration
- run: yarn hardhat test ./test/plugins/individual-collateral/[D-Zd-z]*/*.test.ts
env:
NODE_OPTIONS: '--max-old-space-size=8192'
TS_NODE_SKIP_IGNORE: true
MAINNET_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/${{ secrets.ALCHEMY_MAINNET_KEY }}
FORK_NETWORK: mainnet
PROTO_IMPL: 1
FORK: 1

plugin-tests-base:
name: 'Plugin Tests (Base)'
name: 'Plugin Integration Tests (Base)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -93,6 +138,34 @@ jobs:
FORK: 1
PROTO_IMPL: 1

plugin-tests-arbitrum:
name: 'Plugin Integration Tests (Arbitrum)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --immutable
- name: 'Cache hardhat network fork'
uses: actions/cache@v3
with:
path: cache/hardhat-network-fork
key: hardhat-network-fork-${{ runner.os }}-${{ hashFiles('test/integration/fork-block-numbers.ts') }}
restore-keys: |
hardhat-network-fork-${{ runner.os }}-
hardhat-network-fork-
- run: npx hardhat test ./test/plugins/individual-collateral/{aave-v3,compoundv3,curve/cvx}/*.test.ts
env:
NODE_OPTIONS: '--max-old-space-size=8192'
TS_NODE_SKIP_IGNORE: true
ARBITRUM_RPC_URL: https://arb-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_ARBITRUM_KEY }}
FORK_NETWORK: arbitrum
FORK_BLOCK: 194244696
FORK: 1
PROTO_IMPL: 1

p0-tests:
name: 'P0 tests'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -214,18 +287,3 @@ jobs:
FORK_NETWORK: mainnet
FORK: 1
PROTO_IMPL: 1

slither:
name: 'Slither'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --immutable
- run: pip3 install solc-select slither-analyzer
- run: solc-select install 0.8.19
- run: solc-select use 0.8.19
- run: yarn slither
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ scripts/addresses/31337*
scripts/test.ts
scripts/playground.ts

# Serialized proposals
tasks/validation/proposals/proposal-*.json

# tenderly deployment/verification artifacts
deployments/
backtests/
Expand Down
Loading

0 comments on commit db80197

Please sign in to comment.