pub enum Call<T: Config> {
grant_emission_permission {
grantee: T::AccountId,
allocation: EmissionAllocation<T>,
targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>,
distribution: DistributionControl<T>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
enforcement: EnforcementAuthority<T>,
},
revoke_permission {
permission_id: PermissionId,
},
execute_permission {
permission_id: PermissionId,
},
toggle_permission_accumulation {
permission_id: PermissionId,
accumulating: bool,
},
enforcement_execute_permission {
permission_id: PermissionId,
},
set_enforcement_authority {
permission_id: PermissionId,
enforcement: EnforcementAuthority<T>,
},
grant_curator_permission {
grantee: T::AccountId,
flags: u32,
cooldown: Option<BlockNumberFor<T>>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
},
grant_namespace_permission {
grantee: T::AccountId,
paths: BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
},
update_emission_permission {
permission_id: PermissionId,
new_targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>,
new_streams: Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>,
new_distribution_control: Option<DistributionControl<T>>,
},
// some variants omitted
}
Expand description
Contains a variant per dispatchable extrinsic that this pallet has.
Variants§
grant_emission_permission
Grant a permission for emission delegation
Fields
grantee: T::AccountId
allocation: EmissionAllocation<T>
targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>
distribution: DistributionControl<T>
duration: PermissionDuration<T>
revocation: RevocationTerms<T>
enforcement: EnforcementAuthority<T>
revoke_permission
Revoke a permission. The caller must met revocation constraints or be a root key.
Fields
permission_id: PermissionId
execute_permission
Execute a manual distribution based on permission
Fields
permission_id: PermissionId
toggle_permission_accumulation
Toggle a permission’s accumulation state (enabled/disabled) The caller must be authorized as a controller or be the root key
enforcement_execute_permission
Execute a permission through enforcement authority The caller must be authorized as a controller or be the root key
Fields
permission_id: PermissionId
Set enforcement authority for a permission Only the grantor or root can set enforcement authority
Fields
grant_curator_permission
Grant a permission for curator delegation
grant_namespace_permission
Grant a permission over namespaces
Fields
grantee: T::AccountId
paths: BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>
duration: PermissionDuration<T>
revocation: RevocationTerms<T>
update_emission_permission
Allows Grantor/Grantee to edit stream emission permission
Fields
permission_id: PermissionId
new_targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>
new_streams: Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>
new_distribution_control: Option<DistributionControl<T>>
Implementations§
Source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
Sourcepub fn new_call_variant_grant_emission_permission(
grantee: T::AccountId,
allocation: EmissionAllocation<T>,
targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>,
distribution: DistributionControl<T>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
enforcement: EnforcementAuthority<T>,
) -> Self
pub fn new_call_variant_grant_emission_permission( grantee: T::AccountId, allocation: EmissionAllocation<T>, targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>, distribution: DistributionControl<T>, duration: PermissionDuration<T>, revocation: RevocationTerms<T>, enforcement: EnforcementAuthority<T>, ) -> Self
Create a call with the variant grant_emission_permission
.
Sourcepub fn new_call_variant_revoke_permission(permission_id: PermissionId) -> Self
pub fn new_call_variant_revoke_permission(permission_id: PermissionId) -> Self
Create a call with the variant revoke_permission
.
Sourcepub fn new_call_variant_execute_permission(permission_id: PermissionId) -> Self
pub fn new_call_variant_execute_permission(permission_id: PermissionId) -> Self
Create a call with the variant execute_permission
.
Sourcepub fn new_call_variant_toggle_permission_accumulation(
permission_id: PermissionId,
accumulating: bool,
) -> Self
pub fn new_call_variant_toggle_permission_accumulation( permission_id: PermissionId, accumulating: bool, ) -> Self
Create a call with the variant toggle_permission_accumulation
.
Sourcepub fn new_call_variant_enforcement_execute_permission(
permission_id: PermissionId,
) -> Self
pub fn new_call_variant_enforcement_execute_permission( permission_id: PermissionId, ) -> Self
Create a call with the variant enforcement_execute_permission
.
Create a call with the variant set_enforcement_authority
.
Sourcepub fn new_call_variant_grant_curator_permission(
grantee: T::AccountId,
flags: u32,
cooldown: Option<BlockNumberFor<T>>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
) -> Self
pub fn new_call_variant_grant_curator_permission( grantee: T::AccountId, flags: u32, cooldown: Option<BlockNumberFor<T>>, duration: PermissionDuration<T>, revocation: RevocationTerms<T>, ) -> Self
Create a call with the variant grant_curator_permission
.
Sourcepub fn new_call_variant_grant_namespace_permission(
grantee: T::AccountId,
paths: BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>,
duration: PermissionDuration<T>,
revocation: RevocationTerms<T>,
) -> Self
pub fn new_call_variant_grant_namespace_permission( grantee: T::AccountId, paths: BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>, duration: PermissionDuration<T>, revocation: RevocationTerms<T>, ) -> Self
Create a call with the variant grant_namespace_permission
.
Sourcepub fn new_call_variant_update_emission_permission(
permission_id: PermissionId,
new_targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>,
new_streams: Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>,
new_distribution_control: Option<DistributionControl<T>>,
) -> Self
pub fn new_call_variant_update_emission_permission( permission_id: PermissionId, new_targets: BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>, new_streams: Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>, new_distribution_control: Option<DistributionControl<T>>, ) -> Self
Create a call with the variant update_emission_permission
.
Trait Implementations§
Source§impl<T: Config> CheckIfFeeless for Call<T>
impl<T: Config> CheckIfFeeless for Call<T>
Source§fn is_feeless(&self, origin: &Self::Origin) -> bool
fn is_feeless(&self, origin: &Self::Origin) -> bool
#[pallet::feeless_if]
Source§impl<T: Config> Decode for Call<T>
impl<T: Config> Decode for Call<T>
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Source§impl<T: Config> Encode for Call<T>
impl<T: Config> Encode for Call<T>
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<T: Config> GetCallIndex for Call<T>
impl<T: Config> GetCallIndex for Call<T>
Source§fn get_call_index(&self) -> u8
fn get_call_index(&self) -> u8
Source§fn get_call_indices() -> &'static [u8] ⓘ
fn get_call_indices() -> &'static [u8] ⓘ
GetCallName
].Source§impl<T: Config> GetCallName for Call<T>
impl<T: Config> GetCallName for Call<T>
Source§fn get_call_name(&self) -> &'static str
fn get_call_name(&self) -> &'static str
Source§fn get_call_names() -> &'static [&'static str]
fn get_call_names() -> &'static [&'static str]
GetCallIndex
].Source§impl<T: Config> GetDispatchInfo for Call<T>
impl<T: Config> GetDispatchInfo for Call<T>
Source§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
DispatchInfo
, containing relevant information of this dispatch. Read moreSource§impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
EmissionAllocation<T>: TypeInfo + 'static,
BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>: TypeInfo + 'static,
DistributionControl<T>: TypeInfo + 'static,
PermissionDuration<T>: TypeInfo + 'static,
RevocationTerms<T>: TypeInfo + 'static,
EnforcementAuthority<T>: TypeInfo + 'static,
Option<BlockNumberFor<T>>: TypeInfo + 'static,
BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>: TypeInfo + 'static,
Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>: TypeInfo + 'static,
Option<DistributionControl<T>>: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
EmissionAllocation<T>: TypeInfo + 'static,
BoundedBTreeMap<T::AccountId, u16, T::MaxTargetsPerPermission>: TypeInfo + 'static,
DistributionControl<T>: TypeInfo + 'static,
PermissionDuration<T>: TypeInfo + 'static,
RevocationTerms<T>: TypeInfo + 'static,
EnforcementAuthority<T>: TypeInfo + 'static,
Option<BlockNumberFor<T>>: TypeInfo + 'static,
BoundedBTreeSet<NamespacePathInner, T::MaxNamespacesPerPermission>: TypeInfo + 'static,
Option<BoundedBTreeMap<StreamId, Percent, T::MaxStreamsPerPermission>>: TypeInfo + 'static,
Option<DistributionControl<T>>: TypeInfo + 'static,
T: Config + 'static,
Source§impl<T: Config> UnfilteredDispatchable for Call<T>
impl<T: Config> UnfilteredDispatchable for Call<T>
Source§type RuntimeOrigin = <T as Config>::RuntimeOrigin
type RuntimeOrigin = <T as Config>::RuntimeOrigin
frame_system::Config::RuntimeOrigin
).Source§fn dispatch_bypass_filter(
self,
origin: Self::RuntimeOrigin,
) -> DispatchResultWithPostInfo
fn dispatch_bypass_filter( self, origin: Self::RuntimeOrigin, ) -> DispatchResultWithPostInfo
impl<T: Config> EncodeLike for Call<T>
impl<T: Config> Eq for Call<T>
Auto Trait Implementations§
impl<T> Freeze for Call<T>
impl<T> RefUnwindSafe for Call<T>where
<T as Config>::AccountId: RefUnwindSafe,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: RefUnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: RefUnwindSafe,
T: RefUnwindSafe,
<T as Config>::MaxTargetsPerPermission: RefUnwindSafe,
<T as Config>::MaxNamespacesPerPermission: RefUnwindSafe,
<T as Config>::MaxStreamsPerPermission: RefUnwindSafe,
<T as Config>::MaxRevokersPerPermission: RefUnwindSafe,
<T as Config>::MaxControllersPerPermission: RefUnwindSafe,
impl<T> Send for Call<T>where
T: Send,
<T as Config>::MaxTargetsPerPermission: Send,
<T as Config>::MaxNamespacesPerPermission: Send,
<T as Config>::MaxStreamsPerPermission: Send,
<T as Config>::MaxRevokersPerPermission: Send,
<T as Config>::MaxControllersPerPermission: Send,
impl<T> Sync for Call<T>where
T: Sync,
<T as Config>::MaxTargetsPerPermission: Sync,
<T as Config>::MaxNamespacesPerPermission: Sync,
<T as Config>::MaxStreamsPerPermission: Sync,
<T as Config>::MaxRevokersPerPermission: Sync,
<T as Config>::MaxControllersPerPermission: Sync,
impl<T> Unpin for Call<T>where
<T as Config>::AccountId: Unpin,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: Unpin,
<<<T as Config>::Block as Block>::Header as Header>::Number: Unpin,
T: Unpin,
<T as Config>::MaxTargetsPerPermission: Unpin,
<T as Config>::MaxNamespacesPerPermission: Unpin,
<T as Config>::MaxStreamsPerPermission: Unpin,
<T as Config>::MaxRevokersPerPermission: Unpin,
<T as Config>::MaxControllersPerPermission: Unpin,
impl<T> UnwindSafe for Call<T>where
<T as Config>::AccountId: UnwindSafe + RefUnwindSafe,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: UnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: UnwindSafe,
T: UnwindSafe,
<T as Config>::MaxTargetsPerPermission: UnwindSafe,
<T as Config>::MaxNamespacesPerPermission: UnwindSafe,
<T as Config>::MaxStreamsPerPermission: UnwindSafe,
<T as Config>::MaxRevokersPerPermission: UnwindSafe,
<T as Config>::MaxControllersPerPermission: UnwindSafe,
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> FullLeaf for T
impl<T> FullLeaf for T
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.