pub enum Call<T: Config> {
add_well_known_node {
node: OpaquePeerId,
owner: <<T as Config>::Lookup as StaticLookup>::Source,
},
remove_well_known_node {
node: OpaquePeerId,
},
swap_well_known_node {
remove: OpaquePeerId,
add: OpaquePeerId,
},
reset_well_known_nodes {
nodes: Vec<(OpaquePeerId, T::AccountId)>,
},
claim_node {
node: OpaquePeerId,
},
remove_claim {
node: OpaquePeerId,
},
transfer_node {
node: OpaquePeerId,
owner: <<T as Config>::Lookup as StaticLookup>::Source,
},
add_connections {
node: OpaquePeerId,
connections: Vec<OpaquePeerId>,
},
remove_connections {
node: OpaquePeerId,
connections: Vec<OpaquePeerId>,
},
// some variants omitted
}Expand description
Contains a variant per dispatchable extrinsic that this pezpallet has.
Variants§
add_well_known_node
Add a node to the set of well known nodes. If the node is already claimed, the owner will be updated and keep the existing additional connection unchanged.
May only be called from T::AddOrigin.
node: identifier of the node.
remove_well_known_node
Remove a node from the set of well known nodes. The ownership and additional connections of the node will also be removed.
May only be called from T::RemoveOrigin.
node: identifier of the node.
Fields
node: OpaquePeerIdswap_well_known_node
Swap a well known node to another. Both the ownership and additional connections stay untouched.
May only be called from T::SwapOrigin.
remove: the node which will be moved out from the list.add: the node which will be put in the list.
reset_well_known_nodes
Reset all the well known nodes. This will not remove the ownership and additional connections for the removed nodes. The node owner can perform further cleaning if they decide to leave the network.
May only be called from T::ResetOrigin.
nodes: the new nodes for the allow list.
Fields
nodes: Vec<(OpaquePeerId, T::AccountId)>claim_node
A given node can be claimed by anyone. The owner should be the first to know its PeerId, so claim it right away!
node: identifier of the node.
Fields
node: OpaquePeerIdremove_claim
A claim can be removed by its owner and get back the reservation. The additional connections are also removed. You can’t remove a claim on well known nodes, as it needs to reach consensus among the network participants.
node: identifier of the node.
Fields
node: OpaquePeerIdtransfer_node
A node can be transferred to a new owner.
node: identifier of the node.owner: new owner of the node.
add_connections
Add additional connections to a given node.
node: identifier of the node.connections: additional nodes from which the connections are allowed.
remove_connections
Remove additional connections of a given node.
node: identifier of the node.connections: additional nodes from which the connections are not allowed anymore.
Implementations§
Source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
Sourcepub fn new_call_variant_add_well_known_node(
node: PeerId,
owner: <<T as Config>::Lookup as StaticLookup>::Source,
) -> Self
pub fn new_call_variant_add_well_known_node( node: PeerId, owner: <<T as Config>::Lookup as StaticLookup>::Source, ) -> Self
Create a call with the variant add_well_known_node.
Sourcepub fn new_call_variant_remove_well_known_node(node: PeerId) -> Self
pub fn new_call_variant_remove_well_known_node(node: PeerId) -> Self
Create a call with the variant remove_well_known_node.
Sourcepub fn new_call_variant_swap_well_known_node(
remove: PeerId,
add: PeerId,
) -> Self
pub fn new_call_variant_swap_well_known_node( remove: PeerId, add: PeerId, ) -> Self
Create a call with the variant swap_well_known_node.
Sourcepub fn new_call_variant_reset_well_known_nodes(
nodes: Vec<(PeerId, T::AccountId)>,
) -> Self
pub fn new_call_variant_reset_well_known_nodes( nodes: Vec<(PeerId, T::AccountId)>, ) -> Self
Create a call with the variant reset_well_known_nodes.
Sourcepub fn new_call_variant_claim_node(node: PeerId) -> Self
pub fn new_call_variant_claim_node(node: PeerId) -> Self
Create a call with the variant claim_node.
Sourcepub fn new_call_variant_remove_claim(node: PeerId) -> Self
pub fn new_call_variant_remove_claim(node: PeerId) -> Self
Create a call with the variant remove_claim.
Sourcepub fn new_call_variant_transfer_node(
node: PeerId,
owner: <<T as Config>::Lookup as StaticLookup>::Source,
) -> Self
pub fn new_call_variant_transfer_node( node: PeerId, owner: <<T as Config>::Lookup as StaticLookup>::Source, ) -> Self
Create a call with the variant transfer_node.
Sourcepub fn new_call_variant_add_connections(
node: PeerId,
connections: Vec<PeerId>,
) -> Self
pub fn new_call_variant_add_connections( node: PeerId, connections: Vec<PeerId>, ) -> Self
Create a call with the variant add_connections.
Sourcepub fn new_call_variant_remove_connections(
node: PeerId,
connections: Vec<PeerId>,
) -> Self
pub fn new_call_variant_remove_connections( node: PeerId, connections: Vec<PeerId>, ) -> Self
Create a call with the variant remove_connections.
Trait Implementations§
Source§impl<T: Config> Authorize for Call<T>
impl<T: Config> Authorize for Call<T>
Source§impl<T: Config> CheckIfFeeless for Call<T>
impl<T: Config> CheckIfFeeless for Call<T>
Source§type Origin = <T as Config>::RuntimeOrigin
type Origin = <T as Config>::RuntimeOrigin
Source§fn is_feeless(&self, origin: &Self::Origin) -> bool
fn is_feeless(&self, origin: &Self::Origin) -> bool
#[pezpallet::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>
Source§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,
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, )
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Source§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: 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
pezframe_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> DecodeWithMemTracking for Call<T>where
<<T as Config>::Lookup as StaticLookup>::Source: DecodeWithMemTracking,
Vec<(PeerId, T::AccountId)>: DecodeWithMemTracking,
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>::RuntimeEvent: Sized,
<<T as Config>::Lookup as StaticLookup>::Source: RefUnwindSafe,
T: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
impl<T> Send for Call<T>where
<T as Config>::RuntimeEvent: Sized,
<<T as Config>::Lookup as StaticLookup>::Source: Send,
T: Send,
impl<T> Sync for Call<T>where
<T as Config>::RuntimeEvent: Sized,
<<T as Config>::Lookup as StaticLookup>::Source: Sync,
T: Sync,
impl<T> Unpin for Call<T>
impl<T> UnwindSafe for Call<T>where
<T as Config>::RuntimeEvent: Sized,
<<T as Config>::Lookup as StaticLookup>::Source: UnwindSafe,
T: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
Blanket Implementations§
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
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
impl<T> DecodeWithMemLimit for Twhere
T: DecodeWithMemTracking,
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§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>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.