pub enum Call<T: Config> {
Show 19 variants
add_allocator {
key: <T as Config>::AccountId,
},
remove_allocator {
key: <T as Config>::AccountId,
},
add_to_whitelist {
key: <T as Config>::AccountId,
},
remove_from_whitelist {
key: <T as Config>::AccountId,
},
accept_application {
application_id: u32,
},
deny_application {
application_id: u32,
},
penalize_agent {
agent_key: <T as Config>::AccountId,
percentage: u8,
},
submit_application {
agent_key: <T as Config>::AccountId,
metadata: Vec<u8>,
removing: bool,
},
add_global_params_proposal {
data: GlobalParamsData<T>,
metadata: Vec<u8>,
},
add_global_custom_proposal {
metadata: Vec<u8>,
},
add_dao_treasury_transfer_proposal {
value: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
destination_key: <T as Config>::AccountId,
data: Vec<u8>,
},
vote_proposal {
proposal_id: u64,
agree: bool,
},
remove_vote_proposal {
proposal_id: u64,
},
enable_vote_delegation {},
disable_vote_delegation {},
add_emission_proposal {
recycling_percentage: Percent,
treasury_percentage: Percent,
incentives_ratio: Percent,
data: Vec<u8>,
},
set_emission_params {
recycling_percentage: Percent,
treasury_percentage: Percent,
},
toggle_agent_freezing {},
toggle_namespace_freezing {},
// some variants omitted
}
Expand description
Contains a variant per dispatchable extrinsic that this pallet has.
Variants§
add_allocator
Adds a new allocator to the list. Only available for the root key.
Fields
key: <T as Config>::AccountId
remove_allocator
Removes an existing allocator from the list. Only available for the root key.
Fields
key: <T as Config>::AccountId
add_to_whitelist
Forcefully adds a new agent to the whitelist. Only available for the root key or curators.
Fields
key: <T as Config>::AccountId
remove_from_whitelist
Forcefully removes an agent from the whitelist. Only available for the root key or curators.
Fields
key: <T as Config>::AccountId
accept_application
Accepts an agent application. Only available for the root key or curators.
deny_application
Denies an agent application. Only available for the root key or curators.
penalize_agent
Sets a penalty factor to the given agent emissions. Only available for the root key or curators.
submit_application
Submits a new agent application on behalf of a given key.
add_global_params_proposal
Creates a new global parameters proposal.
add_global_custom_proposal
Creates a new custom global proposal.
add_dao_treasury_transfer_proposal
Creates a proposal moving funds from the treasury account to the given key.
Fields
destination_key: <T as Config>::AccountId
vote_proposal
Casts a vote for an open proposal.
remove_vote_proposal
Removes a casted vote for an open proposal.
enable_vote_delegation
Enables vote power delegation.
disable_vote_delegation
Disables vote power delegation.
add_emission_proposal
Creates a new emission percentage proposal.
set_emission_params
Forcefully sets emission percentages. Only available for the root key.
toggle_agent_freezing
toggle_namespace_freezing
Implementations§
Source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
Sourcepub fn new_call_variant_add_allocator(key: <T as Config>::AccountId) -> Self
pub fn new_call_variant_add_allocator(key: <T as Config>::AccountId) -> Self
Create a call with the variant add_allocator
.
Sourcepub fn new_call_variant_remove_allocator(key: <T as Config>::AccountId) -> Self
pub fn new_call_variant_remove_allocator(key: <T as Config>::AccountId) -> Self
Create a call with the variant remove_allocator
.
Sourcepub fn new_call_variant_add_to_whitelist(key: <T as Config>::AccountId) -> Self
pub fn new_call_variant_add_to_whitelist(key: <T as Config>::AccountId) -> Self
Create a call with the variant add_to_whitelist
.
Sourcepub fn new_call_variant_remove_from_whitelist(
key: <T as Config>::AccountId,
) -> Self
pub fn new_call_variant_remove_from_whitelist( key: <T as Config>::AccountId, ) -> Self
Create a call with the variant remove_from_whitelist
.
Sourcepub fn new_call_variant_accept_application(application_id: u32) -> Self
pub fn new_call_variant_accept_application(application_id: u32) -> Self
Create a call with the variant accept_application
.
Sourcepub fn new_call_variant_deny_application(application_id: u32) -> Self
pub fn new_call_variant_deny_application(application_id: u32) -> Self
Create a call with the variant deny_application
.
Sourcepub fn new_call_variant_penalize_agent(
agent_key: <T as Config>::AccountId,
percentage: u8,
) -> Self
pub fn new_call_variant_penalize_agent( agent_key: <T as Config>::AccountId, percentage: u8, ) -> Self
Create a call with the variant penalize_agent
.
Sourcepub fn new_call_variant_submit_application(
agent_key: <T as Config>::AccountId,
metadata: Vec<u8>,
removing: bool,
) -> Self
pub fn new_call_variant_submit_application( agent_key: <T as Config>::AccountId, metadata: Vec<u8>, removing: bool, ) -> Self
Create a call with the variant submit_application
.
Sourcepub fn new_call_variant_add_global_params_proposal(
data: GlobalParamsData<T>,
metadata: Vec<u8>,
) -> Self
pub fn new_call_variant_add_global_params_proposal( data: GlobalParamsData<T>, metadata: Vec<u8>, ) -> Self
Create a call with the variant add_global_params_proposal
.
Sourcepub fn new_call_variant_add_global_custom_proposal(metadata: Vec<u8>) -> Self
pub fn new_call_variant_add_global_custom_proposal(metadata: Vec<u8>) -> Self
Create a call with the variant add_global_custom_proposal
.
Sourcepub fn new_call_variant_add_dao_treasury_transfer_proposal(
value: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
destination_key: <T as Config>::AccountId,
data: Vec<u8>,
) -> Self
pub fn new_call_variant_add_dao_treasury_transfer_proposal( value: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, destination_key: <T as Config>::AccountId, data: Vec<u8>, ) -> Self
Create a call with the variant add_dao_treasury_transfer_proposal
.
Sourcepub fn new_call_variant_vote_proposal(proposal_id: u64, agree: bool) -> Self
pub fn new_call_variant_vote_proposal(proposal_id: u64, agree: bool) -> Self
Create a call with the variant vote_proposal
.
Sourcepub fn new_call_variant_remove_vote_proposal(proposal_id: u64) -> Self
pub fn new_call_variant_remove_vote_proposal(proposal_id: u64) -> Self
Create a call with the variant remove_vote_proposal
.
Sourcepub fn new_call_variant_enable_vote_delegation() -> Self
pub fn new_call_variant_enable_vote_delegation() -> Self
Create a call with the variant enable_vote_delegation
.
Sourcepub fn new_call_variant_disable_vote_delegation() -> Self
pub fn new_call_variant_disable_vote_delegation() -> Self
Create a call with the variant disable_vote_delegation
.
Sourcepub fn new_call_variant_add_emission_proposal(
recycling_percentage: Percent,
treasury_percentage: Percent,
incentives_ratio: Percent,
data: Vec<u8>,
) -> Self
pub fn new_call_variant_add_emission_proposal( recycling_percentage: Percent, treasury_percentage: Percent, incentives_ratio: Percent, data: Vec<u8>, ) -> Self
Create a call with the variant add_emission_proposal
.
Sourcepub fn new_call_variant_set_emission_params(
recycling_percentage: Percent,
treasury_percentage: Percent,
) -> Self
pub fn new_call_variant_set_emission_params( recycling_percentage: Percent, treasury_percentage: Percent, ) -> Self
Create a call with the variant set_emission_params
.
Sourcepub fn new_call_variant_toggle_agent_freezing() -> Self
pub fn new_call_variant_toggle_agent_freezing() -> Self
Create a call with the variant toggle_agent_freezing
.
Sourcepub fn new_call_variant_toggle_namespace_freezing() -> Self
pub fn new_call_variant_toggle_namespace_freezing() -> Self
Create a call with the variant toggle_namespace_freezing
.
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 as Config>::AccountId: TypeInfo + 'static,
GlobalParamsData<T>: TypeInfo + 'static,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
<T as Config>::AccountId: TypeInfo + 'static,
GlobalParamsData<T>: TypeInfo + 'static,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: 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>where
<T as Config>::AccountId: Freeze,
impl<T> RefUnwindSafe for Call<T>where
<T as Config>::AccountId: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Call<T>where
T: Send,
impl<T> Sync for Call<T>where
T: Sync,
impl<T> Unpin for Call<T>
impl<T> UnwindSafe for Call<T>where
<T as Config>::AccountId: UnwindSafe,
T: 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
.