Type alias MarketMethods<C, MS>

MarketMethods<C, MS>: {
    adminCleanUpPool: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>;
    adminDestroyMarket: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>;
    adminMoveMarketToClosed: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>;
    adminMoveMarketToResolved: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>;
    approveMarket: Te.TaskEither<Error, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>;
    buyCompleteSet: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ExchangeFullSetParams, "marketId"> & TransactionHooks]>;
    deploySwapPool: Te.TaskEither<TransactionError, ExtractableResult<E.IEither<Error, RpcPool>>, [params: Omit<PoolDeploymentParams, "marketId"> & TransactionHooks]>;
    deploySwapPoolAndAdditionalLiquidity: Te.TaskEither<TransactionError, ExtractableResult<E.IEither<Error, RpcPool>>, [params: Omit<PoolDeploymentParams, "marketId"> & TransactionHooks]>;
    disputeOutcome: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>;
    fetchMetadata: Te.TaskEither<Error, MarketTypeOf<MS>, []>;
    redeemShares: Te.TaskEither<Error, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>;
    reportOutcome: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>;
    sellCompleteSet: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ExchangeFullSetParams, "marketId"> & TransactionHooks]>;
}

Interface on market with methods for deploying swap pools, buying and selling sets of assets..

Type Parameters

Type declaration

  • adminCleanUpPool: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>

    Clean up the pool of a resolved market.

    Origin

    The root origin.

    Param

    Omit<ReportOutcomeParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • adminDestroyMarket: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>

    Destroy a market, including its outcome assets, market account and pool account.

    Must be called by DestroyOrigin. Bonds (unless already returned) are slashed without exception. Can currently only be used for destroying CPMM markets.

    Origin

    DestroyOrigin

    Param

    {signer: KeyringPairOrExtSigner}

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • adminMoveMarketToClosed: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>

    Immediately move an open market to closed.

    Origin

    CloseOrigin

    Param

    {signer: KeyringPairOrExtSigner}

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • adminMoveMarketToResolved: Te.TaskEither<TransactionError, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>

    Immediately move a reported or disputed market to resolved.

    Origin

    ResolveOrigin

    Param

    {signer: KeyringPairOrExtSigner}

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • approveMarket: Te.TaskEither<Error, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>

    Approves a market that is waiting for approval from the advisory committee.

    Origin

    ApproveOrigin

    Param

    {signer: KeyringPairOrExtSigner}

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • buyCompleteSet: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ExchangeFullSetParams, "marketId"> & TransactionHooks]>

    Buy a full set of market assets.

    Param

    Omit<ExchangeFullSetParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • deploySwapPool: Te.TaskEither<TransactionError, ExtractableResult<E.IEither<Error, RpcPool>>, [params: Omit<PoolDeploymentParams, "marketId"> & TransactionHooks]>

    Deploy a swap pool for the market.

    Param

    Omit<PoolDeploymentParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, RpcPool>>

  • deploySwapPoolAndAdditionalLiquidity: Te.TaskEither<TransactionError, ExtractableResult<E.IEither<Error, RpcPool>>, [params: Omit<PoolDeploymentParams, "marketId"> & TransactionHooks]>

    Deploy a swap pool for the market and add liquidity.

    Param

    Omit<PoolDeploymentParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, RpcPool>>

  • disputeOutcome: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>

    Dispute the current market outcome with a proposed new outcome.

    Param

    Omit<ReportOutcomeParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • fetchMetadata: Te.TaskEither<Error, MarketTypeOf<MS>, []>

    Fetch metadata from external storage(default IPFS).

  • redeemShares: Te.TaskEither<Error, ISubmittableResult, [params: {
        signer: KeyringPairOrExtSigner;
    } & TransactionHooks]>

    Redeem the shares for a market.

    Param

    { signer: KeyringPairOrExtSigner } & TransactionHooks

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • reportOutcome: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ReportOutcomeParams, "marketId"> & TransactionHooks]>

    Report the outcome of a market. Can only be called by the markets oracle address.

    Param

    Omit<ReportOutcomeParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

  • sellCompleteSet: Te.TaskEither<TransactionError, ISubmittableResult, [params: Omit<ExchangeFullSetParams, "marketId"> & TransactionHooks]>

    Sell a full set of market assets.

    Param

    Omit<ExchangeFullSetParams, 'marketId'>

    Returns

    Promise<EitherInterface<Error, ISubmittableResult>>

Generated using TypeDoc