mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -34,15 +34,15 @@ use sp_std::vec::Vec;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
pub trait Trait: frame_system::Trait {
|
||||
pub trait Config: frame_system::Config {
|
||||
/// The overarching event type.
|
||||
type Event: From<Event> + Into<<Self as frame_system::Trait>::Event>;
|
||||
type Event: From<Event> + Into<<Self as frame_system::Config>::Event>;
|
||||
/// The overarching dispatch call type.
|
||||
type Call: From<Call<Self>>;
|
||||
}
|
||||
|
||||
decl_storage! {
|
||||
trait Store for Module<T: Trait> as ExampleOffchainWorker {
|
||||
trait Store for Module<T: Config> as ExampleOffchainWorker {
|
||||
/// A vector of current participants
|
||||
///
|
||||
/// To enlist someone to participate, signed payload should be
|
||||
@@ -87,7 +87,7 @@ impl EnlistedParticipant {
|
||||
|
||||
decl_module! {
|
||||
/// A public part of the pallet.
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
||||
fn deposit_event() = default;
|
||||
|
||||
/// Get the new event running.
|
||||
|
||||
@@ -39,7 +39,7 @@ parameter_types! {
|
||||
pub const AvailableBlockRatio: Perbill = Perbill::one();
|
||||
}
|
||||
|
||||
impl frame_system::Trait for Test {
|
||||
impl frame_system::Config for Test {
|
||||
type BaseCallFilter = ();
|
||||
type Origin = Origin;
|
||||
type Call = ();
|
||||
@@ -73,7 +73,7 @@ parameter_types! {
|
||||
pub const UnsignedPriority: u64 = 1 << 20;
|
||||
}
|
||||
|
||||
impl Trait for Test {
|
||||
impl Config for Test {
|
||||
type Event = ();
|
||||
type Call = Call<Test>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user