Skip to content

IERC20RewardDistributor

IERC20RewardDistributor

InsufficientAllowanceForDistribution

error InsufficientAllowanceForDistribution(uint256 asked, uint256 provided)

Thrown when the Warper has not set enough allowance for ERC20RewardDistributor.

distributeExternalReward

function distributeExternalReward(uint256 agreementId, address token, uint256 rewardAmount) external returns (struct Accounts.RentalEarnings rentalExternalRewardEarnings)

Executes a single distribution of external ERC20 reward.

Before calling this function, an ERC20 increase allowance should be given for the `tokenAmount` of `token` by caller for Metahub.

Name Type Description
agreementId uint256 The ID of related to the distribution Rental Agreement.
token address Represents the ERC20 token that is being distributed.
rewardAmount uint256 Represents the `token` amount to be distributed as a reward.
Name Type Description
rentalExternalRewardEarnings struct Accounts.RentalEarnings Represents external reward based earnings for all entities.