# Router

### router

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

## Interface

### getRouterState

(address, address, address, address?, int, int, int) getRouterState ()

returns router admin address

#### Return Values

| # | Type    | Description          |
| - | ------- | -------------------- |
| 0 | address | router admin address |

### getPoolAddress

(address) getPoolAddress (jettonWallet0: address, jettonWallet1: address)

returns pool address for two given jetton\_wallets belonging to the router

#### Parameters

| #         | Type      | Name      | Description                                        |
| --------- | --------- | --------- | -------------------------------------------------- |
| undefined | undefined | undefined | Address of the jetton 0 wallet belonging to router |
| undefined | undefined | undefined | Address of the jetton 1 wallet belonging to router |

#### Return Values

| # | Type    | Description  |
| - | ------- | ------------ |
| 0 | address | pool address |

### getChildContracts

(cell, cell, cell, cell) getChildContracts ()

returns code of the child contracts *deprecated*

#### Return Values

| # | Type | Description                         |
| - | ---- | ----------------------------------- |
| 0 | cell | code of the pool contract           |
| 1 | cell | code of the account contract        |
| 2 | cell | code of the nft position contract   |
| 3 | cell | code of the pool prototype contract |

### get\_pending\_timelocks

( int, int, address?, int, address?, int, int, int, cell?, int, cell?,) get\_pending\_timelocks ()

returns active router timelocks to monitor system state. Timestamp 0xFFFFFFFFFFFFFFFF means - never/timelock not active

#### Return Values

| # | Type     | Description                                           |
| - | -------- | ----------------------------------------------------- |
| 0 | int      | Timelock delay                                        |
| 1 | int      | Timestamp when new code can be committed              |
| 2 | address? | Cell with new code                                    |
| 3 | int      | Timestamp when new Admin Address can be committed     |
| 4 | address? | New Admin Address                                     |
| 5 | int      | Timestamp when new Proxy Ton Address can be committed |
| 6 | int      | New Proxy Ton Address                                 |
| 7 | int      | Timestamp when new flags can be committed             |
| 8 | cell?    | New Flags                                             |

## Messages

### JETTON\_TRANSFER\_NOTIFICATION

Opcode : **0x7362d09c**

Process router funding, payload determines if it is mint or swap\ <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>query_id</td><td>Uint(64)</td><td>queryid as of the TON documentation</td></tr><tr><td></td><td>jetton_amount</td><td>Coins(124)</td><td>Amount of coins sent to the router</td></tr><tr><td></td><td>from_user</td><td>Address(267)</td><td>User that originated the transfer</td></tr><tr><td></td><td>forward_payload</td><td>Cell(0),Either, Payload</td><td>Payload for processing</td></tr></tbody></table>

<details>

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

This is a preliminary tl-b - subject to change

{% code title="Tlb for JETTON\_TRANSFER\_NOTIFICATION" overflow="wrap" lineNumbers="true" %}

```javascript
JETTON_TRANSFER_NOTIFICATION#7362d09c 
    query_id:uint64
    jetton_amount:(VarUInteger 16)
    from_user:MsgAddress
    forward_payload:(Either ^Cell Cell)
= ContractMessages;
```

{% endcode %}

</details>

### ROUTER\_CREATE\_POOL

Opcode : **0x2e3034ef**

Operation that deploys and inits new [Pool](/contracts-v1.6-forthcoming/pool.md) contract for two given jettons identified by their wallets. New pool would reorder the jettons to match the invariant `slice_hash(jetton0_address) > slice_hash(jetton1_address).`\ <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>query_id</td><td>Uint(64)</td><td>queryid as of the TON documentation</td></tr><tr><td></td><td>jetton_wallet0</td><td>Address(267)</td><td>Address of the jetton0 wallet. Used to compute pool address</td></tr><tr><td></td><td>jetton_wallet1</td><td>Address(267)</td><td>Address of the jetton1 wallet. Used to compute pool address</td></tr><tr><td></td><td>tick_spacing</td><td>Int(24)</td><td>Tick spacing to be used in the pool</td></tr><tr><td></td><td>initial_priceX96</td><td>Uint(160),PriceX96</td><td>Initial price for the pool</td></tr><tr><td></td><td>pool_active</td><td>Uint(1)</td><td>Should pool be created as active</td></tr><tr><td></td><td>protocol_fee</td><td>Uint(16),Fee</td><td>Liquidity provider fee. base in FEE_DENOMINATOR parts. If value is more than 10000 value would be default</td></tr><tr><td></td><td>lp_fee_base</td><td>Uint(16),Fee</td><td>Protocol fee in FEE_DENOMINATOR. If value is more than 10000 value would be default</td></tr><tr><td></td><td>lp_fee_current</td><td>Uint(16),Fee</td><td>Current value of the pool fee, in case of dynamic adjustment. If value is more than 10000 value would be default</td></tr><tr><td></td><td>0</td><td>Cell(0) roles_cell</td><td>Cell With Role</td></tr><tr><td>0</td><td>has_controller</td><td>Uint(1),Bool</td><td>Flag that shows if this message have a new controller address</td></tr><tr><td>0</td><td>controller_addr</td><td>Address(267)</td><td>Address that is allowed to change the fee. Can always be updated by admin.</td></tr><tr><td>0</td><td>has_creator</td><td>Uint(1),Bool</td><td>Flag that shows if this message have a new creator address</td></tr><tr><td>0</td><td>creator_addr</td><td>Address(267)</td><td>Address that is allowed to change the fee. Can always be updated by admin. If has_controller is false could be 00b</td></tr><tr><td></td><td>1</td><td>Cell(0) metadata_cell</td><td>Cell With Metainfo</td></tr><tr><td>1</td><td>nftv3_content</td><td>Cell(0),Metadata</td><td>Metadata for the NFT Collection</td></tr><tr><td>1</td><td>nftv3item_content</td><td>Cell(0),Metadata</td><td>Metadata for the NFT Item</td></tr><tr><td></td><td>2</td><td>Cell(0) minter_cell</td><td>Cell With Minters</td></tr><tr><td>2</td><td>jetton0_minter</td><td>Address(267)</td><td>Address of the jetton0 minter, used by indexer and frontend</td></tr><tr><td>2</td><td>jetton1_minter</td><td>Address(267)</td><td>Address of the jetton1 minter, used by indexer and frontend</td></tr></tbody></table>

<details>

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

This is a preliminary tl-b - subject to change

{% code title="Tlb for ROUTER\_CREATE\_POOL" overflow="wrap" lineNumbers="true" %}

```javascript
ROUTER_CREATE_POOL#2e3034ef 
    query_id:uint64
    jetton_wallet0:MsgAddress
    jetton_wallet1:MsgAddress
    tick_spacing:int24
    initial_priceX96:uint160
    pool_active:uint1
    protocol_fee:uint16
    lp_fee_base:uint16
    lp_fee_current:uint16
    roles_cell:^[
        has_controller:uint1
        controller_addr:MsgAddress
        has_creator:uint1
        creator_addr:MsgAddress
    ]  
    metadata_cell:^[
        nftv3_content:Cell
        nftv3item_content:Cell
    ]  
    minter_cell:^[
        jetton0_minter:MsgAddress
        jetton1_minter:MsgAddress
    ]  
= ContractMessages;
```

{% endcode %}

</details>

### ROUTER\_PAY\_TO

Opcode : **0xa1daa96d**

This message is the message that is sent to Router by the pool, an it would be accepted only from the pool:

Possible error codes

| Operation | Error Core                       | Value | Meaning                                                  |
| --------- | -------------------------------- | ----- | -------------------------------------------------------- |
| SWAP      | RESULT\_SWAP\_OK                 | 200   | Swap went fine                                           |
| SWAP      | RESULT\_SWAP\_OUTPUT\_TOO\_SMALL | 230   | minAmount was not reached, swap reverted                 |
| SWAP      | RESULT\_SWAP\_INTERNAL\_ERROR    | 231   | Internal error, generally this should not happen         |
| SWAP      | RESULT\_SWAP\_POOL\_LOCKED       | 232   | Attempt to swap in the locked pool                       |
| SWAP      | RESULT\_SWAP\_POOL\_EMPTY        | 233   | Attempt to swap in the empty pool                        |
| MINT      | RESULT\_MINT\_OK                 | 202   | Mint went fine                                           |
| MINT      | RESULT\_NO\_LIQUIDITY            | 226   | Minting Zero liquidity was asked (not always unintended) |
| MINT      | RESULT\_TICK\_IMPOSSIBLE\_LOW    | 220   | One of the ticks is too low                              |
| MINT      | RESULT\_TICK\_IMPOSSIBLE\_HIGH   | 221   | One of the ticks is too high                             |
| MINT      | RESULT\_WRONG\_TICK\_SPACING     | 222   | One of ticks is not divisible by tick\_spacing           |
| MINT      | RESULT\_TOO\_MANY\_TICKS         | 223   | Pool is full                                             |
| MINT      | RESULT\_TOO\_MUCH\_LIQUIDITY     | 224   | Too much liquidity in one tick                           |
| MINT      | RESULT\_NOT\_ENOUGH\_COINS       | 225   | Not enough coins to mint                                 |
| BURN      | RESULT\_BURN\_OK                 | 201   | Burn went fine                                           |

