pub struct ServiceInfo {
pub code_hash: CodeHash,
pub balance: Balance,
pub threshold: Balance,
pub min_item_gas: UnsignedGas,
pub min_memo_gas: UnsignedGas,
pub bytes: u64,
pub items: u32,
pub deposit_offset: Balance,
pub creation_slot: Slot,
pub last_accumulation_slot: Slot,
pub parent_service: ServiceId,
}Expand description
Information concerning a particular service’s state.
This is used in the service_info host-call.
Fields§
§code_hash: CodeHashThe hash of the code of the service.
balance: BalanceThe existing balance of the service.
threshold: BalanceThe minimum balance which the service must satisfy.
min_item_gas: UnsignedGasThe minimum amount of gas which must be provided to this service’s accumulate for each
work item it must process.
min_memo_gas: UnsignedGasThe minimum amount of gas which must be provided to this service’s accumulate for each
incoming transfer it must process.
bytes: u64The total number of bytes used for data electively held for this service on-chain.
items: u32The total number of items of data electively held for this service on-chain.
deposit_offset: BalanceOffset of storage footprint only above which a minimum deposit is needed.
creation_slot: SlotCreation time slot.
last_accumulation_slot: SlotMost recent accumulation time slot.
parent_service: ServiceIdParent service identifier.
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub const CODE_HASH_OFFSET: usize = 0
pub const CODE_HASH_OFFSET: usize = 0
Field offsets in the encoded representation
pub const BALANCE_OFFSET: usize = 32
pub const THRESHOLD_OFFSET: usize = 40
pub const MIN_ITEM_GAS_OFFSET: usize = 48
pub const MIN_MEMO_GAS_OFFSET: usize = 56
pub const BYTES_OFFSET: usize = 64
pub const ITEMS_OFFSET: usize = 72
pub const DEPOSIT_OFFSET_OFFSET: usize = 76
pub const CREATION_SLOT_OFFSET: usize = 84
pub const LAST_ACCUMULATION_SLOT_OFFSET: usize = 88
pub const PARENT_SERVICE_OFFSET: usize = 92
Sourcepub const ENCODED_LEN: usize = 96
pub const ENCODED_LEN: usize = 96
Encoded length in bytes.
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more