Skip to content

Commit

Permalink
Workaround for ForeignController storageAffected
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbreak1211 committed Nov 14, 2024
1 parent 791093b commit 066c7f0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ForeignController.spec
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ methods {
_.withdraw(address,address,uint256),
_.depositForBurn(uint256,uint32,bytes32,address)
] default HAVOC_ALL;
function _.burnLimitsPerMessage(address token) external => burnLimitsPerMessageSummary() expect uint256;
}

persistent ghost bool callProxySuccess;
Expand Down Expand Up @@ -92,8 +93,14 @@ rule storageAffected(method f) {
bool activeBefore = active();
bytes32 mintRecipientsBefore = mintRecipients(anyUint32);

calldataarg args;
f(e, args);
if (f.selector != sig:depositPSM) {
calldataarg args;
f(e, args);
} else {
address asset; uint256 amount;
require asset == usdc || asset == usds || asset == sUsds;
depositPSM(e, asset, amount);
}

bool hasRoleAfter = hasRole(anyBytes32, anyAddr);
bytes32 roleAdminAfter = getRoleAdmin(anyBytes32);
Expand Down

0 comments on commit 066c7f0

Please sign in to comment.