Enum dock_runtime::SystemCall
pub enum SystemCall<T>where
T: Config,{
fill_block {
ratio: Perbill,
},
remark {
remark: Vec<u8, Global>,
},
set_heap_pages {
pages: u64,
},
set_code {
code: Vec<u8, Global>,
},
set_code_without_checks {
code: Vec<u8, Global>,
},
set_storage {
items: Vec<(Vec<u8, Global>, Vec<u8, Global>), Global>,
},
kill_storage {
keys: Vec<Vec<u8, Global>, Global>,
},
kill_prefix {
prefix: Vec<u8, Global>,
subkeys: u32,
},
remark_with_event {
remark: Vec<u8, Global>,
},
// some variants omitted
}
Expand description
Contains one variant per dispatchable that can be called by an extrinsic.
Variants§
fill_block
Fields
ratio: Perbill
A dispatch that will fill the block weight up to the given ratio.
remark
set_heap_pages
Set the number of pages in the WebAssembly environment’s heap.
set_code
Set the new runtime code.
O(C + S)
whereC
length ofcode
andS
complexity ofcan_set_code
- 1 call to
can_set_code
:O(S)
(callssp_io::misc::runtime_version
which is expensive). - 1 storage write (codec
O(C)
). - 1 digest item.
- 1 event. The weight of this function is dependent on the runtime, but generally this is very expensive. We will treat this as a full block.
set_code_without_checks
Set the new runtime code without doing any checks of the given code
.
O(C)
whereC
length ofcode
- 1 storage write (codec
O(C)
). - 1 digest item.
- 1 event. The weight of this function is dependent on the runtime. We will treat this as a full block. #
set_storage
Set some items of storage.
kill_storage
Kill some items from storage.
kill_prefix
Kill all storage items with a key that starts with the given prefix.
NOTE: We rely on the Root origin to provide us the number of subkeys under the prefix we are removing to accurately calculate the weight of this function.
remark_with_event
Make some on-chain remark and emit event.
Implementations§
§impl<T> Call<T>where
T: Config,
impl<T> Call<T>where T: Config,
pub fn new_call_variant_fill_block(ratio: Perbill) -> Call<T>
pub fn new_call_variant_fill_block(ratio: Perbill) -> Call<T>
Create a call with the variant fill_block
.
pub fn new_call_variant_remark(remark: Vec<u8, Global>) -> Call<T>
pub fn new_call_variant_remark(remark: Vec<u8, Global>) -> Call<T>
Create a call with the variant remark
.
pub fn new_call_variant_set_heap_pages(pages: u64) -> Call<T>
pub fn new_call_variant_set_heap_pages(pages: u64) -> Call<T>
Create a call with the variant set_heap_pages
.
pub fn new_call_variant_set_code(code: Vec<u8, Global>) -> Call<T>
pub fn new_call_variant_set_code(code: Vec<u8, Global>) -> Call<T>
Create a call with the variant set_code
.
pub fn new_call_variant_set_code_without_checks(
code: Vec<u8, Global>
) -> Call<T>
pub fn new_call_variant_set_code_without_checks( code: Vec<u8, Global> ) -> Call<T>
Create a call with the variant set_code_without_checks
.
pub fn new_call_variant_set_storage(
items: Vec<(Vec<u8, Global>, Vec<u8, Global>), Global>
) -> Call<T>
pub fn new_call_variant_set_storage( items: Vec<(Vec<u8, Global>, Vec<u8, Global>), Global> ) -> Call<T>
Create a call with the variant set_storage
.
pub fn new_call_variant_kill_storage(
keys: Vec<Vec<u8, Global>, Global>
) -> Call<T>
pub fn new_call_variant_kill_storage( keys: Vec<Vec<u8, Global>, Global> ) -> Call<T>
Create a call with the variant kill_storage
.
pub fn new_call_variant_kill_prefix(
prefix: Vec<u8, Global>,
subkeys: u32
) -> Call<T>
pub fn new_call_variant_kill_prefix( prefix: Vec<u8, Global>, subkeys: u32 ) -> Call<T>
Create a call with the variant kill_prefix
.
pub fn new_call_variant_remark_with_event(remark: Vec<u8, Global>) -> Call<T>
pub fn new_call_variant_remark_with_event(remark: Vec<u8, Global>) -> Call<T>
Create a call with the variant remark_with_event
.
Trait Implementations§
§impl<T> Decode for Call<T>where
T: Config,
impl<T> Decode for Call<T>where T: Config,
§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Call<T>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Call<T>, Error>where __CodecInputEdqy: Input,
§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>
§impl<T> Encode for Call<T>where
T: Config,
impl<T> Encode for Call<T>where T: Config,
§fn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(&self, __codec_dest_edqy: &mut __CodecOutputEdqy)where __CodecOutputEdqy: Output + ?Sized,
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
§impl<T> GetCallName for Call<T>where
T: Config,
impl<T> GetCallName for Call<T>where T: Config,
§fn get_call_name(&self) -> &'static str
fn get_call_name(&self) -> &'static str
§fn get_call_names() -> &'static [&'static str]
fn get_call_names() -> &'static [&'static str]
§impl<T> GetDispatchInfo for Call<T>where
T: Config,
impl<T> GetDispatchInfo for Call<T>where T: Config,
§fn get_dispatch_info(&self) -> DispatchInfo
fn get_dispatch_info(&self) -> DispatchInfo
DispatchInfo
, containing relevant information of this dispatch. Read more§impl<T> TypeInfo for Call<T>where
T: Config + 'static,
PhantomData<(T,)>: TypeInfo + 'static,
impl<T> TypeInfo for Call<T>where T: Config + 'static, PhantomData<(T,)>: TypeInfo + 'static,
§impl<T> UnfilteredDispatchable for Call<T>where
T: Config,
impl<T> UnfilteredDispatchable for Call<T>where T: Config,
§type Origin = <T as Config>::Origin
type Origin = <T as Config>::Origin
frame_system::Config::Origin
).§fn dispatch_bypass_filter(
self,
origin: <Call<T> as UnfilteredDispatchable>::Origin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
fn dispatch_bypass_filter( self, origin: <Call<T> as UnfilteredDispatchable>::Origin ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
impl<T> EncodeLike<Call<T>> for Call<T>where T: Config,
impl<T> Eq for Call<T>where T: Config,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Call<T>where 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>where T: Unpin,
impl<T> UnwindSafe for Call<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> CanUpdate<()> for T
impl<T> CanUpdate<()> for T
source§fn can_remove(&self, _entity: &()) -> bool
fn can_remove(&self, _entity: &()) -> bool
§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>,
§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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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>
§impl<T> IsType<T> for T
impl<T> IsType<T> 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<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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.