generated from Maia-DAO/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
310 changed files
with
37,951 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
#DO NOT SHARE THIS FILE WITH ANYONE - MAKE SURE TO ADD IT TO YOUR .GITIGNORE FILE | ||
|
||
# FORK_TEST_ADDRESSES | ||
|
||
UNISWAP_V3_FACTORY_ADDRESS = 0x1F98431c8aD98523631AE4a59f267346ea31F984 | ||
UNISWAP_V3_SWAP_ROUTER_ADDRESS = 0xE592427A0AEce92De3Edee1F18E0157C05861564 | ||
UNISWAP_V3_NFT_POSITION_MANAGER_ADDRESS = 0xC36442b4a4522E871399CD717aBDD847Ab11FE88 | ||
|
||
UNISWAP_FORK_RPC_URL = https://rpc.ankr.com/arbitrum |
This file contains 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 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 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 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 @@ | ||
*.sol linguist-language=Solidity |
This file contains 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,60 @@ | ||
name: Fuzz Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 0.8 | ||
pull_request: | ||
|
||
jobs: | ||
echidna: | ||
name: Echidna | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
testName: | ||
- TickBitmapEchidnaTest | ||
- TickMathEchidnaTest | ||
- SqrtPriceMathEchidnaTest | ||
- SwapMathEchidnaTest | ||
- TickEchidnaTest | ||
- TickOverflowSafetyEchidnaTest | ||
- OracleEchidnaTest | ||
- BitMathEchidnaTest | ||
- UnsafeMathEchidnaTest | ||
- FullMathEchidnaTest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install node dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Install pip3 | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install slither | ||
run: | | ||
pip3 install slither-analyzer | ||
- name: Install echidna | ||
run: | | ||
sudo wget -O /tmp/echidna-test.tar.gz https://github.com/crytic/echidna/releases/download/v1.7.2/echidna-test-1.7.2-Ubuntu-18.04.tar.gz | ||
sudo tar -xf /tmp/echidna-test.tar.gz -C /usr/bin | ||
sudo chmod +x /usr/bin/echidna-test | ||
- name: Run ${{ matrix.testName }} | ||
run: echidna-test . --contract ${{ matrix.testName }} --config echidna.config.yml |
This file contains 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,33 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 0.8 | ||
pull_request: | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run linters | ||
uses: wearerequired/lint-action@a8497ddb33fb1205941fd40452ca9fff07e0770d | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
prettier: true | ||
auto_fix: true | ||
prettier_extensions: 'css,html,js,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml,sol' |
This file contains 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,64 @@ | ||
name: Mythx | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mythx: | ||
name: Submit to Mythx | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install node dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Install pip3 | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install mythx CLI | ||
run: | | ||
pip3 install mythx-cli | ||
- name: Install solc-select | ||
run: | | ||
pip3 install solc-select | ||
- name: Install solc 0.8.12 | ||
run: | | ||
solc-select install 0.8.12 | ||
solc-select use 0.8.12 | ||
- name: Submit code to Mythx | ||
run: | | ||
mythx --api-key ${{ secrets.MYTHX_API_KEY }} \ | ||
--yes \ | ||
analyze \ | ||
--mode deep \ | ||
--async \ | ||
--create-group \ | ||
--group-name "@uniswap/v3-core@${{ github.sha }}" \ | ||
--solc-version 0.8.12 \ | ||
--check-properties \ | ||
contracts/test/TickBitmapEchidnaTest.sol --include TickBitmapEchidnaTest \ | ||
contracts/test/TickMathEchidnaTest.sol --include TickMathEchidnaTest \ | ||
contracts/test/SqrtPriceMathEchidnaTest.sol --include SqrtPriceMathEchidnaTest \ | ||
contracts/test/SwapMathEchidnaTest.sol --include SwapMathEchidnaTest \ | ||
contracts/test/TickEchidnaTest.sol --include TickEchidnaTest \ | ||
contracts/test/TickOverflowSafetyEchidnaTest.sol --include TickOverflowSafetyEchidnaTest \ | ||
contracts/test/OracleEchidnaTest.sol --include OracleEchidnaTest \ | ||
contracts/test/BitMathEchidnaTest.sol --include BitMathEchidnaTest \ | ||
contracts/test/UnsafeMathEchidnaTest.sol --include UnsafeMathEchidnaTest \ | ||
contracts/test/FullMathEchidnaTest.sol --include FullMathEchidnaTest |
This file contains 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,39 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 0.8 | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
# This is required separately from yarn test because it generates the typechain definitions | ||
- name: Compile | ||
run: yarn compile | ||
|
||
- name: Run unit tests | ||
run: yarn test |
This file contains 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,5 @@ | ||
artifacts/ | ||
cache/ | ||
crytic-export/ | ||
node_modules/ | ||
typechain/ |
This file contains 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,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
This file contains 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,6 @@ | ||
{ | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"prettier/prettier": "error" | ||
} | ||
} |
This file contains 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 @@ | ||
ignore-scripts true |
Oops, something went wrong.