> For the complete documentation index, see [llms.txt](https://docs.vulpefi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vulpefi.com/aggregation-protocol/limit-order-protocol/smart-contracts/helpers/predicatehelper.md).

# PredicateHelper

A helper contract for executing boolean functions on arbitrary target call results

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

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

```javascript
function or(
  address[] targets,
  bytes[] data
) external returns (bool)
```

Calls every target with corresponding data

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

| Name      | Type       | Description |
| --------- | ---------- | ----------- |
| `targets` | address\[] |             |
| `data`    | bytes\[]   |             |

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

| Name     | Type | Description                                                |
| -------- | ---- | ---------------------------------------------------------- |
| `Result` | bool | True if call to any target returned True. Otherwise, false |

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

```javascript
function and(
  address[] targets,
  bytes[] data
) external returns (bool)
```

Calls every target with corresponding data

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

| Name      | Type       | Description |
| --------- | ---------- | ----------- |
| `targets` | address\[] |             |
| `data`    | bytes\[]   |             |

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

| Name     | Type | Description                                                  |
| -------- | ---- | ------------------------------------------------------------ |
| `Result` | bool | True if calls to all targets returned True. Otherwise, false |

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

```javascript
function eq(
  uint256 value,
  address target,
  bytes data
) external returns (bool)
```

Calls target with specified data and tests if it's equal to the value

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

| Name     | Type    | Description   |
| -------- | ------- | ------------- |
| `value`  | uint256 | Value to test |
| `target` | address |               |
| `data`   | bytes   |               |

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

| Name     | Type | Description                                                                |
| -------- | ---- | -------------------------------------------------------------------------- |
| `Result` | bool | True if call to target returns the same value as `value`. Otherwise, false |

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

```javascript
function lt(
  uint256 value,
  address target,
  bytes data
) external returns (bool)
```

Calls target with specified data and tests if it's lower than value

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

| Name     | Type    | Description   |
| -------- | ------- | ------------- |
| `value`  | uint256 | Value to test |
| `target` | address |               |
| `data`   | bytes   |               |

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

| Name     | Type | Description                                                                        |
| -------- | ---- | ---------------------------------------------------------------------------------- |
| `Result` | bool | True if call to target returns value which is lower than `value`. Otherwise, false |

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

```javascript
function gt(
  uint256 value,
  address target,
  bytes data
) external returns (bool)
```

Calls target with specified data and tests if it's bigger than value

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

| Name     | Type    | Description   |
| -------- | ------- | ------------- |
| `value`  | uint256 | Value to test |
| `target` | address |               |
| `data`   | bytes   |               |

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

| Name     | Type | Description                                                                         |
| -------- | ---- | ----------------------------------------------------------------------------------- |
| `Result` | bool | True if call to target returns value which is bigger than `value`. Otherwise, false |

### timestampBelow[​](https://docs.1inch.io/docs/limit-order-protocol/smart-contract/helpers/PredicateHelper#timestampbelow) <a href="#timestampbelow" id="timestampbelow"></a>

```javascript
function timestampBelow(
  uint256 time
) external returns (bool)
```

Checks passed time against block timestamp

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

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| `time` | uint256 |             |

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

| Name     | Type | Description                                                            |
| -------- | ---- | ---------------------------------------------------------------------- |
| `Result` | bool | True if current block timestamp is lower than `time`. Otherwise, false |
