-
Notifications
You must be signed in to change notification settings - Fork 9
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
Make rpc_url
arg optional
#5
base: main
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.
Very nice, had two minor comments.
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.
added alias command for rpc_url
and updated the import of get_network
fn from utils
Been thinking more about this and whether a stateless cli is better. With a stateless ux, there's no ambiguity in which cluster you are querying. You can build a mental model where no flags = mainnet and you never accidentally use a different cluster. It's less important for an explorer but I think stateless is the way to go. If anyone wants to chime in with opinion @Eliascm17, would love to hear thoughts for the contrary Also, the
I was referring to the "local" vs "l" shorthand. |
Yeah I see your point. I think it's important to think of this cli tool as an explorer and default to mainnet unless specified otherwise. On the other hand who else would be using this cli tool besides devs? In my mind I would have assumed that this cli would be pointing to the cluster based on my current solana cli config but would others also think that?
I'm confused as to what this means/ what you're asking me to do lol. |
|
I updated the docs to reflect the accepted shortcuts for the /// Specify your RPC endpoint with shortcuts (l=localnet, d=devnet, m=mainnet, t=testnet). Defaults to Solana CLI config. Alias: -u
#[clap(long, short = 'u', global = true)]
rpc_url: Option<String>, Options:
-u, --rpc-url <RPC_URL> Specify your RPC endpoint with shortcuts (l=localnet, d=devnet, m=mainnet, t=testnet). Defaults to Solana CLI config. Alias: -u
-h, --help Print help
-V, --version Print version |
rpc_url
arg to be optional and based off of solana cli config