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

make slither-flat work for top level errors, structs, enums #1852

Merged
merged 5 commits into from
May 12, 2023

Conversation

smonicas
Copy link
Contributor

fix #1410 #1837

  • Fix the type hint for custom errors in SlitherCompilationUnit where they are CustomErrorTopLevel and not just CustomError
  • Expose the custom error in SolidityCustomRevert so when analyzing a revert SOLIDITY_CALL in slithir it's possible to get the custom error used
  • Set the logging level to INFO for the flattening tool otherwise the logs are not showed
  • Changed list_top_level and list_contracts to be a set and not a list. This avoid duplicates and a necessay check before appending that the element is not present as this is error prone. For example at the moment this check is missing when adding a top level function so if you were to use a top level function n times you will get n definitions of that function in the flattened output

@0xalpharush 0xalpharush changed the title slither-flat improvements make slither-flat work for top level errors, structs, enums May 6, 2023
@0xalpharush 0xalpharush merged commit eda3e54 into dev May 12, 2023
47 checks passed
@0xalpharush 0xalpharush deleted the dev-flattening-improvements branch May 12, 2023 15:47
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 this pull request may close these issues.

None yet

2 participants