Tidy up commented lines, unnecessary imports
This commit is contained in:
Generated
-1
@@ -3734,7 +3734,6 @@ name = "network-defaults"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cosmrs",
|
||||
"hex-literal",
|
||||
"once_cell",
|
||||
"serde",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use config::defaults::DENOM;
|
||||
use cosmwasm_std::{Coin, Timestamp};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -9,7 +9,7 @@ pub mod events;
|
||||
pub mod messages;
|
||||
|
||||
pub fn one_ucoin() -> Coin {
|
||||
Coin::new(1, config::defaults::DENOM)
|
||||
Coin::new(1, DENOM)
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
|
||||
|
||||
@@ -8,7 +8,6 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
cfg-if = "1.0.0"
|
||||
cosmrs = { version = "0.4.1", features = [ "bip32", "cosmwasm" ]}
|
||||
hex-literal = "0.3.3"
|
||||
once_cell = "1.7.2"
|
||||
serde = {version = "1.0", features = ["derive"]}
|
||||
|
||||
@@ -118,7 +118,6 @@ pub struct SupportedNetworks {
|
||||
|
||||
impl SupportedNetworks {
|
||||
pub fn new(support: Vec<Network>) -> Self {
|
||||
// let mut networks: HashMap<Network, NetworkDetails> = HashMap::new();
|
||||
let mut networks = HashMap::new();
|
||||
|
||||
for network in support {
|
||||
|
||||
@@ -11,8 +11,9 @@ pub mod mainnet;
|
||||
pub mod qa;
|
||||
pub mod sandbox;
|
||||
|
||||
// Thes set of defaults that are decided at compile time
|
||||
// Keep DENOM around mostly for use in contracts. (TODO: consider moving it there?)
|
||||
// The set of defaults that are decided at compile time. Ideally we want to reduce these to a
|
||||
// minimum.
|
||||
// Keep DENOM around mostly for use in contracts. (TODO: consider moving it there, or renaming?)
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(network = "mainnet")] {
|
||||
pub const DEFAULT_NETWORK: all::Network = all::Network::MAINNET;
|
||||
|
||||
@@ -3,7 +3,6 @@ use validator_client::nymd::QueryNymdClient;
|
||||
|
||||
pub(crate) fn new_nymd_client() -> validator_client::Client<QueryNymdClient> {
|
||||
let network = DEFAULT_NETWORK;
|
||||
// WIP(JON): remove me, should pick up from network variable passed as first argument
|
||||
let mixnet_contract = network.mixnet_contract_address().to_string();
|
||||
let nymd_url = default_nymd_endpoints()[0].clone();
|
||||
let api_url = default_api_endpoints()[0].clone();
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
use bip39::core::str::FromStr;
|
||||
use bip39::Mnemonic;
|
||||
use config::defaults::DEFAULT_NETWORK;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::thread_rng;
|
||||
use url::Url;
|
||||
@@ -38,18 +39,12 @@ impl ERC20Bridge {
|
||||
.expect("The list of validators is empty");
|
||||
let mnemonic =
|
||||
Mnemonic::from_str(&cosmos_mnemonic).expect("Invalid Cosmos mnemonic provided");
|
||||
let default_network = config::defaults::DEFAULT_NETWORK;
|
||||
let nymd_client = NymdClient::connect_with_mnemonic(
|
||||
default_network,
|
||||
// config::defaults::DEFAULT_NETWORK,
|
||||
DEFAULT_NETWORK,
|
||||
nymd_url.as_ref(),
|
||||
// AccountId::from_str(DEFAULT_MIXNET_CONTRACT_ADDRESS).ok(),
|
||||
// WIP(JON): remove me, overriding default with default is not needed
|
||||
AccountId::from_str(default_network.mixnet_contract_address()).ok(),
|
||||
// Some(default_network.mixnet_contract_address().clone()),
|
||||
AccountId::from_str(DEFAULT_NETWORK.mixnet_contract_address()).ok(),
|
||||
None,
|
||||
// AccountId::from_str(DEFAULT_BANDWIDTH_CLAIM_CONTRACT_ADDRESS).ok(),
|
||||
AccountId::from_str(default_network.bandwidth_claim_contract_address()).ok(),
|
||||
AccountId::from_str(DEFAULT_NETWORK.bandwidth_claim_contract_address()).ok(),
|
||||
mnemonic,
|
||||
None,
|
||||
)
|
||||
|
||||
@@ -97,7 +97,6 @@ impl Default for Base {
|
||||
local_validator: DEFAULT_LOCAL_VALIDATOR
|
||||
.parse()
|
||||
.expect("default local validator is malformed!"),
|
||||
// mixnet_contract_address: DEFAULT_MIXNET_CONTRACT_ADDRESS.to_string(),
|
||||
mixnet_contract_address: DEFAULT_NETWORK.mixnet_contract_address().to_string(),
|
||||
#[cfg(feature = "coconut")]
|
||||
keypair_bs58: String::default(),
|
||||
|
||||
Reference in New Issue
Block a user