Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🎸 rm lend-market from runtime #1047

Merged
merged 1 commit into from
Sep 15, 2023
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
8 changes: 0 additions & 8 deletions Cargo.lock

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

6 changes: 1 addition & 5 deletions node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ use bifrost_stable_pool_rpc_api::{StablePoolRpc, StablePoolRpcApiServer};
use bifrost_stable_pool_rpc_runtime_api::StablePoolRuntimeApi;
use bifrost_ve_minting_rpc_api::{VeMintingRpc, VeMintingRpcApiServer};
use bifrost_ve_minting_rpc_runtime_api::VeMintingRuntimeApi;
use lend_market_rpc::{LendMarket, LendMarketApiServer};
use lend_market_rpc_runtime_api::LendMarketApi;
use node_primitives::{AccountId, Balance, Block, CurrencyId, Nonce, ParaId, PoolId};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use sc_rpc_api::DenyUnsafe;
Expand Down Expand Up @@ -88,7 +86,6 @@ where
C::Api: FeeRuntimeApi<Block, AccountId>,
C::Api: SalpRuntimeApi<Block, ParaId, AccountId>,
C::Api: StablePoolRuntimeApi<Block>,
C::Api: LendMarketApi<Block, AccountId, Balance>,
C::Api: ZenlinkProtocolRuntimeApi<Block, AccountId, AssetId>,
C::Api:
zenlink_stable_amm_runtime_api::StableAmmApi<Block, CurrencyId, Balance, AccountId, PoolId>,
Expand All @@ -106,8 +103,7 @@ where
module.merge(SalpRpc::new(client.clone()).into_rpc())?;
module.merge(ZenlinkProtocol::new(client.clone()).into_rpc())?;
module.merge(StableAmm::new(client.clone()).into_rpc())?;
module.merge(StablePoolRpc::new(client.clone()).into_rpc())?;
module.merge(LendMarket::new(client.clone()).into_rpc())?;
module.merge(StablePoolRpc::new(client).into_rpc())?;

