-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
migrate(forge-bind
): to alloy
#7919
Conversation
Proposing to make the utils method |
TODO:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaniPopes is best equipped to give directions here, but I think this sounds reasonable
@DaniPopes merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
Motivation
Final part of alloy migration
Solution
In order to do this, we have to make use of parts of code that make up the
sol!
macro to create aSolMacroGen
type that is similar to theAbigen
type in ethers.We're reading the JSON abi files (the artifacts) and retrieving the
ABI
from it then converting that to a SolidityTokenStream
and ultimately convert that to aSolInput
that should be passed to the expander that is used by thesol!
macro here: https://github.com/alloy-rs/core/blob/85aecdf54c56da20f274a21f372d3d37b8c118ca/crates/sol-macro/src/lib.rs#L281.However the issue is that the
expand
module is private in thesol-macro
crate and cannot be made public since it's not a macro.@DaniPopes @mattsse I can move the
expand
module to a new cratesol-macro-expander
, make it public and use it in foundry??TODO
expand
public by moving to a new crate.