Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Madara service support #100

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ slot auth login
Create service deployments
```sh
slot deployments create <Project Name> katana
slot deployments create <Project Name> madara
slot deployments create <Project Name> torii --world 0x3fa481f41522b90b3684ecfab7650c259a76387fab9c380b7a959e3d4ac69f
```

Expand All @@ -37,7 +36,7 @@ slot deployments delete <Project Name> torii

Read service logs
```sh
slot deployments logs <Project Name> <katana | madara | torii>
slot deployments logs <Project Name> <katana | torii | saya>
```

List all deployments
Expand All @@ -47,7 +46,7 @@ slot deployments list

View deployments configuration
```sh
slot deployments describe <Project Name> <katana | madara | torii>
slot deployments describe <Project Name> <katana | torii | saya>
```

View predeployed accounts
Expand Down
28 changes: 1 addition & 27 deletions cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::Args;
use slot::api::Client;
use slot::credential::Credentials;
use slot::graphql::deployments::create_deployment::CreateDeploymentCreateDeployment::{
KatanaConfig, MadaraConfig, SayaConfig, ToriiConfig,
KatanaConfig, SayaConfig, ToriiConfig,
};
use slot::graphql::deployments::create_deployment::*;
use slot::graphql::deployments::CreateDeployment;
Expand Down Expand Up @@ -58,7 +58,6 @@ impl CreateArgs {
dev: config.dev.then_some(true),
}),
torii: None,
madara: None,
saya: None,
}),
},
Expand All @@ -67,7 +66,6 @@ impl CreateArgs {
version: config.version.clone(),
config: Some(CreateServiceConfigInput {
katana: None,
madara: None,
torii: Some(CreateToriiConfigInput {
rpc: Some(config.rpc.clone().unwrap_or("".to_string())),
world: format!("{:#x}", config.world),
Expand All @@ -78,31 +76,12 @@ impl CreateArgs {
saya: None,
}),
},
CreateServiceCommands::Madara(config) => CreateServiceInput {
type_: DeploymentService::madara,
version: config.version.clone(),
config: Some(CreateServiceConfigInput {
katana: None,
torii: None,
madara: Some(CreateMadaraConfigInput {
name: config.name.clone(),
base_path: config.base_path.clone(),
dev: config.dev.then_some(true),
no_grandpa: config.no_grandpa.then_some(true),
validator: config.validator.then_some(true),
sealing: config.sealing.clone().map(|s| s.to_string()),
chain: config.chain.clone().map(|c| c.to_string()),
}),
saya: None,
}),
},
CreateServiceCommands::Saya(config) => CreateServiceInput {
type_: DeploymentService::saya,
version: config.version.clone(),
config: Some(CreateServiceConfigInput {
katana: None,
torii: None,
madara: None,
saya: Some(CreateSayaConfigInput {
mode: config.mode.clone(),
rpc_url: config.rpc_url.clone(),
Expand Down Expand Up @@ -163,16 +142,11 @@ impl CreateArgs {
println!("\nEndpoints:");
println!(" RPC: {}", config.rpc);
}
MadaraConfig(config) => {
println!("\nEndpoints:");
println!(" RPC: {}", config.rpc);
}
}

let service = match &self.create_commands {
CreateServiceCommands::Katana(_) => "katana",
CreateServiceCommands::Torii(_) => "torii",
CreateServiceCommands::Madara(_) => "madara",
CreateServiceCommands::Saya(_) => "saya",
};

Expand Down
2 changes: 0 additions & 2 deletions cli/src/command/deployments/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use slot::{api::Client, credential::Credentials};
pub enum Service {
Katana,
Torii,
Madara,
Saya,
}

Expand Down Expand Up @@ -49,7 +48,6 @@ impl DeleteArgs {
let service = match &self.service {
Service::Katana => DeploymentService::katana,
Service::Torii => DeploymentService::torii,
Service::Madara => DeploymentService::madara,
Service::Saya => DeploymentService::saya,
};

Expand Down
8 changes: 1 addition & 7 deletions cli/src/command/deployments/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::services::Service;
use anyhow::Result;
use clap::Args;
use slot::graphql::deployments::describe_deployment::DescribeDeploymentDeploymentConfig::{
KatanaConfig, MadaraConfig, SayaConfig, ToriiConfig,
KatanaConfig, SayaConfig, ToriiConfig,
};
use slot::graphql::deployments::{describe_deployment::*, DescribeDeployment};
use slot::graphql::GraphQLQuery;
Expand All @@ -25,7 +25,6 @@ impl DescribeArgs {
let service = match self.service {
Service::Torii => DeploymentService::torii,
Service::Katana => DeploymentService::katana,
Service::Madara => DeploymentService::madara,
Service::Saya => DeploymentService::saya,
};

Expand Down Expand Up @@ -67,11 +66,6 @@ impl DescribeArgs {
println!(" Version: {}", config.version);
println!(" RPC: {}", config.rpc);
}
MadaraConfig(config) => {
println!("\nEndpoints:");
println!(" Version: {}", config.version);
println!(" RPC: {}", config.rpc);
}
SayaConfig(config) => {
println!("\nEndpoints:");
println!(" RPC URL: {}", config.rpc_url);
Expand Down
1 change: 0 additions & 1 deletion cli/src/command/deployments/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ impl LogReader {
let service = match self.service {
Service::Katana => DeploymentService::katana,
Service::Torii => DeploymentService::torii,
Service::Madara => DeploymentService::madara,
Service::Saya => DeploymentService::saya,
};

Expand Down
86 changes: 0 additions & 86 deletions cli/src/command/deployments/services/madara.rs

This file was deleted.

5 changes: 0 additions & 5 deletions cli/src/command/deployments/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ use clap::{Subcommand, ValueEnum};

use self::{
katana::{KatanaAccountArgs, KatanaCreateArgs, KatanaForkArgs, KatanaUpdateArgs},
madara::MadaraCreateArgs,
saya::{SayaCreateArgs, SayaUpdateArgs},
torii::{ToriiCreateArgs, ToriiUpdateArgs},
};

mod katana;
mod madara;
mod saya;
mod torii;

Expand All @@ -19,8 +17,6 @@ pub enum CreateServiceCommands {
Katana(KatanaCreateArgs),
#[command(about = "Torii deployment.")]
Torii(ToriiCreateArgs),
#[command(about = "Madara deployment.")]
Madara(MadaraCreateArgs),
#[command(about = "Saya deployment.")]
Saya(SayaCreateArgs),
}
Expand Down Expand Up @@ -56,6 +52,5 @@ pub enum KatanaAccountCommands {
pub enum Service {
Katana,
Torii,
Madara,
Saya,
}
3 changes: 1 addition & 2 deletions cli/src/command/deployments/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use clap::Args;
use slot::api::Client;
use slot::credential::Credentials;
use slot::graphql::deployments::update_deployment::UpdateDeploymentUpdateDeployment::{
KatanaConfig, MadaraConfig, SayaConfig, ToriiConfig,
KatanaConfig, SayaConfig, ToriiConfig,
};
use slot::graphql::deployments::update_deployment::{
self, UpdateKatanaConfigInput, UpdateServiceConfigInput, UpdateServiceInput,
Expand Down Expand Up @@ -94,7 +94,6 @@ impl UpdateArgs {
println!("\nEndpoints:");
println!(" RPC: {}", config.rpc);
}
MadaraConfig => {} // TODO: implement
SayaConfig(config) => {
println!("\nConfiguration:");
println!(" RPC URL: {}", config.rpc_url);
Expand Down
Loading
Loading