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

Block Request Judgement Calls on Polkadot #338

Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

- Transaction payments work via new `fungible` trait implementation ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332))
- Block `request_judgement` calls on the Relay Chain ([polkadot-fellows/runtimes#338](https://github.com/polkadot-fellows/runtimes/pull/338))

### Fixed

Expand Down
14 changes: 11 additions & 3 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ use frame_support::{
genesis_builder_helper::{build_config, create_default_config},
parameter_types,
traits::{
fungible::HoldConsideration, ConstU32, EitherOf, EitherOfDiverse, Everything, Get,
InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage,
fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut,
Get, InstanceFilter, KeyOwnerProofSystem, LinearStoragePrice, PrivilegeCmp, ProcessMessage,
ProcessMessageError, WithdrawReasons,
},
weights::{ConstantMultiplier, WeightMeter},
Expand Down Expand Up @@ -175,8 +175,16 @@ parameter_types! {
pub const SS58Prefix: u8 = 0;
}

/// A type to identify `identity::request_judgement` calls.
pub struct IsIdentityJudgementRequestCall;
impl Contains<RuntimeCall> for IsIdentityJudgementRequestCall {
fn contains(c: &RuntimeCall) -> bool {
matches!(c, RuntimeCall::Identity(pallet_identity::Call::request_judgement { .. }))
}
}

impl frame_system::Config for Runtime {
type BaseCallFilter = Everything;
type BaseCallFilter = EverythingBut<IsIdentityJudgementRequestCall>;
type BlockWeights = BlockWeights;
type BlockLength = BlockLength;
type RuntimeOrigin = RuntimeOrigin;
Expand Down
Loading