Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/adapters/MorphoMarketV1Adapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ contract MorphoMarketV1Adapter is IMorphoMarketV1Adapter {
function timelocked() internal {
require(executableAt[msg.data] != 0, NotPending());
require(block.timestamp >= executableAt[msg.data], TimelockNotExpired());
require(!IVaultV2(parentVault).abdicated(bytes4(msg.data)), Abdicated());
executableAt[msg.data] = 0;
emit Accept(bytes4(msg.data), msg.data);
Comment thread
MathisGD marked this conversation as resolved.
Outdated
}
Expand Down
1 change: 1 addition & 0 deletions src/adapters/interfaces/IMorphoMarketV1Adapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface IMorphoMarketV1Adapter is IAdapter {

/* ERRORS */

error Abdicated();
error AlreadyPending();
error IrmMismatch();
error LoanAssetMismatch();
Expand Down
5 changes: 5 additions & 0 deletions test/mocks/VaultV2Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ contract VaultV2Mock {
mapping(bytes32 => uint256) public allocation;
uint256 public _timelock;
uint256 public firstTotalAssets;
mapping(bytes4 => bool) public abdicated;

constructor(address _asset, address _owner, address _curator, address _allocator, address _sentinel) {
asset = _asset;
Expand Down Expand Up @@ -59,4 +60,8 @@ contract VaultV2Mock {
function setFirstTotalAssets(uint256 newFirstTotalAssets) external {
firstTotalAssets = newFirstTotalAssets;
}

function setAbdicated(bytes4 selector, bool newAbdicated) external {
abdicated[selector] = newAbdicated;
}
}