-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: add vm.getChain(chainAlias) #10226
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
base: master
Are you sure you want to change the base?
Conversation
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.
thank you. please make use of alloy-chains https://github.com/alloy-rs/chains instead declaring chains again
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.
I think we can do without these changes, because maybe this is just alloy_chains::Chain::from_str
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.
When returning rpcUrl in Chain struct, as StdChain does we want to:
- return configured rpcUrl in foundry.toml
- if it's not existent on foundry.toml return a default rpcUrl
I couldn't find a feature like this in alloy-rs/chains. should i find another way or just skip this feature and just return configured rpc in env?
sorry for the delay
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.
hey @redtrama returning configured rpc sounds good, thanks
Early pr to get feedback.
Closes #10198
Solution
I've tried to implement the same way StdCheats handles getChain by alias by:
Once the approach is confirmed i can add getChain(chainId)
PR Checklist