evm_pack_uint_be
Packs a UINT256 value into an exact-width big-endian BYTES value for ABI-adjacent byte construction.
Example
Runs locally
{"id":"sample_98ku21","title":"Sample"}
API reference
evm_pack_uint_be(UINT256, INTEGER) #
Returns exactly byte_width big-endian bytes and rejects values that do not fit in the requested width.
Inputs
| Name | Type | Use |
|---|---|---|
value | UINT256 UINT256 value to encode. | required positional |
byte_width | INTEGER Exact byte width from 1 through 32. Values that do not fit raise an Invalid Input Error. | required positional |
Returns
| Name | Type |
|---|---|
bytes | BYTES |
Fixed-width big-endian bytes. Returns exactly byte_width BYTES with no 0x prefix or ABI padding beyond that width.