From acde204845e4271a3f75ecae6610b7c2237ffac5 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Mon, 22 Jul 2024 13:16:17 +0200 Subject: [PATCH 1/3] feat: adapt proxy settings --- runtime/altair/src/lib.rs | 43 ++++++++++++++++++---------------- runtime/centrifuge/src/lib.rs | 43 ++++++++++++++++++---------------- runtime/development/src/lib.rs | 43 ++++++++++++++++++---------------- 3 files changed, 69 insertions(+), 60 deletions(-) diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 1175082155..37e48b1f72 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -623,26 +623,29 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch{..}) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch{..}) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | + // Borrowers should be able to (un)charge fees as part of the borrow flow + RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index cda064c918..d4899ab8c9 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -716,26 +716,29 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | - RuntimeCall::Utility(pallet_utility::Call::batch{..}) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) | + RuntimeCall::Utility(pallet_utility::Call::batch{..}) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | + // Borrowers should be able to (un)charge fees as part of the borrow flow + RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 093b10f001..8bd0d1d978 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -627,26 +627,29 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Loans(pallet_loans::Call::create { .. }) | - RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | - RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | - RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::close { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | - RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | - RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | - RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | - // Borrowers should be able to close and execute an epoch - // in order to get liquidity from repayments in previous epochs. - RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch { .. }) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution { .. }) | - RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch { .. }) | - RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | - RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | - // Borrowers should be able to swap back and forth between local currencies and their variants - RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | - RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) + RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) | + RuntimeCall::Loans(pallet_loans::Call::repay { .. }) | + RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::close { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) | + RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) | + RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) | + RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | + // Borrowers should be able to close and execute an epoch + // in order to get liquidity from repayments in previous epochs. + RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch { .. }) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution { .. }) | + RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) | + RuntimeCall::Utility(pallet_utility::Call::batch { .. }) | + // Borrowers should be able to swap back and forth between local currencies and their variants + RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) | + RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | + // Borrowers should be able to (un)charge fees as part of the borrow flow + RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( From 45374372760806d79fd2906d9b49c30d922c3d77 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Tue, 23 Jul 2024 14:21:21 +0200 Subject: [PATCH 2/3] fix: match pattern --- runtime/altair/src/lib.rs | 2 +- runtime/centrifuge/src/lib.rs | 2 +- runtime/development/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 37e48b1f72..38f421f6fb 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -645,7 +645,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | // Borrowers should be able to (un)charge fees as part of the borrow flow RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | - RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index d4899ab8c9..d82df1207a 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -738,7 +738,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | // Borrowers should be able to (un)charge fees as part of the borrow flow RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | - RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 8bd0d1d978..7db8101636 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -649,7 +649,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..}) | // Borrowers should be able to (un)charge fees as part of the borrow flow RuntimeCall::PoolFees(pallet_pool_fees::Call::charge_fee { .. }) | - RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) | + RuntimeCall::PoolFees(pallet_pool_fees::Call::uncharge_fee { .. }) ) | ProxyType::PodOperation.filter(c) } ProxyType::Invest => matches!( From ee326ba870bf6acee5815a5bdf5bbd5084d9d053 Mon Sep 17 00:00:00 2001 From: Frederik Gartenmeister Date: Tue, 23 Jul 2024 14:35:36 +0200 Subject: [PATCH 3/3] chore: bumb dev spec --- runtime/development/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 7db8101636..ae230fb36e 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -173,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge-devel"), impl_name: create_runtime_str!("centrifuge-devel"), authoring_version: 1, - spec_version: 1300, + spec_version: 1301, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2,