feat: add certora CI integration (#10)

This adds a new command to package.json `verify` which can be run via
`pnpm verify`.

The command runs the certora CLI with a config file which has to be
adjusted for every individual project.

The commit also adds a dedicated task to our github actions, which
ensures, verification is done in every PR as well.
This commit is contained in:
r4bbit
2023-11-23 08:52:05 +01:00
committed by GitHub
parent 22704ebe1a
commit 2b90aeb38a
6 changed files with 70 additions and 1 deletions

8
certora/certora.conf Normal file
View File

@@ -0,0 +1,8 @@
{
"files": ["src/Foo.sol"],
"msg": "Verifying Foo.sol",
"rule_sanity": "basic",
"verify": "Foo:certora/specs/Foo.spec",
"wait_for_results": "all",
}

9
certora/specs/Foo.spec Normal file
View File

@@ -0,0 +1,9 @@
methods {
function id(uint256) external returns (uint256) envfree;
}
rule checkIdOutputIsAlwaysEqualToInput {
uint256 input;
assert id(input) == input;
}