mirror of
https://github.com/vacp2p/foundry-template.git
synced 2026-01-09 23:28:01 -05:00
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:
8
certora/certora.conf
Normal file
8
certora/certora.conf
Normal 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
9
certora/specs/Foo.spec
Normal file
@@ -0,0 +1,9 @@
|
||||
methods {
|
||||
function id(uint256) external returns (uint256) envfree;
|
||||
}
|
||||
|
||||
rule checkIdOutputIsAlwaysEqualToInput {
|
||||
uint256 input;
|
||||
|
||||
assert id(input) == input;
|
||||
}
|
||||
Reference in New Issue
Block a user