Skip to content

Commit fe4f162

Browse files
committed
Release version 0.2.0
1 parent 447b369 commit fe4f162

File tree

12 files changed

+36
-47
lines changed

12 files changed

+36
-47
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [v0.2.0]
99

1010
### Added
1111
- Runner abstraction with `CmdSpec`, `Runner` trait, `RealRunner`, and `DryRunRunner` implementations
@@ -68,4 +68,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6868
- Eliminated code duplication across command modules
6969
- Established consistent command execution pattern for all nargo-based commands
7070
- Verified no unsafe blocks remain in codebase
71-
- All acceptance criteria for Phase 3 satisfied
71+
- All acceptance criteria for Phase 3 satisfied

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = [".", "crates/bargo-core"]
33

44
[package]
55
name = "bargo"
6-
version = "0.1.0"
6+
version = "0.2.0"
77
edition = "2024"
88

99
[dependencies]

crates/bargo-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bargo-core"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2024"
55

66
[dependencies]

crates/bargo-core/src/commands/cairo/workflow.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ pub(crate) fn internal_declare(cfg: &Config, network: &str) -> Result<()> {
282282
load_env_vars();
283283

284284
if cfg.dry_run {
285-
println!("Would declare contract on network: {}", network);
285+
println!("Would declare contract on network: {network}");
286286
return Ok(());
287287
}
288288

@@ -304,7 +304,7 @@ pub(crate) fn internal_declare(cfg: &Config, network: &str) -> Result<()> {
304304
// Implementation would depend on Starknet CLI integration
305305
// This is a placeholder for the actual declare logic
306306
println!("🚧 Contract declaration functionality coming soon");
307-
println!("Network: {}", network);
307+
println!("Network: {network}");
308308
println!("Contract directory: {}", cairo_dir.display());
309309

310310
Ok(())
@@ -326,7 +326,7 @@ pub fn run_deploy(cfg: &Config, class_hash: Option<&str>) -> Result<()> {
326326
Some(hash) => hash.to_string(),
327327
None => "<class_hash_from_declare>".to_string(), // Placeholder for dry-run
328328
};
329-
println!("Would deploy contract with class hash: {}", hash);
329+
println!("Would deploy contract with class hash: {hash}");
330330
return Ok(());
331331
}
332332

@@ -358,7 +358,7 @@ pub fn run_deploy(cfg: &Config, class_hash: Option<&str>) -> Result<()> {
358358
// Implementation would depend on Starknet CLI integration
359359
// This is a placeholder for the actual deploy logic
360360
println!("🚧 Contract deployment functionality coming soon");
361-
println!("Class hash: {}", hash);
361+
println!("Class hash: {hash}");
362362

363363
Ok(())
364364
}
@@ -408,10 +408,7 @@ pub fn run_verify_onchain(cfg: &Config, address: Option<&str>) -> Result<()> {
408408
}
409409

410410
if cfg.dry_run {
411-
println!(
412-
"Would verify proof on-chain at address: {}",
413-
contract_address
414-
);
411+
println!("Would verify proof on-chain at address: {contract_address}");
415412
return Ok(());
416413
}
417414

@@ -422,7 +419,7 @@ pub fn run_verify_onchain(cfg: &Config, address: Option<&str>) -> Result<()> {
422419
// Implementation would depend on Starknet CLI integration
423420
// This is a placeholder for the actual on-chain verification logic
424421
println!("🚧 On-chain verification functionality coming soon");
425-
println!("Contract address: {}", contract_address);
422+
println!("Contract address: {contract_address}");
426423
println!("Calldata: {}", calldata_path.display());
427424

428425
Ok(())

crates/bargo-core/src/commands/evm/workflow.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ pub fn run_deploy(cfg: &Config, network: &str) -> Result<()> {
276276
})?;
277277

278278
if cfg.dry_run {
279-
println!("Would deploy Verifier contract to network: {}", network);
280-
println!("Would use RPC URL: {}", rpc_url);
279+
println!("Would deploy Verifier contract to network: {network}");
280+
println!("Would use RPC URL: {rpc_url}");
281281
return Ok(());
282282
}
283283

@@ -308,12 +308,11 @@ pub fn run_deploy(cfg: &Config, network: &str) -> Result<()> {
308308
deploy_timer.elapsed()
309309
))
310310
);
311-
println!("Contract address: {}", contract_address);
311+
println!("Contract address: {contract_address}");
312312

313313
let mut summary = OperationSummary::new();
314314
summary.add_operation(&format!(
315-
"Verifier contract deployed at: {}",
316-
contract_address
315+
"Verifier contract deployed at: {contract_address}"
317316
));
318317
summary.print();
319318
println!();
@@ -451,10 +450,7 @@ pub fn run_verify_onchain(cfg: &Config) -> Result<()> {
451450
})?;
452451

