Skip to content

Commit

Permalink
expose update uri-all command
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelvanderwaal committed Dec 1, 2021
1 parent 04935e6 commit 07e67b8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "metaboss"
version = "0.3.0-beta"
version = "0.3.0-beta.1"
edition = "2018"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ pub enum UpdateSubcommands {
new_uri: String,
},
/// Update the metadata URI on a list of mint accounts
#[structopt(name = "uri")]
#[structopt(name = "uri-all")]
UriAll {
/// Path to the creator's keypair file
#[structopt(short, long)]
Expand Down
42 changes: 21 additions & 21 deletions src/process_subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,6 @@ pub fn process_mint(client: &RpcClient, commands: MintSubcommands) -> Result<()>
}
}

pub fn process_update(client: &RpcClient, commands: UpdateSubcommands) -> Result<()> {
match commands {
UpdateSubcommands::Data {
keypair,
account,
new_data_file,
} => update_data_one(&client, &keypair, &account, &new_data_file),
UpdateSubcommands::DataAll { keypair, data_dir } => {
update_data_all(&client, &keypair, &data_dir)
}
UpdateSubcommands::Uri {
keypair,
account,
new_uri,
} => update_uri_one(&client, &keypair, &account, &new_uri),
UpdateSubcommands::UriAll { keypair, json_file } => {
update_uri_all(&client, &keypair, &json_file)
}
}
}

pub fn process_set(client: &RpcClient, commands: SetSubcommands) -> Result<()> {
match commands {
SetSubcommands::PrimarySaleHappened { keypair, account } => {
Expand Down Expand Up @@ -109,3 +88,24 @@ pub fn process_snapshot(client: &RpcClient, commands: SnapshotSubcommands) -> Re
} => snapshot_mints(&client, candy_machine_id, update_authority, output),
}
}

pub fn process_update(client: &RpcClient, commands: UpdateSubcommands) -> Result<()> {
match commands {
UpdateSubcommands::Data {
keypair,
account,
new_data_file,
} => update_data_one(&client, &keypair, &account, &new_data_file),
UpdateSubcommands::DataAll { keypair, data_dir } => {
update_data_all(&client, &keypair, &data_dir)
}
UpdateSubcommands::Uri {
keypair,
account,
new_uri,
} => update_uri_one(&client, &keypair, &account, &new_uri),
UpdateSubcommands::UriAll { keypair, json_file } => {
update_uri_all(&client, &keypair, &json_file)
}
}
}

0 comments on commit 07e67b8

Please sign in to comment.