\ <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>query_id</td><td>Uint(64)</td><td>queryid as of the TON documentation</td></tr><tr><td></td><td>reciever0</td><td>Address(267)</td><td>Address of the first receiver of the funds</td></tr><tr><td></td><td>reciever1</td><td>Address(267)</td><td>Address of the second receiver of the funds</td></tr><tr><td></td><td>exit_code0</td><td>Uint(8),ErrorCode</td><td>Exit code for order 0</td></tr><tr><td></td><td>exit_code1</td><td>Uint(8),ErrorCode</td><td>Exit code for order 1</td></tr><tr><td></td><td>exit_code2</td><td>Uint(8),ErrorCode</td><td>Exit code for order 2</td></tr><tr><td></td><td>exit_code3</td><td>Uint(8),ErrorCode</td><td>Exit code for order 3</td></tr><tr><td></td><td>seqno</td><td>Uint(64),Indexer</td><td>Internal pool sequence number</td></tr><tr><td></td><td>0</td><td>Maybe Cell(1) coinsinfo_cell</td><td>Cell with info about the coins</td></tr><tr><td>0</td><td>jetton0_address</td><td>Address(267)</td><td>Jetton to be sent to receiver0 identified by the wallet that belongs to router</td></tr><tr><td>0</td><td>jetton1_address</td><td>Address(267)</td><td>Jetton to be sent to receiver1 identified by the wallet that belongs to router</td></tr><tr><td>0</td><td>amount0</td><td>Coins(124)</td><td>Amount of coins to be payed to receiver0</td></tr><tr><td>0</td><td>amount1</td><td>Coins(124)</td><td>Amount of coins to be payed to receiver1</td></tr><tr><td>0</td><td>0</td><td>Cell(0) indexer_swap_info_cell</td><td>Information about the payload</td></tr><tr><td>0->0</td><td>payload_amount0</td><td>Coins(124)</td><td></td></tr><tr><td>0->0</td><td>payload_0</td><td>Cell(1),Maybe, Payload</td><td></td></tr><tr><td>0->0</td><td>payload_amount1</td><td>Coins(124)</td><td></td></tr><tr><td>0->0</td><td>payload_1</td><td>Cell(1),Maybe, Payload</td><td></td></tr><tr><td>Predicate</td><td></td><td>exit_code0 = 200</td><td></td></tr><tr><td></td><td>1</td><td>Maybe Cell(1) indexer_swap_info_cell</td><td>Information for indexer to process after the swap</td></tr><tr><td>1</td><td>liquidity</td><td>Uint(128),Indexer</td><td>Post-swap concentrated liquidity at current tick</td></tr><tr><td>1</td><td>price_sqrt</td><td>Uint(160),Indexer,PriceX96</td><td>Post-swap square root of the price stored as fixed point 64.96</td></tr><tr><td>1</td><td>tick</td><td>Int(24),Indexer</td><td>Post-swap current tick</td></tr><tr><td>1</td><td>feeGrowthGlobal0X128</td><td>Int(256),Indexer</td><td>Current range fee per unit of the liquidity for jetton0</td></tr><tr><td>1</td><td>feeGrowthGlobal1X128</td><td>Int(256),Indexer</td><td>Current range fee per unit of the liquidity for jetton1</td></tr><tr><td>Predicate</td><td></td><td>exit_code0 != 200</td><td></td></tr><tr><td></td><td>2</td><td>Maybe Cell(1) indexer_info_cell</td><td>Information for indexer to process after the burn</td></tr><tr><td></td><td>3</td><td>Maybe Cell(1) positions_cell</td><td>Cell with positions</td></tr><tr><td>3</td><td>0</td><td>Maybe Cell(1) burn0</td><td>Cell with burn number 0</td></tr><tr><td>3->0</td><td>index[0]</td><td>Uint(64)</td><td></td></tr><tr><td>3->0</td><td>subindex[0]</td><td>Uint(4)</td><td>Subindex</td></tr><tr><td>3->0</td><td>liquidity[0]</td><td>Uint(128)</td><td></td></tr><tr><td>3->0</td><td>tickLower[0]</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>3->0</td><td>tickUpper[0]</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>3->0</td><td>feeGrowthInside0LastX128[0]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->0</td><td>feeGrowthInside1LastX128[0]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3,0</td><td>0</td><td>Maybe Cell(1) new_fee_cell</td><td>Fee counters to collect to (Used by indexer)</td></tr><tr><td>3->0->0</td><td>feeGrowthInside0CurrentX128[0]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->0->0</td><td>feeGrowthInside1CurrentX128[0]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->0</td><td>liquidity2Burn[0]</td><td>Uint(128)</td><td></td></tr><tr><td>3</td><td>1</td><td>Maybe Cell(1) burn1</td><td>Cell with burn number 1</td></tr><tr><td>3->1</td><td>index[1]</td><td>Uint(64)</td><td></td></tr><tr><td>3->1</td><td>subindex[1]</td><td>Uint(4)</td><td>Subindex</td></tr><tr><td>3->1</td><td>liquidity[1]</td><td>Uint(128)</td><td></td></tr><tr><td>3->1</td><td>tickLower[1]</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>3->1</td><td>tickUpper[1]</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>3->1</td><td>feeGrowthInside0LastX128[1]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->1</td><td>feeGrowthInside1LastX128[1]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3,1</td><td>0</td><td>Maybe Cell(1) new_fee_cell</td><td>Fee counters to collect to (Used by indexer)</td></tr><tr><td>3->1->0</td><td>feeGrowthInside0CurrentX128[1]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->1->0</td><td>feeGrowthInside1CurrentX128[1]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->1</td><td>liquidity2Burn[1]</td><td>Uint(128)</td><td></td></tr><tr><td>3</td><td>2</td><td>Maybe Cell(1) burn2</td><td>Cell with burn number 2</td></tr><tr><td>3->2</td><td>index[2]</td><td>Uint(64)</td><td></td></tr><tr><td>3->2</td><td>subindex[2]</td><td>Uint(4)</td><td>Subindex</td></tr><tr><td>3->2</td><td>liquidity[2]</td><td>Uint(128)</td><td></td></tr><tr><td>3->2</td><td>tickLower[2]</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>3->2</td><td>tickUpper[2]</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>3->2</td><td>feeGrowthInside0LastX128[2]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->2</td><td>feeGrowthInside1LastX128[2]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3,2</td><td>0</td><td>Maybe Cell(1) new_fee_cell</td><td>Fee counters to collect to (Used by indexer)</td></tr><tr><td>3->2->0</td><td>feeGrowthInside0CurrentX128[2]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->2->0</td><td>feeGrowthInside1CurrentX128[2]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->2</td><td>liquidity2Burn[2]</td><td>Uint(128)</td><td></td></tr><tr><td>3</td><td>3</td><td>Maybe Cell(1) burn3</td><td>Cell with burn number 3</td></tr><tr><td>3->3</td><td>index[3]</td><td>Uint(64)</td><td></td></tr><tr><td>3->3</td><td>subindex[3]</td><td>Uint(4)</td><td>Subindex</td></tr><tr><td>3->3</td><td>liquidity[3]</td><td>Uint(128)</td><td></td></tr><tr><td>3->3</td><td>tickLower[3]</td><td>Int(24)</td><td>lower bound of the range in which to mint</td></tr><tr><td>3->3</td><td>tickUpper[3]</td><td>Int(24)</td><td>upper bound of the range in which to mint</td></tr><tr><td>3->3</td><td>feeGrowthInside0LastX128[3]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->3</td><td>feeGrowthInside1LastX128[3]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3,3</td><td>0</td><td>Maybe Cell(1) new_fee_cell</td><td>Fee counters to collect to (Used by indexer)</td></tr><tr><td>3->3->0</td><td>feeGrowthInside0CurrentX128[3]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton0, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->3->0</td><td>feeGrowthInside1CurrentX128[3]</td><td>Int(256),x128</td><td>Fee counter inside position range for jetton1, per unit of liquidity, in 128.128 fixed point</td></tr><tr><td>3->3</td><td>liquidity2Burn[3]</td><td>Uint(128)</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 ROUTER\_PAY\_TO" overflow="wrap" lineNumbers="true" %}

