mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Remove generation of instance trait by decl_storage. (#6812)
* remove generation of instance trait, no breaking change * doc * doc * Update frame/support/src/traits.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/support/procedural/src/storage/instance_trait.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e4e0e79ad7
commit
8a37f60844
@@ -36,7 +36,6 @@ pub trait Currency {}
|
||||
|
||||
// Test for:
|
||||
// * No default instance
|
||||
// * Custom InstantiableTrait
|
||||
// * Origin, Inherent, Event
|
||||
mod module1 {
|
||||
use super::*;
|
||||
@@ -49,7 +48,7 @@ mod module1 {
|
||||
}
|
||||
|
||||
frame_support::decl_module! {
|
||||
pub struct Module<T: Trait<I>, I: InstantiableThing> for enum Call where
|
||||
pub struct Module<T: Trait<I>, I: Instance> for enum Call where
|
||||
origin: <T as system::Trait>::Origin,
|
||||
system = system,
|
||||
T::BlockNumber: From<u32>
|
||||
@@ -67,7 +66,7 @@ mod module1 {
|
||||
}
|
||||
|
||||
frame_support::decl_storage! {
|
||||
trait Store for Module<T: Trait<I>, I: InstantiableThing> as Module1 where
|
||||
trait Store for Module<T: Trait<I>, I: Instance> as Module1 where
|
||||
T::BlockNumber: From<u32> + std::fmt::Display
|
||||
{
|
||||
pub Value config(value): T::GenericType;
|
||||
@@ -97,7 +96,7 @@ mod module1 {
|
||||
|
||||
pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"12345678";
|
||||
|
||||
impl<T: Trait<I>, I: InstantiableThing> ProvideInherent for Module<T, I> where
|
||||
impl<T: Trait<I>, I: Instance> ProvideInherent for Module<T, I> where
|
||||
T::BlockNumber: From<u32>
|
||||
{
|
||||
type Call = Call<T, I>;
|
||||
|
||||
Reference in New Issue
Block a user