Skip to content

Commit

Permalink
Update endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Sep 9, 2024
1 parent 7147914 commit 2c1667a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion errors/src/errors/cli/cli_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ create_messages!(
failed_to_get_endpoint_from_env {
args: (),
msg: "Failed to get an endpoint.".to_string(),
help: Some("Either make sure you have a `.env` file in current project directory with an `ENDPOINT` variable set, or set the `--endpoint` flag when invoking the CLI command.\n Example: `ENDPOINT=https://api.explorer.aleo.org/v1` or `leo build --endpoint \"https://api.explorer.aleo.org/v1\"`.".to_string()),
help: Some("Either make sure you have a `.env` file in current project directory with an `ENDPOINT` variable set, or set the `--endpoint` flag when invoking the CLI command.\n Example: `ENDPOINT=https://api.explorer.provable.com/v1` or `leo build --endpoint \"https://api.explorer.provable.com/v1\"`.".to_string()),
}

@backtraced
Expand Down
2 changes: 1 addition & 1 deletion leo/cli/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ mod test_helpers {
use std::path::Path;

const NETWORK: &str = "mainnet";
const ENDPOINT: &str = "https://api.explorer.aleo.org/v1";
const ENDPOINT: &str = "https://api.explorer.provable.com/v1";

pub(crate) fn sample_nested_package(temp_dir: &Path) {
let name = "nested";
Expand Down
4 changes: 2 additions & 2 deletions leo/cli/commands/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub enum Account {
short = 'e',
long,
help = "Endpoint to retrieve network state from.",
default_value = "https://api.explorer.aleo.org/v1"
default_value = "https://api.explorer.provable.com/v1"
)]
endpoint: String,
},
Expand All @@ -73,7 +73,7 @@ pub enum Account {
short = 'e',
long,
help = "Endpoint to retrieve network state from.",
default_value = "https://api.explorer.aleo.org/v1"
default_value = "https://api.explorer.provable.com/v1"
)]
endpoint: String,
},
Expand Down
2 changes: 1 addition & 1 deletion leo/cli/commands/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Example {
short = 'e',
long,
help = "Endpoint to retrieve network state from.",
default_value = "https://api.explorer.aleo.org/v1"
default_value = "https://api.explorer.provable.com/v1"
)]
pub(crate) endpoint: String,
}
Expand Down
2 changes: 1 addition & 1 deletion leo/cli/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct New {
short = 'e',
long,
help = "Endpoint to retrieve network state from.",
default_value = "https://api.explorer.aleo.org/v1"
default_value = "https://api.explorer.provable.com/v1"
)]
pub(crate) endpoint: String,
}
Expand Down
4 changes: 2 additions & 2 deletions leo/cli/commands/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ fn handle_query<N: Network>(
QueryCommands::Stateroot { command } => (None, command.apply(context, ())?),
QueryCommands::Committee { command } => (None, command.apply(context, ())?),
QueryCommands::Mempool { command } => {
if endpoint == "https://api.explorer.aleo.org/v1" {
if endpoint == "https://api.explorer.provable.com/v1" {
tracing::warn!(
"⚠️ `leo query mempool` is only valid when using a custom endpoint. Specify one using `--endpoint`."
);
}
(None, command.apply(context, ())?)
}
QueryCommands::Peers { command } => {
if endpoint == "https://api.explorer.aleo.org/v1" {
if endpoint == "https://api.explorer.provable.com/v1" {
tracing::warn!(
"⚠️ `leo query peers` is only valid when using a custom endpoint. Specify one using `--endpoint`."
);
Expand Down

0 comments on commit 2c1667a

Please sign in to comment.