-
Notifications
You must be signed in to change notification settings - Fork 12
feat: Adding sUSD to synths #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
poolpitako
wants to merge
33
commits into
v3/035
Choose a base branch
from
ssc_synth_for_review
base: v3/035
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
4cf8ccf
feat: adding sUSD to synths
jmonteer 573db2b
feat: setup tests
jmonteer 6973cff
fix: add files
jmonteer 2347403
feat: tests (WIP)
jmonteer 998af43
feat: add buffer
jmonteer 3020cda
fix: add updateBuffer
jmonteer aaf38a7
feat: synth tests running
jmonteer 2b74386
fix: details + test formatting
jmonteer 07ef146
feat: add test_revoke
jmonteer 5738949
feat: test_revoke_with_profit
jmonteer be1717d
fix: sLINK passing
jmonteer 42d67a5
feat: add test_migrate
jmonteer 23e19d0
feat: clean after each test
jmonteer ad5ea27
feat: github workflow
jmonteer 4ac97d5
fix: formatting tests
jmonteer 7ea8a79
fix: formatting
jmonteer 1fe44c3
fix: caps
jmonteer 56e56f2
fix: comments
jmonteer ec10f4f
fix: add comments
jmonteer d302e5b
fix: formatting
jmonteer b3eb985
feat: add sEUR testing
jmonteer 135e60d
feat: manualRemoveFullLiquidity returns values
jmonteer 3576548
feat: add withdrawProtection switch
jmonteer bfcb580
feat: added test for several harvests in a row
jmonteer adf1444
fix: lint
jmonteer dd85f89
fix: routes
jmonteer 998cc7e
fix: fix some tests
jmonteer 7530ea9
fix: routes
jmonteer 3db9770
fix: routes
jmonteer 8414d7d
fix: tests
jmonteer 0e2d640
fix: tests
jmonteer 1550c76
fix: formatting
jmonteer a7c78ce
fix: vault interface
jmonteer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| pull_request: | ||
|
|
||
| jobs: | ||
|
|
||
| solidity: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out github repository | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Setup node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: '12.x' | ||
|
|
||
| - name: Set yarn cache directory path | ||
| id: yarn-cache-dir-path | ||
| run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
|
||
| - name: Restore yarn cache | ||
| uses: actions/cache@v2 | ||
| id: yarn-cache | ||
| with: | ||
| path: | | ||
| ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
| ${{ runner.os }}-yarn- | ||
|
|
||
| - name: Install node.js dependencies | ||
| run: yarn --frozen-lockfile | ||
|
|
||
| - name: Run linter on *.sol and *.json | ||
| run: yarn lint:check | ||
|
|
||
| commits: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out github repository | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run commitlint | ||
| uses: wagoid/commitlint-github-action@v2 | ||
|
|
||
| brownie: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out github repository | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Set up python 3.8 | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.8 | ||
|
|
||
| - name: Set pip cache directory path | ||
| id: pip-cache-dir-path | ||
| run: | | ||
| echo "::set-output name=dir::$(pip cache dir)" | ||
|
|
||
| - name: Restore pip cache | ||
| uses: actions/cache@v2 | ||
| id: pip-cache | ||
| with: | ||
| path: | | ||
| ${{ steps.pip-cache-dir-path.outputs.dir }} | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} | ||
| ${{ runner.os }}-pip- | ||
|
|
||
| - name: Install python dependencies | ||
| run: pip install -r requirements-dev.txt | ||
|
|
||
| - name: Run black | ||
| run: black --check --include "(tests|scripts)" . | ||
|
|
||
| # TODO: Add Slither Static Analyzer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
|
|
||
| - name: Cache compiler installations | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: | | ||
| ~/.solcx | ||
| ~/.vvm | ||
| key: ${{ runner.os }}-compiler-cache | ||
|
|
||
| - name: Setup node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: '12.x' | ||
|
|
||
| - name: Install ganache | ||
| run: npm install -g [email protected] | ||
|
|
||
| - name: Set up python 3.8 | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.8 | ||
|
|
||
| - name: Set pip cache directory path | ||
| id: pip-cache-dir-path | ||
| run: | | ||
| echo "::set-output name=dir::$(pip cache dir)" | ||
|
|
||
| - name: Restore pip cache | ||
| uses: actions/cache@v2 | ||
| id: pip-cache | ||
| with: | ||
| path: | | ||
| ${{ steps.pip-cache-dir-path.outputs.dir }} | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }} | ||
| ${{ runner.os }}-pip- | ||
|
|
||
| - name: Install python dependencies | ||
| run: pip install -r requirements-dev.txt | ||
|
|
||
| - name: Compile Code | ||
| run: brownie compile --size | ||
|
|
||
| - name: Run Tests | ||
| env: | ||
| ETHERSCAN_TOKEN: MW5CQA6QK5YMJXP2WP3RA36HM5A7RA1IHA | ||
| WEB3_INFURA_PROJECT_ID: b7821200399e4be2b4e5dbdf06fbe85b | ||
| run: | | ||
| brownie test -s | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,15 +17,15 @@ autofetch_sources: True | |
|
|
||
| # require OpenZepplin Contracts | ||
| dependencies: | ||
| - iearn-finance/[email protected] | ||
| - iearn-finance/[email protected]-1 | ||
| - OpenZeppelin/[email protected] | ||
|
|
||
| # path remapping to support imports from GitHub/NPM | ||
| compiler: | ||
| solc: | ||
| version: 0.6.12 | ||
| remappings: | ||
| - "@yearnvaults=iearn-finance/[email protected]" | ||
| - "@yearnvaults=iearn-finance/[email protected]-1" | ||
| - "@openzeppelin=OpenZeppelin/[email protected]" | ||
|
|
||
| reports: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| pragma solidity >=0.6.2; | ||
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity 0.6.12; | ||
|
|
||
| interface IUniSimple { | ||
| function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); | ||
| } | ||
| function getAmountsOut(uint256 amountIn, address[] calldata path) | ||
| external | ||
| view | ||
| returns (uint256[] memory amounts); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity >=0.5.0; | ||
|
|
||
| interface IUniswapV2Migrator { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity >=0.6.2; | ||
|
|
||
| import "./IUniswapV2Router01.sol"; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
contracts/Interfaces/UniswapInterfaces/V1/IUniswapV1Factory.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| // SPDX-License-Identifier: UNLICENSED | ||
| pragma solidity >=0.5.0; | ||
|
|
||
| interface IUniswapV1Factory { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.6.12; | ||
|
|
||
| interface IERC20Extended{ | ||
| interface IERC20Extended { | ||
| function decimals() external view returns (uint8); | ||
|
|
||
| function name() external view returns (string memory); | ||
|
|
||
| function symbol() external view returns (string memory); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // SPDX-License-Identifier: AGPL-3.0 | ||
| pragma solidity >=0.4.24; | ||
|
|
||
| // https://docs.synthetix.io/contracts/source/interfaces/iaddressresolver | ||
| interface IAddressResolver { | ||
| function getAddress(bytes32 name) external view returns (address); | ||
|
|
||
| function getSynth(bytes32 key) external view returns (address); | ||
|
|
||
| function requireAndGetAddress(bytes32 name, string calldata reason) | ||
| external | ||
| view | ||
| returns (address); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.