-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fixes to foundry connections and configs #924
Conversation
Quality Gate passedIssues Measures |
@@ -149,14 +149,8 @@ func (n *NetworkConfig) Validate() error { | |||
return fmt.Errorf("chain ID for %s network must be set", name) | |||
} | |||
} | |||
if n.ForkConfigs != nil { | |||
if _, ok := n.ForkConfigs[network]; ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove these checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While using Anvil you may choose not to fork a network, and start network from empty state like geth. Hence these checks are not required
Anvil can be run without forking. Renamed network's
ForkConfig
toAnvilConfig
. Made necessary changes to make fork config not mandatory while using Anvil.Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes improve the function signatures in
foundry.go
by switching from value to pointer receivers for theProps
parameter. This enhances memory efficiency and consistency in how theProps
struct is handled across functions.What
New
function signature to accept a pointer toProps
instead of a value. This change optimizes memory usage by passing a reference.NewVersioned
function signature to also accept a pointer toProps
for the same reasons of efficiency and consistency with theNew
function adjustments.