mintExactQuantity function

MoveCallBuilder mintExactQuantity(
  1. GeneratedConfig config, {
  2. required String expiryMarketId,
  3. required String wrapperId,
  4. required BigInt lowerTick,
  5. required BigInt higherTick,
  6. required BigInt quantityRaw,
  7. BigInt? maxCostRaw,
  8. BigInt? maxProbabilityRaw,
  9. required MarketFeeds feeds,
})

Mint a position of an exact quantityRaw, capped by cost/probability ceilings, returning the new order id (u256). Command order is pricer → auth → mint (auth is a hot potato consumed by this call). maxCostRaw/maxProbabilityRaw default to U64_MAX (no slippage cap). Deployed sig mint_exact_quantity.

Implementation

MoveCallBuilder mintExactQuantity(
  GeneratedConfig config, {
  required String expiryMarketId,
  required String wrapperId,
  required BigInt lowerTick,
  required BigInt higherTick,
  required BigInt quantityRaw,
  BigInt? maxCostRaw,
  BigInt? maxProbabilityRaw,
  required MarketFeeds feeds,
}) {
  return _liveTrade(
      config,
      expiryMarketId,
      feeds,
      (pricer) => withAuth(
          config,
          (auth) => expiry_market.mintExactQuantity(
                config: config,
                arguments: {
                  'market': expiryMarketId,
                  'wrapper': wrapperId,
                  'auth': auth,
                  'pricer': pricer,
                  'lowerTick': lowerTick,
                  'higherTick': higherTick,
                  'quantity': quantityRaw,
                  'maxCost': maxCostRaw ?? U64_MAX,
                  'maxProbability': maxProbabilityRaw ?? U64_MAX,
                },
              )));
}