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

Add RestrictedTransfers proxy type #735

Open
hieronx opened this issue Mar 30, 2022 · 4 comments
Open

Add RestrictedTransfers proxy type #735

hieronx opened this issue Mar 30, 2022 · 4 comments
Assignees
Labels
crcl-runtime Circle runtime related. I8-enhancement An additional feature. P2-nice-to-have Issue is worth doing. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase.

Comments

@hieronx
Copy link
Contributor

hieronx commented Mar 30, 2022

centrifuge/apps#718

  • The proxy is able to do any transfer
  • The proxied account with the RestrictedTransfers type is limited to a set number of accounts which funds can be sent to
  • The proxy can update this list of accounts

Should be able to define destinations per currency type.

Should also support limiting which destinations on other chains it can be transferred to using XCM and/or Connectors.

@mustermeiszer mustermeiszer added the crcl-runtime Circle runtime related. label Apr 7, 2022
@mustermeiszer
Copy link
Collaborator

@offerijns didn't we already add the proxy type or is this a more complex version of

ProxyType::Borrower => matches!(
c,
Call::Loans(pallet_loans::Call::create{..}) |
Call::Loans(pallet_loans::Call::borrow{..}) |
Call::Loans(pallet_loans::Call::repay{..}) |
Call::Loans(pallet_loans::Call::write_off{..}) |
Call::Loans(pallet_loans::Call::close{..}) |
// Borrowers should be able to close and execute an epoch
// in order to get liquidity from repayments in previous epochs.
Call::Loans(pallet_loans::Call::update_nav{..}) |
Call::Pools(pallet_pools::Call::close_epoch{..}) |
Call::Pools(pallet_pools::Call::submit_solution{..}) |
Call::Pools(pallet_pools::Call::execute_epoch{..})
),
ProxyType::Investor => matches!(
c,
Call::Pools(pallet_pools::Call::update_invest_order{..}) |
Call::Pools(pallet_pools::Call::update_redeem_order{..}) |
Call::Pools(pallet_pools::Call::collect{..}) |
// Investors should be able to close and execute an epoch
// in order to get their orders fulfilled.
Call::Loans(pallet_loans::Call::update_nav{..}) |
Call::Pools(pallet_pools::Call::close_epoch{..}) |
Call::Pools(pallet_pools::Call::submit_solution{..}) |
Call::Pools(pallet_pools::Call::execute_epoch{..})
),

@hieronx
Copy link
Contributor Author

hieronx commented Apr 7, 2022

@mustermeiszer What we already added was #734. This just limited the calls which these proxy types could make. This ticket is actually having the ability to limit destinations to which a proxied account can send currency to.

@mustermeiszer
Copy link
Collaborator

Ah, I see. Well, this will need a pallet then.

@mustermeiszer mustermeiszer added Q3-medium Can be done with good experience in the language, but little knowledge of the codebase. P2-nice-to-have Issue is worth doing. I8-enhancement An additional feature. labels Apr 7, 2022
@branan branan self-assigned this Jul 26, 2022
@branan
Copy link
Contributor

branan commented Jul 26, 2022

Branan to write up their thoughts/proposal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crcl-runtime Circle runtime related. I8-enhancement An additional feature. P2-nice-to-have Issue is worth doing. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase.
Projects
None yet
Development

No branches or pull requests

3 participants