forked from balancer/balancer-core
-
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.
chore: foundry boilerplate milestone (#30)
- Loading branch information
Showing
88 changed files
with
6,877 additions
and
13,590 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
MAINNET_RPC= | ||
MAINNET_DEPLOYER_PK= | ||
|
||
SEPOLIA_RPC= | ||
SEPOLIA_DEPLOYER_PK= | ||
|
||
ETHERSCAN_API_KEY= |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
116075 |
This file was deleted.
Oops, something went wrong.
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,98 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
env: | ||
MAINNET_RPC: ${{ secrets.MAINNET_RPC }} | ||
SEPOLIA_RPC: ${{ secrets.SEPOLIA_RPC }} | ||
|
||
jobs: | ||
unit-tests: | ||
name: Run Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile --network-concurrency 1 | ||
|
||
- name: Create mock files with smock | ||
run: yarn smock | ||
|
||
- name: Precompile using 0.8.14 and via-ir=false | ||
run: yarn build | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: yarn test:unit | ||
|
||
integration-tests: | ||
name: Run Integration Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile --network-concurrency 1 | ||
|
||
- name: Create mock files with smock | ||
run: yarn smock | ||
|
||
- name: Precompile using 0.8.14 and via-ir=false | ||
run: yarn build | ||
|
||
- name: Run tests | ||
run: yarn test:integration | ||
|
||
lint: | ||
name: Lint Commit Messages | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: wagoid/commitlint-github-action@v5 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile --network-concurrency 1 | ||
|
||
- run: yarn lint:check |
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 |
---|---|---|
@@ -1,8 +1,24 @@ | ||
build | ||
node_modules | ||
.idea/* | ||
coverage.json | ||
coverage/ | ||
# General | ||
yarn-error.log | ||
crytic-export | ||
mcore_* | ||
node_modules | ||
.DS_STORE | ||
.vscode | ||
|
||
# Foundry files | ||
cache | ||
out-via-ir | ||
|
||
# Config files | ||
.env | ||
|
||
# Avoid ignoring gitkeep | ||
!/**/.gitkeep | ||
|
||
# Keep the latest deployment only | ||
broadcast/*/*/* | ||
|
||
# Out dir | ||
out | ||
|
||
# Smock dir | ||
test/smock |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 |
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,7 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# 1. Build the contracts | ||
# 2. Stage build output | ||
# 2. Lint and stage style improvements | ||
yarn build && npx lint-staged |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,22 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"mark-callable-contracts": "off", | ||
"event-name-camelcase": "off", | ||
"const-name-snakecase": "off", | ||
"compiler-version": ["off"], | ||
"constructor-syntax": "warn", | ||
"quotes": ["error", "single"], | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"not-rely-on-time": "off", | ||
"no-inline-assembly": "off", | ||
"no-empty-blocks": "off", | ||
"private-vars-leading-underscore": ["warn", { "strict": false }], | ||
"ordering": "warn", | ||
"immutable-name-snakecase": "warn", | ||
"avoid-low-level-calls": "off", | ||
"no-console": "off", | ||
"max-line-length": ["warn", 120], | ||
"indent": ["error", 4] | ||
"TODO": "REMOVE_TEMPORARY_LINTER_SETTINGS_BELOW", | ||
"custom-errors": "off", | ||
"one-contract-per-file": "off", | ||
"definition-name-capwords": "off" | ||
} | ||
} |
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,27 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"compiler-version": ["off"], | ||
"constructor-syntax": "warn", | ||
"quotes": ["error", "single"], | ||
"func-visibility": ["warn", { "ignoreConstructors": true }], | ||
"not-rely-on-time": "off", | ||
"func-name-mixedcase": "off", | ||
"var-name-mixedcase": "off", | ||
"const-name-snakecase": "off", | ||
"no-inline-assembly": "off", | ||
"no-empty-blocks": "off", | ||
"definition-name-capwords": "off", | ||
"named-parameters-function": "off", | ||
"no-global-import": "off", | ||
"max-states-count": "off", | ||
"no-unused-vars": "off", | ||
"private-vars-leading-underscore": ["off"], | ||
"ordering": "off", | ||
"state-visibility": "off", | ||
"immutable-name-snakecase": "warn", | ||
"avoid-low-level-calls": "off", | ||
"one-contract-per-file": "off", | ||
"max-line-length": ["warn", 125] | ||
} | ||
} |
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 @@ | ||
test/smock/* |
Oops, something went wrong.