453452
if cfg.dry_run {
454-
println!(
455-
"Would verify proof on-chain at contract: {}",
456-
contract_address
457-
);
453+
println!("Would verify proof on-chain at contract: {contract_address}");
458454
println!("Would use calldata from: {}", calldata_path.display());
459455
return Ok(());
460456
}
@@ -474,15 +470,14 @@ pub fn run_verify_onchain(cfg: &Config) -> Result<()> {
474470
// This is a placeholder for actual on-chain verification
475471
// The actual implementation would depend on the specific verifier contract interface
476472
println!("🚧 On-chain verification functionality coming soon");
477-
println!("Contract address: {}", contract_address);
478-
println!("RPC URL: {}", rpc_url);
473+
println!("Contract address: {contract_address}");
474+
println!("RPC URL: {rpc_url}");
479475
println!("Calldata: {}", calldata_path.display());
480476

481477
if !cfg.quiet {
482478
let mut summary = OperationSummary::new();
483479
summary.add_operation(&format!(
484-
"On-chain verification prepared for contract: {}",
485-
contract_address
480+
"On-chain verification prepared for contract: {contract_address}"
486481
));
487482
summary.print();
488483
}

crates/bargo-core/src/runner.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,17 @@ impl Runner for DryRunRunner {
389389
let env_str = spec
390390
.env
391391
.iter()
392-
.map(|(k, v)| format!("{}={}", k, v))
392+
.map(|(k, v)| format!("{k}={v}"))
393393
.collect::<Vec<_>>()
394394
.join(" ");
395-
print!("{} ", env_str);
395+
print!("{env_str} ");
396396
}
397397

398398
// Print working directory if specified
399399
if let Some(ref cwd) = spec.cwd {
400400
println!("Would run in directory '{}': {}", cwd.display(), cmd_str);
401401
} else {
402-
println!("Would run: {}", cmd_str);
402+
println!("Would run: {cmd_str}");
403403
}
404404

405405
Ok(())
@@ -428,7 +428,7 @@ impl Runner for DryRunRunner {
428428
cmd_str
429429
);
430430
} else {
431-
println!("Would run (capturing output): {}", cmd_str);
431+
println!("Would run (capturing output): {cmd_str}");
432432
}
433433

434434
// Return realistic fake output

crates/bargo-core/src/util/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/// Create a smart error with context and suggestions
22
pub fn create_smart_error(message: &str, suggestions: &[&str]) -> color_eyre::eyre::Error {
3-
let mut error_msg = format!("❌ {}", message);
3+
let mut error_msg = format!("❌ {message}");
44

55
if !suggestions.is_empty() {
66
error_msg.push_str("\n\n💡 Suggestions:");
77
for suggestion in suggestions {
8-
error_msg.push_str(&format!("\n • {}", suggestion));
8+
error_msg.push_str(&format!("\n • {suggestion}"));
99
}
1010
}
1111

@@ -14,7 +14,7 @@ pub fn create_smart_error(message: &str, suggestions: &[&str]) -> color_eyre::ey
1414

1515
/// Enhanced error with suggestions for common issues
1616
pub fn enhance_error_with_suggestions(error: color_eyre::eyre::Error) -> color_eyre::eyre::Error {
17-
let error_msg = format!("{}", error);
17+
let error_msg = format!("{error}");
1818

1919
// Check for common error patterns and add suggestions
2020
if error_msg.contains("Required files are missing") {

crates/bargo-core/src/util/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn format_file_size(path: &Path) -> String {
4242
Ok(metadata) => {
4343
let size = metadata.len();
4444
if size < 1024 {
45-
format!("{} B", size)
45+
format!("{size} B")
4646
} else if size < 1024 * 1024 {
4747
format!("{:.1} KB", size as f64 / 1024.0)
4848
} else {

crates/bargo-core/src/util/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ pub fn colorize(text: &str, color: &str) -> String {
5050

5151
/// Create success message with green color
5252
pub fn success(text: &str) -> String {
53-
colorize(&format!("✅ {}", text), colors::BRIGHT_GREEN)
53+
colorize(&format!("✅ {text}"), colors::BRIGHT_GREEN)
5454
}
5555

5656
/// Create info message with blue color
5757
pub fn info(text: &str) -> String {
58-
colorize(&format!("ℹ️ {}", text), colors::BRIGHT_BLUE)
58+
colorize(&format!("ℹ️ {text}"), colors::BRIGHT_BLUE)
5959
}
6060

6161
/// Print ASCII art banners for different operations

0 commit comments

Comments
 (0)