// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "../../listing/Listings.sol"; import "../../renting/Rentings.sol"; import "../Accounts.sol"; interface IERC20RewardDistributor is IContractEntity { /** * @dev Thrown when the Warper has not set enough allowance for ERC20RewardDistributor. */ error InsufficientAllowanceForDistribution(uint256 asked, uint256 provided); /** * @notice Executes a single distribution of external ERC20 reward. * @dev Before calling this function, an ERC20 increase allowance should be given * for the `tokenAmount` of `token` * by caller for Metahub. * @param agreementId The ID of related to the distribution Rental Agreement. * @param token Represents the ERC20 token that is being distributed. * @param rewardAmount Represents the `token` amount to be distributed as a reward. * @return rentalExternalRewardEarnings Represents external reward based earnings for all entities. */ function distributeExternalReward( uint256 agreementId, address token, uint256 rewardAmount ) external returns (Accounts.RentalEarnings memory rentalExternalRewardEarnings); }