# ArgPacker

**Inherits:** [IArgPacker](https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/liquiditybase/iargpacker)

View functions that pack and unpack addLiquidity parameters.

### Functions <a href="#functions" id="functions"></a>

#### unpackAddLiquidityArgs <a href="#unpackaddliquidityargs" id="unpackaddliquidityargs"></a>

Unpacks packed addLiquidity parameters.

```solidity
function unpackAddLiquidityArgs(bytes memory argsPacked)
    public
    pure
    returns (IMaverickV2Pool.AddLiquidityParams memory args);
```

#### packAddLiquidityArgs <a href="#packaddliquidityargs" id="packaddliquidityargs"></a>

Packs addLiquidity paramters into a bytes object. The packing is \[kind, ticksArray, amountsArray] where the arrays are packed like this: \[length, array\[0], array\[1],..., array\[length-1]]. length is 1 byte (256 total possible elements).

```solidity
function packAddLiquidityArgs(IMaverickV2Pool.AddLiquidityParams memory args)
    public
    pure
    returns (bytes memory argsPacked);
```

#### packAddLiquidityArgsArray <a href="#packaddliquidityargsarray" id="packaddliquidityargsarray"></a>

Packs addLiquidity paramters array element-wise.

```solidity
function packAddLiquidityArgsArray(IMaverickV2Pool.AddLiquidityParams[] memory args)
    public
    pure
    returns (bytes[] memory argsPacked);
```

#### unpackUint88Array <a href="#unpackuint88array" id="unpackuint88array"></a>

Unpacks sqrtPrice breaks bytes object into array.

```solidity
function unpackUint88Array(bytes memory packedArray) public pure returns (uint88[] memory fullArray);
```

#### packUint88Array <a href="#packuint88array" id="packuint88array"></a>

Packs sqrtPrice breaks array with this format: \[length, array\[0], array\[1],..., array\[length-1]] where length is 1 byte.

```solidity
function packUint88Array(uint88[] memory fullArray) public pure returns (bytes memory packedArray);
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/liquiditybase/argpacker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
