Skip to content

Commit 1ef840f

Browse files
authored
feat: point to beta-4 faucet and block explorer by default (#134)
closes #133. With this PR `forc-wallet` points to beta-4 network by default.
1 parent 755404c commit 1ef840f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/account.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ pub(crate) fn verify_address_and_update_cache(
244244
pub(crate) fn print_balance_empty(node_url: &Url) {
245245
let beta_2_url = crate::network::BETA_2.parse::<Url>().unwrap();
246246
let beta_3_url = crate::network::BETA_3.parse::<Url>().unwrap();
247+
let beta_4_url = crate::network::BETA_4.parse::<Url>().unwrap();
247248
let faucet_url = match node_url.host_str() {
248249
host if host == beta_2_url.host_str() => crate::network::BETA_2_FAUCET,
249250
host if host == beta_3_url.host_str() => crate::network::BETA_3_FAUCET,
251+
host if host == beta_4_url.host_str() => crate::network::BETA_4_FAUCET,
250252
_ => return println!(" Account empty."),
251253
};
252254
println!(
@@ -488,9 +490,12 @@ pub(crate) async fn transfer_cli(
488490
.await?;
489491

490492
let block_explorer_url = match transfer.node_url.host_str() {
491-
host if host == crate::network::BETA_3.parse::<Url>().unwrap().host_str() => {
493+
host if host == crate::network::BETA_4.parse::<Url>().unwrap().host_str() => {
492494
crate::explorer::DEFAULT
493495
}
496+
host if host == crate::network::BETA_3.parse::<Url>().unwrap().host_str() => {
497+
crate::explorer::BETA_3
498+
}
494499
host if host == crate::network::BETA_2.parse::<Url>().unwrap().host_str() => {
495500
crate::explorer::BETA_2
496501
}

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ pub mod utils;
77

88
/// The default network used in the case that none is specified.
99
pub mod network {
10-
pub const DEFAULT: &str = BETA_3;
10+
pub const DEFAULT: &str = BETA_4;
1111
pub const BETA_2: &str = "https://node-beta-2.fuel.network";
1212
pub const BETA_2_FAUCET: &str = "https://faucet-beta-2.fuel.network";
1313
pub const BETA_3: &str = "https://beta-3.fuel.network/";
1414
pub const BETA_3_FAUCET: &str = "https://faucet-beta-3.fuel.network/";
15+
pub const BETA_4: &str = "https://beta-4.fuel.network/";
16+
pub const BETA_4_FAUCET: &str = "https://faucet-beta-4.fuel.network/";
1517
}
1618

1719
/// Contains definitions of URLs to the block explorer for each network.
1820
pub mod explorer {
19-
pub const DEFAULT: &str = BETA_3;
21+
pub const DEFAULT: &str = BETA_4;
2022
pub const BETA_2: &str = "https://fuellabs.github.io/block-explorer-v2/beta-2";
2123
pub const BETA_3: &str = "https://fuellabs.github.io/block-explorer-v2/beta-3";
24+
pub const BETA_4: &str = "https://fuellabs.github.io/block-explorer-v2/beta-4";
2225
}

0 commit comments

Comments
 (0)