Skip to content

Commit

Permalink
feat: add morpho, cap automator, freezer mom
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-manuel committed Mar 27, 2024
1 parent ea77df7 commit b7f8917
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 52 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,3 @@ jobs:
- name: Run tests
run: FOUNDRY_PROFILE=ci forge test

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Run coverage
run: forge coverage --report summary --report lcov

# To ignore coverage for certain directories modify the paths in this step as needed. The
# below default ignores coverage results for the test and script directories. Alternatively,
# to include coverage in all directories, comment out this step. Note that because this
# filtering applies to the lcov file, the summary table generated in the previous step will
# still include all files and directories.
# The `--rc lcov_branch_coverage=1` part keeps branch info in the filtered report, since lcov
# defaults to removing branch info.
- name: Filter directories
run: |
sudo apt update && sudo apt install -y lcov
lcov --remove lcov.info 'test/*' 'script/*' --output-file lcov.info --rc lcov_branch_coverage=1
# This step posts a detailed coverage report as a comment and deletes previous comments on
# each push. The below step is used to fail coverage if the specified coverage threshold is
# not met. The below step can post a comment (when it's `github-token` is specified) but it's
# not as useful, and this action cannot fail CI based on a minimum coverage threshold, which
# is why we use both in this way.
- name: Post coverage report
if: github.event_name == 'pull_request' # This action fails when ran outside of a pull request.
uses: romeovs/[email protected]
with:
delete-old-comments: true
lcov-file: ./lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }} # Adds a coverage summary comment to the PR.

- name: Verify minimum coverage
uses: zgosalvez/github-actions-report-lcov@v2
with:
coverage-files: ./lcov.info
minimum-coverage: 90 # Set coverage threshold.
24 changes: 18 additions & 6 deletions src/Ethereum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ library Ethereum {
/*** SparkDAO Addresses ***/
/******************************************************************************************************************/

address internal constant SPARK_PROXY = 0x3300f198988e4C9C63F75dF86De36421f06af8c4;
address internal constant META_MORPHO_VAULT = 0x73e65DBD630f90604062f6E02fAb9138e713edD9;
address internal constant SPARK_PROXY = 0x3300f198988e4C9C63F75dF86De36421f06af8c4;

/******************************************************************************************************************/
/*** Core Protocol Addresses ***/
/*** SparkLend - Core Protocol Addresses ***/
/******************************************************************************************************************/

address internal constant AAVE_ORACLE = 0x8105f69D9C41644c6A0803fDA7D03Aa70996cFD9;
Expand All @@ -36,7 +37,7 @@ library Ethereum {
address internal constant WETH_GATEWAY = 0xBD7D6a9ad7865463DE44B05F04559f65e3B11704;

/******************************************************************************************************************/
/*** Reserve Token Addresses ***/
/*** SparkLend - Reserve Token Addresses ***/
/******************************************************************************************************************/

address internal constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
Expand Down Expand Up @@ -85,7 +86,18 @@ library Ethereum {
address internal constant WSTETH_DEBT_TOKEN = 0xd5c3E3B566a42A6110513Ac7670C1a86D76E13E6;

/******************************************************************************************************************/
/*** Implementation Addresses ***/
/*** SparkLend - Auxiliary Protocol Addresses ***/
/******************************************************************************************************************/

address internal constant CAP_AUTOMATOR = 0x2276f52afba7Cf2525fd0a050DF464AC8532d0ef;
address internal constant FREEZER_MOM = 0xFA36c12Bc307b40c701D65d8FE8F88cCEdE2277a;
address internal constant SPELL_FREEZE_ALL = 0xA67d62f75F8D11395eE120CA8390Ab3bF01f0b8A;
address internal constant SPELL_FREEZE_DAI = 0x0F9149c4d6018A5999AdA5b592E372845cfeC725;
address internal constant SPELL_PAUSE_ALL = 0x216738c7B1E83cC1A1FFcD3433226B0a3B174484;
address internal constant SPELL_PAUSE_DAI = 0x1B94E2F3818E1D657bE2A62D37560514b52DB17F;

/******************************************************************************************************************/
/*** SparkLend - Implementation Addresses ***/
/******************************************************************************************************************/

address internal constant A_TOKEN_IMPL = 0x6175ddEc3B9b38c88157C10A01ed4A3fa8639cC6;
Expand All @@ -98,7 +110,7 @@ library Ethereum {
address internal constant VARIABLE_DEBT_TOKEN_IMPL = 0x86C71796CcDB31c3997F8Ec5C2E3dB3e9e40b985;

/******************************************************************************************************************/
/*** Config Engine Addresses ***/
/*** SparkLend - Config Engine Addresses ***/
/******************************************************************************************************************/

address internal constant PROXY_ADMIN = 0x883A82BDd3d07ae6ACfD151020faD350df25087e;
Expand All @@ -107,7 +119,7 @@ library Ethereum {
address internal constant TRANSPARENT_PROXY_FACTORY = 0x777803CbDD89D5D5Bc1DdD2151B51b0B07F6bf37;

/******************************************************************************************************************/
/*** Data Provider Addresses ***/
/*** SparkLend - Data Provider Addresses ***/
/******************************************************************************************************************/

address internal constant PROTOCOL_DATA_PROVIDER = 0xFc21d6d146E6086B8359705C8b28512a983db0cb;
Expand Down
10 changes: 5 additions & 5 deletions src/Gnosis.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.13;
library Gnosis {

/******************************************************************************************************************/
/*** Core Protocol Addresses ***/
/*** SparkLend - Core Protocol Addresses ***/
/******************************************************************************************************************/

address internal constant AAVE_ORACLE = 0x8105f69D9C41644c6A0803fDA7D03Aa70996cFD9;
Expand All @@ -20,7 +20,7 @@ library Gnosis {
address internal constant WETH_GATEWAY = 0xBD7D6a9ad7865463DE44B05F04559f65e3B11704;

/******************************************************************************************************************/
/*** Reserve Token Addresses ***/
/*** SparkLend - Reserve Token Addresses ***/
/******************************************************************************************************************/

address internal constant GNO = 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb;
Expand All @@ -44,7 +44,7 @@ library Gnosis {
address internal constant WXDAI_DEBT_TOKEN = 0x868ADfDf12A86422524EaB6978beAE08A0008F37;

/******************************************************************************************************************/
/*** Implementation Addresses ***/
/*** SparkLend - Implementation Addresses ***/
/******************************************************************************************************************/

address internal constant A_TOKEN_IMPL = 0x856900aa78e856a5df1a2665eE3a66b2487cD68f;
Expand All @@ -56,7 +56,7 @@ library Gnosis {
address internal constant VARIABLE_DEBT_TOKEN_IMPL = 0x0ee554F6A1f7a4Cb4f82D4C124DdC2AD3E37fde1;

/******************************************************************************************************************/
/*** Config Engine Addresses ***/
/*** SparkLend - Config Engine Addresses ***/
/******************************************************************************************************************/

address internal constant PROXY_ADMIN = 0xf76B8262dfd60fb7432C6b55E91f42b6da953647;
Expand All @@ -65,7 +65,7 @@ library Gnosis {
address internal constant TRANSPARENT_PROXY_FACTORY = 0x91277b74a9d1Cc30fA0ff4927C287fe55E307D78;

/******************************************************************************************************************/
/*** Data Provider Addresses ***/
/*** SparkLend - Data Provider Addresses ***/
/******************************************************************************************************************/

address internal constant PROTOCOL_DATA_PROVIDER = 0x2a002054A06546bB5a264D57A81347e23Af91D18;
Expand Down

0 comments on commit b7f8917

Please sign in to comment.