Skip to content

Commit

Permalink
feat: add dev mode support for Katana (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm authored Sep 9, 2024
1 parent 55cf3eb commit a5b3913
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl CreateArgs {
invoke_max_steps: config.invoke_max_steps,
validate_max_steps: config.validate_max_steps,
genesis: config.genesis.clone(),
dev_mode: config.dev_mode,
}),
torii: None,
madara: None,
Expand Down
10 changes: 9 additions & 1 deletion cli/src/command/deployments/services/katana.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use clap::Args;
use clap::{ArgAction, Args};
use katana_primitives::genesis;
use katana_primitives::genesis::json::GenesisJson;

Expand Down Expand Up @@ -51,6 +51,10 @@ pub struct KatanaCreateArgs {
#[arg(help = "Path to a Katana genesis file.")]
#[arg(value_parser = genesis_value_parser)]
pub genesis: Option<String>,

#[arg(long, action = ArgAction::Set, default_value_t = false)]
#[arg(help = "Enable Katana dev mode for specific endpoints.")]
pub dev_mode: bool,
}

#[derive(Debug, Args, serde::Serialize)]
Expand Down Expand Up @@ -87,6 +91,10 @@ pub struct KatanaUpdateArgs {
#[arg(long, value_name = "gas_price")]
#[arg(help = "Gas Price.")]
pub gas_price: Option<u64>,

#[arg(long, action = ArgAction::Set, default_value_t = false)]
#[arg(help = "Enable Katana dev mode for specific endpoints.")]
pub dev_mode: bool,
}

#[derive(Debug, Args, serde::Serialize)]
Expand Down
28 changes: 28 additions & 0 deletions slot/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11734,6 +11734,20 @@
"name": "String",
"ofType": null
}
},
{
"defaultValue": null,
"description": null,
"name": "devMode",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
}
],
"interfaces": [],
Expand Down Expand Up @@ -20144,6 +20158,20 @@
"ofType": null
}
}
},
{
"defaultValue": null,
"description": null,
"name": "devMode",
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
}
}
],
"inputFields": [],
Expand Down

0 comments on commit a5b3913

Please sign in to comment.