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

feat: Nest Builtin Functions #288

Open
lmittmann opened this issue Jul 16, 2023 · 0 comments
Open

feat: Nest Builtin Functions #288

lmittmann opened this issue Jul 16, 2023 · 0 comments

Comments

@lmittmann
Copy link

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.

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

No branches or pull requests

1 participant