Order pallet

The order pallet is mainly meant for parachains looking to interact with the market. Therefore, teams looking to deploy their parachain on Polkadot should look into procuring Coretime by accessing the Market pallet.

Nevertheless, if they cannot find Coretime on the market that meets their requirements, they can create an order. This way, they will signal to Coretime traders that there is demand for a region that meets the specified requirements.

create_order

Extrinsic for creating an order.

Arguments:

  • para_id: The para id to which Coretime will be allocated.

  • requirements: Region requirements of the order.

pub fn create_order(
	origin: OriginFor<T>,
	para_id: ParaId,
	requirements: Requirements,
) -> DispatchResult {

cancel_order

Extrinsic for cancelling an order.

If the region requirements on which the order was based are for an expired region, anyone can cancel the order.

Only expired orders can be cancelled.

Arguments:

  • order_id: The order the caller wants to cancel.

pub fn cancel_order(origin: OriginFor<T>, order_id: OrderId) -> DispatchResult { }

contribute

Extrinsic for contributing to an order.

Arguments:

  • order_id: The order to which the caller wants to contribute.

  • amount: The amount of tokens the user wants to contribute. This amount will be reserved and will only be spent if the order gets fulfilled.

pub fn contribute(
	origin: OriginFor<T>,
	order_id: OrderId,
	amount: BalanceOf<T>,
) -> DispatchResult { }

remove_contribution

Extrinsic for removing contributions from a cancelled order.

Arguments:

  • order_id: The cancelled order from which the user wants to claim back their contribution.

pub fn remove_contribution(origin: OriginFor<T>, order_id: OrderId) -> DispatchResult { }

Last updated