pub enum Call<T: Config> {
add_stake {
agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
},
remove_stake {
agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
},
transfer_stake {
agent_key: <T as Config>::AccountId,
new_agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
},
register_agent {
agent_key: T::AccountId,
name: Vec<u8>,
url: Vec<u8>,
metadata: Vec<u8>,
},
unregister_agent {},
update_agent {
url: Vec<u8>,
metadata: Option<Vec<u8>>,
staking_fee: Option<Percent>,
weight_control_fee: Option<Percent>,
},
set_agent_update_cooldown {
new_cooldown: BlockNumberFor<T>,
},
create_namespace {
path: NamespacePathInner,
},
delete_namespace {
path: NamespacePathInner,
},
// some variants omitted
}
Expand description
Contains a variant per dispatchable extrinsic that this pallet has.
Variants§
add_stake
Adds stakes from origin to the agent key.
Fields
agent_key: <T as Config>::AccountId
remove_stake
Removes stakes from origin to the agent key.
Fields
agent_key: <T as Config>::AccountId
transfer_stake
Transfers origin’s stakes from an agent to another.
register_agent
Registers a new agent on behalf of an arbitrary key.
unregister_agent
Unregister origin’s key agent.
update_agent
Updates origin’s key agent metadata.
Fields
set_agent_update_cooldown
Updates origin’s key agent metadata.
Fields
new_cooldown: BlockNumberFor<T>
create_namespace
Create a new namespace, automatically creating missing intermediate nodes
Fields
path: NamespacePathInner
delete_namespace
Delete a namespace and all its children
Fields
path: NamespacePathInner
Implementations§
Source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
Sourcepub fn new_call_variant_add_stake(
agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
) -> Self
pub fn new_call_variant_add_stake( agent_key: <T as Config>::AccountId, amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, ) -> Self
Create a call with the variant add_stake
.
Sourcepub fn new_call_variant_remove_stake(
agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
) -> Self
pub fn new_call_variant_remove_stake( agent_key: <T as Config>::AccountId, amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, ) -> Self
Create a call with the variant remove_stake
.
Sourcepub fn new_call_variant_transfer_stake(
agent_key: <T as Config>::AccountId,
new_agent_key: <T as Config>::AccountId,
amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance,
) -> Self
pub fn new_call_variant_transfer_stake( agent_key: <T as Config>::AccountId, new_agent_key: <T as Config>::AccountId, amount: <<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance, ) -> Self
Create a call with the variant transfer_stake
.
Sourcepub fn new_call_variant_register_agent(
agent_key: T::AccountId,
name: Vec<u8>,
url: Vec<u8>,
metadata: Vec<u8>,
) -> Self
pub fn new_call_variant_register_agent( agent_key: T::AccountId, name: Vec<u8>, url: Vec<u8>, metadata: Vec<u8>, ) -> Self
Create a call with the variant register_agent
.
Sourcepub fn new_call_variant_unregister_agent() -> Self
pub fn new_call_variant_unregister_agent() -> Self
Create a call with the variant unregister_agent
.
Sourcepub fn new_call_variant_update_agent(
url: Vec<u8>,
metadata: Option<Vec<u8>>,
staking_fee: Option<Percent>,
weight_control_fee: Option<Percent>,
) -> Self
pub fn new_call_variant_update_agent( url: Vec<u8>, metadata: Option<Vec<u8>>, staking_fee: Option<Percent>, weight_control_fee: Option<Percent>, ) -> Self
Create a call with the variant update_agent
.
Sourcepub fn new_call_variant_set_agent_update_cooldown(
new_cooldown: BlockNumberFor<T>,
) -> Self
pub fn new_call_variant_set_agent_update_cooldown( new_cooldown: BlockNumberFor<T>, ) -> Self
Create a call with the variant set_agent_update_cooldown
.
Sourcepub fn new_call_variant_create_namespace(path: NamespacePathInner) -> Self
pub fn new_call_variant_create_namespace(path: NamespacePathInner) -> Self
Create a call with the variant create_namespace
.
Sourcepub fn new_call_variant_delete_namespace(path: NamespacePathInner) -> Self
pub fn new_call_variant_delete_namespace(path: NamespacePathInner) -> Self
Create a call with the variant delete_namespace
.
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,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
BlockNumberFor<T>: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
<T as Config>::AccountId: TypeInfo + 'static,
<<T as Config>::Currency as Currency<<T as Config>::AccountId>>::Balance: TypeInfo + 'static,
T::AccountId: TypeInfo + 'static,
BlockNumberFor<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>::Block as Block>::Header as Header>::Number: 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 as Config>::Block as Block>::Header as Header>::Number: 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
.