```javascript
ROUTER_PAY_TO#a1daa96d 
    query_id:uint64
    reciever0:MsgAddress
    reciever1:MsgAddress
    exit_code0:uint8
    exit_code1:uint8
    exit_code2:uint8
    exit_code3:uint8
    seqno:uint64
    coinsinfo_cell:(Maybe ^[
        jetton0_address:MsgAddress
        jetton1_address:MsgAddress
        amount0:(VarUInteger 16)
        amount1:(VarUInteger 16)
        indexer_swap_info_cell:^[
            payload_amount0:(VarUInteger 16)
            payload_0:(Maybe ^Cell)
            payload_amount1:(VarUInteger 16)
            payload_1:(Maybe ^Cell)
        ]  
    ]  
    (exit_code0 = 200)?(
        indexer_swap_info_cell:(Maybe ^[
            liquidity:uint128
            price_sqrt:uint160
            tick:int24
            feeGrowthGlobal0X128:int256
            feeGrowthGlobal1X128:int256
        ] ) 
    )
    (exit_code0 != 200)?(
        indexer_info_cell:(Maybe ^[
        ] ) 
        positions_cell:(Maybe ^[
            burn0:(Maybe ^[
                index[0]:uint64
                subindex[0]:uint4
                liquidity[0]:uint128
                tickLower[0]:int24
                tickUpper[0]:int24
                feeGrowthInside0LastX128[0]:int256
                feeGrowthInside1LastX128[0]:int256
                new_fee_cell:(Maybe ^[
                    feeGrowthInside0CurrentX128[0]:int256
                    feeGrowthInside1CurrentX128[0]:int256
                ] ) 
                liquidity2Burn[0]:uint128
            ] ) 
            burn1:(Maybe ^[
                index[1]:uint64
                subindex[1]:uint4
                liquidity[1]:uint128
                tickLower[1]:int24
                tickUpper[1]:int24
                feeGrowthInside0LastX128[1]:int256
                feeGrowthInside1LastX128[1]:int256
                new_fee_cell:(Maybe ^[
                    feeGrowthInside0CurrentX128[1]:int256
                    feeGrowthInside1CurrentX128[1]:int256
                ] ) 
                liquidity2Burn[1]:uint128
            ] ) 
            burn2:(Maybe ^[
                index[2]:uint64
                subindex[2]:uint4
                liquidity[2]:uint128
                tickLower[2]:int24
                tickUpper[2]:int24
                feeGrowthInside0LastX128[2]:int256
                feeGrowthInside1LastX128[2]:int256
                new_fee_cell:(Maybe ^[
                    feeGrowthInside0CurrentX128[2]:int256
                    feeGrowthInside1CurrentX128[2]:int256
                ] ) 
                liquidity2Burn[2]:uint128
            ] ) 
            burn3:(Maybe ^[
                index[3]:uint64
                subindex[3]:uint4
                liquidity[3]:uint128
                tickLower[3]:int24
                tickUpper[3]:int24
                feeGrowthInside0LastX128[3]:int256
                feeGrowthInside1LastX128[3]:int256
                new_fee_cell:(Maybe ^[
                    feeGrowthInside0CurrentX128[3]:int256
                    feeGrowthInside1CurrentX128[3]:int256
                ] ) 
                liquidity2Burn[3]:uint128
            ] ) 
        ] ) 
    )
= ContractMessages;
```

{% endcode %}

</details>

### ROUTERV3\_RESET\_GAS

Opcode : **0x42a0fb43**

This operation allows router owners the gas if too much accumulated on the contract\
Access Rights: This operation is allowed for router::admin\_address<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>query_id</td><td>Uint(64)</td><td>queryid as of the TON documentation</td></tr></tbody></table>

<details>

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

This is a preliminary tl-b - subject to change

{% code title="Tlb for ROUTERV3\_RESET\_GAS" overflow="wrap" lineNumbers="true" %}

```javascript
ROUTERV3_RESET_GAS#42a0fb43 
    query_id:uint64
= 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.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.
