Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/certora/add-ci' into certora/unc…
Browse files Browse the repository at this point in the history
…hecked
  • Loading branch information
QGarchery committed Sep 19, 2023
2 parents 2227b6c + e3f8412 commit 7bcb574
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ docs/
# Certora
.certora**
emv-*-certora*
certora/munged

# Dotenv file
.env
12 changes: 12 additions & 0 deletions certora/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
munged: $(wildcard ../src/*.sol) munging.patch
@rm -rf munged
@cp -r ../src munged
@patch -p0 -d munged < munging.patch

record:
diff -ruN ../src munged | sed 's+\.\./src/++g' | sed 's+munged/++g' > munging.patch

clean:
rm -rf munged

.PHONY: record clean # do not add munged here, as it is useful to protect munged edits
12 changes: 12 additions & 0 deletions certora/munging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ruN Irm.sol Irm.sol
--- Irm.sol 2023-09-19 15:59:58.045886731 +0200
+++ Irm.sol 2023-09-19 16:09:50.491751975 +0200
@@ -38,7 +38,7 @@
/// @notice Speed factor (scaled by WAD).
uint256 public immutable SPEED_FACTOR;
/// @notice Target utilization (scaled by WAD).
- uint256 public immutable TARGET_UTILIZATION;
+ uint256 public TARGET_UTILIZATION;
/// @notice Initial rate (scaled by WAD).
uint128 public immutable INITIAL_RATE;

2 changes: 2 additions & 0 deletions certora/scripts/verifyLiveness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euxo pipefail

make -C certora munged

certoraRun \
src/Irm.sol \
--verify Irm:certora/specs/Liveness.spec \
Expand Down

0 comments on commit 7bcb574

Please sign in to comment.