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, event, and custom error signatures #130

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

doublesharp
Copy link

Updates the functions signature hash tools to also work for custom errors and events.

Custom error sighashes can help with debugging when a client receives a custom error hash but does not have the ABI to decode it.

Reformats output to handle multiple files, show sighash by file. Conflicts per file as well.

Use plaintext and json doc types.

Doesn't open a new document when there are no signatures to report.

refactor to show function and custom error sighashes
use json formatting for JSON output
refactor output handlers
add config for errorSigs
update readme
split output by filename
@Alexangelj
Copy link

Can this get merged in? Custom errors have been available for awhile now and there is no tool that can easily get all the function signatures of them.

@tintinweb
Copy link
Member

@vquelque wdyt, should we get that into solidity-workspace and rebase the UI changes into master?

@tintinweb tintinweb added the improvement New feature or request label Oct 13, 2023
@doublesharp
Copy link
Author

Unfortunately I don't have time to right now to merge the upstream updates into this PR but for anyone else needing to generate custom error signature hashes you can use the modified v1.5 from my branch.

You will need vsce to create the VSIX file.

npm i -g vsce
git clone https://github.com/doublesharp/vscode-solidity-auditor
cd vscode-solidity-auditor
git checkout function-custom-error-signatures
npm i
vsce package

This will create a file in the project repo called solidity-visual-auditor-0.1.5.vsix. From VS Code choose Extensions, then the the dots on the top right, and Install from VSIX.... Choose the file you created and it should create the extension. Note that this is using the same name + older version of the plugin so it can be overwritten by an update if you have auto-update enabled.

Once the modified plugin is install you can generate the signature hashes via the command palette.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants