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

chore: move /contracts from /crates to root (#259) #261

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/check-anvil-dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
with:
filters: |
contracts:
- 'crates/contracts/lib/**'
- 'crates/contracts/script/**'
- 'crates/contracts/src/**'
- 'contracts/lib/**'
- 'contracts/script/**'
- 'contracts/src/**'

# This step runs only if some contract changed.
# It checks the diff in the anvil state file.
Expand All @@ -34,7 +34,7 @@ jobs:
# Note: if the git diff fails to fetch the changes, then the step will also fail.
- name: Check the anvil dump has changed
if: steps.filter.outputs.contracts == 'true'
working-directory: crates/contracts/anvil/contracts_deployed_anvil_state.json
working-directory: contracts/anvil/contracts_deployed_anvil_state.json
run: |
if [ -z "$(git diff origin/${{ github.event.pull_request.base.ref }} -- state.json)" ]; then
echo "The anvil dump is outdated";
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./crates/contracts
working-directory: ./contracts
steps:
- uses: actions/checkout@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "crates/contracts/lib/forge-std"]
path = crates/contracts/lib/forge-std
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "crates/contracts/lib/eigenlayer-middleware"]
path = crates/contracts/lib/eigenlayer-middleware
url = https://github.com/Layr-labs/eigenlayer-middleware
[submodule "contracts/lib/eigenlayer-middleware"]
path = contracts/lib/eigenlayer-middleware
url = https://github.com/Layr-Labs/eigenlayer-middleware.git
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ __CONTRACTS__: ##

PHONY: start-anvil-chain-with-contracts-deployed
start-anvil-chain-with-contracts-deployed: ##
./crates/contracts/anvil/start-anvil-chain-with-el-and-avs-deployed.sh
./contracts/anvil/start-anvil-chain-with-el-and-avs-deployed.sh

PHONY: start-anvil-chain-with-contracts-deployed
deploy-contracts-to-anvil-and-save-state: ##
./crates/contracts/anvil/deploy-contracts-save-anvil-state.sh
./contracts/anvil/deploy-contracts-save-anvil-state.sh

__TESTING__: ##

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cargo run --example get_operator_from_id

## Anvil utils(This requires a local anvil instance running using docker )

Get EigenLayer contract addresses for local anvil testing . These are predetermined addresses that are stored in a mapping using these [scripts](https://github.com/Layr-Labs/eigensdk-rs/blob/d9b40d806b4939c64bb7d3df0f6f2a542499bd27/crates/contracts/script/DeployMockAvsRegistries.s.sol#L202).
Get EigenLayer contract addresses for local anvil testing . These are predetermined addresses that are stored in a mapping using these [scripts](https://github.com/Layr-Labs/eigensdk-rs/blob/d9b40d806b4939c64bb7d3df0f6f2a542499bd27/contracts/script/DeployMockAvsRegistries.s.sol#L202).

```sh
make start-anvil-chain-with-contracts-deployed
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cd $repo_root

### SDK bindings ###
SDK_CONTRACTS="MockAvsServiceManager ContractsRegistry MockERC20"
SDK_CONTRACTS_LOCATION=crates/contracts
SDK_CONTRACTS_LOCATION=contracts
SDK_BINDINGS_PATH=crates/utils/src/sdk
# The echo is to remove quotes, and the patsubst to make the regex match the full text only
SDK_CONTRACTS_ARGS=$(generate_flags $SDK_CONTRACTS)
Expand Down
2 changes: 1 addition & 1 deletion testing/testing-utils/src/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use testcontainers::{

const ANVIL_IMAGE: &str = "ghcr.io/foundry-rs/foundry";
const ANVIL_TAG: &str = "latest";
const ANVIL_STATE_PATH: &str = "./crates/contracts/anvil/contracts_deployed_anvil_state.json"; // relative path from the project root
const ANVIL_STATE_PATH: &str = "./contracts/anvil/contracts_deployed_anvil_state.json"; // relative path from the project root

fn workspace_dir() -> PathBuf {
let output = std::process::Command::new(env!("CARGO"))
Expand Down