• Calculates the total SOL cost for a bid.

    Multiplies the micro-SOL price per token basis by the token amount to get the total cost in SOL.

    Returns

    The total cost in SOL

    Example

    // Bidding for 1,000,000 token units at 500 micro-SOL each
    const pricePerUnit = microLamports(500n);
    const amount = 1_000_000n;
    const totalCost = totalBidSol(pricePerUnit, amount);
    // Returns total SOL needed for the bid

    Parameters

    • pricePerTokenBasis: MicroSolInput

      The price in micro-SOL per token basis unit

    • tokenAmount: bigint

      The number of token basis units to purchase

    Returns SolAmount

Generated using TypeDoc