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

Fix function selector computation for functions with no arguments #603

Merged
merged 4 commits into from
May 29, 2023
Merged

Fix function selector computation for functions with no arguments #603

merged 4 commits into from
May 29, 2023

Conversation

ilamanov
Copy link
Contributor

@ilamanov ilamanov commented May 29, 2023

Current behavior: If you try to compute the function selector of "function claimed()", it will try to hash the following string: "functionclaimed()".
Expected behavior: It should hash "claimed()" instead


PR-Codex overview

This PR focuses on fixing getFunctionSelector for functions with no arguments.

Detailed summary

  • Fixed getFunctionSelector for functions with no arguments
  • Added tests for getFunctionSelector
  • Refactored hashFunction to handle functions with no parameters

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented May 29, 2023

🦋 Changeset detected

Latest commit: f015231

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented May 29, 2023

@ilamanov is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit ee2b2b8 into wevm:main May 29, 2023
@github-actions github-actions bot mentioned this pull request May 29, 2023
jxom added a commit that referenced this pull request Jun 2, 2023
)

* Fixed function selector for no-arg functions

* add changeset

* Update dull-eyes-speak.md

* Update dull-eyes-speak.md

---------

Co-authored-by: jxom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants