getActions

sdk.deployMarket.getActions()

The getActions method generates a set of actions required to deploy a market. These actions typically involve deploying the market contract, registering the asset on the blockchain, and registering the market in the backend system.

Parameters

  • traits: Optional. IMarketFractionTraits - The traits that define the market's characteristics, such as time boundaries, capitalization, and asset types.
  • abortController: Optional. An AbortController instance to handle the cancellation of actions.

Returns

IMarketActions<Traits> - A set of actions (IActionsSet) that include deploying the contract, registering the asset, and registering the market.

returns an object with:

  • run method: Executes the set of actions required to complete the process, such as deploying a market.
  • on method: Allows you to subscribe to execution state changes, errors, and other events during the process. This method is useful for updating the UI or handling retries in case of errors.

Usage Example

const actions = await sdk.deployMarket.getActions();