PredicateHelper

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

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

Calls every target with corresponding data

Parameters:arrow-up-right

Name
Type
Description

targets

address[]

data

bytes[]

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

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

Calls every target with corresponding data

Parameters:arrow-up-right

Name
Type
Description

targets

address[]

data

bytes[]

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

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

Parameters:arrow-up-right

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

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

Parameters:arrow-up-right

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

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

Parameters:arrow-up-right

Name
Type
Description

value

uint256

Value to test

target

address

data

bytes

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

timestampBelowarrow-up-right

Checks passed time against block timestamp

Parameters:arrow-up-right

Name
Type
Description

time

uint256

Return Values:arrow-up-right

Name
Type
Description

Result

bool

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

Last updated