Closed wtdcode closed 3 months ago
Seems not possible as https://github.com/rust-lang/rust/issues/69133
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"
);
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"), ...)