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.

feat: Nest Builtin Functions #288

@lmittmann

Description

@lmittmann

Thanks for this awesome project. I noticed that it is not possible to nest multiple builtin functions.

Example:

I want to store the function signature of test() at memory[0:4]:

// test.huff
#define function test() nonpayable returns ()

#define macro MAIN() = takes (0) returns (0) {
    __PADRIGHT(__FUNC_SIG(test)) 0x0 mstore
}
$ huffc -V
huffc 0.3.2
$ huffc test.huff
Error: Invalid Macro Arguments: "(" 
Expected literal, identifier (string), or an argument call

__FUNC_SIG gives me 0xXXXXXXXX, but I need 0xXXXXXXXX00000000000000000000000000000000000000000000000000000000.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions