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

parseAbi fails when the human readable ABI contains a fallback() function #253

Open
1 task done
joaquim-verges opened this issue Sep 23, 2024 · 1 comment
Open
1 task done
Labels
good first issue Good for newcomers

Comments

@joaquim-verges
Copy link

Describe the bug

Works fine with receive(), but fallback() throws an error. See steps to reproduce below.

Link to Minimal Reproducible Example

No response

Steps To Reproduce

    const abi = formatAbi([
      {
        stateMutability: "payable",
        type: "fallback",
        inputs: [],
        outputs: [],
      },
    ]);
    const abi2 = parseAbi(abi);
    // throws
    // UnknownSignatureError: Unknown signature.
    // Details: fallback()
    // Version: abitype@1.0.5

Package Version

1.0.5

TypeScript Version

5.0.4

Check existing issues

Anything else?

No response

@Raiden1411
Copy link
Collaborator

This was changed in #229 but the format function change wasn't made to accommodate to those changes. See here.

You can create a PR with these changes if you want.

@Raiden1411 Raiden1411 added the good first issue Good for newcomers label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants