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

Remove metadata checks for files with free functions / file-level functions #281

Open
pcaversaccio opened this issue Apr 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pcaversaccio
Copy link
Contributor

Describe the bug

If you currently use in some form contracts that use free functions (a.k.a file-level functions) via imports, halmos will issue the following warning:

Skipped FreeFunctionsFile.json due to parsing failure: KeyError: 'metadata'

Currently, this warning is printed in red colour. I would suggest orange should be enough ;). The underlying reason is that these files are compiled in the normal way (since in some contracts you will use them) but there is no metadata available in the standard JSON input file for these files.

To Reproduce

git clone https://github.com/pcaversaccio/snekmate and checkout the feat/halmos branch. Run pnpm install and forge install and invoke:

halmos --contract ERC20TestHalmos --function testHalmosAssertNoBackdoor --storage-layout generic --ffi -vvvv

image

Environment:

  • OS: Linux
  • Python version: 3.11.3
  • Halmos and other dependency versions: 0.1.13.dev1+ga617814
@aviggiano
Copy link
Contributor

This also happens for structs

https://github.com/code-423n4/2024-06-size?tab=readme-ov-file#property-based-tests

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