evm_modexp
Computes base^exp mod modulus over three fixed-width UINT256 values. Returns 0 when modulus is 0 or 1; for other moduli, exponent 0 returns 1. This is not the EVM MODEXP precompile byte interface: it does not accept length-prefixed byte sequences, produce variable-width output, or model gas. NULL input propagates to NULL.
Example
Local
{"id":"sample_oom7wr","title":"Sample","code":"SELECT evm_modexp(5::UINT256, 3::UINT256, 13::UINT256)::VARCHAR AS result;\n-- => [{\"result\":\"8\"}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM