Skip to content

Commit 641377b

Browse files
Copilotlarp0
andcommitted
Fix deployment issues: use provided program ID, improve error handling, add IDL warnings
Co-authored-by: larp0 <[email protected]>
1 parent d2d778d commit 641377b

File tree

2 files changed

+122
-87
lines changed

2 files changed

+122
-87
lines changed

src/main.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
8686
.unwrap_or_else(|| cli_config.keypair_path.clone());
8787

8888
// Create a signer directly from the keypair path
89-
let signer =
90-
match solana_sdk::signature::read_keypair_file(&keypair_path) {
91-
Ok(signer) => signer,
92-
Err(err) => {
93-
return Err(format!("Error reading keypair file {}: {}", keypair_path, err).into());
94-
}
95-
};
89+
let signer = match solana_sdk::signature::read_keypair_file(&keypair_path) {
90+
Ok(signer) => signer,
91+
Err(err) => {
92+
return Err(format!("Error reading keypair file {}: {}", keypair_path, err).into());
93+
}
94+
};
9695

9796
Config {
9897
json_rpc_url: normalize_to_url_if_moniker(
@@ -949,15 +948,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
949948
println!();
950949

951950
// Execute deployment
952-
let results = match tokio::runtime::Runtime::new() {
953-
Ok(runtime) => runtime.block_on(
954-
ebpf_deploy::deploy_to_all_networks(deploy_config, config.commitment_config),
955-
),
956-
Err(e) => {
957-
eprintln!("Failed to create async runtime: {}", e);
958-
return Err(e.into());
959-
}
960-
};
951+
let results =
952+
ebpf_deploy::deploy_to_all_networks(deploy_config, config.commitment_config).await;
961953

962954
// Display results
963955
println!("\n📋 Deployment Results Summary");

0 commit comments

Comments
 (0)