-
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
Environment variable, ETH_RPC_URL, is not being picked up by forge script #7755
Comments
foundry/crates/cli/src/opts/ethereum.rs Lines 21 to 22 in e971af1
and for forge we are using foundry/crates/common/src/evm.rs Lines 47 to 49 in e971af1
the latter does not have a I don't think we should enable this now as this would cause people's |
yeah, if --fork-url is provided all test launch in forking mode |
Can you help us understand why the previous versions of foundry handled this case differently? In the past we did not have to specify this in every command because it automatically picked up on the environment variable. Did the most recent version change how it handles environment variables or specifically this argument? The puzzling behavior is the need to specify it for a local anvil instance now. |
Marking as @jjbailey-io because of how environment variables overrule any configuration you can easily get into a situation like every test being ran as a fork test, this has significant overhead. There is a meta-ticket here: #7322 tracking proposed improvements around prioritisation in the CLI |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (63fff35 2024-04-22T00:25:29.889454000Z)
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
In previous versions of forge,
ETH_RPC_URL
could be set in the terminal via export andforge script
would pick it up. When it was not set at all, it would default to the local anvil instance. These no longer happen.rpc-url
has to be explicitly on the command now, even for local anvil instance at127.0.0.1:8545
.The text was updated successfully, but these errors were encountered: