evm_iszero

Implements the EVM ISZERO opcode: returns BIGINT 1 when the complete UINT256 word is zero and 0 otherwise. NULL input propagates to NULL.

Scalar function TypesEVM

Example

Runs locally

SELECT evm_iszero(7::UINT256) AS result;
-- => [{"result":0}]

API reference

evm_iszero(UINT256) #

Returns 1 for a zero UINT256 input and 0 otherwise.

Inputs

Name Type Use
x UINT256

UINT256 word tested for zero.

required positional

Returns

Name Type
is_zero BIGINT

Zero indicator. BIGINT 1 or 0, or NULL for NULL input.