pub struct CallApi<'api> { /* private fields */ }Implementations§
source§impl<'api> CallApi<'api>
impl<'api> CallApi<'api>
sourcepub fn fill_block(&self, ratio: Perbill) -> Result<WrappedCall<'api>>
pub fn fill_block(&self, ratio: Perbill) -> Result<WrappedCall<'api>>
A dispatch that will fill the block weight up to the given ratio.
sourcepub fn set_heap_pages(&self, pages: u64) -> Result<WrappedCall<'api>>
pub fn set_heap_pages(&self, pages: u64) -> Result<WrappedCall<'api>>
Set the number of pages in the WebAssembly environment’s heap.
sourcepub fn set_code(&self, code: Vec<u8>) -> Result<WrappedCall<'api>>
pub fn set_code(&self, code: Vec<u8>) -> Result<WrappedCall<'api>>
Set the new runtime code.
O(C + S)whereClength ofcodeandScomplexity ofcan_set_code- 1 call to
can_set_code:O(S)(callssp_io::misc::runtime_versionwhich 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.
sourcepub fn set_code_without_checks(&self, code: Vec<u8>) -> Result<WrappedCall<'api>>
pub fn set_code_without_checks(&self, code: Vec<u8>) -> Result<WrappedCall<'api>>
sourcepub fn set_storage(
&self,
items: Vec<(Vec<u8>, Vec<u8>)>
) -> Result<WrappedCall<'api>>
pub fn set_storage(
&self,
items: Vec<(Vec<u8>, Vec<u8>)>
) -> Result<WrappedCall<'api>>
Set some items of storage.
sourcepub fn kill_storage(&self, keys: Vec<Vec<u8>>) -> Result<WrappedCall<'api>>
pub fn kill_storage(&self, keys: Vec<Vec<u8>>) -> Result<WrappedCall<'api>>
Kill some items from storage.
sourcepub fn kill_prefix(
&self,
prefix: Vec<u8>,
subkeys: u32
) -> Result<WrappedCall<'api>>
pub fn kill_prefix(
&self,
prefix: Vec<u8>,
subkeys: u32
) -> Result<WrappedCall<'api>>
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.
sourcepub fn remark_with_event(&self, remark: Vec<u8>) -> Result<WrappedCall<'api>>
pub fn remark_with_event(&self, remark: Vec<u8>) -> Result<WrappedCall<'api>>
Make some on-chain remark and emit event.
Trait Implementations§
Auto Trait Implementations§
impl<'api> !RefUnwindSafe for CallApi<'api>
impl<'api> Send for CallApi<'api>
impl<'api> Sync for CallApi<'api>
impl<'api> Unpin for CallApi<'api>
impl<'api> !UnwindSafe for CallApi<'api>
Blanket Implementations§
§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> 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>
Convert
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. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moresource§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> 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>,
Consume self to return an equivalent value of
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
The counterpart to
unchecked_from.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.