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

feat: add Makefile target to generate bindings (main branch) #208

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 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
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,15 @@ lint:
cargo fmt --all -- --check \
&& cargo clippy --workspace --all-features --benches --examples --tests -- -D warnings

bindings:
@echo "Generating bindings..."
cd crates/contracts
forge build
cd ../..
MegaRedHand marked this conversation as resolved.
Show resolved Hide resolved
forge bind --alloy --bindings-path crates/utils --overwrite --root crates/contracts
# Restore the Cargo.toml file
git restore crates/utils/Cargo.toml
@echo "Bindings generated"

start-anvil: reset-anvil ##
$(MAKE) start-anvil-chain-with-contracts-deployed
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,15 @@ cargo run --example get_quorum_count

The main branch of this repo is intended to be syncronized with mainnet version of core contracts.

To update the bindings of this repo:

- Inside the `crates/contracts` folder, run:
To update the bindings of this repo, run:

```bash
forge bind --alloy --bindings-path <path-eigensdk-rs>/crates/utils --overwrite -C src/contracts
make bindings
```

where `path-eigensdk-rs` is the full path to the eigensdk-rs (this) repo.

This command will generate the bindings files in the folder: `<path-eigensdk-rs>/crates/utils`.

⚠️ It rewrites Cargo.toml file, this file must be restored to the current version.
This command will generate the bindings files in the folder: `crates/utils`.

- Fix all compilation warnings.
⚠️ Remember to fix all compilation warnings.

## Contributor Guidelines

Expand Down
14 changes: 4 additions & 10 deletions crates/eigensdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,15 @@ cargo run --example get_quorum_count

The main branch of this repo is intended to be syncronized with mainnet version of core contracts.

To update the bindings of this repo:

- Inside the `crates/contracts` folder, run:
To update the bindings of this repo, run:

```bash
forge bind --alloy --bindings-path <path-eigensdk-rs>/crates/utils --overwrite -C src/contracts
make bindings
```

where `path-eigensdk-rs` is the full path to the eigensdk-rs (this) repo.

This command will generate the bindings files in the folder: `<path-eigensdk-rs>/crates/utils`.

⚠️ It rewrites Cargo.toml file, this file must be restored to the current version.
This command will generate the bindings files in the folder: `crates/utils`.

- Fix all compilation warnings.
⚠️ Remember to fix all compilation warnings.

## Contributor Guidelines

Expand Down
Loading