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

Cast no longer correctly returns signature if name with uint (no bit size annotation) used #6195

Closed
2 tasks done
Philogy opened this issue Nov 1, 2023 · 1 comment · Fixed by alloy-rs/core#397
Closed
2 tasks done
Labels
T-bug Type: bug

Comments

@Philogy
Copy link

Philogy commented Nov 1, 2023

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

cast 0.2.0 (34f684d 2023-11-01T22:17:43.258061708Z)

What command(s) is the bug in?

cast sig

Operating System

Linux

Describe the bug

Previously cast would correctly give the same result if you requested the selector for with an input like transfer(address, uint256) and transfer(address, uint) however cast has begun interpreting uint literally, returning different (incorrect) selectors for the two:

$ cast sig "transfer(address, uint)"
> 0x6cb927d8 // keccak256("transfer(address,uint)")[0:4]

$ cast sig "transfer(address, uint256)"
> 0xa9059cbb // keccak256("transfer(address,uint256)")[0:4], actually correct
@Philogy Philogy added the T-bug Type: bug label Nov 1, 2023
@gakonst gakonst added this to Foundry Nov 1, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Nov 1, 2023
@mattsse
Copy link
Member

mattsse commented Nov 2, 2023

wdyt @DaniPopes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants