mintExactQuantity function
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,
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,
},
)));
}