-
Notifications
You must be signed in to change notification settings - Fork 9
WIP: Comparision #116
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
WIP: Comparision #116
Changes from all commits
ee08f3b
26b11ca
ca9c97a
77bbc25
d6f8bdf
a9b3fe9
f889d01
fd24677
7eea4c1
3e49eae
4a00479
af11052
abbf933
e9abc8a
214b7eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,49 @@ | ||
| NETWORK_RPC_URL=http://localhost:8545 | ||
| MNEMONIC=optional deployer mnemonic goes here | ||
| BLOCK_EXPLORER_KEY=optional etherscan key for verifying contracts | ||
| # endpoints | ||
| MAINNET_RPC_URL=http://localhost:8545 | ||
| GNOSIS_RPC_URL=http://localhost:8546 | ||
| HOODI_RPC_URL=http://localhost:8547 | ||
| CHIADO_RPC_URL=http://localhost:8548 | ||
|
|
||
| # verification | ||
| ETHERSCAN_API_KEY=123 | ||
| GNOSISSCAN_API_KEY=456 | ||
|
|
||
| # test settings | ||
| # Use this to run tests with a forked vault contracts | ||
| TEST_USE_FORK_VAULTS=false | ||
| # Skip snapshots update in tests | ||
| TEST_SKIP_SNAPSHOTS=false | ||
|
|
||
| # deployment | ||
| PRIVATE_KEY=0x12345 | ||
| # Add transactions to remove vault factories in current deployment files | ||
| REMOVE_PREV_FACTORIES=false | ||
|
|
||
| # contract variables | ||
| # mainnet | ||
| #META_VAULT_FACTORY_OWNER=0x2685C0e39EEAAd383fB71ec3F493991d532A87ae | ||
| #OS_TOKEN_REDEEMER_OWNER=0x2685C0e39EEAAd383fB71ec3F493991d532A87ae | ||
| #OS_TOKEN_REDEEMER_ROOT_UPDATE_DELAY=432000 | ||
| #VALIDATORS_REGISTRY=0x00000000219ab540356cBB839Cbe05303d7705Fa | ||
|
|
||
| # hoodi | ||
| #META_VAULT_FACTORY_OWNER=0xFF2B6d2d5c205b99E2e6f607B6aFA3127B9957B6 | ||
| #OS_TOKEN_REDEEMER_OWNER=0xFF2B6d2d5c205b99E2e6f607B6aFA3127B9957B6 | ||
| #OS_TOKEN_REDEEMER_ROOT_UPDATE_DELAY=432000 | ||
| #VALIDATORS_REGISTRY=0x00000000219ab540356cBB839Cbe05303d7705Fa | ||
|
|
||
| # chiado | ||
| #META_VAULT_FACTORY_OWNER=0xFF2B6d2d5c205b99E2e6f607B6aFA3127B9957B6 | ||
| #OS_TOKEN_REDEEMER_OWNER=0xFF2B6d2d5c205b99E2e6f607B6aFA3127B9957B6 | ||
| #OS_TOKEN_REDEEMER_ROOT_UPDATE_DELAY=432000 | ||
| #TOKENS_CONVERTER_FACTORY=0xB67D5b629926Ea16485c8a6A568C860f79cd2FA7 | ||
| #VALIDATORS_REGISTRY=0xb97036A26259B7147018913bD58a774cf91acf25 | ||
| #GNO_TOKEN=0x19C653Da7c37c66208fbfbE8908A5051B57b4C70 | ||
|
|
||
| # gnosis | ||
| #META_VAULT_FACTORY_OWNER= | ||
| #OS_TOKEN_REDEEMER_OWNER= | ||
| #OS_TOKEN_REDEEMER_ROOT_UPDATE_DELAY=432000 | ||
| #TOKENS_CONVERTER_FACTORY= | ||
| #VALIDATORS_REGISTRY=0x0B98057eA310F4d31F2a452B414647007d1645d9 | ||
| #GNO_TOKEN=0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: code coverage | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| comment-forge-coverage: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
| with: | ||
| version: stable | ||
|
|
||
| - name: Run forge coverage | ||
| id: coverage | ||
| run: | | ||
| { | ||
| echo 'COVERAGE<<EOF' | ||
| echo "| File | % Lines | % Statements | % Branches | % Funcs |" | ||
| echo "|------|---------|--------------|------------|---------|" | ||
| forge coverage --skip script --no-match-coverage "(keeper|mocks|test|script|VaultsRegistry|DepositDataRegistry)" 2>/dev/null | | ||
| grep '^|' | | ||
| grep -v 'test/' | | ||
| grep -v '^|--' | | ||
| grep -v 'File' | | ||
| sed 's/-*+//g' | ||
| echo EOF | ||
| } >> "$GITHUB_OUTPUT" | ||
| env: | ||
| MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | ||
| GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }} | ||
| TEST_SKIP_SNAPSHOTS: true | ||
| TEST_USE_FORK_VAULTS: false | ||
|
|
||
| - name: Check coverage is updated | ||
| uses: actions/github-script@v5 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const fs = require('fs'); | ||
| const file = "coverage.txt" | ||
| if(!fs.existsSync(file)) { | ||
| console.log("Nothing to check"); | ||
| return | ||
| } | ||
| const currentCoverage = fs.readFileSync(file, "utf8").trim(); | ||
| const newCoverage = (`${{ steps.coverage.outputs.COVERAGE }}`).trim(); | ||
| if (newCoverage != currentCoverage) { | ||
| core.setFailed(`Code coverage not updated. Run : forge coverage | grep '^|' | grep -v 'test/' > coverage.txt`); | ||
| } | ||
|
|
||
| - name: Comment on PR | ||
| id: comment | ||
| uses: actions/github-script@v5 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const {data: comments} = await github.rest.issues.listComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| }) | ||
|
|
||
| const botComment = comments.find(comment => comment.user.id === 41898282) | ||
|
|
||
| const output = `${{ steps.coverage.outputs.COVERAGE }}`; | ||
| const commentBody = `Forge code coverage:\n${output}\n`; | ||
|
|
||
| if (botComment) { | ||
| github.rest.issues.updateComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| comment_id: botComment.id, | ||
| body: commentBody | ||
| }) | ||
| } else { | ||
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: commentBody | ||
| }); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||||
| name: Lint | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| push: | ||||||||||||||||||||
| branches: | ||||||||||||||||||||
| - main | ||||||||||||||||||||
| pull_request: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| run-linters: | ||||||||||||||||||||
| name: Run linters | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - name: Check out Git repository | ||||||||||||||||||||
| uses: actions/checkout@v3 | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install Foundry | ||||||||||||||||||||
| uses: foundry-rs/foundry-toolchain@v1 | ||||||||||||||||||||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Lint' step
Uses Step Error loading related location Loading |
||||||||||||||||||||
| with: | ||||||||||||||||||||
| version: stable | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Lint | ||||||||||||||||||||
| run: forge fmt --check | ||||||||||||||||||||
|
Comment on lines
+11
to
+24
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 1 year ago To fix the issue, we will add a
Suggested changeset
1
.github/workflows/lint.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||||||||||||||||
| name: Slither | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| push: | ||||||||||||||||||||
| branches: | ||||||||||||||||||||
| - main | ||||||||||||||||||||
| pull_request: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| slither: | ||||||||||||||||||||
| name: Slither analysis | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install Foundry | ||||||||||||||||||||
| uses: foundry-rs/foundry-toolchain@v1 | ||||||||||||||||||||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Slither' step
Uses Step Error loading related location Loading |
||||||||||||||||||||
| with: | ||||||||||||||||||||
| version: stable | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Setup Python | ||||||||||||||||||||
| uses: actions/setup-python@v4 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| python-version: '3.10' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install pip3 | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| python -m pip install --upgrade pip | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install Slither | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| pip3 install slither-analyzer | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Build | ||||||||||||||||||||
| run: forge compile --skip test | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Run Slither | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| slither --fail-high --skip-clean . | ||||||||||||||||||||
|
Comment on lines
+11
to
+42
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 1 year ago To fix the issue, we will add a
Suggested changeset
1
.github/workflows/slither.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,32 @@ | ||||||||||||||||||||
| name: Tests | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| push: | ||||||||||||||||||||
| branches: | ||||||||||||||||||||
| - main | ||||||||||||||||||||
| pull_request: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| forge-fork-tests: | ||||||||||||||||||||
| name: Forge Fork Tests | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install Foundry | ||||||||||||||||||||
| uses: foundry-rs/foundry-toolchain@v1 | ||||||||||||||||||||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium test
Unpinned 3rd party Action 'Tests' step
Uses Step Error loading related location Loading |
||||||||||||||||||||
| with: | ||||||||||||||||||||
| version: stable | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||
| run: forge test --isolate -vvv | ||||||||||||||||||||
| env: | ||||||||||||||||||||
| FORGE_SNAPSHOT_CHECK: false | ||||||||||||||||||||
| TEST_USE_FORK_VAULTS: true | ||||||||||||||||||||
| TEST_SKIP_SNAPSHOTS: true | ||||||||||||||||||||
| MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | ||||||||||||||||||||
| GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }} | ||||||||||||||||||||
| FOUNDRY_PROFILE: test | ||||||||||||||||||||
|
Comment on lines
+11
to
+32
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium test
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 1 year ago To fix the issue, we will add a
Suggested changeset
1
.github/workflows/test-fork.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||||||||||||||||
| name: Tests | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| push: | ||||||||||||||||||||
| branches: | ||||||||||||||||||||
| - main | ||||||||||||||||||||
| pull_request: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| forge-tests: | ||||||||||||||||||||
| name: Forge Tests | ||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||
|
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||
| with: | ||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Install Foundry | ||||||||||||||||||||
| uses: foundry-rs/foundry-toolchain@v1 | ||||||||||||||||||||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium test
Unpinned 3rd party Action 'Tests' step
Uses Step Error loading related location Loading |
||||||||||||||||||||
| with: | ||||||||||||||||||||
| version: stable | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||
| run: forge test --isolate --gas-snapshot-check=true -vvv | ||||||||||||||||||||
| env: | ||||||||||||||||||||
| TEST_USE_FORK_VAULTS: false | ||||||||||||||||||||
| TEST_SKIP_SNAPSHOTS: false | ||||||||||||||||||||
| MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} | ||||||||||||||||||||
| GNOSIS_RPC_URL: ${{ secrets.GNOSIS_RPC_URL }} | ||||||||||||||||||||
| FOUNDRY_PROFILE: test | ||||||||||||||||||||
|
Comment on lines
+11
to
+31
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium test
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 1 year ago To fix the issue, we will add a
Suggested changeset
1
.github/workflows/test.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Refresh and try again.
|
||||||||||||||||||||
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium