Skip to main content

IKeeperFeePayer.sol

IKeeperFeePayer

Interface for a contract that pays keeper fees.

SetRouter

event SetRouter(address)

approveToRouter

function approveToRouter(address token, bool approve) external

Approves or revokes approval to the Uniswap router for a given token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the token.
    approveboolA boolean indicating whether to approve or revoke approval.

payKeeperFee

function payKeeperFee(address tokenIn, uint256 amountOut, address keeperAddress) external returns (uint256 amountIn)

Pays the keeper fee using Uniswap swaps.

  • Parameters:

    NameTypeDescription
    tokenInaddressThe address of the token being swapped.
    amountOutuint256The desired amount of output tokens.
    keeperAddressaddressThe address of the keeper to receive the fee.
  • Return Values:

    NameTypeDescription
    amountInuint256The actual amount of input tokens used for the swap.