Merge branch 'schouhy/add-wallet-deploy-command' of github.com:logos-blockchain/lssa into schouhy/add-wallet-deploy-command

This commit is contained in:
Sergio Chouhy 2025-12-09 15:22:30 -03:00
commit 79b4dc0333

View File

@ -159,20 +159,17 @@ pub async fn execute_subcommand(command: Command) -> Result<SubcommandReturnValu
.await? .await?
} }
Command::DeployProgram { binary_filepath } => { Command::DeployProgram { binary_filepath } => {
let bytecode: Vec<u8> = std::fs::read(&binary_filepath).with_context(|| { let bytecode: Vec<u8> = std::fs::read(&binary_filepath).context(format!(
format!( "Failed to read program binary at {}",
"Failed to read program binary at {}", binary_filepath.display()
binary_filepath.display() ))?;
)
})?;
let message = nssa::program_deployment_transaction::Message::new(bytecode); let message = nssa::program_deployment_transaction::Message::new(bytecode);
let transaction = ProgramDeploymentTransaction::new(message); let transaction = ProgramDeploymentTransaction::new(message);
let response = wallet_core let _response = wallet_core
.sequencer_client .sequencer_client
.send_tx_program(transaction) .send_tx_program(transaction)
.await .await
.with_context(|| "Transaction submission error"); .context("Transaction submission error");
println!("Response: {:?}", response);
SubcommandReturnValue::Empty SubcommandReturnValue::Empty
} }