fedimint_dummy_common/
config.rsuse fedimint_core::core::ModuleKind;
use fedimint_core::encoding::{Decodable, Encodable};
use fedimint_core::{plugin_types_trait_impl_config, Amount};
use serde::{Deserialize, Serialize};
use crate::DummyCommonInit;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DummyGenParams {
pub local: DummyGenParamsLocal,
pub consensus: DummyGenParamsConsensus,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DummyGenParamsLocal;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DummyGenParamsConsensus {
pub tx_fee: Amount,
}
impl Default for DummyGenParams {
fn default() -> Self {
Self {
local: DummyGenParamsLocal,
consensus: DummyGenParamsConsensus {
tx_fee: Amount::ZERO,
},
}
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct DummyConfig {
pub local: DummyConfigLocal,
pub private: DummyConfigPrivate,
pub consensus: DummyConfigConsensus,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Encodable, Decodable, Hash)]
pub struct DummyClientConfig {
pub tx_fee: Amount,
}
#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
pub struct DummyConfigLocal;
#[derive(Clone, Debug, Serialize, Deserialize, Decodable, Encodable)]
pub struct DummyConfigConsensus {
pub tx_fee: Amount,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct DummyConfigPrivate;
plugin_types_trait_impl_config!(
DummyCommonInit,
DummyGenParams,
DummyGenParamsLocal,
DummyGenParamsConsensus,
DummyConfig,
DummyConfigLocal,
DummyConfigPrivate,
DummyConfigConsensus,
DummyClientConfig
);