Skip to content

Commit

Permalink
fix: failing certora-ci (#410)
Browse files Browse the repository at this point in the history
* fix: try installing solc-select

* fix: addShares selector
  • Loading branch information
8sunyuan authored Feb 6, 2024
1 parent 5b15e1e commit 7511559
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/certora-prover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ jobs:
run: pip install certora-cli
- name: Install solc
run: |
wget https://github.com/ethereum/solidity/releases/download/v0.8.12/solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc
chmod +x /usr/local/bin/solc
pip install solc-select
solc-select use 0.8.12 --always-install
- name: Verify rule ${{ matrix.params }}
run: |
bash ${{ matrix.params }}
Expand Down
6 changes: 3 additions & 3 deletions certora/specs/core/StrategyManager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ methods {
// external calls to StrategyManager
function _.getDeposits(address) external => DISPATCHER(true);
function _.slasher() external => DISPATCHER(true);
function _.addShares(address,address,uint256) external => DISPATCHER(true);
function _.addShares(address,address,address,uint256) external => DISPATCHER(true);
function _.removeShares(address,address,uint256) external => DISPATCHER(true);
function _.withdrawSharesAsTokens(address, address, uint256, address) external => DISPATCHER(true);

Expand Down Expand Up @@ -97,7 +97,7 @@ definition methodCanIncreaseShares(method f) returns bool =
f.selector == sig:depositIntoStrategy(address,address,uint256).selector
|| f.selector == sig:depositIntoStrategyWithSignature(address,address,uint256,address,uint256,bytes).selector
|| f.selector == sig:withdrawSharesAsTokens(address,address,uint256,address).selector
|| f.selector == sig:addShares(address,address,uint256).selector;
|| f.selector == sig:addShares(address,address,address,uint256).selector;

/**
* a staker's amount of shares in a strategy (i.e. `stakerStrategyShares[staker][strategy]`) should only decrease when
Expand Down Expand Up @@ -129,7 +129,7 @@ rule newSharesIncreaseTotalShares(address strategy) {
uint256 stakerStrategySharesBefore = get_stakerStrategyShares(e.msg.sender, strategy);
uint256 totalSharesBefore = totalShares(strategy);
if (
f.selector == sig:addShares(address, address, uint256).selector
f.selector == sig:addShares(address, address, address, uint256).selector
|| f.selector == sig:removeShares(address, address, uint256).selector
) {
uint256 totalSharesAfter = totalShares(strategy);
Expand Down

0 comments on commit 7511559

Please sign in to comment.