evm_bit_count
Counts set bits in the complete 256-bit unsigned EVM word. Returns 0 for zero and 256 for UINT256_MAX. NULL input propagates to NULL.
Example
Runs locally
{"id":"sample_j2y3kj","title":"Sample"}
Counts set bits in the complete 256-bit unsigned EVM word. Returns 0 for zero and 256 for UINT256_MAX. NULL input propagates to NULL.
Runs locally
SELECT evm_bit_count('0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'::UINT256) AS result;
-- => [{"result":128}]