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

why the abi is a object, instead of an array? #20

Description

@dugubuyan

when i use the huffc to generate an artifict json, it's abi is like this : {
"constructor": null,
"functions": { ...} }
so when it comes to deploy , an error occured: "TypeError: abi.map is not a function"
I think the right abi is an array, it is like this : abi = [
"function decimals() view returns (string)",
"function balanceOf(address addr) view returns (uint)"
]

the foudry.toml is below:
// start
[profile.default]
solc_version = '0.8.20'
evm_version = 'shanghai'
auto_detect_solc = false
optimizer = true
optimizer_runs = 200 # Default amount
ffi = true
fuzz_runs = 1_000
remappings = [
"forge-std=lib/forge-std/src/",
"foundry-huff=lib/foundry-huff/src/",
]
// end
the commend which i use is below:
huffc addTwo.huff -a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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