Skip to content
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

Adding foundry config #15

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Node
uses: actions/setup-node@v4
Expand All @@ -46,6 +48,9 @@ jobs:
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Build
run: yarn build

Expand Down Expand Up @@ -74,6 +79,9 @@ jobs:
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -83,6 +91,22 @@ jobs:
- name: Test
run: yarn test --no-compile

core-foundry-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run tests
run: forge test -vvv

- name: Run snapshot
run: forge snapshot

core-deploy-dry-run:
needs: [core-build]
runs-on: ubuntu-latest
Expand All @@ -99,6 +123,9 @@ jobs:
- name: Install Dependencies
run: yarn install --prefer-offline --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
Expand Down
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "core/lib/forge-std"]
path = core/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "core/lib/erc4626"]
path = core/lib/erc4626
url = https://github.com/thesis/erc4626
[submodule "core/lib/solmate"]
path = core/lib/solmate
url = https://github.com/Rari-Capital/solmate
[submodule "core/lib/ds-test"]
path = core/lib/ds-test
url = https://github.com/dapphub/ds-test
2 changes: 2 additions & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
build/
cache/
cache_forge/
export.json
export/
node_modules/
out/
typechain/
yarn-debug.log*
yarn-error.log*
6 changes: 6 additions & 0 deletions core/foundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[profile.default]
src = 'contracts'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
1 change: 1 addition & 0 deletions core/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { HardhatUserConfig } from "hardhat/config"

import "@nomicfoundation/hardhat-toolbox"
import "@nomicfoundation/hardhat-foundry"
import "hardhat-deploy"

const config: HardhatUserConfig = {
Expand Down
1 change: 1 addition & 0 deletions core/lib/ds-test
Submodule ds-test added at e28215
1 change: 1 addition & 0 deletions core/lib/erc4626
Submodule erc4626 added at 643cd0
1 change: 1 addition & 0 deletions core/lib/forge-std
Submodule forge-std added at 2f1126
1 change: 1 addition & 0 deletions core/lib/solmate
Submodule solmate added at e0e9ff
1 change: 1 addition & 0 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.0",
"@nomicfoundation/hardhat-foundry": "^1.1.1",
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@nomicfoundation/hardhat-verify": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions core/remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@openzeppelin/=node_modules/@openzeppelin/
erc4626/=lib/erc4626/src/
eth-gas-reporter/=node_modules/eth-gas-reporter/
forge-std/=lib/forge-std/src/
hardhat-deploy/=node_modules/hardhat-deploy/
hardhat/=node_modules/hardhat/
solmate/=lib/solmate/src/
7 changes: 7 additions & 0 deletions core/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,13 @@
debug "^4.1.1"
lodash.isequal "^4.5.0"

"@nomicfoundation/hardhat-foundry@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz#db72b1f33f9cfaecc27e67f69ad436f8710162d6"
integrity sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ==
dependencies:
chalk "^2.4.2"

"@nomicfoundation/hardhat-network-helpers@^1.0.0":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.9.tgz#767449e8a2acda79306ac84626117583d95d25aa"
Expand Down
Loading