Skip to content

Commit

Permalink
fix: #36
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Dec 31, 2024
1 parent ddec60b commit 98d1648
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/asset-management/EulerV2Manager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,33 @@ contract EulerV2Manager is IAssetManager, Owned(msg.sender), RGT {
revert OutstandingSharesForVault();
}

assetVault[aAsset] = aVault;
emit VaultForAsset(aAsset, aVault);
if (aVault != lVault) {
assetVault[aAsset] = aVault;
emit VaultForAsset(aAsset, aVault);
}
}

function setGuardian(address aGuardian) external onlyOwner {
guardian = aGuardian;
emit Guardian(aGuardian);
if (aGuardian != guardian) {
guardian = aGuardian;
emit Guardian(aGuardian);
}
}

function setWindDownMode(bool aWindDown) external onlyGuardianOrOwner {
windDownMode = aWindDown;
emit WindDownMode(aWindDown);
if (aWindDown != windDownMode) {
windDownMode = aWindDown;
emit WindDownMode(aWindDown);
}
}

function setThresholds(uint128 aLowerThreshold, uint128 aUpperThreshold) external onlyGuardianOrOwner {
require(aUpperThreshold <= 1e18 && aUpperThreshold >= aLowerThreshold, "AM: INVALID_THRESHOLDS");
(lowerThreshold, upperThreshold) = (aLowerThreshold, aUpperThreshold);
emit Thresholds(aLowerThreshold, aUpperThreshold);

if (aLowerThreshold != lowerThreshold || aUpperThreshold != upperThreshold) {
(lowerThreshold, upperThreshold) = (aLowerThreshold, aUpperThreshold);
emit Thresholds(aLowerThreshold, aUpperThreshold);
}
}

function rawCall(address aTarget, bytes calldata aCalldata, uint256 aValue)
Expand Down

0 comments on commit 98d1648

Please sign in to comment.