# OrderRFQMixin

RFQ Limit Order mixin

## Derives[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#derives) <a href="#derives" id="derives"></a>

* [Permitable](broken://pages/DOO2eTZDAe5crCpeY8uu)
* [AmountCalculator](/aggregation-protocol/limit-order-protocol/smart-contracts/helpers/amountcalculator.md)
* [EIP712](https://docs.openzeppelin.com/contracts/3.x/api/utils/cryptography#draft-EIP712)

## Functions[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#functions) <a href="#functions" id="functions"></a>

### invalidatorForOrderRFQ[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#invalidatorfororderrfq) <a href="#invalidatorfororderrfq" id="invalidatorfororderrfq"></a>

```javascript
function invalidatorForOrderRFQ(
  address maker,
  uint256 slot
) external returns (uint256)
```

Returns bitmask for double-spend invalidators based on lowest byte of order.info and filled quotes

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters)

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| `maker` | address |             |
| `slot`  | uint256 |             |

**Return Values:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#return-values)

| Name     | Type    | Description                                                       |
| -------- | ------- | ----------------------------------------------------------------- |
| `Result` | uint256 | Each bit represents whether corresponding was already invalidated |

### cancelOrderRFQ[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#cancelorderrfq) <a href="#cancelorderrfq" id="cancelorderrfq"></a>

```javascript
function cancelOrderRFQ(
  uint256 orderInfo
) external
```

Cancels order's quote

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters-1)

| Name        | Type    | Description |
| ----------- | ------- | ----------- |
| `orderInfo` | uint256 |             |

### fillOrderRFQ[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#fillorderrfq) <a href="#fillorderrfq" id="fillorderrfq"></a>

```javascript
function fillOrderRFQ(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount
) external returns (uint256, uint256)
```

Fills order's quote, fully or partially (whichever is possible)

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters-2)

| Name           | Type                       | Description                          |
| -------------- | -------------------------- | ------------------------------------ |
| `order`        | struct OrderRFQMixin.Order | Order quote to fill                  |
| `signature`    | bytes                      | Signature to confirm quote ownership |
| `makingAmount` | uint256                    | Making amount                        |
| `takingAmount` | uint256                    | Taking amount                        |

### fillOrderRFQToWithPermit[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#fillorderrfqtowithpermit) <a href="#fillorderrfqtowithpermit" id="fillorderrfqtowithpermit"></a>

```javascript
function fillOrderRFQToWithPermit(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount,
  address target,
  bytes permit
) external returns (uint256, uint256)
```

Fills Same as `fillOrderRFQ` but calls permit first, allowing to approve token spending and make a swap in one transaction. Also allows to specify funds destination instead of `msg.sender`

See tests for examples

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters-3)

| Name           | Type                       | Description                                                                        |
| -------------- | -------------------------- | ---------------------------------------------------------------------------------- |
| `order`        | struct OrderRFQMixin.Order | Order quote to fill                                                                |
| `signature`    | bytes                      | Signature to confirm quote ownership                                               |
| `makingAmount` | uint256                    | Making amount                                                                      |
| `takingAmount` | uint256                    | Taking amount                                                                      |
| `target`       | address                    | Address that will receive swap funds                                               |
| `permit`       | bytes                      | Should consist of abiencoded token address and encoded `IERC20Permit.permit` call. |

### fillOrderRFQTo[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#fillorderrfqto) <a href="#fillorderrfqto" id="fillorderrfqto"></a>

```javascript
function fillOrderRFQTo(
  struct OrderRFQMixin.Order order,
  bytes signature,
  uint256 makingAmount,
  uint256 takingAmount,
  address target
) public returns (uint256, uint256)
```

Same as `fillOrderRFQ` but allows to specify funds destination instead of `msg.sender`

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters-4)

| Name           | Type                       | Description                          |
| -------------- | -------------------------- | ------------------------------------ |
| `order`        | struct OrderRFQMixin.Order | Order quote to fill                  |
| `signature`    | bytes                      | Signature to confirm quote ownership |
| `makingAmount` | uint256                    | Making amount                        |
| `takingAmount` | uint256                    | Taking amount                        |
| `target`       | address                    | Address that will receive swap funds |

## Events[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#events) <a href="#events" id="events"></a>

### OrderFilledRFQ[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#orderfilledrfq) <a href="#orderfilledrfq" id="orderfilledrfq"></a>

```javascript
event OrderFilledRFQ(
  bytes32 orderHash,
  uint256 makingAmount
)
```

Emitted when RFQ gets filled

**Parameters:**[**​**](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/OrderRFQMixin#parameters-5)

| Name           | Type    | Description |
| -------------- | ------- | ----------- |
| `orderHash`    | bytes32 |             |
| `makingAmount` | uint256 |             |


---

# 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.vulpefi.com/aggregation-protocol/limit-order-protocol/smart-contracts/orderrfqmixin.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.
