Stryke Docs
HomeGitHubSocials
  • ⚑Introducing Stryke
  • πŸ”Products Overview
    • Product Overview (CLAMM)
      • For Option Traders
      • For Liquidity Providers
  • 🌚Tokenomics
    • SYK Token
    • xSYK Token
    • Reward Gauges
    • Protocol Fees
  • πŸšΆβ€β™‚οΈUI Walkthroughs
    • CLAMM Walkthrough
      • Connect Wallet
      • Navigate Markets
      • Trade Options
      • Limit Exercise
      • Provide Liquidity
      • Reward Gauges
  • ⛓️Developers
    • Contracts
      • LP Management
        • Mint a Position
        • Burn a Position
        • Reserve Liquidity
        • Withdraw Reserved Liquidity
      • Trading
        • Mint Option
        • Exercise Option
    • APIs
      • xSYK
      • CLAMM
        • Trading
          • Purchase
          • Exercise
        • LP management
        • Option markets
        • Strikes chain
    • Deployed Addresses
      • CLAMM
      • Tokens & Others
      • Gauges
    • Bug Bounty Program
  • πŸ“šREFERENCES
    • Glossary
    • Audits
    • Partners
    • Media Kit
Powered by GitBook
LogoLogo

Β© 2024 Stryke

On this page

Was this helpful?

  1. Developers
  2. Contracts
  3. LP Management

Mint a Position

PreviousLP ManagementNextBurn a Position

Last updated 9 months ago

Was this helpful?

Mint a new position using the specified handler.

function mintPosition(IHandler _handler, bytes calldata _mintPositionData)
    external
    onlyWhitelistedHandlers(_handler)
    nonReentrant
    returns (uint256 sharesMinted);

Parameters

Name
Type
Description

_handler

IHandler

The address of the handler to use.

_mintPositionData

bytes

The data required to mint the position.

Returns

Name
Type
Description

sharesMinted

uint256

The number of shares minted.

The `_mintPositionData` parameter has to be constructed the following way:

struct MintPositionParams {
    IUniswapV3Pool pool;
    address hook;
    int24 tickLower;
    int24 tickUpper;
    uint128 liquidity;
}

bytes memory _mintPositionParams = abi.encode(
    _params.pool,
    _params.hook,
    _params.tickLower,
    _params.tickUpper,
    _params.liquidity
);

// To decode:
MintPositionParams memory decodedParams = abi.decode(encodedData, (MintPositionParams));

MintPositionParams Struct

Field Name
Type
Description

pool

IUniswapV3Pool

The Uniswap V3 pool contract

hook

address

The address of the hook contract

tickLower

int24

The lower tick of the position

tickUpper

int24

The upper tick of the position

liquidity

uint128

The amount of liquidity to mint

⛓️
Contract Git Source