-
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(forge): add forge selectors
cmd
#5072
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.
need to do a second pass / test, just a few comments:
cli/src/cmd/forge/fourbyte.rs
Outdated
@@ -28,6 +28,8 @@ pub struct UploadSelectorsArgs { | |||
impl UploadSelectorsArgs { | |||
/// Builds a contract and uploads the ABI to selector database | |||
pub async fn run(self) -> eyre::Result<()> { | |||
println!("Warning! This command is deprecated and will be removed in v1, use `forge selectors upload` instead"); |
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 could make this even more flashy with some yellow color, e.g: https://github.com/foundry-rs/foundry/blob/master/cli/src/cmd/forge/script/mod.rs#L750
}; | ||
|
||
#[derive(Debug, Clone, Parser)] | ||
pub enum SelectorsSubcommands { |
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.
Let's leave some docs on what this is 🙏
all: bool, | ||
|
||
#[clap(flatten)] | ||
project_paths: ProjectPathsArgs, |
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.
Let's also document this field
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.
tbf I don't really know how to document this field: it doesn't look settable by the user and it's not documented over on fourbytes.rs either..
any suggestions?
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.
these will be flattened and will use the existing documentation
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.
sick, pending ci
not sure what broke the ci - ran cargo +nightly fmt --all
cargo +nightly clippy --all --all-features -- -D warnings before the last commit. |
no worries—the ci failure is a flaky test that we need to fix |
Motivation
Tackles the first part of this comment on #5012.
Solution
Ported the code from
forge upload-selectors
over toforge selectors upload
and added a warning in the former.