diff --git a/contracts/avalanche/connectors/aave/v2/main.sol b/contracts/avalanche/connectors/aave/v2/main.sol index 05a4808d..44540022 100644 --- a/contracts/avalanche/connectors/aave/v2/main.sol +++ b/contracts/avalanche/connectors/aave/v2/main.sol @@ -282,9 +282,9 @@ abstract contract AaveResolver is Events, Helpers { * @dev Swap borrow rate mode * @notice Swaps user borrow rate mode between variable and stable * @param token The address of the token to swap borrow rate.(For AVAX: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) - * @param currentRateMode Current Rate mode. (Stable = 1, Variable = 2) + * @param rateMode Current Rate mode. (Stable = 1, Variable = 2) */ - function swapBorrowRateMode(address token, uint256 currentRateMode) + function swapBorrowRateMode(address token, uint256 rateMode) external payable returns (string memory _eventName, bytes memory _eventParam) @@ -294,12 +294,12 @@ abstract contract AaveResolver is Events, Helpers { bool isAVAX = token == avaxAddr; address _token = isAVAX ? wavaxAddr : token; - if (getPaybackBalance(_token, currentRateMode) > 0) { - aave.swapBorrowRateMode(_token, currentRateMode); + if (getPaybackBalance(_token, rateMode) > 0) { + aave.swapBorrowRateMode(_token, rateMode); } _eventName = "LogSwapRateMode(address,uint256)"; - _eventParam = abi.encode(token, currentRateMode); + _eventParam = abi.encode(token, rateMode); } } diff --git a/contracts/mainnet/connectors/aave/v2/main.sol b/contracts/mainnet/connectors/aave/v2/main.sol index 5cf08931..f7edda1d 100644 --- a/contracts/mainnet/connectors/aave/v2/main.sol +++ b/contracts/mainnet/connectors/aave/v2/main.sol @@ -282,9 +282,9 @@ abstract contract AaveResolver is Events, Helpers { * @dev Swap borrow rate mode * @notice Swaps user borrow rate mode between variable and stable * @param token The address of the token to swap borrow rate.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) - * @param currentRateMode Current Rate mode. (Stable = 1, Variable = 2) + * @param rateMode Current Rate mode. (Stable = 1, Variable = 2) */ - function swapBorrowRateMode(address token, uint256 currentRateMode) + function swapBorrowRateMode(address token, uint256 rateMode) external payable returns (string memory _eventName, bytes memory _eventParam) @@ -294,12 +294,12 @@ abstract contract AaveResolver is Events, Helpers { bool isEth = token == ethAddr; address _token = isEth ? wethAddr : token; - if (getPaybackBalance(_token, currentRateMode) > 0) { - aave.swapBorrowRateMode(_token, currentRateMode); + if (getPaybackBalance(_token, rateMode) > 0) { + aave.swapBorrowRateMode(_token, rateMode); } _eventName = "LogSwapRateMode(address,uint256)"; - _eventParam = abi.encode(token, currentRateMode); + _eventParam = abi.encode(token, rateMode); } } diff --git a/contracts/polygon/connectors/aave/v2/main.sol b/contracts/polygon/connectors/aave/v2/main.sol index f597a487..20677010 100644 --- a/contracts/polygon/connectors/aave/v2/main.sol +++ b/contracts/polygon/connectors/aave/v2/main.sol @@ -282,9 +282,9 @@ abstract contract AaveResolver is Events, Helpers { * @dev Swap borrow rate mode * @notice Swaps user borrow rate mode between variable and stable * @param token The address of the token to swap borrow rate.(For MATIC: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) - * @param currentRateMode Current Rate mode. (Stable = 1, Variable = 2) + * @param rateMode Current Rate mode. (Stable = 1, Variable = 2) */ - function swapBorrowRateMode(address token, uint256 currentRateMode) + function swapBorrowRateMode(address token, uint256 rateMode) external payable returns (string memory _eventName, bytes memory _eventParam) @@ -294,12 +294,12 @@ abstract contract AaveResolver is Events, Helpers { bool isMatic = token == maticAddr; address _token = isMatic ? wmaticAddr : token; - if (getPaybackBalance(_token, currentRateMode) > 0) { - aave.swapBorrowRateMode(_token, currentRateMode); + if (getPaybackBalance(_token, rateMode) > 0) { + aave.swapBorrowRateMode(_token, rateMode); } _eventName = "LogSwapRateMode(address,uint256)"; - _eventParam = abi.encode(token, currentRateMode); + _eventParam = abi.encode(token, rateMode); } } diff --git a/hardhat.config.ts b/hardhat.config.ts index 12280e70..0508b8e5 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -43,7 +43,7 @@ const networkGasPriceConfig: Record = { avalanche: 40, arbitrum: 1, optimism: 0.001, - fantom: 300 + fantom: 210 }; function createConfig(network: string) {