Enum pallet_subspace::pallet::Call
source · pub enum Call<T: Config> {
report_equivocation {
equivocation_proof: Box<EquivocationProof<HeaderFor<T>>>,
},
store_segment_headers {
segment_headers: Vec<SegmentHeader>,
},
enable_solution_range_adjustment {
solution_range_override: Option<u64>,
voting_solution_range_override: Option<u64>,
},
vote {
signed_vote: Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>,
},
enable_rewards_at {
enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>,
},
enable_authoring_by_anyone {},
set_pot_slot_iterations {
slot_iterations: NonZeroU32,
},
// some variants omitted
}
Expand description
Contains a variant per dispatchable extrinsic that this pallet has.
Variants§
report_equivocation
Report farmer equivocation/misbehavior. This method will verify the equivocation proof. If valid, the offence will be reported.
This extrinsic must be called unsigned and it is expected that only block authors will
call it (validated in ValidateUnsigned
), as such if the block author is defined it
will be defined as the equivocation reporter.
Fields
equivocation_proof: Box<EquivocationProof<HeaderFor<T>>>
store_segment_headers
Submit new segment header to the blockchain. This is an inherent extrinsic and part of the Subspace consensus logic.
enable_solution_range_adjustment
Enable solution range adjustment after every era. Note: No effect on the solution range for the current era
vote
Farmer vote, currently only used for extra rewards to farmers.
Fields
signed_vote: Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>
enable_rewards_at
Enable rewards for blocks and votes at specified block height.
Fields
enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>
Enable storage access for all users.
set_pot_slot_iterations
Update proof of time slot iterations
Fields
slot_iterations: NonZeroU32
Implementations§
source§impl<T: Config> Call<T>
impl<T: Config> Call<T>
sourcepub fn new_call_variant_report_equivocation(
equivocation_proof: Box<EquivocationProof<HeaderFor<T>>>,
) -> Self
pub fn new_call_variant_report_equivocation( equivocation_proof: Box<EquivocationProof<HeaderFor<T>>>, ) -> Self
Create a call with the variant report_equivocation
.
sourcepub fn new_call_variant_store_segment_headers(
segment_headers: Vec<SegmentHeader>,
) -> Self
pub fn new_call_variant_store_segment_headers( segment_headers: Vec<SegmentHeader>, ) -> Self
Create a call with the variant store_segment_headers
.
sourcepub fn new_call_variant_enable_solution_range_adjustment(
solution_range_override: Option<u64>,
voting_solution_range_override: Option<u64>,
) -> Self
pub fn new_call_variant_enable_solution_range_adjustment( solution_range_override: Option<u64>, voting_solution_range_override: Option<u64>, ) -> Self
Create a call with the variant enable_solution_range_adjustment
.
sourcepub fn new_call_variant_vote(
signed_vote: Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>,
) -> Self
pub fn new_call_variant_vote( signed_vote: Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>, ) -> Self
Create a call with the variant vote
.
sourcepub fn new_call_variant_enable_rewards_at(
enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>,
) -> Self
pub fn new_call_variant_enable_rewards_at( enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>, ) -> Self
Create a call with the variant enable_rewards_at
.
Create a call with the variant enable_authoring_by_anyone
.
sourcepub fn new_call_variant_set_pot_slot_iterations(
slot_iterations: NonZeroU32,
) -> Self
pub fn new_call_variant_set_pot_slot_iterations( slot_iterations: NonZeroU32, ) -> Self
Create a call with the variant set_pot_slot_iterations
.
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,
Box<EquivocationProof<HeaderFor<T>>>: TypeInfo + 'static,
Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>: TypeInfo + 'static,
EnableRewardsAt<BlockNumberFor<T>>: TypeInfo + 'static,
T: Config + 'static,
impl<T> TypeInfo for Call<T>where
PhantomData<(T,)>: TypeInfo + 'static,
Box<EquivocationProof<HeaderFor<T>>>: TypeInfo + 'static,
Box<SignedVote<BlockNumberFor<T>, T::Hash, T::AccountId>>: TypeInfo + 'static,
EnableRewardsAt<BlockNumberFor<T>>: TypeInfo + 'static,
T: Config + 'static,
source§impl<T: Config> UnfilteredDispatchable for Call<T>
impl<T: Config> UnfilteredDispatchable for Call<T>
§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>::Block as Block>::Header as Header>::Number: Freeze,
impl<T> RefUnwindSafe for Call<T>where
T: RefUnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: RefUnwindSafe,
<<T as Config>::Block as Block>::Header: RefUnwindSafe,
<T as Config>::Hash: RefUnwindSafe,
<T as Config>::AccountId: 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: UnwindSafe,
<<<T as Config>::Block as Block>::Header as Header>::Number: UnwindSafe,
<<T as Config>::Block as Block>::Header: UnwindSafe,
<T as Config>::Hash: 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
§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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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<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> 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<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
.