Type alias CreateMarketBaseParams<C, MS>

CreateMarketBaseParams<C, MS>: {
    baseAsset: ZeitgeistPrimitivesAsset | AssetId;
    deadlines: {
        disputeDuration: number;
        gracePeriod: number;
        oracleDuration: number;
    };
    disputeMechanism: ZeitgeistPrimitivesMarketMarketDisputeMechanism | "Authorized" | "Court" | "SimpleDisputes";
    marketType: {
        Categorical: number;
    } | {
        Scalar: [number, number];
    };
    metadata: MarketTypeOf<MS>;
    oracle: string;
    period: {
        Block: [number, number];
    } | {
        Timestamp: [number, number];
    };
    signer: KeyringPairOrExtSigner;
    waitForFinalization?: boolean;
}

Base parameters for creating a market.

Type Parameters

Type declaration

  • baseAsset: ZeitgeistPrimitivesAsset | AssetId

    The base asset of the market. Can be ZTG or another

  • deadlines: {
        disputeDuration: number;
        gracePeriod: number;
        oracleDuration: number;
    }
    • disputeDuration: number

      The number of blocks to await possible disputes after market is resolved.

    • gracePeriod: number

      The number of blocks to wait after trading ends and before the oracle can resolve the market.

    • oracleDuration: number

      The number of blocks to wait for the oracle to resolve the market. If this period is exceeded, the market will go into open resolving where anyone can resolve the market.

  • disputeMechanism: ZeitgeistPrimitivesMarketMarketDisputeMechanism | "Authorized" | "Court" | "SimpleDisputes"

    Market dispute mechanism.

    Note

    Authorized is the only one available atm.

  • marketType: {
        Categorical: number;
    } | {
        Scalar: [number, number];
    }

    Type of market, categorical or scalar

  • metadata: MarketTypeOf<MS>

    Metadata to store in external storage alongside the market.

  • oracle: string

    The resolver of the market outcome

  • period: {
        Block: [number, number];
    } | {
        Timestamp: [number, number];
    }

    The period of the market in tuple of timestamps or block numbers.

  • signer: KeyringPairOrExtSigner

    The signer of the transaction. Can be a unlocked keyring pair or extension.

  • Optional waitForFinalization?: boolean

    If true, the extrinsic will wait for the market to be finalize in a block before resolving. Otherwise it will resolve immediately after inclusion.

Generated using TypeDoc