Web3JS Online
Viem Online
Webhooks, Alerts, and a simple API.
fromHex is a versatile function that decodes a hex value to various types, including strings, numbers, big integers, byte arrays, and booleans. It takes two parameters: hex, which is the hex value to decode, and toOrOptions, which specifies the desired output type or options.
The toOrOptions parameter can be a string indicating the desired output type (e.g., "string", "number", "bigint", "boolean"), or an object with options for the decode operation (e.g., size: 32 to specify the number of bytes to decode).
Here are some examples of using the fromHex function: