diff --git a/packages/yswaps/contracts/swappers/async/BancorSwapper.sol b/packages/yswaps/contracts/swappers/async/BancorSwapper.sol index da61e36d..3c283214 100644 --- a/packages/yswaps/contracts/swappers/async/BancorSwapper.sol +++ b/packages/yswaps/contracts/swappers/async/BancorSwapper.sol @@ -32,13 +32,17 @@ interface IBancorNetwork { ) external payable returns (uint256 returnAmount); } -interface IBancorSwapper is IAsyncSwapper {} +interface IBancorSwapper is IAsyncSwapper { + function contractRegistry() external returns (IContractRegistry); + + function bancorNetworkName() external returns (bytes32); +} contract BancorSwapper is IBancorSwapper, AsyncSwapper { using SafeERC20 for IERC20; - IContractRegistry public contractRegistry; - bytes32 public bancorNetworkName; + IContractRegistry public immutable override contractRegistry; + bytes32 public immutable override bancorNetworkName; constructor( address _governor, diff --git a/packages/yswaps/contracts/swappers/sync/BancorSwapper.sol b/packages/yswaps/contracts/swappers/sync/BancorSwapper.sol index 7a4188ec..f325ea5b 100644 --- a/packages/yswaps/contracts/swappers/sync/BancorSwapper.sol +++ b/packages/yswaps/contracts/swappers/sync/BancorSwapper.sol @@ -30,13 +30,17 @@ interface IBancorNetwork { ) external payable returns (uint256 returnAmount); } -interface IBancorSwapper is ISyncSwapper {} +interface IBancorSwapper is ISyncSwapper { + function contractRegistry() external returns (IContractRegistry); + + function bancorNetworkName() external returns (bytes32); +} contract BancorSwapper is IBancorSwapper, SyncSwapper { using SafeERC20 for IERC20; - IContractRegistry public contractRegistry; - bytes32 public bancorNetworkName; + IContractRegistry public immutable override contractRegistry; + bytes32 public immutable override bancorNetworkName; constructor( address _governor, diff --git a/packages/yswaps/contracts/swappers/sync/SyncSwapper.sol b/packages/yswaps/contracts/swappers/sync/SyncSwapper.sol index c99601a6..a499abd8 100644 --- a/packages/yswaps/contracts/swappers/sync/SyncSwapper.sol +++ b/packages/yswaps/contracts/swappers/sync/SyncSwapper.sol @@ -31,7 +31,7 @@ abstract contract SyncSwapper is ISyncSwapper, Swapper { address _tokenIn, address _tokenOut, uint256 _amountIn, - uint256 _maxSlippage + uint256 ) internal pure { if (_receiver == address(0) || _tokenIn == address(0) || _tokenOut == address(0)) revert CommonErrors.ZeroAddress(); if (_amountIn == 0) revert CommonErrors.ZeroAmount();