mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Migrate away from SimpleDispatchInfo (#5686)
* Migrate away from SimpleDispatchInfo * Fix imports * Better doc * Update lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -36,13 +36,13 @@
|
||||
//! ### Example - Get random seed for the current block
|
||||
//!
|
||||
//! ```
|
||||
//! use frame_support::{decl_module, dispatch, traits::Randomness, weights::{SimpleDispatchInfo, MINIMUM_WEIGHT}};
|
||||
//! use frame_support::{decl_module, dispatch, traits::Randomness, weights::MINIMUM_WEIGHT};
|
||||
//!
|
||||
//! pub trait Trait: frame_system::Trait {}
|
||||
//!
|
||||
//! decl_module! {
|
||||
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
//! #[weight = SimpleDispatchInfo::FixedNormal(MINIMUM_WEIGHT)]
|
||||
//! #[weight = MINIMUM_WEIGHT]
|
||||
//! pub fn random_module_example(origin) -> dispatch::DispatchResult {
|
||||
//! let _random_value = <pallet_randomness_collective_flip::Module<T>>::random(&b"my context"[..]);
|
||||
//! Ok(())
|
||||
|
||||
Reference in New Issue
Block a user