-
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
feat: support mesc #8760
feat: support mesc #8760
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.
lgtm, just a question on priority of aliases
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.
cool, love this
return Some(endpoint.map(Cow::Owned)) | ||
} | ||
|
||
if let Ok(Some(endpoint)) = mesc::get_endpoint_by_query(maybe_alias, Some("foundry")) { |
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.
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.
there are errors in there related to eg mesc not being enabled and such, which is why i chose to ignore it. don't want it to fail for people not using mesc
Motivation
mesc is a cross-tool endpoint management tool that allows users to manage endpoints across chains, set defaults, and aliases.
We already have some pre-existing ways to do this in Foundry (i.e. rpc aliases in
foundry.toml
), but supporting mesc makes sense going forward. I'd also recommend that we consider deprecating the endpoint management stuff we have currently at some point in the future.Solution
Before looking at rpc aliases in
foundry.toml
, we query mesc first. mesc can handle things like the chain name, chain ID, a raw url, aliases and more.This PR does not change the default foundry url based on mesc as I felt that might be too big of a change, given setting an RPC url in some contexts ends up enabling forking or other behavior
Closes #8502