evm_shr
Implements EVM SHR: logically shifts a UINT256 word right, fills high bits with zero, and returns zero for counts at least 256. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.
Example
Local
{"id":"sample_tzsgcg","title":"Sample","code":"SELECT evm_shr(4::BIGINT, 256::UINT256)::VARCHAR AS result;\n-- => [{\"result\":\"16\"}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
evm_shr(BIGINT, UINT256) #
Logical right shift with zero fill over a 256-bit EVM word.
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM