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

error: invalid funcSig output for solidity functions containing uint type #27

Closed
alesanro opened this issue Aug 15, 2019 · 1 comment · Fixed by #28
Closed

error: invalid funcSig output for solidity functions containing uint type #27

alesanro opened this issue Aug 15, 2019 · 1 comment · Fixed by #28

Comments

@alesanro
Copy link

There is an invalid hash of signature function calculation for uint types.

The next function has a signature provideAccess(address[],uint256[],bytes32,bytes)

function provideAccess(address[] _addresses, uint[] _amounts, bytes32 _key, bytes _info) public {
// ...
}

Then it should have the next hash:

> require("web3-utils").soliditySha3("provideAccess(address[],uint256[],bytes32,bytes)").slice(0, 10)

'0x745ca7ea'

but funcSig command returns like:

> require("web3-utils").soliditySha3("provideAccess(address[],uint[],bytes32,bytes)").slice(0, 10)

'0xb196df14'
@tintinweb
Copy link
Member

tintinweb commented Sep 10, 2019

thank you @alesanro!
going to merge it in a second and also fix that functions w/o arguments are actually missing (plus other canonicalisation). 👍

tintinweb added a commit that referenced this issue Sep 10, 2019
 - this is still a hack that we will replace with properly an AST based
 version
 - will also show internal/private functions. ignore them for now :)
GNSPS pushed a commit to GNSPS/vscode-solidity-auditor that referenced this issue Jan 11, 2020
 - this is still a hack that we will replace with properly an AST based
 version
 - will also show internal/private functions. ignore them for now :)
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 a pull request may close this issue.

2 participants