Enum anchor_cli::IdlCommand
source · pub enum IdlCommand {
Init {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
Close {
program_id: Pubkey,
idl_address: Option<Pubkey>,
print_only: bool,
priority_fee: Option<u64>,
},
WriteBuffer {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
SetBuffer {
program_id: Pubkey,
buffer: Pubkey,
print_only: bool,
priority_fee: Option<u64>,
},
Upgrade {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
SetAuthority {
address: Option<Pubkey>,
program_id: Pubkey,
new_authority: Pubkey,
print_only: bool,
priority_fee: Option<u64>,
},
EraseAuthority {
program_id: Pubkey,
priority_fee: Option<u64>,
},
Authority {
program_id: Pubkey,
},
Build {
program_name: Option<String>,
out: Option<String>,
out_ts: Option<String>,
no_docs: bool,
skip_lint: bool,
},
Fetch {
address: Pubkey,
out: Option<String>,
},
}
Variants§
Init
Initializes a program’s IDL account. Can only be run once.
Close
Fields
idl_address: Option<Pubkey>
The IDL account to close. If none is given, then the IDL account derived from program_id is used.
WriteBuffer
Writes an IDL into a buffer account. This can be used with SetBuffer to perform an upgrade.
SetBuffer
Sets a new IDL buffer for the program.
Fields
Upgrade
Upgrades the IDL to the new file. An alias for first writing and then then setting the idl buffer account.
SetAuthority
Sets a new authority on the IDL account.
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.
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.
Build
Generates the IDL for the program using the compilation method.
Fields
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§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) -> Self
fn parse_from<I, T>(itr: I) -> Self
source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
source§impl Subcommand for IdlCommand
impl Subcommand for IdlCommand
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for IdlCommand
impl RefUnwindSafe for IdlCommand
impl Send for IdlCommand
impl Sync for IdlCommand
impl Unpin for IdlCommand
impl UnwindSafe for IdlCommand
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more