Add nym- prefix to network-defaults (#3069)
* network-defaults: update cargo metadata * Add nym- prefix to network-defaults crate * Some manual updating * rustfmt
This commit is contained in:
Generated
+27
-27
@@ -795,7 +795,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
@@ -1013,9 +1013,9 @@ dependencies = [
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
@@ -1830,10 +1830,10 @@ dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
"maxminddb",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-contracts-common",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-task",
|
||||
"okapi",
|
||||
"pretty_env_logger",
|
||||
@@ -2098,8 +2098,8 @@ dependencies = [
|
||||
"getrandom 0.2.8",
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"network-defaults",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -3151,9 +3151,9 @@ dependencies = [
|
||||
"futures",
|
||||
"humantime-serde",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-sphinx-acknowledgements",
|
||||
"nym-sphinx-addressing",
|
||||
"nym-sphinx-forwarding",
|
||||
@@ -3230,19 +3230,6 @@ dependencies = [
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "no-std-compat"
|
||||
version = "0.4.1"
|
||||
@@ -3454,9 +3441,9 @@ dependencies = [
|
||||
"clap_complete_fig",
|
||||
"dotenv",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-cli-commands",
|
||||
"nym-network-defaults",
|
||||
"pretty_env_logger",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -3485,8 +3472,8 @@ dependencies = [
|
||||
"k256",
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"network-defaults",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract-common",
|
||||
"rand 0.6.5",
|
||||
"serde",
|
||||
@@ -3515,9 +3502,9 @@ dependencies = [
|
||||
"gateway-requests",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -3597,10 +3584,10 @@ dependencies = [
|
||||
"log",
|
||||
"mixnet-client",
|
||||
"mixnode-common",
|
||||
"network-defaults",
|
||||
"nym-api-requests",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -3683,6 +3670,19 @@ dependencies = [
|
||||
"validator-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-network-requester"
|
||||
version = "1.1.9"
|
||||
@@ -3696,9 +3696,9 @@ dependencies = [
|
||||
"ipnetwork 0.20.0",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-sdk",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -3769,9 +3769,9 @@ dependencies = [
|
||||
"gateway-client",
|
||||
"gateway-requests",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
"pretty_env_logger",
|
||||
@@ -3801,9 +3801,9 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -4039,8 +4039,8 @@ dependencies = [
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"hex-literal",
|
||||
"network-defaults",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-types",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
@@ -6882,10 +6882,10 @@ dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"network-defaults",
|
||||
"nym-api-requests",
|
||||
"nym-contracts-common",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
"prost 0.10.4",
|
||||
|
||||
@@ -106,8 +106,11 @@ license = "Apache-2.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
async-trait = "0.1.63"
|
||||
cfg-if = "1.0.0"
|
||||
dotenv = "0.15.0"
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4"
|
||||
once_cell = "1.7.2"
|
||||
serde = "1.0.152"
|
||||
serde_json = "1.0.91"
|
||||
tap = "1.0.1"
|
||||
|
||||
@@ -21,7 +21,7 @@ credentials = { path = "../../common/credentials" }
|
||||
credential-storage = { path = "../../common/credential-storage" }
|
||||
nym-crypto = { path = "../../common/crypto", features = ["rand", "asymmetric", "symmetric", "aes", "hashing"] }
|
||||
nym-bin-common = { path = "../../common/bin-common"}
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-pemstore = { path = "../../common/pemstore" }
|
||||
validator-client = { path = "../../common/client-libs/validator-client", features = ["nyxd-client"] }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use crate::error::Result;
|
||||
use bip39::Mnemonic;
|
||||
use network_defaults::{NymNetworkDetails, VOUCHER_INFO};
|
||||
use nym_network_defaults::{NymNetworkDetails, VOUCHER_INFO};
|
||||
use std::str::FromStr;
|
||||
use url::Url;
|
||||
use validator_client::nyxd;
|
||||
|
||||
@@ -12,8 +12,8 @@ use credential_storage::storage::Storage;
|
||||
use credential_storage::PersistentStorage;
|
||||
use credentials::coconut::bandwidth::{BandwidthVoucher, TOTAL_ATTRIBUTES};
|
||||
use credentials::coconut::utils::obtain_aggregate_signature;
|
||||
use network_defaults::VOUCHER_INFO;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use nym_network_defaults::VOUCHER_INFO;
|
||||
use validator_client::nyxd::traits::DkgQueryClient;
|
||||
use validator_client::nyxd::tx::Hash;
|
||||
use validator_client::nyxd::CosmWasmClient;
|
||||
|
||||
@@ -11,8 +11,8 @@ use commands::*;
|
||||
use config::{DATA_DIR, DB_FILE_NAME};
|
||||
use error::Result;
|
||||
use log::*;
|
||||
use network_defaults::{setup_env, NymNetworkDetails};
|
||||
use nym_bin_common::completions::fig_generate;
|
||||
use nym_network_defaults::{setup_env, NymNetworkDetails};
|
||||
use std::process::exit;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ credentials = { path = "../../common/credentials" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
gateway-client = { path = "../../common/client-libs/gateway-client" }
|
||||
gateway-requests = { path = "../../gateway/gateway-requests" }
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||
nym-pemstore = { path = "../../common/pemstore" }
|
||||
nym-task = { path = "../../common/task" }
|
||||
|
||||
@@ -56,7 +56,7 @@ impl SocketClient {
|
||||
}
|
||||
|
||||
async fn create_bandwidth_controller(config: &Config) -> BandwidthController<QueryNyxdClient> {
|
||||
let details = network_defaults::NymNetworkDetails::new_from_env();
|
||||
let details = nym_network_defaults::NymNetworkDetails::new_from_env();
|
||||
let mut client_config = validator_client::Config::try_from_nym_network_details(&details)
|
||||
.expect("failed to construct validator client config");
|
||||
let nyxd_url = config
|
||||
|
||||
@@ -87,13 +87,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
network_defaults::var_names::NYM_API,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
network_defaults::var_names::NYXD,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use std::error::Error;
|
||||
|
||||
use clap::{crate_name, crate_version, Parser};
|
||||
use network_defaults::setup_env;
|
||||
use nym_bin_common::logging::{banner, setup_logging};
|
||||
use nym_network_defaults::setup_env;
|
||||
|
||||
pub mod client;
|
||||
pub mod commands;
|
||||
|
||||
@@ -37,7 +37,7 @@ credentials = { path = "../../common/credentials" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
gateway-client = { path = "../../common/client-libs/gateway-client" }
|
||||
gateway-requests = { path = "../../gateway/gateway-requests" }
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||
ordered-buffer = { path = "../../common/socks5/ordered-buffer" }
|
||||
nym-pemstore = { path = "../../common/pemstore" }
|
||||
|
||||
@@ -72,7 +72,7 @@ impl NymClient {
|
||||
|
||||
#[cfg(not(feature = "mobile"))]
|
||||
async fn create_bandwidth_controller(config: &Config) -> BandwidthController<QueryNyxdClient> {
|
||||
let details = network_defaults::NymNetworkDetails::new_from_env();
|
||||
let details = nym_network_defaults::NymNetworkDetails::new_from_env();
|
||||
let mut client_config = validator_client::Config::try_from_nym_network_details(&details)
|
||||
.expect("failed to construct validator client config");
|
||||
let nyxd_url = config
|
||||
|
||||
@@ -86,13 +86,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
network_defaults::var_names::NYM_API,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
network_defaults::var_names::NYXD,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use std::error::Error;
|
||||
|
||||
use clap::{crate_name, crate_version, Parser};
|
||||
use network_defaults::setup_env;
|
||||
use nym_bin_common::logging::{banner, setup_logging};
|
||||
use nym_network_defaults::setup_env;
|
||||
|
||||
pub mod client;
|
||||
mod commands;
|
||||
|
||||
@@ -22,7 +22,7 @@ coconut-interface = { path = "../../coconut-interface" }
|
||||
credentials = { path = "../../credentials" }
|
||||
nym-crypto = { path = "../../crypto" }
|
||||
gateway-requests = { path = "../../../gateway/gateway-requests" }
|
||||
network-defaults = { path = "../../network-defaults" }
|
||||
nym-network-defaults = { path = "../../network-defaults" }
|
||||
nym-sphinx = { path = "../../nymsphinx" }
|
||||
nym-pemstore = { path = "../../pemstore" }
|
||||
validator-client = { path = "../validator-client" }
|
||||
|
||||
@@ -16,8 +16,8 @@ use gateway_requests::iv::IV;
|
||||
use gateway_requests::registration::handshake::{client_handshake, SharedKeys};
|
||||
use gateway_requests::{BinaryRequest, ClientControlRequest, ServerResponse, PROTOCOL_VERSION};
|
||||
use log::*;
|
||||
use network_defaults::{REMAINING_BANDWIDTH_THRESHOLD, TOKENS_TO_BURN};
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_network_defaults::{REMAINING_BANDWIDTH_THRESHOLD, TOKENS_TO_BURN};
|
||||
use nym_sphinx::forwarding::packet::MixPacket;
|
||||
use nym_task::TaskClient;
|
||||
use rand::rngs::OsRng;
|
||||
|
||||
@@ -29,7 +29,7 @@ tokio = { version = "1.24.1", features = ["sync", "time"] }
|
||||
futures = "0.3"
|
||||
|
||||
coconut-interface = { path = "../../coconut-interface" }
|
||||
network-defaults = { path = "../../network-defaults" }
|
||||
nym-network-defaults = { path = "../../network-defaults" }
|
||||
nym-api-requests = { path = "../../../nym-api/nym-api-requests" }
|
||||
|
||||
# required for nyxd-client
|
||||
|
||||
@@ -30,8 +30,6 @@ use coconut_interface::Base58;
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use cw3::ProposalResponse;
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use network_defaults::NymNetworkDetails;
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use nym_api_requests::models::MixNodeBondAnnotated;
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use nym_mixnet_contract_common::{
|
||||
@@ -41,6 +39,8 @@ use nym_mixnet_contract_common::{
|
||||
Delegation, IdentityKey, RewardedSetNodeStatus, UnbondedMixnode,
|
||||
};
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
#[cfg(feature = "nyxd-client")]
|
||||
use std::str::FromStr;
|
||||
use url::Url;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::nyxd::traits::MixnetQueryClient;
|
||||
use colored::Colorize;
|
||||
use core::fmt;
|
||||
use itertools::Itertools;
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::BuildHasher;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NYM_API_VERSION;
|
||||
use nym_network_defaults::NYM_API_VERSION;
|
||||
|
||||
pub const API_VERSION: &str = NYM_API_VERSION;
|
||||
pub const MIXNODES: &str = "mixnodes";
|
||||
|
||||
@@ -17,8 +17,8 @@ use cosmrs::rpc::HttpClientUrl;
|
||||
use cosmrs::tx::Msg;
|
||||
use execute::execute;
|
||||
use log::debug;
|
||||
use network_defaults::{ChainDetails, NymNetworkDetails};
|
||||
use nym_mixnet_contract_common::MixId;
|
||||
use nym_network_defaults::{ChainDetails, NymNetworkDetails};
|
||||
use nym_vesting_contract_common::ExecuteMsg as VestingExecuteMsg;
|
||||
use nym_vesting_contract_common::PledgeCap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -207,7 +207,7 @@ impl DirectSecp256k1HdWalletBuilder {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegr
|
||||
cosmwasm-std = { version = "1.0.0" }
|
||||
|
||||
validator-client = { path = "../client-libs/validator-client", features = ["nyxd-client"] }
|
||||
network-defaults = { path = "../network-defaults" }
|
||||
nym-network-defaults = { path = "../network-defaults" }
|
||||
nym-mixnet-contract-common = { path = "../cosmwasm-smart-contracts/mixnet-contract" }
|
||||
nym-vesting-contract-common = { path = "../cosmwasm-smart-contracts/vesting-contract" }
|
||||
coconut-bandwidth-contract-common = { path = "../cosmwasm-smart-contracts/coconut-bandwidth-contract" }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::{
|
||||
use nym_network_defaults::{
|
||||
setup_env,
|
||||
var_names::{MIXNET_CONTRACT_ADDRESS, NYM_API, NYXD, VESTING_CONTRACT_ADDRESS},
|
||||
NymNetworkDetails,
|
||||
|
||||
@@ -27,14 +27,14 @@ pub async fn generate(args: Args) {
|
||||
debug!("Received arguments: {:?}", args);
|
||||
|
||||
let multisig_addr = args.multisig_addr.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
.expect("Multisig address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting multisig address to AccountId")
|
||||
});
|
||||
|
||||
let mix_denom = args.mix_denom.unwrap_or_else(|| {
|
||||
std::env::var(network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
std::env::var(nym_network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
});
|
||||
|
||||
let instantiate_msg = InstantiateMsg {
|
||||
|
||||
@@ -45,22 +45,23 @@ pub async fn generate(args: Args) {
|
||||
debug!("Received arguments: {:?}", args);
|
||||
|
||||
let multisig_addr = args.multisig_addr.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
.expect("Multisig address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting multisig address to AccountId")
|
||||
});
|
||||
|
||||
let mix_denom = args.mix_denom.unwrap_or_else(|| {
|
||||
std::env::var(network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
std::env::var(nym_network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
});
|
||||
|
||||
let mut time_configuration =
|
||||
if let Ok(config) = std::env::var(network_defaults::var_names::DKG_TIME_CONFIGURATION) {
|
||||
TimeConfiguration::from_str(&config).expect("Invalid env variable value")
|
||||
} else {
|
||||
TimeConfiguration::default()
|
||||
};
|
||||
let mut time_configuration = if let Ok(config) =
|
||||
std::env::var(nym_network_defaults::var_names::DKG_TIME_CONFIGURATION)
|
||||
{
|
||||
TimeConfiguration::from_str(&config).expect("Invalid env variable value")
|
||||
} else {
|
||||
TimeConfiguration::default()
|
||||
};
|
||||
if let Some(public_key_submission_time_secs) = args.public_key_submission_time_secs {
|
||||
time_configuration.public_key_submission_time_secs = public_key_submission_time_secs;
|
||||
}
|
||||
|
||||
@@ -79,21 +79,21 @@ pub async fn generate(args: Args) {
|
||||
debug!("initial_rewarding_params: {:?}", initial_rewarding_params);
|
||||
|
||||
let rewarding_validator_address = args.rewarding_validator_address.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::REWARDING_VALIDATOR_ADDRESS)
|
||||
.expect("Rewarding validator address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting rewarding validator address to AccountId")
|
||||
});
|
||||
|
||||
let vesting_contract_address = args.vesting_contract_address.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::VESTING_CONTRACT_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::VESTING_CONTRACT_ADDRESS)
|
||||
.expect("Vesting contract address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting vesting contract address to AccountId")
|
||||
});
|
||||
|
||||
let rewarding_denom = args.rewarding_denom.unwrap_or_else(|| {
|
||||
std::env::var(network_defaults::var_names::MIX_DENOM)
|
||||
std::env::var(nym_network_defaults::var_names::MIX_DENOM)
|
||||
.expect("Rewarding (mix) denom has to be set")
|
||||
});
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ pub async fn generate(args: Args) {
|
||||
let coconut_bandwidth_contract_address =
|
||||
args.coconut_bandwidth_contract_address.unwrap_or_else(|| {
|
||||
let address =
|
||||
std::env::var(network_defaults::var_names::COCONUT_BANDWIDTH_CONTRACT_ADDRESS)
|
||||
std::env::var(nym_network_defaults::var_names::COCONUT_BANDWIDTH_CONTRACT_ADDRESS)
|
||||
.expect("Coconut bandwidth contract address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting bandwidth contract address to AccountId")
|
||||
});
|
||||
|
||||
let coconut_dkg_contract_address = args.coconut_dkg_contract_address.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::COCONUT_DKG_CONTRACT_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::COCONUT_DKG_CONTRACT_ADDRESS)
|
||||
.expect("Coconut DKG contract address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting DKG contract address to AccountId")
|
||||
|
||||
@@ -24,14 +24,14 @@ pub async fn generate(args: Args) {
|
||||
debug!("Received arguments: {:?}", args);
|
||||
|
||||
let mixnet_contract_address = args.mixnet_contract_address.unwrap_or_else(|| {
|
||||
let address = std::env::var(network_defaults::var_names::MIXNET_CONTRACT_ADDRESS)
|
||||
let address = std::env::var(nym_network_defaults::var_names::MIXNET_CONTRACT_ADDRESS)
|
||||
.expect("Mixnet contract address has to be set");
|
||||
AccountId::from_str(address.as_str())
|
||||
.expect("Failed converting mixnet address to AccountId")
|
||||
});
|
||||
|
||||
let mix_denom = args.mix_denom.unwrap_or_else(|| {
|
||||
std::env::var(network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
std::env::var(nym_network_defaults::var_names::MIX_DENOM).expect("Mix denom has to be set")
|
||||
});
|
||||
|
||||
let instantiate_msg = InitMsg {
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::context::SigningClient;
|
||||
use clap::Parser;
|
||||
use cosmrs::{AccountId, Coin as CosmosCoin};
|
||||
use log::info;
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use validator_client::nyxd::cosmwasm_client::types::{ContractCodeId, InstantiateOptions};
|
||||
use validator_client::nyxd::Coin;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use crate::context::SigningClient;
|
||||
use clap::Parser;
|
||||
use log::{info, warn};
|
||||
use network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use nym_mixnet_contract_common::Coin;
|
||||
use nym_network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use validator_client::nyxd::traits::MixnetSigningClient;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use crate::context::SigningClient;
|
||||
use clap::Parser;
|
||||
use log::{info, warn};
|
||||
use network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use nym_mixnet_contract_common::{Coin, Gateway};
|
||||
use nym_network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use validator_client::nyxd::VestingSigningClient;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
||||
@@ -5,10 +5,10 @@ use clap::Parser;
|
||||
use cosmwasm_std::Uint128;
|
||||
use log::{info, warn};
|
||||
|
||||
use network_defaults::{
|
||||
use nym_mixnet_contract_common::{Coin, MixNodeCostParams, Percent};
|
||||
use nym_network_defaults::{
|
||||
DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT,
|
||||
};
|
||||
use nym_mixnet_contract_common::{Coin, MixNodeCostParams, Percent};
|
||||
use validator_client::nyxd::traits::MixnetSigningClient;
|
||||
use validator_client::nyxd::CosmWasmCoin;
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ use crate::context::SigningClient;
|
||||
use clap::Parser;
|
||||
use cosmwasm_std::Uint128;
|
||||
use log::{info, warn};
|
||||
use network_defaults::{
|
||||
DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT,
|
||||
};
|
||||
use nym_mixnet_contract_common::{Coin, MixNodeCostParams};
|
||||
use nym_mixnet_contract_common::{MixNode, Percent};
|
||||
use nym_network_defaults::{
|
||||
DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT,
|
||||
};
|
||||
use validator_client::nyxd::{CosmWasmCoin, VestingSigningClient};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
|
||||
@@ -6,8 +6,8 @@ use std::str::FromStr;
|
||||
use clap::Parser;
|
||||
use log::info;
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_mixnet_contract_common::Coin;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use nym_vesting_contract_common::messages::VestingSpecification;
|
||||
use nym_vesting_contract_common::PledgeCap;
|
||||
use validator_client::nyxd::AccountId;
|
||||
|
||||
@@ -14,4 +14,4 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
toml = "0.5.6"
|
||||
url = "2.2"
|
||||
|
||||
network-defaults = { path = "../network-defaults" }
|
||||
nym-network-defaults = { path = "../network-defaults" }
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
// re-export everything from the `network-defaults` to not break the existing imports
|
||||
// reason for moving defaults to separate crate is that I don't want to pull in all dependencies
|
||||
// like `handlebars`, `toml`, etc if I only want to grab one constant...
|
||||
pub use network_defaults::*;
|
||||
pub use nym_network_defaults::*;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use handlebars::Handlebars;
|
||||
use network_defaults::mainnet::read_var_if_not_default;
|
||||
use network_defaults::var_names::CONFIGURED;
|
||||
use nym_network_defaults::mainnet::read_var_if_not_default;
|
||||
use nym_network_defaults::var_names::CONFIGURED;
|
||||
use serde::de::DeserializeOwned;
|
||||
use serde::Serialize;
|
||||
use std::any::type_name;
|
||||
|
||||
@@ -19,7 +19,7 @@ url = "2.2"
|
||||
thiserror = "1.0.37"
|
||||
|
||||
nym-crypto = { path = "../crypto" }
|
||||
network-defaults = { path = "../network-defaults" }
|
||||
nym-network-defaults = { path = "../network-defaults" }
|
||||
nym-sphinx-acknowledgements = { path = "../nymsphinx/acknowledgements" }
|
||||
nym-sphinx-addressing = { path = "../nymsphinx/addressing" }
|
||||
nym-sphinx-forwarding = { path = "../nymsphinx/forwarding" }
|
||||
|
||||
@@ -6,9 +6,9 @@ use crate::verloc::sender::{PacketSender, TestedNode};
|
||||
use futures::stream::FuturesUnordered;
|
||||
use futures::StreamExt;
|
||||
use log::*;
|
||||
use network_defaults::mainnet::NYM_API;
|
||||
use nym_bin_common::version_checker::{self, parse_version};
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_network_defaults::mainnet::NYM_API;
|
||||
use nym_task::TaskClient;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::thread_rng;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
[package]
|
||||
name = "network-defaults"
|
||||
name = "nym-network-defaults"
|
||||
version = "0.1.0"
|
||||
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
description = "Nym network defaults"
|
||||
edition.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[dependencies]
|
||||
cfg-if = "1.0.0"
|
||||
dotenv = "0.15.0"
|
||||
cfg-if = { workspace = true }
|
||||
dotenv = { workspace = true }
|
||||
hex-literal = "0.3.3"
|
||||
once_cell = "1.7.2"
|
||||
serde = {version = "1.0", features = ["derive"]}
|
||||
thiserror = "1.0"
|
||||
url = "2.2"
|
||||
once_cell = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"]}
|
||||
thiserror = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
||||
@@ -31,7 +31,7 @@ rand_pcg = "0.3.1"
|
||||
|
||||
nym-mixnet-contract-common = { path = "../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
nym-contracts-common = { path = "../common/cosmwasm-smart-contracts/contracts-common" }
|
||||
network-defaults = { path = "../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../common/network-defaults" }
|
||||
nym-bin-common = { path = "../common/bin-common"}
|
||||
nym-task = { path = "../common/task" }
|
||||
validator-client = { path = "../common/client-libs/validator-client", features=["nyxd-client"] }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use network_defaults::{
|
||||
use nym_network_defaults::{
|
||||
var_names::{NYM_API, NYXD},
|
||||
NymNetworkDetails,
|
||||
};
|
||||
|
||||
@@ -6,8 +6,8 @@ extern crate rocket_okapi;
|
||||
use clap::Parser;
|
||||
use dotenv::dotenv;
|
||||
use log::info;
|
||||
use network_defaults::setup_env;
|
||||
use nym_bin_common::logging::setup_logging;
|
||||
use nym_network_defaults::setup_env;
|
||||
use nym_task::TaskManager;
|
||||
|
||||
pub(crate) mod cache;
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ nym-bin-common = { path = "../common/bin-common" }
|
||||
gateway-requests = { path = "gateway-requests" }
|
||||
mixnet-client = { path = "../common/client-libs/mixnet-client" }
|
||||
mixnode-common = { path = "../common/mixnode-common" }
|
||||
network-defaults = { path = "../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../common/network-defaults" }
|
||||
nym-sphinx = { path = "../common/nymsphinx" }
|
||||
nym-pemstore = { path = "../common/pemstore" }
|
||||
statistics-common = { path = "../common/statistics" }
|
||||
|
||||
@@ -161,7 +161,7 @@ pub async fn execute(args: Init, output: OutputFormat) -> Result<(), Box<dyn Err
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use network_defaults::var_names::BECH32_PREFIX;
|
||||
use nym_network_defaults::var_names::BECH32_PREFIX;
|
||||
|
||||
use crate::node::{storage::InMemStorage, Gateway};
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ use crate::{config::Config, Cli};
|
||||
use clap::CommandFactory;
|
||||
use clap::Subcommand;
|
||||
use config::OptionalSet;
|
||||
use network_defaults::var_names::NYXD;
|
||||
use network_defaults::var_names::{BECH32_PREFIX, NYM_API, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||
use nym_bin_common::version_checker;
|
||||
use nym_network_defaults::var_names::NYXD;
|
||||
use nym_network_defaults::var_names::{BECH32_PREFIX, NYM_API, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use std::error::Error;
|
||||
use std::net::IpAddr;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use crate::config::template::config_template;
|
||||
use config::defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use config::NymConfig;
|
||||
use network_defaults::mainnet::{NYM_API, NYXD_URL, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use nym_network_defaults::mainnet::{NYM_API, NYXD_URL, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::net::IpAddr;
|
||||
use std::path::PathBuf;
|
||||
|
||||
+1
-1
@@ -5,9 +5,9 @@ use clap::{crate_name, crate_version, Parser, ValueEnum};
|
||||
use colored::Colorize;
|
||||
use lazy_static::lazy_static;
|
||||
use log::error;
|
||||
use network_defaults::setup_env;
|
||||
use nym_bin_common::logging::setup_logging;
|
||||
use nym_bin_common::{build_information::BinaryBuildInformation, logging::banner};
|
||||
use nym_network_defaults::setup_env;
|
||||
use std::error::Error;
|
||||
|
||||
mod commands;
|
||||
|
||||
@@ -16,7 +16,7 @@ impl Bandwidth {
|
||||
impl From<Credential> for Bandwidth {
|
||||
fn from(credential: Credential) -> Self {
|
||||
let token_value = credential.voucher_value();
|
||||
let bandwidth_bytes = token_value * network_defaults::BYTES_PER_UTOKEN;
|
||||
let bandwidth_bytes = token_value * nym_network_defaults::BYTES_PER_UTOKEN;
|
||||
Bandwidth {
|
||||
value: bandwidth_bytes,
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use bandwidth_claim_contract::msg::ExecuteMsg;
|
||||
use bandwidth_claim_contract::payment::LinkPaymentData;
|
||||
use credentials::token::bandwidth::TokenCredential;
|
||||
use nym_crypto::asymmetric::identity::{PublicKey, Signature, SIGNATURE_LENGTH};
|
||||
use network_defaults::{ETH_EVENT_NAME, ETH_MIN_BLOCK_DEPTH};
|
||||
use nym_network_defaults::{ETH_EVENT_NAME, ETH_MIN_BLOCK_DEPTH};
|
||||
use std::str::FromStr;
|
||||
use validator_client::nxmd::traits::MixnetQueryClient;
|
||||
use validator_client::nyxd::{AccountId, NyxdClient, SigningNyxdClient};
|
||||
|
||||
@@ -16,8 +16,8 @@ use crate::{commands::sign::load_identity_keys, OutputFormat};
|
||||
use colored::Colorize;
|
||||
use log::*;
|
||||
use mixnet_client::forwarder::{MixForwardingSender, PacketForwarder};
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use nym_task::{TaskClient, TaskManager};
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::thread_rng;
|
||||
|
||||
Generated
+17
-17
@@ -775,7 +775,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
@@ -1948,8 +1948,8 @@ dependencies = [
|
||||
"getrandom 0.2.8",
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"network-defaults",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -3343,19 +3343,6 @@ dependencies = [
|
||||
"jni-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "new_debug_unreachable"
|
||||
version = "1.0.4"
|
||||
@@ -3612,6 +3599,19 @@ dependencies = [
|
||||
"time 0.3.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-pemstore"
|
||||
version = "0.1.0"
|
||||
@@ -3635,9 +3635,9 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"network-defaults",
|
||||
"nym-bin-common",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -6779,10 +6779,10 @@ dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"network-defaults",
|
||||
"nym-api-requests",
|
||||
"nym-contracts-common",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
"prost",
|
||||
|
||||
Generated
+16
-16
@@ -686,7 +686,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"network-defaults",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
@@ -2809,19 +2809,6 @@ dependencies = [
|
||||
"jni-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "new_debug_unreachable"
|
||||
version = "1.0.4"
|
||||
@@ -2981,6 +2968,19 @@ dependencies = [
|
||||
"ts-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"dotenv",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-pemstore"
|
||||
version = "0.1.0"
|
||||
@@ -3063,8 +3063,8 @@ dependencies = [
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"hex-literal",
|
||||
"network-defaults",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-types",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
@@ -5576,10 +5576,10 @@ dependencies = [
|
||||
"itertools",
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"network-defaults",
|
||||
"nym-api-requests",
|
||||
"nym-contracts-common",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
"prost",
|
||||
|
||||
@@ -15,7 +15,7 @@ cosmwasm-std = "1.0.0-beta8"
|
||||
cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" }
|
||||
|
||||
config = { path = "../../common/config" }
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
validator-client = { path = "../../common/client-libs/validator-client", features = [
|
||||
"nyxd-client",
|
||||
|
||||
@@ -94,7 +94,7 @@ fn parse_optional_str(raw: &str) -> Option<String> {
|
||||
}
|
||||
|
||||
mod sandbox {
|
||||
use network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDetails};
|
||||
use nym_network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDetails};
|
||||
|
||||
use super::parse_optional_str;
|
||||
|
||||
@@ -129,8 +129,8 @@ mod sandbox {
|
||||
)]
|
||||
}
|
||||
|
||||
pub(crate) fn network_details() -> network_defaults::NymNetworkDetails {
|
||||
network_defaults::NymNetworkDetails {
|
||||
pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails {
|
||||
nym_network_defaults::NymNetworkDetails {
|
||||
chain_details: ChainDetails {
|
||||
bech32_account_prefix: BECH32_PREFIX.to_string(),
|
||||
mix_denom: MIX_DENOM.into(),
|
||||
@@ -155,7 +155,7 @@ mod sandbox {
|
||||
}
|
||||
|
||||
mod qa {
|
||||
use network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDetails};
|
||||
use nym_network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDetails};
|
||||
|
||||
use super::parse_optional_str;
|
||||
|
||||
@@ -190,8 +190,8 @@ mod qa {
|
||||
)]
|
||||
}
|
||||
|
||||
pub(crate) fn network_details() -> network_defaults::NymNetworkDetails {
|
||||
network_defaults::NymNetworkDetails {
|
||||
pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails {
|
||||
nym_network_defaults::NymNetworkDetails {
|
||||
chain_details: ChainDetails {
|
||||
bech32_account_prefix: BECH32_PREFIX.to_string(),
|
||||
mix_denom: MIX_DENOM.into(),
|
||||
|
||||
@@ -10,7 +10,7 @@ client-core = { path = "../../../clients/client-core", features = ["fs-surb-stor
|
||||
nym-crypto = { path = "../../../common/crypto" }
|
||||
gateway-client = { path = "../../../common/client-libs/gateway-client" }
|
||||
gateway-requests = { path = "../../../gateway/gateway-requests" }
|
||||
network-defaults = { path = "../../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../../common/network-defaults" }
|
||||
nym-sphinx = { path = "../../../common/nymsphinx" }
|
||||
nym-task = { path = "../../../common/task" }
|
||||
validator-client = { path = "../../../common/client-libs/validator-client", features = ["nyxd-client"] }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use client_core::config::DebugConfig;
|
||||
use network_defaults::mainnet;
|
||||
use nym_network_defaults::mainnet;
|
||||
use url::Url;
|
||||
|
||||
/// Config struct for [`crate::mixnet::MixnetClient`]
|
||||
|
||||
@@ -35,7 +35,7 @@ client-core = { path = "../../clients/client-core" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
nym-bin-common = { path = "../../common/bin-common"}
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-sdk = { path = "../../sdk/rust/nym-sdk" }
|
||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||
ordered-buffer = {path = "../../common/socks5/ordered-buffer"}
|
||||
|
||||
@@ -67,13 +67,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
network_defaults::var_names::NYM_API,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
network_defaults::var_names::NYXD,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use clap::{crate_name, crate_version, Parser};
|
||||
use network_defaults::setup_env;
|
||||
use nym_bin_common::logging::{banner, setup_logging};
|
||||
use nym_network_defaults::setup_env;
|
||||
|
||||
use error::NetworkRequesterError;
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ tap = "1"
|
||||
nym-cli-commands = { path = "../../common/commands" }
|
||||
nym-bin-common = { path = "../../common/bin-common"}
|
||||
validator-client = { path = "../../common/client-libs/validator-client", features = ["nyxd-client"] }
|
||||
network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_query_client, create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use validator_client::nyxd::AccountId;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::create_query_client;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
block: nym_cli_commands::validator::block::Block,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) mod generators;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{
|
||||
create_signing_client, create_signing_client_with_nym_api, ClientArgs,
|
||||
};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) mod rewards;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
global_args: ClientArgs,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::ClientArgs;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) mod delegators;
|
||||
pub(crate) mod operators;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
global_args: ClientArgs,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) mod keys;
|
||||
pub(crate) mod rewards;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
global_args: ClientArgs,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
global_args: ClientArgs,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::ClientArgs;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) mod gateways;
|
||||
pub(crate) mod mixnodes;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::create_query_client_with_nym_api;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
query: nym_cli_commands::validator::mixnet::query::MixnetQuery,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::create_query_client;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
signature: nym_cli_commands::validator::signature::Signature,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::create_query_client;
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
transactions: nym_cli_commands::validator::transactions::Transactions,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use network_defaults::NymNetworkDetails;
|
||||
use nym_cli_commands::context::{create_query_client, create_signing_client, ClientArgs};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
|
||||
pub(crate) async fn execute(
|
||||
global_args: ClientArgs,
|
||||
|
||||
Reference in New Issue
Block a user