Skip to content
    hazBasehazBaseDocs
    SMART CONTRACTS
    Contract catalog

    MarketManager

    Handle token listings, purchases and fees.

    Markets & fund routingMarketManager.sol@hazbase/kit@0.9.0

    Role and use

    Build listing or signed-voucher trades with allowed payment tokens and participant conditions.

    Integration considerationsConfigure asset approvals, payment tokens, fees and destinations. Reconcile order status with confirmed events.

    Key SDK operations

    These operations are exposed by MarketManagerHelper in @hazbase/kit@0.9.0. The signatures below are type definitions; see the SDK reference for parameter structures and the complete interface.

    typescript
    import { MarketManagerHelper } from '@hazbase/kit';

    createAsk

    typescript
    async createAsk(
        asset: Asset,
        price: bigint,
        paymentToken: string,
        quantity: bigint,
        params?: {
          maxPerWallet?: number;
          startTime?: number;
          endTime?: number;
          royaltyReceiver?: string;
          royaltyBps?: number;
          agreement?: string;
          offerId?: string;
        }
      ): Promise<{ askId: bigint; receipt: ethers.TransactionReceipt }>

    fillAsk

    typescript
    async fillAsk(
        askId: BigNumberish,
        qty: BigNumberish,
        opts?: { permit?: PermitData; investorSig?: BytesLike; value?: bigint }
      ): Promise<{ receipt: TransactionReceipt; totals?: { totalPaid: bigint; fee: bigint; royalty: bigint; net: bigint } }>

    cancelAsk

    typescript
    async cancelAsk(askId: BigNumberish): Promise<TransactionReceipt>

    ask

    typescript
    async ask(id: BigNumberish): Promise<Ask>
    View parameters, return types and all methods

    Related contracts

    Put it into practice

    Physical assets & inventory

    See the data model, processing sequence and SDK code for an application-level implementation.

    Read the implementation pattern

    Specification and source

    The Solidity source is pinned to the revision below. Match it with the SDK version and your network’s implementation address and ABI.

    market-manager/contracts/MarketManager.sol

    Source revision: b53a5b5