Trait polkadot_runtime_common::traits::Registrar
source · pub trait Registrar {
type AccountId;
// 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;
// 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 parachains. Ordered ascending by ParaId
. Parathreads are not included.
sourcefn is_parathread(id: ParaId) -> bool
fn is_parathread(id: ParaId) -> bool
Return if a ParaId
is a Parathread.
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 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
Lower a para back to normal from parachain status.
Provided Methods§
sourcefn is_parachain(id: ParaId) -> bool
fn is_parachain(id: ParaId) -> bool
Return if a ParaId
is a Parachain.
sourcefn is_registered(id: ParaId) -> bool
fn is_registered(id: ParaId) -> bool
Return if a ParaId
is registered in the system.