Skip to main content

    Usage Examples

    Basic Decoding

    Multiple Parameters

    Destructuring with Names

    Dynamic Types (Strings)

    Arrays

    Tuples (Structs)

    Decoding Transaction Calldata

    With or Without Selector

    The decoder automatically handles both formats:

    Type-Safe Decoding

    TypeScript infers return types from function definition:

    Error Handling

    Parsing Contract Logs

    Decode function calls from event logs or traces:

    See Also