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

refactor(certora): introduce shared.spec to reuse helper functions #117

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

0x-r4bbit
Copy link
Collaborator

@0x-r4bbit 0x-r4bbit commented Sep 17, 2024

We have a couple of helper functions redefined in multiple spec files. This commit introduces a shared.spec that provides such functions.

The file is then imported in other spec files, so we can make use of the functions there.

Closes #87

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Added natspec comments?
  • Ran forge snapshot?
  • Ran pnpm gas-report?
  • Ran pnpm lint?
  • Ran forge test?
  • Ran pnpm verify?

We have a couple of helper functions redefined in multiple spec files.
This commit introduces a `shared.spec` that provides such functions.

The file is then imported in other spec files, so we can make use of the
functions there.

Closes #87
@0x-r4bbit
Copy link
Collaborator Author

I needed to update the commit to explicitly import StakeManager into shared.spec so that it is aware of it's function signatures, otherwise it wouldn't be able to compile.

Only happened in Stakevault.spec though.

@0x-r4bbit 0x-r4bbit merged commit 40c5be4 into develop Sep 19, 2024
8 checks passed
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.

Share common certora utility functions and helpers across spec files
2 participants