Enum anchor_cli::IdlCommand
source · pub enum IdlCommand {
Init {
program_id: Pubkey,
filepath: String,
},
Close {
program_id: Pubkey,
},
WriteBuffer {
program_id: Pubkey,
filepath: String,
},
SetBuffer {
program_id: Pubkey,
buffer: Pubkey,
},
Upgrade {
program_id: Pubkey,
filepath: String,
},
SetAuthority {
address: Option<Pubkey>,
program_id: Pubkey,
new_authority: Pubkey,
},
EraseAuthority {
program_id: Pubkey,
},
Authority {
program_id: Pubkey,
},
Parse {
file: String,
out: Option<String>,
out_ts: Option<String>,
no_docs: bool,
},
Fetch {
address: Pubkey,
out: Option<String>,
},
}Variants§
Init
Initializes a program’s IDL account. Can only be run once.
Close
WriteBuffer
Writes an IDL into a buffer account. This can be used with SetBuffer to perform an upgrade.
SetBuffer
Fields
Sets a new IDL buffer for the program.
Upgrade
Upgrades the IDL to the new file. An alias for first writing and then then setting the idl buffer account.
SetAuthority
Fields
address: Option<Pubkey>The IDL account buffer to set the authority of. If none is given, then the canonical IDL account is used.
New authority of the IDL account.
Sets a new authority on the IDL account.
EraseAuthority
Command to remove the ability to modify the IDL account. This should likely be used in conjection with eliminating an “upgrade authority” on the program.
Authority
Outputs the authority for the IDL account.
Parse
Fields
Parses an IDL from source.
Fetch
Fetches an IDL for the given address from a cluster. The address can be a program, IDL account, or IDL buffer.
Trait Implementations§
source§impl CommandFactory for IdlCommand
impl CommandFactory for IdlCommand
source§fn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
CommandFactory::command_for_updatesource§impl Debug for IdlCommand
impl Debug for IdlCommand
source§impl FromArgMatches for IdlCommand
impl FromArgMatches for IdlCommand
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches to self.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches to self.source§impl Parser for IdlCommand
impl Parser for IdlCommand
source§fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
source§fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
source§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
source§impl Subcommand for IdlCommand
impl Subcommand for IdlCommand
source§fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
source§fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand