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: replacing environment for foundry boilerplate
- Loading branch information
1 parent
f4ed5d6
commit 53242b7
Showing
19 changed files
with
1,910 additions
and
7,895 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 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,92 @@ | ||
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: 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: 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,21 @@ | ||
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 |
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,18 @@ | ||
{ | ||
"extends": "solhint:recommended", | ||
"rules": { | ||
"mark-callable-contracts": "off", | ||
"event-name-camelcase": "off", | ||
"const-name-snakecase": "off", | ||
"max-line-length": ["warn", 120], | ||
"indent": ["error", 4] | ||
"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] | ||
} | ||
} |
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,25 @@ | ||
{ | ||
"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", | ||
"private-vars-leading-underscore": ["warn", { "strict": false }], | ||
"ordering": "warn", | ||
"immutable-name-snakecase": "warn", | ||
"avoid-low-level-calls": "off", | ||
"one-contract-per-file": "off", | ||
"max-line-length": ["warn", 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 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
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,36 @@ | ||
[fmt] | ||
line_length = 120 | ||
tab_width = 2 | ||
bracket_spacing = false | ||
int_types = 'long' | ||
quote_style = 'single' | ||
number_underscore = 'thousands' | ||
multiline_func_header = 'params_first' | ||
sort_imports = true | ||
|
||
[profile.default] | ||
solc_version = '0.5.12' | ||
libs = ["node_modules", "lib"] | ||
optimizer_runs = 10_000 | ||
|
||
[profile.optimized] | ||
via_ir = true | ||
out = 'out-via-ir' | ||
|
||
[profile.test] | ||
via_ir = true | ||
out = 'out-via-ir' | ||
|
||
[profile.docs] | ||
src = 'src/interfaces/' | ||
|
||
[fuzz] | ||
runs = 1000 | ||
|
||
[rpc_endpoints] | ||
mainnet = "${MAINNET_RPC}" | ||
sepolia = "${SEPOLIA_RPC}" | ||
|
||
[etherscan] | ||
mainnet = { key = "${ETHERSCAN_API_KEY}", chain = "mainnet" } | ||
sepolia = { key = "${ETHERSCAN_API_KEY}", chain = "sepolia" } |
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,8 @@ | ||
/** | ||
* List of supported options: https://github.com/defi-wonderland/natspec-smells?tab=readme-ov-file#options | ||
*/ | ||
|
||
/** @type {import('@defi-wonderland/natspec-smells').Config} */ | ||
module.exports = { | ||
include: 'contracts' | ||
}; |
Oops, something went wrong.