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

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

Open
dugubuyan opened this issue Oct 19, 2023 · 0 comments
Open

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

dugubuyan opened this issue Oct 19, 2023 · 0 comments

Comments

@dugubuyan
Copy link

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

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