pub use pallet_election_provider_multi_phase::{Miner, MinerConfig}; pub use subxt::ext::sp_core; pub use primitives::{AccountId, Header, Hash, Balance}; // pub type AccountId = sp_runtime::AccountId32; // pub type Header = subxt::config::substrate::SubstrateHeader; // pub type Hash = sp_core::H256; // pub type Balance = u128; pub use subxt::ext::sp_runtime::traits::{Block as BlockT, Header as HeaderT}; pub const DEFAULT_URI: &str = "ws://127.0.0.1:9944"; pub const LOG_TARGET: &str = "ghost-staking-miner"; pub const DEFAULT_PROMETHEUS_PORT: u16 = 9999; pub type Pair = sp_core::sr25519::Pair; pub type Accuracy = sp_runtime::Perbill; // TODO: revisit pub type RpcClient = subxt::backend::legacy::LegacyPrcMethods; pub type ChainClient = subxt::OnlineClient; pub type Config = subxt::SubstrateConfig; pub type SignedSubmission = pallet_election_provider_multi_phase::SignedSubmission; #[subxt::subxt( runtime_metadata_path = "artifacts/metadata.scale", derive_for_all_types = "Clone, Debug, Eq, PartialEq", derive_for_type( path = "pallet_election_provider_multi_phase::RoundSnapshot", derive = "Default" ), substitute_type( path = "sp_npos_elections::ElectionScore", with = "::subxt::utils::Static<::sp_npos_elections::ElectionScore>" ), substitute_type( path = "pallet_election_provider_multi_phase::Phase", with = "::subxt::utils::Static<::pallet_election_provider_multi_phase::Phase>" ) )] pub mod runtime {} pub static SHARED_CLIENT: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new();