VulpeFI Docs
  • Whitepaper
  • VulpeFI Overview
  • Wallet VulpeFI
    • Wallet auto-connect
  • Aggregation Protocol
    • Introduction
    • Guide
      • Quick start
    • API
      • Swagger
        • Binance Smart Chain
        • Ethereum Network
        • BASE
        • Arbitrum
        • Polygon
      • Swap params
      • Quote params
    • Smart contracts
      • Aggregation VulpeFI
      • ClipperRouter
      • LimitOrderProtocol
      • UnoswapRouter
    • Limit order protocol
      • Introduction
      • Limit vs. RFQ Orders
      • Smart contracts
        • LimitOrderProtocol
        • LimitOrderProtocolPro
        • OrderLib
        • OrderMixin
        • OrderRFQMixin
        • helpers
          • AmountCalculator
          • ChainlinkCalculator
          • ERC1155Proxy
          • ERC721Proxy
          • ERC721ProxySafe
          • ImmutableOwner
          • NonceManager
          • PredicateHelper
          • SeriesNonceManager
          • WethUnwrapper
        • Interfaces
          • IDaiLikePermit
          • IWithdrawable
          • Interaction
          • PostInteraction
          • PreInteraction
      • Liquidity Source and API
        • Ethereum Network
        • Binance Smart Chain
        • Polygon
        • Avalanche
        • Gnosis Chain
    • Spot Price aggregator
      • Examples
      • Spot Price Aggregator
Powered by GitBook
On this page
  • Functions​
  • or​
  • and​
  • eq​
  • lt​
  • gt​
  • timestampBelow​
  1. Aggregation Protocol
  2. Limit order protocol
  3. Smart contracts
  4. helpers

PredicateHelper

PreviousNonceManagerNextSeriesNonceManager

Last updated 1 year ago

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

Functions

or

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

Calls every target with corresponding data

Parameters:

Name
Type
Description

targets

address[]

data

bytes[]

Return Values:

Name
Type
Description

Result

bool

True if call to any target returned True. Otherwise, false

and

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

Calls every target with corresponding data

Name
Type
Description

targets

address[]

data

bytes[]

Name
Type
Description

Result

bool

True if calls to all targets returned True. Otherwise, false

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

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Name
Type
Description

Result

bool

True if call to target returns the same value as value. Otherwise, false

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

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

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Name
Type
Description

Result

bool

True if call to target returns value which is lower than value. Otherwise, false

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

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

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Name
Type
Description

Result

bool

True if call to target returns value which is bigger than value. Otherwise, false

function timestampBelow(
  uint256 time
) external returns (bool)

Checks passed time against block timestamp

Name
Type
Description

time

uint256

Name
Type
Description

Result

bool

True if current block timestamp is lower than time. Otherwise, false

Parameters:

Return Values:

eq

Parameters:

Return Values:

lt

Parameters:

Return Values:

gt

Parameters:

Return Values:

timestampBelow

Parameters:

Return Values:

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​