Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sol! macro panics when trying to process an ABI JSON file #184

Closed
0xvanbeethoven opened this issue Jul 10, 2023 · 0 comments · Fixed by #217
Closed

sol! macro panics when trying to process an ABI JSON file #184

0xvanbeethoven opened this issue Jul 10, 2023 · 0 comments · Fixed by #217
Assignees
Labels
bug Something isn't working

Comments

@0xvanbeethoven
Copy link

0xvanbeethoven commented Jul 10, 2023

Component

sol! macro

What version of Alloy are you on?

alloy-sol-types = {git = "https://github.com/alloy-rs/core", package = "alloy-sol-types", rev = "80e7894", features = ["json"]}

Operating System

macOS (Apple Silicon)

Describe the bug

Description
When attempting to use the sol! macro to generate a contract from an ABI JSON file, the macro panics with the error: "function has no name: Function { attrs: [], kind: Constructor, name: None, arguments: [], attributes: FunctionAttributes({}), returns: None }".

Steps to Reproduce
Here is a minimal code example that reproduces the issue:

use alloy_sol_types::sol;

sol!(Uniswap, "src/abi/uniswap.json");

In this case, the JSON ABI file is the uniswap v3 pool abi copied from Etherscan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants