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

[Feature] Ability to specify a dynamic ABI file path for sol! #738

Open
kayabaNerve opened this issue Sep 15, 2024 · 0 comments
Open

[Feature] Ability to specify a dynamic ABI file path for sol! #738

kayabaNerve opened this issue Sep 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kayabaNerve
Copy link

Component

sol! macro

Describe the feature you would like

I built my contracts to OUT_DIR. sol!(MyContract, concat!(env!("OUT_DIR"), "/contracts/MyContract.abi")) fails to compile with "expected ident". Reviewing the macro myself, the macro appears to be looking for a string literal for the path (preventing usage of so-derived paths).

This can be worked around by hooking into alloy-sol-macro-expander directly from a build script. That crate has weaker semver guarantees and building custom expanders is largely undocumented (though it was a small amount of code once I worked it out). I understand if this is closed as won't fix accordingly, I just wanted to explain why I thought the issue at least worth filing.

Additional context

No response

@kayabaNerve kayabaNerve added the enhancement New feature or request label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant