Skip to content

Commit

Permalink
Rename foundry/ to contracts/
Browse files Browse the repository at this point in the history
  • Loading branch information
dphilipson committed Feb 16, 2023
1 parent 6a4e26a commit d5b6975
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
cache-on-failure: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# Build to generate the ABI bindings.
- name: cargo build
uses: actions-rs/cargo@v1
with:
command: build
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
target/
/target/

# These are backup files generated by rustfmt
*.rs.bk
Expand All @@ -11,8 +11,8 @@ target/
.vscode

# Foundry, configured in foundry.toml
foundry/cache/
foundry/out/
/contracts/cache/
/contracts/out/

# Generated contract bindings, created in build.rs
src/common/contracts
/src/common/contracts
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "contracts/lib/account-abstraction"]
path = foundry/lib/account-abstraction
path = contracts/lib/account-abstraction
url = https://github.com/eth-infinitism/account-abstraction
branch = develop
[submodule "contracts/lib/forge-std"]
path = foundry/lib/forge-std
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.3.0
[submodule "foundry/lib/openzeppelin-contracts"]
path = foundry/lib/openzeppelin-contracts
path = contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::process::Command;
use std::{env, error};

fn main() -> Result<(), Box<dyn error::Error>> {
println!("cargo:rerun-if-changed=foundry/lib");
println!("cargo:rerun-if-changed=foundry/src");
println!("cargo:rerun-if-changed=contracts/lib");
println!("cargo:rerun-if-changed=contracts/src");
println!("cargo:rerun-if-changed=proto");
generate_contract_bindings()?;
generate_protos()?;
Expand All @@ -28,7 +28,7 @@ fn generate_contract_bindings() -> Result<(), Box<dyn error::Error>> {
fn abigen_of(contract: &str) -> Result<Abigen, Box<dyn error::Error>> {
Ok(Abigen::new(
contract,
format!("foundry/out/{contract}.sol/{contract}.json"),
format!("contracts/out/{contract}.sol/{contract}.json"),
)?
.add_event_derive("serde::Deserialize")
.add_event_derive("serde::Serialize"))
Expand Down
2 changes: 1 addition & 1 deletion foundry/README.md → contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Foundry
# Contracts

This directory is a [Foundry](https://getfoundry.sh/) project, although its
`foundry.toml` is at the repo root, as is required for the Git submodules that
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[profile.default]
src = 'foundry/src'
out = 'foundry/out'
libs = ['foundry/lib']
cache_path = 'foundry/cache'
src = 'contracts/src'
out = 'contracts/out'
libs = ['contracts/lib']
cache_path = 'foundrys/cache'

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
4 changes: 2 additions & 2 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
account-abstraction/=foundry/lib/account-abstraction/contracts/
@openzeppelin/=foundry/lib/openzeppelin-contracts/
account-abstraction/=contracts/lib/account-abstraction/contracts/
@openzeppelin/=contracts/lib/openzeppelin-contracts/

0 comments on commit d5b6975

Please sign in to comment.