pub enum SystemOperation {
Show 14 variants
Transfer {
owner: Option<Owner>,
recipient: Recipient,
amount: Amount,
},
Claim {
owner: Owner,
target_id: ChainId,
recipient: Recipient,
amount: Amount,
},
OpenChain(OpenChainConfig),
CloseChain,
ChangeOwnership {
super_owners: Vec<PublicKey>,
owners: Vec<(PublicKey, u64)>,
multi_leader_rounds: u32,
timeout_config: TimeoutConfig,
},
ChangeApplicationPermissions(ApplicationPermissions),
Subscribe {
chain_id: ChainId,
channel: SystemChannel,
},
Unsubscribe {
chain_id: ChainId,
channel: SystemChannel,
},
PublishBytecode {
bytecode_id: BytecodeId,
},
PublishDataBlob {
blob_hash: CryptoHash,
},
ReadBlob {
blob_id: BlobId,
},
CreateApplication {
bytecode_id: BytecodeId,
parameters: Vec<u8>,
instantiation_argument: Vec<u8>,
required_application_ids: Vec<UserApplicationId>,
},
RequestApplication {
chain_id: ChainId,
application_id: UserApplicationId,
},
Admin(AdminOperation),
}Expand description
A system operation.
Variants§
Transfer
Transfers amount units of value from the given owner’s account to the recipient.
If no owner is given, try to take the units out of the unattributed account.
Claim
Claims amount units of value from the given owner’s account in the remote
target chain. Depending on its configuration, the target chain may refuse to
process the message.
OpenChain(OpenChainConfig)
Creates (or activates) a new chain.
This will automatically subscribe to the future committees created by admin_id.
CloseChain
Closes the chain.
ChangeOwnership
Changes the ownership of the chain.
Fields
super_owners: Vec<PublicKey>Super owners can propose fast blocks in the first round, and regular blocks in any round.
owners: Vec<(PublicKey, u64)>The regular owners, with their weights that determine how often they are round leader.
multi_leader_rounds: u32The number of initial rounds after 0 in which all owners are allowed to propose blocks.
timeout_config: TimeoutConfigThe timeout configuration: how long fast, multi-leader and single-leader rounds last.
ChangeApplicationPermissions(ApplicationPermissions)
Changes the application permissions configuration on this chain.
Subscribe
Subscribes to a system channel.
Unsubscribe
Unsubscribes from a system channel.
PublishBytecode
Publishes a new application bytecode.
Fields
bytecode_id: BytecodeIdPublishDataBlob
Publishes a new data blob.
Fields
blob_hash: CryptoHashReadBlob
Reads a blob and discards the result.
CreateApplication
Creates a new application.
RequestApplication
Requests a message from another chain to register a user application on this chain.
Admin(AdminOperation)
Operations that are only allowed on the admin chain.
Trait Implementations§
Source§impl Clone for SystemOperation
impl Clone for SystemOperation
Source§fn clone(&self) -> SystemOperation
fn clone(&self) -> SystemOperation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemOperation
impl Debug for SystemOperation
Source§impl<'de> Deserialize<'de> for SystemOperation
impl<'de> Deserialize<'de> for SystemOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<SystemOperation> for Operation
impl From<SystemOperation> for Operation
Source§fn from(operation: SystemOperation) -> Self
fn from(operation: SystemOperation) -> Self
Source§impl Hash for SystemOperation
impl Hash for SystemOperation
Source§impl PartialEq for SystemOperation
impl PartialEq for SystemOperation
Source§impl Serialize for SystemOperation
impl Serialize for SystemOperation
impl Eq for SystemOperation
impl StructuralPartialEq for SystemOperation
Auto Trait Implementations§
impl Freeze for SystemOperation
impl RefUnwindSafe for SystemOperation
impl Send for SystemOperation
impl Sync for SystemOperation
impl Unpin for SystemOperation
impl UnwindSafe for SystemOperation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.