mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Remove Filter and use Contains instead (#9514)
* Remove Filter and use Contains instead * Fixes * Formatting * Update docs/Upgrading-2.0-to-3.0.md Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Typo Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -229,7 +229,7 @@ pub type BlockNumber = u64;
|
||||
pub type Index = u64;
|
||||
|
||||
impl system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Hash = H256;
|
||||
type Origin = Origin;
|
||||
type BlockNumber = BlockNumber;
|
||||
@@ -268,14 +268,14 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, Call, Signature,
|
||||
|
||||
mod origin_test {
|
||||
use super::{module3, nested, system, Block, UncheckedExtrinsic};
|
||||
use frame_support::traits::{Filter, OriginTrait};
|
||||
use frame_support::traits::{Contains, OriginTrait};
|
||||
|
||||
impl nested::module3::Config for RuntimeOriginTest {}
|
||||
impl module3::Config for RuntimeOriginTest {}
|
||||
|
||||
pub struct BaseCallFilter;
|
||||
impl Filter<Call> for BaseCallFilter {
|
||||
fn filter(c: &Call) -> bool {
|
||||
impl Contains<Call> for BaseCallFilter {
|
||||
fn contains(c: &Call) -> bool {
|
||||
match c {
|
||||
Call::NestedModule3(_) => true,
|
||||
_ => false,
|
||||
|
||||
@@ -275,7 +275,7 @@ pub type BlockNumber = u64;
|
||||
pub type Index = u64;
|
||||
|
||||
impl system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Hash = H256;
|
||||
type Origin = Origin;
|
||||
type BlockNumber = BlockNumber;
|
||||
|
||||
@@ -157,7 +157,7 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, Call, Signature, ()>;
|
||||
|
||||
impl system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Hash = H256;
|
||||
type Origin = Origin;
|
||||
type BlockNumber = BlockNumber;
|
||||
|
||||
@@ -493,7 +493,7 @@ frame_support::parameter_types!(
|
||||
);
|
||||
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u32;
|
||||
|
||||
@@ -223,7 +223,7 @@ frame_support::parameter_types!(
|
||||
);
|
||||
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u32;
|
||||
|
||||
@@ -206,7 +206,7 @@ impl frame_system::Config for Runtime {
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u32;
|
||||
|
||||
@@ -243,7 +243,7 @@ frame_support::parameter_types!(
|
||||
);
|
||||
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u32;
|
||||
|
||||
@@ -129,7 +129,7 @@ mod tests {
|
||||
}
|
||||
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::AllowAll;
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type Origin = Origin;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
|
||||
@@ -25,7 +25,7 @@ pub trait Config: 'static + Eq + Clone {
|
||||
type Origin: Into<Result<RawOrigin<Self::AccountId>, Self::Origin>>
|
||||
+ From<RawOrigin<Self::AccountId>>;
|
||||
|
||||
type BaseCallFilter: frame_support::traits::Filter<Self::Call>;
|
||||
type BaseCallFilter: frame_support::traits::Contains<Self::Call>;
|
||||
type BlockNumber: Decode + Encode + EncodeLike + Clone + Default;
|
||||
type Hash;
|
||||
type AccountId: Encode + EncodeLike + Decode;
|
||||
|
||||
Reference in New Issue
Block a user