WIP: feat: support project-level network overrides#6
Draft
Conversation
The switch recipe now checks both lib/just-foundry/networks/ and the project's networks/ directory. For project-only networks, the symlink points directly to the project file. For library networks, the standard symlink is used. Project overlays are resolved at runtime by env_load_network() and env_show(), so edits to network files take effect immediately without re-running switch. Three cases handled by switch: - Both exist: symlink to library, overlay applied at runtime - Project only: symlink to project file - Library only: symlink as before (unchanged behavior)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
switchrecipe now checks bothlib/just-foundry/networks/and the project'snetworks/directoryenv_load_network()andenv_show(), so edits take effect immediately without re-runningswitchHow it works
Projects can place
networks/<name>.envfiles in their root to:taiko-hoodi) not shipped with just-foundryPriority chain (last wins):
lib/just-foundry/networks/<name>.env)networks/<name>.env).env(secrets, deployment params)