Skip to content

Commit

Permalink
pub re-exporting some crates
Browse files Browse the repository at this point in the history
  • Loading branch information
batconjurer committed Sep 5, 2024
1 parent 641a85b commit aa2cf20
Show file tree
Hide file tree
Showing 25 changed files with 99 additions and 93 deletions.
6 changes: 0 additions & 6 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion crates/apps_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namada-eth-bridge = [

[dependencies]
namada_core = {path = "../core"}
namada_io = { path = "../io" }
namada_macros = {path = "../macros"}
namada_migrations = {path = "../migrations", optional = true}
namada_sdk = {path = "../sdk", features = ["download-params", "multicore"]}
Expand Down
6 changes: 3 additions & 3 deletions crates/apps_lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod wallet;

use clap::{ArgGroup, ArgMatches, ColorChoice};
use color_eyre::eyre::Result;
use namada_io::StdIo;
use namada_sdk::io::StdIo;
use utils::*;
pub use utils::{safe_exit, Cmd};

Expand Down Expand Up @@ -3220,6 +3220,7 @@ pub mod args {
use std::str::FromStr;

use data_encoding::HEXUPPER;
use namada_core::masp::{MaspEpoch, PaymentAddress};
use namada_sdk::address::{Address, EstablishedAddress};
pub use namada_sdk::args::*;
use namada_sdk::chain::{ChainId, ChainIdPrefix};
Expand All @@ -3230,6 +3231,7 @@ pub mod args {
use namada_sdk::ibc::core::host::types::identifiers::{ChannelId, PortId};
use namada_sdk::keccak::KeccakHash;
use namada_sdk::key::*;
use namada_sdk::masp::utils::RetryStrategy;
use namada_sdk::storage::{self, BlockHeight, Epoch};
use namada_sdk::time::DateTimeUtc;
use namada_sdk::token::NATIVE_MAX_DECIMAL_PLACES;
Expand All @@ -3246,8 +3248,6 @@ pub mod args {
VP_USER_WASM,
};
use namada_sdk::{token, DEFAULT_GAS_LIMIT};
use namada_token::masp::utils::RetryStrategy;
use namada_token::masp::{MaspEpoch, PaymentAddress};

use super::context::*;
use super::utils::*;
Expand Down
2 changes: 1 addition & 1 deletion crates/apps_lib/src/cli/api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use namada_io::{Client, Io};
use namada_sdk::error::Error;
use namada_sdk::io::{Client, Io};
use namada_sdk::rpc::wait_until_node_is_synched;

use crate::tendermint_rpc::client::CompatMode;
Expand Down
2 changes: 1 addition & 1 deletion crates/apps_lib/src/cli/client.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::io::Read;

use color_eyre::eyre::Result;
use namada_io::{display_line, Io, NamadaIo};
use namada_sdk::io::{display_line, Io, NamadaIo};
use namada_sdk::masp::ShieldedContext;
use namada_sdk::{Namada, NamadaImpl};

Expand Down
12 changes: 8 additions & 4 deletions crates/apps_lib/src/cli/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ use std::path::{Path, PathBuf};
use std::str::FromStr;

use color_eyre::eyre::Result;
use namada_io::Io;
use namada_core::masp::{
BalanceOwner, ExtendedSpendingKey, ExtendedViewingKey, PaymentAddress,
TransferSource, TransferTarget,
};
use namada_sdk::address::{Address, InternalAddress};
use namada_sdk::chain::ChainId;
use namada_sdk::ethereum_events::EthAddress;
use namada_sdk::ibc::trace::{ibc_token, is_ibc_denom, is_nft_trace};
use namada_sdk::io::Io;
use namada_sdk::key::*;
use namada_sdk::masp::fs::FsShieldedUtils;
use namada_sdk::masp::ShieldedWallet;
use namada_sdk::wallet::{DatedSpendingKey, DatedViewingKey, Wallet};
use namada_sdk::{Namada, NamadaImpl};
use namada_token::masp::fs::FsShieldedUtils;
use namada_token::masp::{ShieldedWallet, *};

use super::args;
use crate::cli::utils;
Expand Down Expand Up @@ -231,7 +235,7 @@ impl Context {
/// Make an implementation of Namada from this object and parameters.
pub fn to_sdk<C, IO>(self, client: C, io: IO) -> impl Namada
where
C: namada_io::Client + Sync,
C: namada_sdk::io::Client + Sync,
IO: Io,
{
let chain_ctx = self.take_chain_or_exit();
Expand Down
4 changes: 2 additions & 2 deletions crates/apps_lib/src/cli/relayer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use color_eyre::eyre::Result;
use namada_io::Io;
use namada_sdk::io::Io;

use crate::cli;
use crate::cli::api::{CliApi, CliClient};
Expand All @@ -14,7 +14,7 @@ impl CliApi {
where
C: CliClient,
{
use namada_io::display_line;
use namada_sdk::io::display_line;

display_line!(&io, "The Namada Ethereum bridge is disabled");
Ok(())
Expand Down
7 changes: 3 additions & 4 deletions crates/apps_lib/src/cli/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ use color_eyre::eyre::Result;
use itertools::sorted;
use ledger_namada_rs::{BIP44Path, NamadaApp};
use namada_core::chain::BlockHeight;
use namada_io::{display_line, edisplay_line, Io};
use namada_core::masp::{ExtendedSpendingKey, MaspValue, PaymentAddress};
use namada_sdk::address::{Address, DecodeError};
use namada_sdk::io::{display_line, edisplay_line, Io};
use namada_sdk::key::*;
use namada_sdk::masp::find_valid_diversifier;
use namada_sdk::wallet::{
DecryptionError, DerivationPath, DerivationPathError, FindKeyError, Wallet,
};
use namada_token::masp::{
find_valid_diversifier, ExtendedSpendingKey, MaspValue, PaymentAddress,
};
use rand_core::OsRng;

use crate::cli;
Expand Down
12 changes: 7 additions & 5 deletions crates/apps_lib/src/client/masp.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
use std::time::Duration;

use color_eyre::owo_colors::OwoColorize;
#[cfg(any(test, feature = "testing"))]
use namada_io::DevNullProgressBar;
use namada_io::{display, display_line, Client, Io, MaybeSend, MaybeSync};
use namada_sdk::args::ShieldedSync;
use namada_sdk::control_flow::install_shutdown_signal;
use namada_sdk::error::Error;
use namada_sdk::masp::{IndexerMaspClient, LedgerMaspClient, ShieldedContext};
use namada_token::masp::{MaspLocalTaskEnv, ShieldedSyncConfig, ShieldedUtils};
#[cfg(any(test, feature = "testing"))]
use namada_sdk::io::DevNullProgressBar;
use namada_sdk::io::{display, display_line, Client, Io, MaybeSend, MaybeSync};
use namada_sdk::masp::{
IndexerMaspClient, LedgerMaspClient, MaspLocalTaskEnv, ShieldedContext,
ShieldedSyncConfig, ShieldedUtils,
};

#[allow(clippy::too_many_arguments)]
pub async fn syncing<
Expand Down
7 changes: 4 additions & 3 deletions crates/apps_lib/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use masp_primitives::merkle_tree::MerklePath;
use masp_primitives::sapling::Node;
use masp_primitives::transaction::components::I128Sum;
use masp_primitives::zip32::ExtendedFullViewingKey;
use namada_io::{display, display_line, edisplay_line, Client, Io};
use namada_core::masp::{BalanceOwner, MaspEpoch};
use namada_sdk::address::{Address, InternalAddress, MASP};
use namada_sdk::chain::{BlockHeight, Epoch};
use namada_sdk::collections::{HashMap, HashSet};
Expand All @@ -26,7 +26,10 @@ use namada_sdk::governance::storage::proposal::{
use namada_sdk::governance::utils::{ProposalVotes, VotePower};
use namada_sdk::governance::ProposalVote;
use namada_sdk::hash::Hash;
use namada_sdk::io::{display, display_line, edisplay_line, Client, Io};
use namada_sdk::key::*;
use namada_sdk::masp::shielded_wallet::ShieldedApi;
use namada_sdk::masp::MaspTokenRewardData;
use namada_sdk::parameters::{storage as param_storage, EpochDuration};
use namada_sdk::proof_of_stake::types::{
CommissionPair, Slash, ValidatorMetaData, ValidatorState,
Expand All @@ -44,8 +47,6 @@ use namada_sdk::token::MaspDigitPos;
use namada_sdk::tx::display_batch_resp;
use namada_sdk::wallet::AddressVpType;
use namada_sdk::{error, state as storage, token, Namada};
use namada_token::masp::shielded_wallet::ShieldedApi;
use namada_token::masp::{BalanceOwner, MaspEpoch, MaspTokenRewardData};

use crate::cli::{self, args};
use crate::tendermint::merkle::proof::ProofOps;
Expand Down
Loading

0 comments on commit aa2cf20

Please sign in to comment.