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

Closed
1 task done
joaquim-verges opened this issue Sep 23, 2024 · 3 comments · Fixed by #259 or #261
Closed
1 task done

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

joaquim-verges opened this issue Sep 23, 2024 · 3 comments · Fixed by #259 or #261
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: [email protected]

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.

@KedziaPawel
Copy link
Contributor

hey @Raiden1411 , I've created the PR #259 that addresses the issue. If you could take a look that would be awesome

Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest ABIType version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
3 participants