Trait polkadot_runtime_common::traits::Registrar
source · pub trait Registrar {
type AccountId;
Show 14 methods
// Required methods
fn manager_of(id: ParaId) -> Option<Self::AccountId>;
fn parachains() -> Vec<ParaId>;
fn is_parathread(id: ParaId) -> bool;
fn apply_lock(id: ParaId);
fn remove_lock(id: ParaId);
fn register(
who: Self::AccountId,
id: ParaId,
genesis_head: HeadData,
validation_code: ValidationCode,
) -> DispatchResult;
fn deregister(id: ParaId) -> DispatchResult;
fn make_parachain(id: ParaId) -> DispatchResult;
fn make_parathread(id: ParaId) -> DispatchResult;
fn worst_head_data() -> HeadData;
fn worst_validation_code() -> ValidationCode;
fn execute_pending_transitions();
// Provided methods
fn is_parachain(id: ParaId) -> bool { ... }
fn is_registered(id: ParaId) -> bool { ... }
}
Expand description
Parachain registration API.
Required Associated Types§
Required Methods§
sourcefn manager_of(id: ParaId) -> Option<Self::AccountId>
fn manager_of(id: ParaId) -> Option<Self::AccountId>
Report the manager (permissioned owner) of a parachain, if there is one.
sourcefn parachains() -> Vec<ParaId>
fn parachains() -> Vec<ParaId>
All lease holding parachains. Ordered ascending by ParaId
. On-demand
parachains are not included.
sourcefn is_parathread(id: ParaId) -> bool
fn is_parathread(id: ParaId) -> bool
Return if a ParaId
is a Parathread (on-demand parachain).
sourcefn apply_lock(id: ParaId)
fn apply_lock(id: ParaId)
Apply a lock to the para registration so that it cannot be modified by the manager directly. Instead the para must use its sovereign governance or the governance of the relay chain.
sourcefn remove_lock(id: ParaId)
fn remove_lock(id: ParaId)
Remove any lock on the para registration.
sourcefn register(
who: Self::AccountId,
id: ParaId,
genesis_head: HeadData,
validation_code: ValidationCode,
) -> DispatchResult
fn register( who: Self::AccountId, id: ParaId, genesis_head: HeadData, validation_code: ValidationCode, ) -> DispatchResult
Register a Para ID under control of who
. Registration may be
delayed by session rotation.
sourcefn deregister(id: ParaId) -> DispatchResult
fn deregister(id: ParaId) -> DispatchResult
Deregister a Para ID, free any data, and return any deposits.
sourcefn make_parachain(id: ParaId) -> DispatchResult
fn make_parachain(id: ParaId) -> DispatchResult
Elevate a para to parachain status.
sourcefn make_parathread(id: ParaId) -> DispatchResult
fn make_parathread(id: ParaId) -> DispatchResult
Downgrade lease holding parachain into parathread (on-demand parachain)
fn worst_head_data() -> HeadData
fn worst_validation_code() -> ValidationCode
sourcefn execute_pending_transitions()
fn execute_pending_transitions()
Execute any pending state transitions for paras. For example onboarding to on-demand parachain, or upgrading on-demand to lease holding parachain.
Provided Methods§
sourcefn is_parachain(id: ParaId) -> bool
fn is_parachain(id: ParaId) -> bool
Return if a ParaId
is a lease holding Parachain.
sourcefn is_registered(id: ParaId) -> bool
fn is_registered(id: ParaId) -> bool
Return if a ParaId
is registered in the system.