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

Function selector is incorrect if there's a comment in the function signature definition #68

Closed
mds1 opened this issue Mar 25, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mds1
Copy link

mds1 commented Mar 25, 2021

Steps to reproduce:

  1. See this function has an inline comment
  2. Run "List function signatures" for this file
  3. Notice how it outputs 1137c1f8 => sendToken(address,address,uint256,bytes32,//) when it should output b9bfabe1 => sendToken(address,address,uint256,bytes32,bytes32)

Function linked above:

function sendToken(
    address _receiver,
    address _tokenAddr,
    uint256 _amount,
    bytes32 _pkx, // ephemeral public key x coordinate
    bytes32 _ciphertext
) external payable {
   ...
}
@tintinweb tintinweb added the bug Something isn't working label Mar 26, 2021
@tintinweb
Copy link
Member

tintinweb commented Mar 26, 2021

@mds1,

fixed it for the upcoming v0.1.1. let me know if you need it earlier and I can probably provide you an alpha.

the function signature extraction is super hacky and I do not expect that a lot of people are using it. if it turns out it is actually being used I might refactor the lexical extraction and actually use the AST.

cheers

PS: v0.1.1 will take a couple more weeks for testing.

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

No branches or pull requests

2 participants