Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Add support for tuples in function parmeters #315

Description

@Mouradif

Currently the Huff parser throws an error for functions defined like this:

#define function callFunction(address, (address, uint256), bytes) nonpayable returns ()

The error:

Error: Invalid Argument Type: "(" 

The original function signature in Solidity is:

function callFunction(address, DyDxAccount.Info memory, bytes memory);

Where DyDxAccount.Info is:

library DyDxAccount {
    struct Info {
        address owner;
        uint256 number;
    }
}

The function's signature is 0x8b418713 or keccak256("callFunction(address,(address,uint256),bytes)")

My current workaround is to simply define the function signature as a constant for my function dispatch but it would be great to have support for tuples or even structs one day

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions