-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mobycrypt
committed
Dec 12, 2024
1 parent
aa6f44c
commit 2f4b95b
Showing
3 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use anyhow::Result; | ||
use clap::{Args, Subcommand}; | ||
use scarb::core::Config; | ||
use sozo_walnut::WalnutDebugger; | ||
|
||
#[derive(Debug, Args)] | ||
pub struct WalnutArgs { | ||
#[command(subcommand)] | ||
pub command: WalnutVerifyCommand, | ||
} | ||
|
||
#[derive(Debug, Subcommand)] | ||
pub enum WalnutVerifyCommand { | ||
#[command(about = "Verify contracts in walnut.dev - essential for debugging source code in Walnut")] | ||
Verify(WalnutVerifyOptions), | ||
} | ||
|
||
#[derive(Debug, Args)] | ||
pub struct WalnutVerifyOptions {} | ||
|
||
impl WalnutArgs { | ||
pub fn run(self, config: &Config) -> Result<()> { | ||
let ws = scarb::ops::read_workspace(config.manifest_path(), config)?; | ||
config.tokio_handle().block_on(async { | ||
match self.command { | ||
WalnutVerifyCommand::Verify(_options) => { | ||
WalnutDebugger::verify(&ws).await?; | ||
} | ||
} | ||
Ok(()) | ||
}) | ||
} | ||
} |