pub enum TransactionKind {
Transfer {
to: AccountId,
amount: Balance,
},
ServiceCall {
service: ServiceId,
method: u32,
data: Vec<u8>,
},
ServiceDeploy {
code: Vec<u8>,
initial_state: Vec<u8>,
},
ServiceUpdate {
service: ServiceId,
code: Vec<u8>,
},
ValidatorRegister {
keys: ValidatorKeys,
stake: Balance,
},
ValidatorUnregister,
Delegate {
validator: AccountId,
amount: Balance,
},
Undelegate {
validator: AccountId,
amount: Balance,
},
CoreAssign {
core: u16,
service: ServiceId,
duration: u64,
},
AvailabilityReport {
core: u16,
data_hash: Hash,
chunks: Vec<Vec<u8>>,
},
DisputeInitiate {
core: u16,
block_number: u32,
evidence: Vec<u8>,
},
DisputeVote {
dispute_id: Hash,
vote: bool,
justification: Vec<u8>,
},
}Expand description
Transaction kinds supported by JAM
Variants§
Transfer
Transfer tokens between accounts
ServiceCall
Call a service method
ServiceDeploy
Deploy a new service
ServiceUpdate
Update service code
ValidatorRegister
Register as a validator
ValidatorUnregister
Unregister as a validator
Delegate
Delegate stake to a validator
Undelegate
Undelegate stake from a validator
CoreAssign
Core assignment transaction
Fields
AvailabilityReport
Availability report
Fields
DisputeInitiate
Dispute initiation
Fields
DisputeVote
Dispute vote
Implementations§
Source§impl TransactionKind
impl TransactionKind
Sourcepub fn transaction_type(&self) -> TransactionType
pub fn transaction_type(&self) -> TransactionType
Get the transaction type identifier
Sourcepub fn requires_stake(&self) -> bool
pub fn requires_stake(&self) -> bool
Check if this transaction requires stake
Sourcepub fn target_service(&self) -> Option<ServiceId>
pub fn target_service(&self) -> Option<ServiceId>
Get the target service ID if applicable
Sourcepub fn target_core(&self) -> Option<u16>
pub fn target_core(&self) -> Option<u16>
Get the core index if applicable
Trait Implementations§
Source§impl Clone for TransactionKind
impl Clone for TransactionKind
Source§fn clone(&self) -> TransactionKind
fn clone(&self) -> TransactionKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionKind
impl Debug for TransactionKind
Source§impl Decode for TransactionKind
impl Decode for TransactionKind
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>
Attempt to deserialise the value from input.
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,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<'de> Deserialize<'de> for TransactionKind
impl<'de> Deserialize<'de> for TransactionKind
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for TransactionKind
impl Encode for TransactionKind
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
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, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl EncodeLike for TransactionKind
impl Eq for TransactionKind
Source§impl PartialEq for TransactionKind
impl PartialEq for TransactionKind
Source§fn eq(&self, other: &TransactionKind) -> bool
fn eq(&self, other: &TransactionKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TransactionKind
impl Serialize for TransactionKind
impl StructuralPartialEq for TransactionKind
Auto Trait Implementations§
impl Freeze for TransactionKind
impl RefUnwindSafe for TransactionKind
impl Send for TransactionKind
impl Sync for TransactionKind
impl Unpin for TransactionKind
impl UnsafeUnpin for TransactionKind
impl UnwindSafe for TransactionKind
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
Mutably borrows from an owned value. Read more