# Payloads

### router\_payloads

* [Description](#description)
* [Data Storage](#data-storage)
* [Interface](#interface)
* [Messages](#messages)

## Messages

### POOL\_FUND\_ACCOUNT

Opcode : **0x4468de77**

This is not a message Op this is a payload format for JETTON\_TRANSFER\_NOTIFICATION\ <br>

<table data-full-width="true"><thead><tr><th width="50">Path</th><th width="200">Mnemonic</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td></td><td>op</td><td>Uint(32),op</td><td>POOLV3_FUND_ACCOUNT (0x4468de77)</td></tr><tr><td></td><td>jetton_target_w</td><td>Address(267)</td><td>Address of the jetton0 wallet. Used to compute pool address</td></tr><tr><td></td><td>enough0</td><td>Coins(124)</td><td>When temporary storage (user account) satisfy both enough0/1 amounts - mint would trigger</td></tr><tr><td></td><td>enough1</td><td>Coins(124)</td><td>When temporary storage (user account) satisfy both enough0/1 amounts - mint would trigger</td></tr><tr><td></td><td>needPos</td><td>Uint(64)</td><td>Amount of positions that are enough for the order to be executed</td></tr><tr><td></td><td>passthrough</td><td>Uint(4)</td><td>Amount of positions that will be untouched</td></tr><tr><td></td><td>target_action</td><td>Uint(32)</td><td>target_action</td></tr><tr><td></td><td>0</td><td>Maybe Cell(1) MintOrder0</td><td>Cell with mint order</td></tr><tr><td>0</td><td>op0</td><td>Uint(32)</td><td></td></tr><tr><td>0</td><td>liquidity0</td><td>Uint(128)</td><td>Amount of liquidity to mint</td></tr><tr><td>0</td><td>tickLower0</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>0</td><td>tickUpper0</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>0</td><td>receiver</td><td>Address(267)</td><td>Address of receiver of the NFT</td></tr><tr><td></td><td>1</td><td>Maybe Cell(1) MintOrder1</td><td>Cell with mint order</td></tr><tr><td>1</td><td>op1</td><td>Uint(32)</td><td></td></tr><tr><td>1</td><td>liquidity1</td><td>Uint(128)</td><td>Amount of liquidity to mint</td></tr><tr><td>1</td><td>tickLower1</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>1</td><td>tickUpper1</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>1</td><td>receiver</td><td>Address(267)</td><td>Address of receiver of the NFT</td></tr><tr><td></td><td>2</td><td>Maybe Cell(1) MintOrder2</td><td>Cell with mint order</td></tr><tr><td>2</td><td>op2</td><td>Uint(32)</td><td></td></tr><tr><td>2</td><td>liquidity2</td><td>Uint(128)</td><td>Amount of liquidity to mint</td></tr><tr><td>2</td><td>tickLower2</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>2</td><td>tickUpper2</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>2</td><td>receiver</td><td>Address(267)</td><td>Address of receiver of the NFT</td></tr><tr><td></td><td>3</td><td>Maybe Cell(1) MintOrder3</td><td>Cell with mint order</td></tr><tr><td>3</td><td>op3</td><td>Uint(32)</td><td></td></tr><tr><td>3</td><td>liquidity3</td><td>Uint(128)</td><td>Amount of liquidity to mint</td></tr><tr><td>3</td><td>tickLower3</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>3</td><td>tickUpper3</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>3</td><td>receiver</td><td>Address(267)</td><td>Address of receiver of the NFT</td></tr></tbody></table>

<details>

<summary>TL-B Description (TBD)</summary>

This is a preliminary tl-b - subject to change

{% code title="Tlb for POOL\_FUND\_ACCOUNT" overflow="wrap" lineNumbers="true" %}

```javascript
POOL_FUND_ACCOUNT#4468de77 
    jetton_target_w:MsgAddress
    enough0:(VarUInteger 16)
    enough1:(VarUInteger 16)
    needPos:uint64
    passthrough:uint4
    target_action:uint32
    MintOrder0:(Maybe ^[
        op0:uint32
        liquidity0:uint128
        tickLower0:int24
        tickUpper0:int24
        receiver:MsgAddress
    ] ) 
    MintOrder1:(Maybe ^[
        op1:uint32
        liquidity1:uint128
        tickLower1:int24
        tickUpper1:int24
        receiver:MsgAddress
    ] ) 
    MintOrder2:(Maybe ^[
        op2:uint32
        liquidity2:uint128
        tickLower2:int24
        tickUpper2:int24
        receiver:MsgAddress
    ] ) 
    MintOrder3:(Maybe ^[
        op3:uint32
        liquidity3:uint128
        tickLower3:int24
        tickUpper3:int24
        receiver:MsgAddress
    ] ) 
= ContractMessages;
```

{% endcode %}

</details>

### POOL\_FUND\_SOMEONES\_ACCOUNT

Opcode : **0x134b6d30**

This is not a message Op this is a payload format for JETTON\_TRANSFER\_NOTIFICATION\ <br>

<table data-full-width="true"><thead><tr><th width="50">Path</th><th width="200">Mnemonic</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td></td><td>op</td><td>Uint(32),op</td><td></td></tr><tr><td></td><td>jetton_target_w</td><td>Address(267)</td><td>Address of the second jetton wallet (first is identified by sender_address). Used to compute pool address</td></tr><tr><td></td><td>to_user</td><td>Address(267)</td><td>User to fund</td></tr></tbody></table>

<details>

<summary>TL-B Description (TBD)</summary>

This is a preliminary tl-b - subject to change

{% code title="Tlb for POOL\_FUND\_SOMEONES\_ACCOUNT" overflow="wrap" lineNumbers="true" %}

```javascript
POOL_FUND_SOMEONES_ACCOUNT#134b6d30 
    jetton_target_w:MsgAddress
    to_user:MsgAddress
= ContractMessages;
```

{% endcode %}

</details>

### POOL\_SWAP

Opcode : **0xa7fb58f8**

This is not a message Op this is a payload format for JETTON\_TRANSFER\_NOTIFICATION\ <br>

<table data-full-width="true"><thead><tr><th width="50">Path</th><th width="200">Mnemonic</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td></td><td>op</td><td>Uint(32),op</td><td></td></tr><tr><td></td><td>target_jetton_wallet</td><td>Address(267)</td><td></td></tr><tr><td></td><td>sqrtPriceLimitX96</td><td>Uint(160),PriceX96</td><td>Limit price. Swap won't go beyond it</td></tr><tr><td></td><td>minOutAmount</td><td>Coins(124)</td><td></td></tr><tr><td></td><td>owner_address</td><td>Address(267)</td><td>Address of the sender</td></tr><tr><td></td><td>0</td><td>Maybe Cell(1) multihop_cell</td><td>Cell with multihop data</td></tr><tr><td>0</td><td>target_address</td><td>Address(267)</td><td>Address of the receiver</td></tr><tr><td>0</td><td>ok_forward_amount</td><td>Coins(124)</td><td></td></tr><tr><td>0</td><td>ok_forward_payload</td><td>Cell(0),Maybe, Payload</td><td>Payload for processing by target with swapped coins</td></tr><tr><td>0</td><td>ret_forward_amount</td><td>Coins(124)</td><td></td></tr><tr><td>0</td><td>ret_forward_payload</td><td>Cell(0),Maybe, Payload</td><td>Payload for processing by owner with change/return coins</td></tr><tr><td>0</td><td>excess_address</td><td>Address(267)</td><td>Address to get excess gas</td></tr><tr><td></td><td>1</td><td>Cell(0) referral_cell</td><td>Cell with referral data</td></tr><tr><td>1</td><td>code</td><td>Uint(32)</td><td></td></tr></tbody></table>

<details>

<summary>TL-B Description (TBD)</summary>

This is a preliminary tl-b - subject to change

{% code title="Tlb for POOL\_SWAP" overflow="wrap" lineNumbers="true" %}

```javascript
POOL_SWAP#a7fb58f8 
    target_jetton_wallet:MsgAddress
    sqrtPriceLimitX96:uint160
    minOutAmount:(VarUInteger 16)
    owner_address:MsgAddress
    multihop_cell:(Maybe ^[
        target_address:MsgAddress
        ok_forward_amount:(VarUInteger 16)
        ok_forward_payload:(Maybe ^Cell)
        ret_forward_amount:(VarUInteger 16)
        ret_forward_payload:(Maybe ^Cell)
        excess_address:MsgAddress
    ] ) 
    referral_cell:^[
        code:uint32
    ]  
= ContractMessages;
```

{% endcode %}

</details>


---

# 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.tonco.io/contracts-v1.6-forthcoming/router_payloads.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.
