Skip to content

Commit

Permalink
Update paths for workspace dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Garfield committed Feb 25, 2022
1 parent db5da71 commit 893e00b
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 76 deletions.
29 changes: 3 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["solana", "cronos", "program"]

[dependencies]
anchor-client = "0.22.0"
cronos-sdk = "0.1.3"
cronos-sdk = { path = "../sdk", version = "0.1.3"}
dotenv = "0.15.0"
postgres = "0.19.2"
solana-account-decoder = "1.9.9"
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords = ["solana", "cronos", "cli"]
[dependencies]
anchor-lang = "0.22.0"
clap = { version = "3.0.14", features = ["derive"] }
cronos-sdk = "0.1.3"
cronos-sdk = { path = "../sdk", version = "0.1.3" }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
solana-account-decoder = "1.9.5"
Expand Down
26 changes: 13 additions & 13 deletions cli/src/app/admin.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
use clap::{App, AppSettings, Arg};
use clap::{Command, Arg};

pub fn app() -> App<'static> {
App::new("admin")
pub fn app() -> Command<'static> {
Command::new("admin")
.about("Run admin instructions against Cronos")
.setting(AppSettings::SubcommandRequiredElseHelp)
.subcommand_required(true)
.subcommand(admin_cancel_app())
.subcommand(admin_health_app())
.subcommand(admin_initialize_app())
}

fn admin_cancel_app() -> App<'static> {
App::new("cancel").about("Cancels a scheduled task").arg(
fn admin_cancel_app() -> Command<'static> {
Command::new("cancel").about("Cancels a scheduled task").arg(
Arg::new("address")
.index(1)
.takes_value(true)
.help("A task address"),
)
}

fn admin_health_app() -> App<'static> {
App::new("health")
fn admin_health_app() -> Command<'static> {
Command::new("health")
.about("Admin health commands")
.setting(AppSettings::SubcommandRequiredElseHelp)
.subcommand(App::new("reset").about("Resets the health account"))
.subcommand(App::new("start").about("Starts a new health check"))
.subcommand_required(true)
.subcommand(Command::new("reset").about("Resets the health account"))
.subcommand(Command::new("start").about("Starts a new health check"))
}

fn admin_initialize_app() -> App<'static> {
App::new("initialize").about("Initializes the Cronos program")
fn admin_initialize_app() -> Command<'static> {
Command::new("initialize").about("Initializes the Cronos program")
}
6 changes: 3 additions & 3 deletions cli/src/app/blocktime.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::App;
use clap::Command;

pub fn app() -> App<'static> {
App::new("blocktime").about("Check the current Solana blocktime")
pub fn app() -> Command<'static> {
Command::new("blocktime").about("Check the current Solana blocktime")
}
24 changes: 12 additions & 12 deletions cli/src/app/config.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
use clap::{App, AppSettings, Arg};
use clap::{Command, Arg};

pub fn app() -> App<'static> {
App::new("config")
pub fn app() -> Command<'static> {
Command::new("config")
.about("Get Cronos program config info ")
.subcommand(config_set_app())
}

fn config_set_app() -> App<'static> {
App::new("set")
fn config_set_app() -> Command<'static> {
Command::new("set")
.about("Set Cronos config variables")
.setting(AppSettings::SubcommandRequiredElseHelp)
.subcommand_required(true)
.subcommand(config_set_min_recurr_app())
.subcommand(config_set_program_fee_app())
.subcommand(config_set_worker_fee_app())
}

fn config_set_min_recurr_app() -> App<'static> {
App::new("min_recurr")
fn config_set_min_recurr_app() -> Command<'static> {
Command::new("min_recurr")
.about("Update the minimum recurrence interval")
.arg(
Arg::new("new_value")
Expand All @@ -27,8 +27,8 @@ fn config_set_min_recurr_app() -> App<'static> {
)
}

fn config_set_program_fee_app() -> App<'static> {
App::new("program_fee").about("Update the program fee").arg(
fn config_set_program_fee_app() -> Command<'static> {
Command::new("program_fee").about("Update the program fee").arg(
Arg::new("new_value")
.index(1)
.takes_value(true)
Expand All @@ -37,8 +37,8 @@ fn config_set_program_fee_app() -> App<'static> {
)
}

fn config_set_worker_fee_app() -> App<'static> {
App::new("worker_fee").about("Update the worker fee").arg(
fn config_set_worker_fee_app() -> Command<'static> {
Command::new("worker_fee").about("Update the worker fee").arg(
Arg::new("new_value")
.index(1)
.takes_value(true)
Expand Down
8 changes: 4 additions & 4 deletions cli/src/app/cronos.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use clap::{App, AppSettings};
use clap::Command;

pub fn cronos() -> App<'static> {
App::new("Cronos")
pub fn cronos() -> Command<'static> {
Command::new("Cronos")
.bin_name("cronos")
.about("Cronos is an instruction scheduler for Solana")
.version(version!())
.setting(AppSettings::SubcommandRequiredElseHelp)
.subcommand_required(true)
.subcommand(super::admin::app())
.subcommand(super::blocktime::app())
.subcommand(super::config::app())
Expand Down
8 changes: 4 additions & 4 deletions cli/src/app/daemon.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::App;
use clap::Command;

pub fn app() -> App<'static> {
App::new("daemon")
pub fn app() -> Command<'static> {
Command::new("daemon")
.about("Manage your daemon")
.subcommand(App::new("new").about("Create a daemon account"))
.subcommand(Command::new("new").about("Create a daemon account"))
}
8 changes: 4 additions & 4 deletions cli/src/app/health.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::App;
use clap::Command;

pub fn app() -> App<'static> {
App::new("health")
pub fn app() -> Command<'static> {
Command::new("health")
.about("Check the Cronos health")
.subcommand(App::new("reset").about("Reset the Cronos health tracker"))
.subcommand(Command::new("reset").about("Reset the Cronos health tracker"))
}
14 changes: 7 additions & 7 deletions cli/src/app/task.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use clap::{App, Arg};
use clap::{Command, Arg};

pub fn app() -> App<'static> {
App::new("task")
pub fn app() -> Command<'static> {
Command::new("task")
.about("Manage your tasks")
.subcommand(task_cancel_app())
.subcommand(task_new_app())
Expand All @@ -13,17 +13,17 @@ pub fn app() -> App<'static> {
)
}

fn task_cancel_app() -> App<'static> {
App::new("cancel").about("Cancels a task").arg(
fn task_cancel_app() -> Command<'static> {
Command::new("cancel").about("Cancels a task").arg(
Arg::new("address")
.index(1)
.takes_value(true)
.help("A task address"),
)
}

fn task_new_app() -> App<'static> {
App::new("new")
fn task_new_app() -> Command<'static> {
Command::new("new")
.about("Creates a new task")
.arg(
Arg::new("filepath")
Expand Down
2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["solana", "cronos", "sdk"]

[dependencies]
anchor-client = { version = "0.22.0", features = ["debug"] }
cronos-program = { version = "0.1.3", features = ["no-entrypoint"] }
cronos-program = { path = "../programs/cronos", features = ["no-entrypoint"], version = "0.1.3" }
solana-client-helpers = "1.1.0"
solana-program = "1.9.5"
solana-sdk = "1.9.8"

0 comments on commit 893e00b

Please sign in to comment.