Skip to content

Commit

Permalink
Feat: Adapt proxy settings (#1922)
Browse files Browse the repository at this point in the history
* feat: adapt proxy settings

* fix: match pattern
  • Loading branch information
mustermeiszer authored Jul 23, 2024
1 parent 59f0d5d commit 4b9c6ab
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 61 deletions.
43 changes: 23 additions & 20 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,26 +623,29 @@ impl InstanceFilter<RuntimeCall> 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!(
Expand Down
43 changes: 23 additions & 20 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,26 +716,29 @@ impl InstanceFilter<RuntimeCall> 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!(
Expand Down
45 changes: 24 additions & 21 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -627,26 +627,29 @@ impl InstanceFilter<RuntimeCall> 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!(
Expand Down

0 comments on commit 4b9c6ab

Please sign in to comment.