> For the complete documentation index, see [llms.txt](https://docs.mav.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/libraries/packlib.md).

# PackLib

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

#### unpackExactInputSingleArgsAmounts <a href="#unpackexactinputsingleargsamounts" id="unpackexactinputsingleargsamounts"></a>

```solidity
function unpackExactInputSingleArgsAmounts(bytes memory argsPacked)
    internal
    pure
    returns (address recipient, IMaverickV2Pool pool, bool tokenAIn, uint256 amountIn, uint256 amountOutMinimum);
```

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

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

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

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

#### packAddLiquidityArgsToArray <a href="#packaddliquidityargstoarray" id="packaddliquidityargstoarray"></a>

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

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

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

#### unpackInt32Array <a href="#unpackint32array" id="unpackint32array"></a>

```solidity
function unpackInt32Array(bytes memory input) internal pure returns (int32[] memory array);
```

#### unpackUint128Array <a href="#unpackuint128array" id="unpackuint128array"></a>

```solidity
function unpackUint128Array(bytes memory input) internal pure returns (uint128[] memory array);
```

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

```solidity
function unpackUint88Array(bytes memory input) internal pure returns (uint88[] memory array);
```

#### packArray <a href="#packarray" id="packarray"></a>

```solidity
function packArray(int32[] memory array) internal pure returns (bytes memory output);
```

#### packArray <a href="#packarray-1" id="packarray-1"></a>

```solidity
function packArray(uint128[] memory array) internal pure returns (bytes memory output);
```

#### packArray <a href="#packarray-2" id="packarray-2"></a>

```solidity
function packArray(uint88[] memory array) internal pure returns (bytes memory output);
```

#### \_unpackArray <a href="#unpackarray" id="unpackarray"></a>

```solidity
function _unpackArray(bytes memory input, uint256 elementBytes) internal pure returns (uint256[] memory array);
```

#### \_packArray <a href="#packarray" id="packarray"></a>

```solidity
function _packArray(uint256[] memory array, uint256 elementBytes) internal pure returns (bytes memory output);
```

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mav.xyz/technical-reference/maverick-v2/v2-contracts/maverick-v2-supplemental-contracts/libraries/packlib.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
