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

Add support for tuples in function parmeters #315

Open
Mouradif opened this issue Apr 11, 2024 · 0 comments
Open

Add support for tuples in function parmeters #315

Mouradif opened this issue Apr 11, 2024 · 0 comments

Comments

@Mouradif
Copy link
Contributor

Mouradif commented Apr 11, 2024

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant