fix: Complete snowbridge pezpallet rebrand and critical bug fixes
- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs) - pallet/ directories → pezpallet/ (4 locations) - Fixed pezpallet.rs self-include recursion bug - Fixed sc-chain-spec hardcoded crate name in derive macro - Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API) - Added BizinikiwiConfig type alias for zombienet tests - Deleted obsolete session state files Verified: pezsnowbridge-pezpallet-*, pezpallet-staking, pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet [foo]]
|
||||
#[pezframe_support::pezpallet [foo]]
|
||||
mod foo {
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant(Hello)]
|
||||
#[pezpallet::constant(Hello)]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+10
-10
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,14 +28,14 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,15 +28,15 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_| true)]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_| true)]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,15 +28,15 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_, _: u8| -> bool { true })]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_, _: u8| -> bool { true })]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,15 +28,15 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize()]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize()]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,15 +28,15 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(Ok(Default::default()))]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(Ok(Default::default()))]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,17 +28,17 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_a: &u32| -> TransactionValidityWithRefund {
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_a: &u32| -> TransactionValidityWithRefund {
|
||||
Ok(Default::default())
|
||||
})]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,15 +28,15 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pallet::weight_of_authorize("foo")]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pezpallet::weight_of_authorize("foo")]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,14 +28,14 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
@@ -28,14 +28,14 @@ mod pallet {
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call(weight = T::WeightIn)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = T::WeightIn)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::authorize(|_, _| Ok(Default::default()))]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call1(origin: OriginFor<T>, a: u32) -> DispatchResult {
|
||||
let _ = origin;
|
||||
let _ = a;
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar: codec::Codec + scale_info::TypeInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar: scale_info::TypeInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(origin: OriginFor<T>, _bar: T::Bar) -> DispatchResultWithPostInfo {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
@@ -15,28 +15,28 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezframe_support::pezpallet_prelude::{DispatchResultWithPostInfo, Hooks};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[derive(Encode, Decode, DecodeWithMemTracking, scale_info::TypeInfo, PartialEq, Clone)]
|
||||
struct Bar;
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(origin: OriginFor<T>, _bar: Bar) -> DispatchResultWithPostInfo {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResultWithPostInfo;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(10)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(10)]
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(10)]
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(10)]
|
||||
pub fn bar(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(|| -> bool { true })]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(|| -> bool { true })]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(|_: bool| -> bool { true })]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(|_: bool| -> bool { true })]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(|_: &OriginFor<T>, _s: &u32| -> bool { true })]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(|_: &OriginFor<T>, _s: &u32| -> bool { true })]
|
||||
pub fn foo(_: OriginFor<T>, _something: u64) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(|_: &OriginFor<T>| -> u32 { 0 })]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(|_: &OriginFor<T>| -> u32 { 0 })]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResultWithPostInfo;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0something)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0something)]
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResultWithPostInfo;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weird_attr]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weird_attr]
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
const Foo: u8 = 3u8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResultWithPostInfo;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(256)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(256)]
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn foo(origin: u8) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn foo(origin: OriginFor<T>) -> ::DispatchResult { todo!() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar: codec::Codec;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar: codec::Codec;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
pub(crate) fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pallet::weight(0)]
|
||||
#[pezpallet::weight(0)]
|
||||
pub fn bar(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, DispatchResultWithPostInfo};
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResultWithPostInfo;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::call_index(2)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
#[pezpallet::call_index(1)]
|
||||
#[pezpallet::call_index(2)]
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn foo() {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::{BlockNumberFor, OriginFor};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn foo(origin: OriginFor<T>) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::call]
|
||||
impl <T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl <T: Config> Pezpallet<T> {
|
||||
pub fn foo(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
|
||||
return Err(DispatchError::BadOrigin);
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(10_000something)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
#[pezpallet::weight(10_000something)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(123_u64)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
#[pezpallet::weight(123_u64)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(123)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
#[pezpallet::weight(123)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
|
||||
#[pallet::call_index(1)]
|
||||
#[pallet::weight(123_custom_prefix)]
|
||||
#[pezpallet::call_index(1)]
|
||||
#[pezpallet::weight(123_custom_prefix)]
|
||||
pub fn bar(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,42 +21,42 @@ pub trait WeightInfo {
|
||||
fn foo() -> Weight;
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(invalid)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(invalid)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call = invalid]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call = invalid]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+14
-14
@@ -24,42 +24,42 @@ pub trait WeightInfo {
|
||||
fn foo() -> Weight;
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(prefix))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(prefix))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = prefix)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = prefix)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+14
-14
@@ -24,42 +24,42 @@ pub trait WeightInfo {
|
||||
fn foo() -> Weight;
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(123))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(123))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = 123)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = 123)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+14
-14
@@ -23,42 +23,42 @@ use pezframe_system::pezpallet_prelude::*;
|
||||
pub trait WeightInfo {
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = <T as Config>::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = <T as Config>::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+14
-14
@@ -17,40 +17,40 @@
|
||||
|
||||
// Stray tokens after good input.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(<T as Config>::WeightInfo straycat))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(<T as Config>::WeightInfo straycat))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = <T as Config>::WeightInfo straycat)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = <T as Config>::WeightInfo straycat)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight(*_unused)]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
#[pezpallet::weight(*_unused)]
|
||||
pub fn foo(_: OriginFor<T>, _unused: u64) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
if Self::in_code_storage_version() != Self::on_chain_storage_version() {
|
||||
|
||||
@@ -37,8 +37,8 @@ mod pallet {
|
||||
}
|
||||
}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+6
-6
@@ -15,15 +15,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::composite_enum]
|
||||
#[pezpallet::composite_enum]
|
||||
pub enum HoldReasons {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default, without_automatic_metadata, without_automatic_metadata)]
|
||||
#[pezpallet::config(with_default, without_automatic_metadata, without_automatic_metadata)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,28 +15,28 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<u32>;
|
||||
|
||||
#[pallet::include_metadata]
|
||||
#[pezpallet::include_metadata]
|
||||
type MyNonScaleTypeInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,26 +15,26 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pallet::include_metadata]
|
||||
#[pezpallet::constant]
|
||||
#[pezpallet::include_metadata]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,30 +15,30 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::no_default_bounds]
|
||||
#[pallet::include_metadata]
|
||||
#[pezpallet::no_default_bounds]
|
||||
#[pezpallet::include_metadata]
|
||||
#[allow(deprecated)]
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+6
-6
@@ -15,18 +15,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<Self::Block>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -17,32 +17,32 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorage<T: Config> = StorageValue<_, Vec<u8>>;
|
||||
|
||||
// Your Pallet's callable functions.
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
// Your Pezpallet's callable functions.
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+14
-14
@@ -17,32 +17,32 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
// Your Pallet's callable functions.
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
// Your Pezpallet's callable functions.
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+14
-14
@@ -17,34 +17,34 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorage<T: Config> = StorageValue<_, Vec<u8>>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageMap<T: Config> = StorageMap<_, _, u32, u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageDoubleMap<T: Config> = StorageDoubleMap<_, _, u32, _, u64, u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyCountedStorageMap<T: Config> = CountedStorageMap<_, _, u32, u64>;
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+15
-15
@@ -17,35 +17,35 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorage<T: Config> = StorageValue<_, Vec<u8>>;
|
||||
|
||||
// Your Pallet's callable functions.
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::weight(0)]
|
||||
// Your Pezpallet's callable functions.
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::weight(0)]
|
||||
pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,29 +15,29 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezframe_support::pezpallet_prelude::StorageValue;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type Foo<T> = StorageValue<_, u8>;
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,27 +15,27 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type Foo<T> = StorageValue<_, u8>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pallet::storage_prefix = "Foo"]
|
||||
#[pezpallet::storage]
|
||||
#[pezpallet::storage_prefix = "Foo"]
|
||||
type NotFoo<T> = StorageValue<_, u16>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type CounterForBar<T> = StorageValue<_, u16>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type Bar<T> = CountedStorageMap<_, Twox64Concat, u16, u16>;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -15,16 +15,16 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
#[allow(unused_imports)]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::error]
|
||||
#[pezpallet::error]
|
||||
pub enum Error<T> {
|
||||
CustomError(crate::MyError),
|
||||
}
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::error]
|
||||
#[pezpallet::error]
|
||||
pub enum Error<T> where u32: From<u8> {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::error]
|
||||
#[pezpallet::error]
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::error]
|
||||
#[pezpallet::error]
|
||||
pub enum Foo<T> {}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -15,27 +15,27 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, IsType};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar: Clone + PartialEq + std::fmt::Debug;
|
||||
type RuntimeEvent: IsType<<Self as pezframe_system::Config>::RuntimeEvent> + From<Event<Self>>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::event]
|
||||
#[pezpallet::event]
|
||||
pub enum Event<T: Config> {
|
||||
B { b: T::Bar },
|
||||
}
|
||||
|
||||
@@ -15,27 +15,27 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
#[allow(unused_imports)]
|
||||
mod pallet {
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, IsType};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type Bar;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::event]
|
||||
#[pezpallet::event]
|
||||
pub enum Event<T: Config> {
|
||||
B { b: T::Bar },
|
||||
}
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::event]
|
||||
#[pezpallet::event]
|
||||
pub struct Foo;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::event]
|
||||
#[pezpallet::event]
|
||||
pub enum Foo {}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::genesis_build]
|
||||
#[pezpallet::genesis_build]
|
||||
impl<T: Config> GenesisBuild<T> for GenesisConfig {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::genesis_build]
|
||||
#[pezpallet::genesis_build]
|
||||
impl GenesisBuild for GenesisConfig {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::genesis_build]
|
||||
#[pezpallet::genesis_build]
|
||||
impl Foo {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::composite_enum]
|
||||
#[pezpallet::composite_enum]
|
||||
pub struct HoldReason;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::composite_enum]
|
||||
#[pezpallet::composite_enum]
|
||||
enum HoldReason {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config<I: 'static = ()>: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T, I = ()>(core::marker::PhantomData<(T, I)>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T, I = ()>(core::marker::PhantomData<(T, I)>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config<I>, I: 'static> Hooks<BlockNumberFor<T>> for Pallet<T, I> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config<I>, I: 'static> Hooks<BlockNumberFor<T>> for Pezpallet<T, I> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config<I>, I: 'static> Pallet<T, I> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config<I>, I: 'static> Pezpallet<T, I> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,25 +15,25 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, ProvideInherent};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::inherent]
|
||||
impl<T: Config> ProvideInherent for Pallet<T> {}
|
||||
#[pezpallet::inherent]
|
||||
impl<T: Config> ProvideInherent for Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::Hooks;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::inherent]
|
||||
#[pezpallet::inherent]
|
||||
impl Foo {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::composite_enum]
|
||||
#[pezpallet::composite_enum]
|
||||
pub enum LockId {}
|
||||
|
||||
#[pallet::composite_enum]
|
||||
#[pezpallet::composite_enum]
|
||||
pub enum LockId {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
mod foo;
|
||||
|
||||
fn main() {
|
||||
|
||||
+11
-11
@@ -15,26 +15,26 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pallet::no_default_bounds]
|
||||
#[pezpallet::constant]
|
||||
#[pezpallet::no_default_bounds]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+11
-11
@@ -15,26 +15,26 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pallet::no_default]
|
||||
#[pezpallet::constant]
|
||||
#[pezpallet::no_default]
|
||||
type MyGetParam2: Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
+14
-14
@@ -17,34 +17,34 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
pub use pallet::*;
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorage<T: Config> = StorageValue<_, Vec<u8>>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageMap<T: Config> = StorageMap<Key = u32, Value = u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageDoubleMap<T: Config> = StorageDoubleMap<Key1 = u32, Key2 = u64, Value = u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyCountedStorageMap<T: Config> = CountedStorageMap<Key = u32, Value = u64>;
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -18,44 +18,44 @@
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod my_test {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[cfg(all(target_endian = "little", target_endian = "big"))] // Never compiles.
|
||||
fn never_compiled() {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[cfg(all(target_endian = "little", target_endian = "big"))] // Never compiles.
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::authorize(|_source| {
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::authorize(|_source| {
|
||||
never_compiled(); // This will fail to compile if the authorize function is defined.
|
||||
Err(InvalidTransaction::Call.into())
|
||||
})]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn call_0(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::authorize(|_source| { Err(InvalidTransaction::Call.into()) })]
|
||||
#[pallet::weight_of_authorize(Weight::zero())]
|
||||
#[pallet::call_index(1)]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::authorize(|_source| { Err(InvalidTransaction::Call.into()) })]
|
||||
#[pezpallet::weight_of_authorize(Weight::zero())]
|
||||
#[pezpallet::call_index(1)]
|
||||
pub fn call_1(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[pallet::weight(Weight::zero())]
|
||||
#[pallet::call_index(2)]
|
||||
#[pezpallet::weight(Weight::zero())]
|
||||
#[pezpallet::call_index(2)]
|
||||
pub fn call_2(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default, without_automatic_metadata)]
|
||||
#[pezpallet::config(with_default, without_automatic_metadata)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<Self::AccountId>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(without_automatic_metadata)]
|
||||
#[pezpallet::config(without_automatic_metadata)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<Self::AccountId>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,18 +15,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type MyGetParam2: Get<Self::AccountId>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -19,55 +19,55 @@
|
||||
|
||||
use pezframe_support::{derive_impl, traits::ConstU32};
|
||||
|
||||
pub use pallet::*;
|
||||
pub use pezpallet::*;
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
|
||||
// The struct on which we build all of our Pallet logic.
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
// The struct on which we build all of our Pezpallet logic.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
// Your Pallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pallet::config]
|
||||
// Your Pezpallet's configuration trait, representing custom external types and interfaces.
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
// The MEL requirement for bounded pallets is skipped by `dev_mode`.
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorage<T: Config> = StorageValue<_, Vec<u8>>;
|
||||
|
||||
// The Hasher requirement skipped by `dev_mode`.
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
pub type MyStorageMap<T: Config> = StorageMap<_, _, u32, u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageDoubleMap<T: Config> = StorageDoubleMap<_, _, u32, _, u64, u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyCountedStorageMap<T: Config> = CountedStorageMap<_, _, u32, u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
pub type MyStorageMap2<T: Config> = StorageMap<Key = u32, Value = u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyStorageDoubleMap2<T: Config> = StorageDoubleMap<Key1 = u32, Key2 = u64, Value = u64>;
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
type MyCountedStorageMap2<T: Config> = CountedStorageMap<Key = u32, Value = u64>;
|
||||
|
||||
// Your Pallet's callable functions.
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
// Your Pezpallet's callable functions.
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
// No need to define a `weight` attribute here because of `dev_mode`.
|
||||
pub fn my_call(_origin: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// Your Pallet's internal functions.
|
||||
impl<T: Config> Pallet<T> {}
|
||||
// Your Pezpallet's internal functions.
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
|
||||
@@ -104,12 +104,12 @@ pezframe_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
// Exclude part `Storage` in order not to check its metadata in tests.
|
||||
System: pezframe_system exclude_parts { Pallet, Storage },
|
||||
Example: pallet,
|
||||
System: pezframe_system exclude_parts { Pezpallet, Storage },
|
||||
Example: pezpallet,
|
||||
}
|
||||
);
|
||||
|
||||
impl pallet::Config for Runtime {}
|
||||
impl pezpallet::Config for Runtime {}
|
||||
|
||||
fn main() {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
@@ -126,7 +126,7 @@ fn main() {
|
||||
}
|
||||
|
||||
TestExternalities::default().execute_with(|| {
|
||||
pallet::MyStorageMap::<Runtime>::insert(1, 2);
|
||||
pezpallet::MyStorageMap::<Runtime>::insert(1, 2);
|
||||
let mut k = [twox_128(b"Example"), twox_128(b"MyStorageMap")].concat();
|
||||
k.extend(1u32.using_encoded(blake2_128_concat));
|
||||
assert_eq!(unhashed::get::<u64>(&k), Some(2u64));
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
use codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use pezframe_support::PalletError;
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
#[allow(unused_imports)]
|
||||
pub mod pallet {
|
||||
#[pallet::config]
|
||||
pub mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::error]
|
||||
#[pezpallet::error]
|
||||
pub enum Error<T> {
|
||||
CustomError(crate::MyError),
|
||||
}
|
||||
|
||||
+10
-10
@@ -15,29 +15,29 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
#[allow(unused_imports)]
|
||||
pub mod pallet {
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::{Hooks, IsType};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config:
|
||||
pezframe_system::Config<Hash = pezsp_core::H256, RuntimeEvent: From<Event<Self>>>
|
||||
{
|
||||
type Bar: Clone + std::fmt::Debug + Eq;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
|
||||
#[pallet::event]
|
||||
#[pezpallet::event]
|
||||
pub enum Event<T: Config> {
|
||||
B { b: T::Bar },
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::DispatchResult;
|
||||
use pezframe_system::pezpallet_prelude::OriginFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::feeless_if(|_: &OriginFor<T>| -> bool { true })]
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::feeless_if(|_: &OriginFor<T>| -> bool { true })]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult { Ok(()) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,42 +22,42 @@ pub trait WeightInfo {
|
||||
fn foo() -> Weight;
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: crate::WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = <T as Config>::WeightInfo)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = <T as Config>::WeightInfo)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -28,42 +28,42 @@ impl WeightInfo for () {
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
// Crazy man just uses `()`, but it still works ;)
|
||||
#[pallet::call(weight(()))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(()))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
// Crazy man just uses `()`, but it still works ;)
|
||||
#[pallet::call(weight = ())]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = ())]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -27,40 +27,40 @@ impl Impl {
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod parentheses {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(crate::Impl))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(crate::Impl))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod assign {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight = crate::Impl)]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight = crate::Impl)]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+8
-8
@@ -22,21 +22,21 @@ pub trait WeightInfo {
|
||||
fn foo() -> Weight;
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
type WeightInfo: WeightInfo;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::call_index(0)]
|
||||
#[pezpallet::call(weight(<T as Config>::WeightInfo))]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::call_index(0)]
|
||||
pub fn foo(_: OriginFor<T>) -> DispatchResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ construct_runtime! {
|
||||
pub struct Runtime
|
||||
{
|
||||
System: pezframe_system,
|
||||
Pallet: test_pallet,
|
||||
Pezpallet: test_pallet,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
pub type MyStorage<T> = StorageValue<_, u32>;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::{ensure, pezpallet_prelude::DispatchResult};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::tasks_experimental]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pallet::task_index(0)]
|
||||
#[pallet::task_condition(|i, j| i == 0u32 && j == 2u64)]
|
||||
#[pallet::task_list(vec![(0u32, 2u64), (2u32, 4u64)].iter())]
|
||||
#[pallet::task_weight(0.into())]
|
||||
#[pezpallet::tasks_experimental]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
#[pezpallet::task_index(0)]
|
||||
#[pezpallet::task_condition(|i, j| i == 0u32 && j == 2u64)]
|
||||
#[pezpallet::task_list(vec![(0u32, 2u64), (2u32, 4u64)].iter())]
|
||||
#[pezpallet::task_weight(0.into())]
|
||||
fn foo(i: u32, j: u64) -> DispatchResult {
|
||||
ensure!(i == 0, "i must be 0");
|
||||
ensure!(j == 2, "j must be 2");
|
||||
@@ -39,25 +39,25 @@ pub mod pallet {
|
||||
}
|
||||
}
|
||||
|
||||
#[pezframe_support::pallet(dev_mode)]
|
||||
#[pezframe_support::pezpallet(dev_mode)]
|
||||
pub mod pezpallet_with_instance {
|
||||
use pezframe_support::pezpallet_prelude::{ValueQuery, StorageValue};
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config<I: 'static = ()>: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T, I = ()>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T, I = ()>(_);
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
pub type SomeStorage<T, I = ()> = StorageValue<_, u32, ValueQuery>;
|
||||
|
||||
#[pallet::tasks_experimental]
|
||||
impl<T: Config<I>, I> Pallet<T, I> {
|
||||
#[pallet::task_index(0)]
|
||||
#[pallet::task_condition(|i, j| i == 0u32 && j == 2u64)]
|
||||
#[pallet::task_list(vec![(0u32, 2u64), (2u32, 4u64)].iter())]
|
||||
#[pallet::task_weight(0.into())]
|
||||
#[pezpallet::tasks_experimental]
|
||||
impl<T: Config<I>, I> Pezpallet<T, I> {
|
||||
#[pezpallet::task_index(0)]
|
||||
#[pezpallet::task_condition(|i, j| i == 0u32 && j == 2u64)]
|
||||
#[pezpallet::task_list(vec![(0u32, 2u64), (2u32, 4u64)].iter())]
|
||||
#[pezpallet::task_weight(0.into())]
|
||||
fn foo(_i: u32, _j: u64) -> pezframe_support::pezpallet_prelude::DispatchResult {
|
||||
<SomeStorage<T, I>>::get();
|
||||
Ok(())
|
||||
|
||||
+12
-12
@@ -15,31 +15,31 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
#[pallet::config]
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config {
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type U: Get<u32>;
|
||||
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type V: Get<u32> + From<u16>;
|
||||
|
||||
#[pallet::constant]
|
||||
#[pezpallet::constant]
|
||||
type W: From<u16> + Get<u32>;
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
||||
#[pezpallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pezpallet<T> {}
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
|
||||
#[pallet::config(with_default)]
|
||||
#[pezpallet::config(with_default)]
|
||||
pub trait Config: pezframe_system::Config {}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(_);
|
||||
|
||||
#[pallet::storage]
|
||||
#[pezpallet::storage]
|
||||
pub type MyStorage<T> = StorageValue<_, u32>;
|
||||
|
||||
#[pallet::view_functions]
|
||||
impl<T: Config> Pallet<T> {
|
||||
#[pezpallet::view_functions]
|
||||
impl<T: Config> Pezpallet<T> {
|
||||
pub fn get_value() -> Option<u32> {
|
||||
MyStorage::<T>::get()
|
||||
}
|
||||
|
||||
@@ -15,22 +15,22 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
#[pallet::config]
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config
|
||||
where
|
||||
<Self as pezframe_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
|
||||
#[pallet::call]
|
||||
impl<T: Config> Pallet<T> where <T as pezframe_system::Config>::Nonce: From<u128> {}
|
||||
#[pezpallet::call]
|
||||
impl<T: Config> Pezpallet<T> where <T as pezframe_system::Config>::Nonce: From<u128> {}
|
||||
|
||||
impl<T: Config> Pallet<T>
|
||||
impl<T: Config> Pezpallet<T>
|
||||
where
|
||||
<T as pezframe_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
// Must receive a string literal pointing to a path
|
||||
#[pezpallet_doc(X)]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config
|
||||
where
|
||||
<Self as pezframe_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
// Expected one argument for the doc path.
|
||||
#[pezpallet_doc]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config
|
||||
where
|
||||
<Self as pezframe_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
@@ -15,19 +15,19 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#[pezframe_support::pallet]
|
||||
#[pezframe_support::pezpallet]
|
||||
// Argument expected as list, not named value.
|
||||
#[pezpallet_doc = "invalid"]
|
||||
mod pallet {
|
||||
#[pallet::config]
|
||||
mod pezpallet {
|
||||
#[pezpallet::config]
|
||||
pub trait Config: pezframe_system::Config
|
||||
where
|
||||
<Self as pezframe_system::Config>::Nonce: From<u128>,
|
||||
{
|
||||
}
|
||||
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(core::marker::PhantomData<T>);
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(core::marker::PhantomData<T>);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user