Ok(module)
}
Expand Down
24 changes: 3 additions & 21 deletions node/service/src/chain_spec/bifrost_kusama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ use std::{
use bifrost_kusama_runtime::{
constants::currency::DOLLARS, AccountId, AssetRegistryConfig, Balance, BalancesConfig,
BlockNumber, CouncilConfig, CouncilMembershipConfig, DefaultBlocksPerRound, DemocracyConfig,
GenesisConfig, IndicesConfig, InflationInfo, OracleMembershipConfig, ParachainInfoConfig,
ParachainStakingConfig, PolkadotXcmConfig, Range, SS58Prefix, SalpConfig, SessionConfig,
SystemConfig, TechnicalCommitteeConfig, TechnicalMembershipConfig, TokensConfig, VestingConfig,
WASM_BINARY,
GenesisConfig, IndicesConfig, InflationInfo, ParachainInfoConfig, ParachainStakingConfig,
PolkadotXcmConfig, Range, SS58Prefix, SalpConfig, SessionConfig, SystemConfig,
TechnicalCommitteeConfig, TechnicalMembershipConfig, TokensConfig, VestingConfig, WASM_BINARY,
};
use bifrost_runtime_common::AuraId;
use cumulus_primitives_core::ParaId;
Expand Down Expand Up @@ -129,7 +128,6 @@ pub fn bifrost_genesis(
Vec<CurrencyId>,
Vec<(CurrencyId, u32, u32, u32)>,
),
oracle_membership: Vec<AccountId>,
) -> GenesisConfig {
GenesisConfig {
system: SystemConfig {
Expand All @@ -146,10 +144,6 @@ pub fn bifrost_genesis(
members: technical_committee_membership.try_into().expect("convert error!"),
phantom: Default::default(),
},
oracle_membership: OracleMembershipConfig {
members: oracle_membership.try_into().expect("convert error!"),
phantom: Default::default(),
},
council: CouncilConfig { members: vec![], phantom: Default::default() },
technical_committee: TechnicalCommitteeConfig {
members: vec![],
Expand Down Expand Up @@ -222,7 +216,6 @@ fn development_config_genesis(id: ParaId) -> GenesisConfig {

let council_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let technical_committee_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let oracle_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];

let salp_multisig: AccountId =
hex!["49daa32c7287890f38b7e1a8cd2961723d36d20baa0bf3b82e0c4bdda93b1c0a"].into();
Expand All @@ -242,7 +235,6 @@ fn development_config_genesis(id: ParaId) -> GenesisConfig {
technical_committee_membership,
salp_multisig,
(vec![], vec![], vec![]),
oracle_membership,
)
}

Expand Down Expand Up @@ -312,7 +304,6 @@ fn local_config_genesis(id: ParaId) -> GenesisConfig {

let council_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let technical_committee_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let oracle_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let salp_multisig: AccountId =
hex!["49daa32c7287890f38b7e1a8cd2961723d36d20baa0bf3b82e0c4bdda93b1c0a"].into();

Expand Down Expand Up @@ -379,7 +370,6 @@ fn local_config_genesis(id: ParaId) -> GenesisConfig {
technical_committee_membership,
salp_multisig,
(currency, vcurrency, vsbond),
oracle_membership,
)
}

Expand Down Expand Up @@ -455,10 +445,6 @@ fn rococo_testnet_config_genesis(id: ParaId) -> GenesisConfig {
// dDWnEWnx3GUgfugXh9mZtgj4CvJdmd8naYkWYCZGxjfb1Cz
hex!["420398e0150cd9d417fb8fd4027b75bd42717262e6eac97c55f2f8f84e8ffb3f"].into(),
];
let oracle_membership = vec![
// dDWnEWnx3GUgfugXh9mZtgj4CvJdmd8naYkWYCZGxjfb1Cz
hex!["420398e0150cd9d417fb8fd4027b75bd42717262e6eac97c55f2f8f84e8ffb3f"].into(),
];

bifrost_genesis(
invulnerables,
Expand All @@ -478,7 +464,6 @@ fn rococo_testnet_config_genesis(id: ParaId) -> GenesisConfig {
vec![],
vec![],
),
oracle_membership,
)
}

Expand Down Expand Up @@ -518,7 +503,6 @@ fn rococo_local_config_genesis(id: ParaId) -> GenesisConfig {

let council_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let technical_committee_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let oracle_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];

bifrost_genesis(
vec![
Expand All @@ -542,7 +526,6 @@ fn rococo_local_config_genesis(id: ParaId) -> GenesisConfig {
technical_committee_membership,
salp_multisig,
(vec![(Token(DOT), 100_000_000, None), (Token(KSM), 10_000_000, None)], vec![], vec![]),
oracle_membership,
)
}

Expand Down Expand Up @@ -659,7 +642,6 @@ fn bifrost_config_genesis(id: ParaId) -> GenesisConfig {
vec![], // technical committee membership
salp_multisig,
(vec![], vec![], vec![]),
vec![],
)
}

Expand Down
15 changes: 2 additions & 13 deletions node/service/src/chain_spec/bifrost_polkadot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
use bifrost_polkadot_runtime::{
constants::currency::DOLLARS, AccountId, AssetRegistryConfig, Balance, BalancesConfig,
BlockNumber, CollatorSelectionConfig, CouncilMembershipConfig, GenesisConfig, IndicesConfig,
OracleMembershipConfig, ParachainInfoConfig, PolkadotXcmConfig, SS58Prefix, SalpConfig,
SessionConfig, SystemConfig, TechnicalMembershipConfig, TokensConfig, VestingConfig,
WASM_BINARY,
ParachainInfoConfig, PolkadotXcmConfig, SS58Prefix, SalpConfig, SessionConfig, SystemConfig,
TechnicalMembershipConfig, TokensConfig, VestingConfig, WASM_BINARY,
};
use bifrost_runtime_common::AuraId;
use cumulus_primitives_core::ParaId;
Expand Down Expand Up @@ -84,7 +83,6 @@ pub fn bifrost_polkadot_genesis(
Vec<CurrencyId>,
Vec<(CurrencyId, u32, u32, u32)>,
),
oracle_membership: Vec<AccountId>,
) -> GenesisConfig {
GenesisConfig {
system: SystemConfig {
Expand All @@ -101,10 +99,6 @@ pub fn bifrost_polkadot_genesis(
members: technical_committee_membership.try_into().expect("convert error!"),
phantom: Default::default(),
},
oracle_membership: OracleMembershipConfig {
members: oracle_membership.try_into().expect("convert error!"),
phantom: Default::default(),
},
council: Default::default(),
technical_committee: Default::default(),
treasury: Default::default(),
Expand Down Expand Up @@ -162,7 +156,6 @@ fn development_config_genesis(id: ParaId) -> GenesisConfig {

let council_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let technical_committee_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let oracle_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let salp_multisig: AccountId =
hex!["49daa32c7287890f38b7e1a8cd2961723d36d20baa0bf3b82e0c4bdda93b1c0a"].into();

Expand All @@ -179,7 +172,6 @@ fn development_config_genesis(id: ParaId) -> GenesisConfig {
technical_committee_membership,
salp_multisig,
(vec![], vec![], vec![]),
oracle_membership,
)
}

Expand Down Expand Up @@ -227,7 +219,6 @@ fn local_config_genesis(id: ParaId) -> GenesisConfig {
.collect();
let council_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let technical_committee_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let oracle_membership = vec![get_account_id_from_seed::<sr25519::Public>("Alice")];
let salp_multisig: AccountId =
hex!["49daa32c7287890f38b7e1a8cd2961723d36d20baa0bf3b82e0c4bdda93b1c0a"].into();
let currency = vec![
Expand Down Expand Up @@ -256,7 +247,6 @@ fn local_config_genesis(id: ParaId) -> GenesisConfig {
technical_committee_membership,
salp_multisig,
(currency, vcurrency, vec![]),
oracle_membership,
)
}

Expand Down Expand Up @@ -331,6 +321,5 @@ fn bifrost_polkadot_config_genesis(id: ParaId) -> GenesisConfig {
vec![],
salp_multisig,
(vec![], vec![], vec![]),
vec![],
)
}
12 changes: 0 additions & 12 deletions runtime/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ bifrost-slpx = { path = "../../pallets/slpx", default-features = false }
bifrost-stable-pool = { path = "../../pallets/stable-pool", default-features = false }
bifrost-stable-pool-rpc-runtime-api = { path = "../../pallets/stable-pool/rpc/runtime-api", default-features = false }
bifrost-currencies = { workspace = true }
lend-market = { path = "../../pallets/lend-market", default-features = false }
lend-market-rpc-runtime-api = { path = "../../pallets/lend-market/rpc/runtime-api", default-features = false }
pallet-prices = { path = "../../pallets/prices", default-features = false }
bifrost-vtoken-voting = { path = "../../pallets/vtoken-voting", default-features = false, features = [ "kusama" ] }

# orml
Expand All @@ -131,7 +128,6 @@ orml-xtokens = { version = "0.4.1-dev", default-features = false }
orml-unknown-tokens = { version = "0.4.1-dev", default-features = false }
orml-xcm = { version = "0.4.1-dev", default-features = false }
orml-xcm-support = { version = "0.4.1-dev", default-features = false }
orml-oracle = { version = "0.4.1-dev", default-features = false }

merkle-distributor = { version = "*", default-features = false }
zenlink-protocol = { version = "*", default-features = false }
Expand Down Expand Up @@ -214,7 +210,6 @@ std = [
"orml-unknown-tokens/std",
"orml-xcm/std",
"orml-xcm-support/std",
"orml-oracle/std",
"nutsfinance-stable-asset/std",
"bifrost-runtime-common/std",
"bifrost-farming/std",
Expand All @@ -236,9 +231,6 @@ std = [
"bifrost-slpx/std",
"bifrost-stable-pool/std",
"bifrost-stable-pool-rpc-runtime-api/std",
"lend-market/std",
"lend-market-rpc-runtime-api/std",
"pallet-prices/std",
"bifrost-vtoken-voting/std",
"zenlink-protocol/std",
"zenlink-protocol-runtime-api/std",
Expand Down Expand Up @@ -293,7 +285,6 @@ runtime-benchmarks = [
"bifrost-slpx/runtime-benchmarks",
"bifrost-stable-pool/runtime-benchmarks",
"bifrost-vtoken-voting/runtime-benchmarks",
"lend-market/runtime-benchmarks",
]

try-runtime = [
Expand Down Expand Up @@ -339,7 +330,6 @@ try-runtime = [
"bifrost-currencies/try-runtime",
"orml-unknown-tokens/try-runtime",
"orml-xcm/try-runtime",
"orml-oracle/try-runtime",
"zenlink-protocol/try-runtime",
"merkle-distributor/try-runtime",
"zenlink-stable-amm/try-runtime",
Expand All @@ -362,8 +352,6 @@ try-runtime = [
"bifrost-slpx/try-runtime",
"nutsfinance-stable-asset/try-runtime",
"bifrost-stable-pool/try-runtime",
"lend-market/try-runtime",
"pallet-prices/try-runtime",
"bifrost-vtoken-voting/try-runtime",
]

Expand Down
Loading