> For the complete documentation index, see [llms.txt](https://docs.rigoblock.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rigoblock.com/solidity-api-reference/protocol/extensions/adapters/a0xrouter.md).

# A0xRouter

## A0xRouter

*See docs/0x/ACTION\_ALLOWLIST.md for security rationale and blocked action details.*

### constructor

```solidity
constructor(address allowanceHolder, address deployer) public
```

#### Parameters

| Name            | Type    | Description                                                          |
| --------------- | ------- | -------------------------------------------------------------------- |
| allowanceHolder | address | The 0x AllowanceHolder contract address (chain-specific, immutable). |
| deployer        | address | The 0x Deployer/Registry contract address (same on all chains).      |

### onlyDelegateCall

```solidity
modifier onlyDelegateCall()
```

### requiredVersion

```solidity
function requiredVersion() external pure returns (string)
```

Returns the minimum implementation version to use an external application.

*Adapters must implement it when modifying proxy state or storage.*

#### Return Values

| Name | Type   | Description                              |
| ---- | ------ | ---------------------------------------- |
| \[0] | string | String of the minimum supported version. |

### exec

```solidity
function exec(address operator, address token, uint256 amount, address payable target, bytes data) external payable returns (bytes)
```

Execute a swap via the 0x AllowanceHolder contract.

*The calldata is forwarded unmodified to AllowanceHolder after validation.*

#### Parameters

| Name     | Type            | Description                                                                     |
| -------- | --------------- | ------------------------------------------------------------------------------- |
| operator | address         | The address authorized to consume the ephemeral allowance. Must equal `target`. |
| token    | address         | The sell token address.                                                         |
| amount   | uint256         | The sell token amount.                                                          |
| target   | address payable | The 0x Settler contract address that will execute the swap.                     |
| data     | bytes           | The Settler.execute() calldata containing swap instructions.                    |

#### Return Values

| Name | Type  | Description |
| ---- | ----- | ----------- |
| \[0] | bytes |             |
