Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions Cargo.lock

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

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ default-members = [
"zrml/court",
"zrml/hybrid-router",
"zrml/global-disputes",
"zrml/liquidity-mining",
"zrml/market-commons",
"zrml/neo-swaps",
"zrml/orderbook",
Expand All @@ -37,7 +36,6 @@ members = [
"zrml/court",
"zrml/hybrid-router",
"zrml/global-disputes",
"zrml/liquidity-mining",
"zrml/market-commons",
"zrml/neo-swaps",
"zrml/orderbook",
Expand Down Expand Up @@ -242,7 +240,6 @@ zrml-authorized = { path = "zrml/authorized", default-features = false }
zrml-court = { path = "zrml/court", default-features = false }
zrml-global-disputes = { path = "zrml/global-disputes", default-features = false }
zrml-hybrid-router = { path = "zrml/hybrid-router", default-features = false }
zrml-liquidity-mining = { path = "zrml/liquidity-mining", default-features = false }
zrml-market-commons = { path = "zrml/market-commons", default-features = false }
zrml-neo-swaps = { path = "zrml/neo-swaps", default-features = false }
zrml-orderbook = { path = "zrml/orderbook", default-features = false }
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog_for_devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ As of 0.3.9, the changelog's format is based on
components which query the chain's storage, the extrinsics or the runtime
APIs/RPC interface.

## v0.5.4

- ⚠️ Remove zrml-liquidity-mining from code base.

## v0.5.2

[#1310]: https://github.com/zeitgeistpm/zeitgeist/pull/1310
Expand Down
1 change: 0 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ url = { workspace = true }
battery-station-runtime = { workspace = true, optional = true }
zeitgeist-primitives = { workspace = true, features = ["default"] }
zeitgeist-runtime = { workspace = true, optional = true }
zrml-liquidity-mining = { workspace = true, features = ["default"] }
zrml-swaps-rpc = { workspace = true }

[features]
Expand Down
10 changes: 2 additions & 8 deletions node/src/chain_spec/battery_station.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
Expand All @@ -24,13 +24,7 @@ use battery_station_runtime::parameters::SS58Prefix;
use hex_literal::hex;
use sc_service::ChainType;
use sp_core::crypto::UncheckedInto;
use zeitgeist_primitives::{
constants::{
ztg::{LIQUIDITY_MINING, LIQUIDITY_MINING_PTD},
BASE,
},
types::AccountId,
};
use zeitgeist_primitives::{constants::BASE, types::AccountId};

#[cfg(feature = "parachain")]
use {
Expand Down
7 changes: 2 additions & 5 deletions node/src/chain_spec/dev.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
Expand Down Expand Up @@ -30,10 +30,7 @@ use battery_station_runtime::{
};
use sc_service::ChainType;
use sp_core::sr25519;
use zeitgeist_primitives::{
constants::ztg::{LIQUIDITY_MINING, LIQUIDITY_MINING_PTD},
types::Balance,
};
use zeitgeist_primitives::types::Balance;
#[cfg(feature = "parachain")]
use {
super::battery_station::inflation_config,
Expand Down
6 changes: 1 addition & 5 deletions node/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
Expand Down Expand Up @@ -148,10 +148,6 @@ macro_rules! generate_generic_genesis_function {
grandpa: $runtime::GrandpaConfig {
authorities: acs.initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(),
},
liquidity_mining: $runtime::LiquidityMiningConfig {
initial_balance: LIQUIDITY_MINING,
per_block_distribution: LIQUIDITY_MINING_PTD.mul_ceil(LIQUIDITY_MINING),
},
#[cfg(feature = "parachain")]
parachain_info: $runtime::ParachainInfoConfig { parachain_id: acs.parachain_id },
#[cfg(feature = "parachain")]
Expand Down
4 changes: 1 addition & 3 deletions node/src/chain_spec/zeitgeist.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2023 Forecasting Technologies LTD.
// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
Expand Down Expand Up @@ -27,8 +27,6 @@ use sc_service::ChainType;
use sp_core::crypto::UncheckedInto;
use zeitgeist_runtime::parameters::SS58Prefix;

use zeitgeist_primitives::constants::ztg::{LIQUIDITY_MINING, LIQUIDITY_MINING_PTD};

#[cfg(feature = "parachain")]
use {
super::{generate_inflation_config_function, Extensions},
Expand Down
5 changes: 0 additions & 5 deletions primitives/src/constants/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ parameter_types! {
pub const MaxOrders: u32 = 100;
}

// Liquidity Mining parameters
parameter_types! {
pub const LiquidityMiningPalletId: PalletId = PalletId(*b"zge/lymg");
}

// NeoSwaps
parameter_types! {
pub storage NeoExitFee: Balance = CENT;
Expand Down
8 changes: 1 addition & 7 deletions primitives/src/constants/ztg.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Forecasting Technologies LTD.
// Copyright 2023-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
//
// This file is part of Zeitgeist.
Expand Down Expand Up @@ -26,9 +26,6 @@ pub const COMMUNITY_INCENTIVES: u128 = 2_000_000;
/// Total ZTG amount for collators.
pub const COLLATORS: u128 = 0;

/// Total ZTG amount for liquidity mining.
pub const LIQUIDITY_MINING: u128 = 0;

/// Total ZTG amount for parachain lease.
pub const PARACHAIN_LEASE: u128 = 40_000_000;

Expand Down Expand Up @@ -58,8 +55,5 @@ pub const TOTAL_INITIAL_ZTG: u128 = COMMUNITY_INCENTIVES

// Inflation

/// Perthousand liquidity mining inflation. 0%
pub const LIQUIDITY_MINING_PTD: Perbill = Perbill::from_perthousand(0);

/// Perthousand collator staking inflation. 5%
pub const STAKING_PTD: Perbill = Perbill::from_perthousand(50);
4 changes: 0 additions & 4 deletions runtime/battery-station/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ zrml-authorized = { workspace = true }
zrml-court = { workspace = true }
zrml-global-disputes = { workspace = true, optional = true }
zrml-hybrid-router = { workspace = true }
zrml-liquidity-mining = { workspace = true }
zrml-market-commons = { workspace = true }
zrml-neo-swaps = { workspace = true }
zrml-orderbook = { workspace = true }
Expand Down Expand Up @@ -216,7 +215,6 @@ runtime-benchmarks = [
"zrml-authorized/runtime-benchmarks",
"zrml-court/runtime-benchmarks",
"zrml-hybrid-router/runtime-benchmarks",
"zrml-liquidity-mining/runtime-benchmarks",
"zrml-neo-swaps/runtime-benchmarks",
"zrml-parimutuel/runtime-benchmarks",
"zrml-prediction-markets/runtime-benchmarks",
Expand Down Expand Up @@ -332,7 +330,6 @@ std = [
"zrml-authorized/std",
"zrml-court/std",
"zrml-hybrid-router/std",
"zrml-liquidity-mining/std",
"zrml-market-commons/std",
"zrml-neo-swaps/std",
"zrml-parimutuel/std",
Expand Down Expand Up @@ -391,7 +388,6 @@ try-runtime = [
"zrml-authorized/try-runtime",
"zrml-court/try-runtime",
"zrml-hybrid-router/try-runtime",
"zrml-liquidity-mining/try-runtime",
"zrml-market-commons/try-runtime",
"zrml-neo-swaps/try-runtime",
"zrml-parimutuel/try-runtime",
Expand Down
1 change: 0 additions & 1 deletion runtime/battery-station/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ impl Contains<RuntimeCall> for IsCallable {
_ => true,
},
RuntimeCall::SimpleDisputes(_) => false,
RuntimeCall::LiquidityMining(_) => false,
RuntimeCall::PredictionMarkets(inner_call) => match inner_call {
create_market {
dispute_mechanism: Some(MarketDisputeMechanism::SimpleDisputes),
Expand Down
4 changes: 0 additions & 4 deletions runtime/battery-station/src/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,6 @@ parameter_types! {
/// be another trie item whose value is the size of an account ID plus 32 bytes.
pub const SubAccountDeposit: Balance = deposit(1, 53);

// Liquidity Mining parameters
/// Pallet identifier, mainly used for named balance reserves.
pub const LiquidityMiningPalletId: PalletId = LM_PALLET_ID;

// Multisig
// One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
pub const DepositBase: Balance = deposit(1, 88);
Expand Down
39 changes: 0 additions & 39 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ macro_rules! decl_common_types {
CourtPalletId::get(),
GlobalDisputesPalletId::get(),
HybridRouterPalletId::get(),
LiquidityMiningPalletId::get(),
OrderbookPalletId::get(),
ParimutuelPalletId::get(),
PmPalletId::get(),
Expand Down Expand Up @@ -312,7 +311,6 @@ macro_rules! create_runtime {
MarketCommons: zrml_market_commons::{Pallet, Storage} = 50,
Authorized: zrml_authorized::{Call, Event<T>, Pallet, Storage} = 51,
Court: zrml_court::{Call, Event<T>, Pallet, Storage} = 52,
LiquidityMining: zrml_liquidity_mining::{Call, Config<T>, Event<T>, Pallet, Storage} = 53,
RikiddoSigmoidFeeMarketEma: zrml_rikiddo::<Instance1>::{Pallet, Storage} = 54,
SimpleDisputes: zrml_simple_disputes::{Call, Event<T>, Pallet, Storage} = 55,
Swaps: zrml_swaps::{Call, Event<T>, Pallet, Storage} = 56,
Expand Down Expand Up @@ -1225,42 +1223,12 @@ macro_rules! impl_config_traits {
type WeightInfo = zrml_court::weights::WeightInfo<Runtime>;
}

impl zrml_liquidity_mining::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type MarketCommons = MarketCommons;
type MarketId = MarketId;
type PalletId = LiquidityMiningPalletId;
type WeightInfo = zrml_liquidity_mining::weights::WeightInfo<Runtime>;
}

impl zrml_market_commons::Config for Runtime {
type Balance = Balance;
type MarketId = MarketId;
type Timestamp = Timestamp;
}

// NoopLiquidityMining implements LiquidityMiningPalletApi with no-ops.
// Has to be public because it will be exposed by Runtime.
pub struct NoopLiquidityMining;

impl zrml_liquidity_mining::LiquidityMiningPalletApi for NoopLiquidityMining {
type AccountId = AccountId;
type Balance = Balance;
type BlockNumber = BlockNumber;
type MarketId = MarketId;

fn add_shares(_: Self::AccountId, _: Self::MarketId, _: Self::Balance) {}

fn distribute_market_incentives(
_: &Self::MarketId,
) -> frame_support::pallet_prelude::DispatchResult {
Ok(())
}

fn remove_shares(_: &Self::AccountId, _: &Self::MarketId, _: Self::Balance) {}
}

impl zrml_prediction_markets::Config for Runtime {
type AdvisoryBond = AdvisoryBond;
type AdvisoryBondSlashPercentage = AdvisoryBondSlashPercentage;
Expand All @@ -1283,10 +1251,6 @@ macro_rules! impl_config_traits {
type DisputeBond = DisputeBond;
type RuntimeEvent = RuntimeEvent;
type GlobalDisputes = GlobalDisputes;
// LiquidityMining is currently unstable.
// NoopLiquidityMining will be applied only to mainnet once runtimes are separated.
type LiquidityMining = NoopLiquidityMining;
// type LiquidityMining = LiquidityMining;
type MaxCategories = MaxCategories;
type MaxCreatorFee = MaxCreatorFee;
type MaxDisputes = MaxDisputes;
Expand Down Expand Up @@ -1544,7 +1508,6 @@ macro_rules! create_runtime_api {
list_benchmark!(list, extra, zrml_hybrid_router, HybridRouter);
#[cfg(not(feature = "parachain"))]
list_benchmark!(list, extra, zrml_prediction_markets, PredictionMarkets);
list_benchmark!(list, extra, zrml_liquidity_mining, LiquidityMining);
list_benchmark!(list, extra, zrml_styx, Styx);
list_benchmark!(list, extra, zrml_neo_swaps, NeoSwaps);

Expand Down Expand Up @@ -1650,7 +1613,6 @@ macro_rules! create_runtime_api {
add_benchmark!(params, batches, zrml_hybrid_router, HybridRouter);
#[cfg(not(feature = "parachain"))]
add_benchmark!(params, batches, zrml_prediction_markets, PredictionMarkets);
add_benchmark!(params, batches, zrml_liquidity_mining, LiquidityMining);
add_benchmark!(params, batches, zrml_styx, Styx);
add_benchmark!(params, batches, zrml_neo_swaps, NeoSwaps);

Expand Down Expand Up @@ -2256,7 +2218,6 @@ macro_rules! create_common_tests {

#[test_case(AuthorizedPalletId::get(); "authorized")]
#[test_case(CourtPalletId::get(); "court")]
#[test_case(LiquidityMiningPalletId::get(); "liquidity_mining")]
#[test_case(PmPalletId::get(); "prediction_markets")]
#[test_case(SimpleDisputesPalletId::get(); "simple_disputes")]
#[test_case(SwapsPalletId::get(); "swaps")]
Expand Down
Loading