mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
enum Pays for PaysFee (#5733)
* enum Pays for PaysFee * Fix doc test * Update bin/node/executor/tests/basic.rs * Update bin/node/executor/tests/basic.rs
This commit is contained in:
@@ -93,7 +93,7 @@ use sp_runtime::traits::{StaticLookup, Dispatchable};
|
||||
use frame_support::{
|
||||
Parameter, decl_module, decl_event, decl_storage, decl_error, ensure,
|
||||
};
|
||||
use frame_support::weights::{MINIMUM_WEIGHT, GetDispatchInfo, FunctionOf};
|
||||
use frame_support::weights::{MINIMUM_WEIGHT, GetDispatchInfo, FunctionOf, Pays};
|
||||
use frame_system::{self as system, ensure_signed};
|
||||
|
||||
pub trait Trait: frame_system::Trait {
|
||||
@@ -124,7 +124,7 @@ decl_module! {
|
||||
#[weight = FunctionOf(
|
||||
|args: (&Box<<T as Trait>::Call>,)| args.0.get_dispatch_info().weight + 10_000,
|
||||
|args: (&Box<<T as Trait>::Call>,)| args.0.get_dispatch_info().class,
|
||||
true
|
||||
Pays::Yes,
|
||||
)]
|
||||
fn sudo(origin, call: Box<<T as Trait>::Call>) {
|
||||
// This is a public call, so we ensure that the origin is some signed account.
|
||||
@@ -180,7 +180,7 @@ decl_module! {
|
||||
|args: (&<T::Lookup as StaticLookup>::Source, &Box<<T as Trait>::Call>,)| {
|
||||
args.1.get_dispatch_info().class
|
||||
},
|
||||
true
|
||||
Pays::Yes,
|
||||
)]
|
||||
fn sudo_as(origin, who: <T::Lookup as StaticLookup>::Source, call: Box<<T as Trait>::Call>) {
|
||||
// This is a public call, so we ensure that the origin is some signed account.
|
||||
|
||||
Reference in New Issue
Block a user