Gelato-automations/contracts/functions/InstaDapp/connectors/FConnectMaker.sol

78 lines
1.6 KiB
Solidity
Raw Normal View History

2020-11-02 10:51:49 +00:00
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.4;
import {
IConnectMaker
} from "../../../interfaces/InstaDapp/connectors/IConnectMaker.sol";
function _encodeOpenMakerVault(string memory _colType)
pure
returns (bytes memory)
{
return abi.encodeWithSelector(IConnectMaker.open.selector, _colType);
}
function _encodeBorrowDaiMakerVault(
uint256 _vaultId,
uint256 _amt,
uint256 _getId,
uint256 _setId
) pure returns (bytes memory) {
return
abi.encodeWithSelector(
IConnectMaker.borrow.selector,
_vaultId,
_amt,
_getId,
_setId
);
}
function _encodedDepositMakerVault(
uint256 _vaultId,
uint256 _amt,
uint256 _getId,
uint256 _setId
) pure returns (bytes memory) {
return
abi.encodeWithSelector(
IConnectMaker.deposit.selector,
_vaultId,
_amt,
_getId,
_setId
);
}
function _encodePaybackMakerVault(
uint256 _vaultId,
uint256 _amt,
uint256 _getId,
uint256 _setId
) pure returns (bytes memory) {
return
abi.encodeWithSelector(
IConnectMaker.payback.selector,
_vaultId,
_amt,
_getId,
_setId
);
}
function _encodedWithdrawMakerVault(
uint256 _vaultId,
uint256 _amt,
uint256 _getId,
uint256 _setId
) pure returns (bytes memory) {
return
abi.encodeWithSelector(
IConnectMaker.withdraw.selector,
_vaultId,
_amt,
_getId,
_setId
);
}