-
Notifications
You must be signed in to change notification settings - Fork 153
proxy types: refactor whitelist of calls #646
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
Changes from all commits
9d899da
3db0410
10a4767
43f2ca7
3ed5409
34acd97
5a2f571
c794e2e
d081166
fb708ff
5d370c2
48b9837
8323baf
0b28d09
81b6fb6
c8cd038
1352ab6
3a11842
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -537,18 +537,24 @@ impl InstanceFilter<RuntimeCall> for ProxyType { | |
| fn filter(&self, c: &RuntimeCall) -> bool { | ||
| match self { | ||
| ProxyType::Any => true, | ||
| ProxyType::NonTransfer => !matches!( | ||
| ProxyType::NonTransfer => matches!( | ||
| c, | ||
| RuntimeCall::Balances { .. } | | ||
| // `purchase`, `renew`, `transfer` and `purchase_credit` are pretty self explanatory. | ||
| RuntimeCall::Broker(pallet_broker::Call::purchase { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::renew { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::transfer { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) | | ||
| // `pool` doesn't transfer, but it defines the account to be paid for contributions | ||
| RuntimeCall::Broker(pallet_broker::Call::pool { .. }) | | ||
| // `assign` is essentially a transfer of a region NFT | ||
| RuntimeCall::Broker(pallet_broker::Call::assign { .. }) | ||
| RuntimeCall::System(_) | | ||
| RuntimeCall::ParachainSystem(_) | | ||
| RuntimeCall::Timestamp(_) | | ||
| RuntimeCall::CollatorSelection(_) | | ||
| RuntimeCall::Session(_) | | ||
| RuntimeCall::Utility(_) | | ||
| RuntimeCall::Multisig(_) | | ||
| RuntimeCall::Proxy(_) | | ||
| // We don't allow `purchase`, `renew`, `transfer`, `purchase_credit`, | ||
| // `pool` doesn't transfer, but it defines the account to be paid for contributions, | ||
| // `assign` is essentially a transfer of a region NFT. | ||
| RuntimeCall::Broker(pallet_broker::Call::claim_revenue { .. }) | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes done 48b9837 |
||
| RuntimeCall::Broker(pallet_broker::Call::drop_region { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::drop_contribution { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::drop_history { .. }) | | ||
| RuntimeCall::Broker(pallet_broker::Call::drop_renewal { .. }) | ||
| ), | ||
| ProxyType::CancelProxy => matches!( | ||
| c, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,8 +189,26 @@ impl InstanceFilter<RuntimeCall> for ProxyType { | |
| fn filter(&self, c: &RuntimeCall) -> bool { | ||
| match self { | ||
| ProxyType::Any => true, | ||
| ProxyType::NonTransfer => | ||
| !matches!(c, RuntimeCall::Balances { .. } | RuntimeCall::EncointerBalances { .. }), | ||
| ProxyType::NonTransfer => matches!( | ||
| c, | ||
| RuntimeCall::System(_) | | ||
| RuntimeCall::ParachainSystem(_) | | ||
| RuntimeCall::Timestamp(_) | | ||
| RuntimeCall::CollatorSelection(_) | | ||
| RuntimeCall::Session(_) | | ||
| RuntimeCall::Utility(_) | | ||
| RuntimeCall::Proxy(_) | | ||
| RuntimeCall::Collective(_) | | ||
| RuntimeCall::Membership(_) | | ||
| RuntimeCall::EncointerScheduler(_) | | ||
| RuntimeCall::EncointerCeremonies(_) | | ||
| RuntimeCall::EncointerCommunities(_) | | ||
| RuntimeCall::EncointerBazaar(_) | | ||
| RuntimeCall::EncointerReputationCommitments(_) | | ||
| RuntimeCall::EncointerFaucet(_) | | ||
| RuntimeCall::EncointerDemocracy(_) | | ||
| RuntimeCall::EncointerTreasuries(_) | ||
|
Comment on lines
+203
to
+210
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @clangenb could you verify these?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. looks good to me! |
||
| ), | ||
| ProxyType::BazaarEdit => matches!( | ||
| c, | ||
| RuntimeCall::EncointerBazaar(EncointerBazaarCall::create_offering { .. }) | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conflicts with the changes in the call filter of the asset hub migration... can we please pause doing refactors until AHM is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you're right, sorry about that Oli!