mintExactAmount function
MoveCallBuilder
mintExactAmount(
- GeneratedConfig config, {
- required String expiryMarketId,
- required String wrapperId,
- required BigInt lowerTick,
- required BigInt higherTick,
- required BigInt maxPremiumRaw,
- required BigInt minQuantityRaw,
- BigInt? maxCostRaw,
- required MarketFeeds feeds,
Mint by spending up to maxPremiumRaw (raw quote units), enforcing a
minQuantityRaw floor on the position received and a maxCostRaw all-in
ceiling, returning the new order id (u256). Command order is pricer → auth
→ mint. Deployed sig mint_exact_amount.
Implementation
MoveCallBuilder mintExactAmount(
GeneratedConfig config, {
required String expiryMarketId,
required String wrapperId,
required BigInt lowerTick,
required BigInt higherTick,
required BigInt maxPremiumRaw,
required BigInt minQuantityRaw,
BigInt? maxCostRaw,
required MarketFeeds feeds,
}) {
return _liveTrade(
config,
expiryMarketId,
feeds,
(pricer) => withAuth(
config,
(auth) => expiry_market.mintExactAmount(
config: config,
arguments: {
'market': expiryMarketId,
'wrapper': wrapperId,
'auth': auth,
'pricer': pricer,
'lowerTick': lowerTick,
'higherTick': higherTick,
'maxPremium': maxPremiumRaw,
'minQuantity': minQuantityRaw,
'maxCost': maxCostRaw ?? U64_MAX,
},
)));
}