Skip to content

Commit

Permalink
Merge pull request #23 from euler-xyz/check-account-status-mutability
Browse files Browse the repository at this point in the history
Change `checkAccountStatus` function mutability (Cantina 196)
  • Loading branch information
dglowinski authored Jul 30, 2024
2 parents 50c5c90 + 49ec8d3 commit 8eed9ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/EVault/EVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ contract EVault is Dispatch {

function disableController() public virtual override use(MODULE_RISKMANAGER) {}

function checkAccountStatus(address account, address[] calldata collaterals) public virtual override returns (bytes4) { return super.checkAccountStatus(account, collaterals); }
function checkAccountStatus(address account, address[] calldata collaterals) public view virtual override returns (bytes4) { return super.checkAccountStatus(account, collaterals); }

function checkVaultStatus() public virtual override returns (bytes4) { return super.checkVaultStatus(); }

Expand Down
2 changes: 1 addition & 1 deletion src/EVault/IEVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ interface IRiskManager is IEVCVault {
/// @return magicValue Must return the bytes4 magic value 0xb168c58f (which is a selector of this function) when
/// account status is valid, or revert otherwise.
/// @dev Only callable by EVC during status checks
function checkAccountStatus(address account, address[] calldata collaterals) external returns (bytes4);
function checkAccountStatus(address account, address[] calldata collaterals) external view returns (bytes4);

/// @notice Checks the status of the vault and reverts if caps are exceeded
/// @return magicValue Must return the bytes4 magic value 0x4b3d1223 (which is a selector of this function) when
Expand Down
1 change: 1 addition & 0 deletions src/EVault/modules/RiskManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ abstract contract RiskManagerModule is IRiskManager, LiquidityUtils {
/// `disableController`), but they don't change the vault's storage.
function checkAccountStatus(address account, address[] calldata collaterals)
public
view
virtual
reentrantOK
onlyEVCChecks
Expand Down

0 comments on commit 8eed9ff

Please sign in to comment.