mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
minor changes
This commit is contained in:
parent
9b99b207a8
commit
f66cfc6533
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ const networkGasPriceConfig: Record<string, number> = {
|
|||
avalanche: 40,
|
||||
arbitrum: 1,
|
||||
optimism: 0.001,
|
||||
fantom: 300
|
||||
fantom: 210
|
||||
};
|
||||
|
||||
function createConfig(network: string) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user