# Adapters

### AdapterActions

#### addPools

```solidity
function addPools(struct PoolInput[] pools) external
```

*Add pools to router adapter storage. Allowed only for MarginlyPoolAdmin owner*

**Parameters**

| Name  | Type                | Description         |
| ----- | ------------------- | ------------------- |
| pools | struct PoolInput\[] | New pool parameters |

#### transferRouterAdapterOwnership

```solidity
function transferRouterAdapterOwnership(uint256 dexIdx, address to) external
```

*Set a new owner of a Marginly router adapter contract. Allowed only for MarginlyPoolAdmin owner*

**Parameters**

| Name   | Type    | Description                                    |
| ------ | ------- | ---------------------------------------------- |
| dexIdx | uint256 | Index of a dex                                 |
| to     | address | Address of a new Marginly router adapter owner |

#### acceptRouterAdapterOwnership

```solidity
function acceptRouterAdapterOwnership(uint256 dexIdx) external
```

*Accepts ownership of adapter. Needed for new pools addition*

**Parameters**

| Name   | Type    | Description    |
| ------ | ------- | -------------- |
| dexIdx | uint256 | Index of a dex |


---

# 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.marginly.com/router/adapters.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.
