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 foundry-binder crate #1257

Merged
merged 5 commits into from
Apr 12, 2022

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Apr 10, 2022

Motivation

Provide a one step solution to generate ethers-rs bindings for any solidity project.

Example usage https://github.com/mattsse/defi-bindings

Solution

The configurable Binder type will

  • clone a github repo
  • build the repo with foundry Config support
  • generate ethers-rs bindings for the built artifacts

To improve

  • add additional filter to only generate certain contracts

@onbjerg onbjerg added the L-ignore Log: ignore PR in changelog label Apr 11, 2022
@onbjerg
Copy link
Collaborator

onbjerg commented Apr 11, 2022

Should we not use this in forge bind as well? 😄

@mattsse
Copy link
Member Author

mattsse commented Apr 11, 2022

slightly different use case, forge bind is intended to generate bindings for the current foundry project.

whereas this is intended to generate them for any repo in one step.

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - worth maybe adding a change to https://github.com/gakonst/foundry-rust-template so that we show how integration with third party contracts + forge bind works

@onbjerg
Copy link
Collaborator

onbjerg commented Apr 12, 2022

slightly different use case, forge bind is intended to generate bindings for the current foundry project.

whereas this is intended to generate them for any repo in one step.

I'm not sure I understand - this crate seems to be able to use a local path as opposed to a remote repository as well? 🤔 Is there any reason we could not merge them?

Copy link
Collaborator

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm this seems pretty simple - I just thought we were duplicating some stuff where we could avoid it

lgtm

@mattsse mattsse merged commit 063f9bd into foundry-rs:master Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-ignore Log: ignore PR in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants