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§

source

type AccountId

The account ID type that encodes a parachain manager ID.

Required Methods§

source

fn manager_of(id: ParaId) -> Option<Self::AccountId>

Report the manager (permissioned owner) of a parachain, if there is one.

source

fn parachains() -> Vec<ParaId>

All lease holding parachains. Ordered ascending by ParaId. On-demand parachains are not included.

source

fn is_parathread(id: ParaId) -> bool

Return if a ParaId is a Parathread (on-demand parachain).

source

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.

source

fn remove_lock(id: ParaId)

Remove any lock on the para registration.

source

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.

source

fn deregister(id: ParaId) -> DispatchResult

Deregister a Para ID, free any data, and return any deposits.

source

fn make_parachain(id: ParaId) -> DispatchResult

Elevate a para to parachain status.

source

fn make_parathread(id: ParaId) -> DispatchResult

Downgrade lease holding parachain into parathread (on-demand parachain)

Provided Methods§

source

fn is_parachain(id: ParaId) -> bool

Return if a ParaId is a lease holding Parachain.

source

fn is_registered(id: ParaId) -> bool

Return if a ParaId is registered in the system.

Implementors§

source§

impl<T: Config> Registrar for Pallet<T>

§

type AccountId = <T as Config>::AccountId