We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sol!
sol! macro
0.7.4
Linux
sol! seems only to support string literals, i.e., LitStr. For instance:
LitStr.
sol!(T, "[]"); // Works sol!(T, concat!("[","]")); // Doesn't work const s: &str = "[]"; sol!(T, s); // Doesn't work either
Is it possible to support a constant &str instead? This would be helpful to support something like concat!(std::env!("OUT_DIR"), ...)
&str
concat!(std::env!("OUT_DIR"), ...)
The text was updated successfully, but these errors were encountered:
Seems not possible as rust-lang/rust#69133
Sorry, something went wrong.
We parse out environment variables with $ENV inside of the literal, but that's about as much as you can do unfortunately
Bumping this, is there a way to reference environment variables in the latest version of sol!? This doesn't seem to work:
sol!( #[allow(missing_docs)] #[sol(rpc)] SafeProxyFactory, "$OUT_DIR/../../../../.foundry/forge/out/SafeProxyFactory.sol/SafeProxyFactory.json" );
No branches or pull requests
Component
sol! macro
What version of Alloy are you on?
0.7.4
Operating System
Linux
Describe the bug
sol!
seems only to support string literals, i.e.,LitStr.
For instance:Is it possible to support a constant
&str
instead? This would be helpful to support something likeconcat!(std::env!("OUT_DIR"), ...)
The text was updated successfully, but these errors were encountered: