diff --git a/contracts/execution/UniswapV3ExecutionAdapter.sol b/contracts/execution/UniswapV3ExecutionAdapter.sol index 5c71d01a..29682a9d 100644 --- a/contracts/execution/UniswapV3ExecutionAdapter.sol +++ b/contracts/execution/UniswapV3ExecutionAdapter.sol @@ -88,6 +88,7 @@ contract UniswapV3ExecutionAdapter is IExecutionAdapter, Ownable2Step { /// @param fee The fee tier to set function setAssetFee(address asset, uint24 fee) external onlyOwnerOrGuardian { if (asset == address(0)) revert ErrorsLib.ZeroAddress(); + if (!CONFIG.isSystemIdle()) revert ErrorsLib.SystemNotIdle(); address pool = UNISWAP_V3_FACTORY.getPool(asset, address(UNDERLYING_ASSET), fee); diff --git a/contracts/test/MockOrionConfig.sol b/contracts/test/MockOrionConfig.sol index 0ca0a190..85c45a9e 100644 --- a/contracts/test/MockOrionConfig.sol +++ b/contracts/test/MockOrionConfig.sol @@ -17,6 +17,8 @@ contract MockOrionConfig { mapping(address => bool) private whitelisted; /// @dev When true, return 0 for unset tokens (simulates real OrionConfig where unwhitelisted tokens have no entry) bool public returnZeroForUnsetTokens; + /// @dev Mirrors OrionConfig `isSystemIdle` for adapter tests; default true (idle). + bool public systemIdle = true; constructor(address _underlyingAsset) { UNDERLYING_ASSET = _underlyingAsset; @@ -78,4 +80,12 @@ contract MockOrionConfig { function setGuardian(address _guardian) external { guardian = _guardian; } + + function isSystemIdle() external view returns (bool) { + return systemIdle; + } + + function setSystemIdle(bool idle) external { + systemIdle = idle; + } } diff --git a/package.json b/package.json index 67a042cd..f7de79e7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@orion-finance/protocol", "description": "Orion Finance Protocol", - "version": "2.3.2", + "version": "2.3.3", "type": "module", "engines": { "node": ">=22.10.0"