Skip to main content

IRewardsDistributorAdmin

Functions

_setPendingAdmin

function _setPendingAdmin(
address newPendingAdmin
) external

Begins transfer of admin rights. The newPendingAdmin must call _acceptAdmin to finalize the transfer.

Admin function to begin change of admin. The newPendingAdmin must call _acceptAdmin to finalize the transfer.

Parameters

NameTypeDescription
newPendingAdminaddressNew pending admin.

_acceptAdmin

function _acceptAdmin() external

Accepts transfer of admin rights. msg.sender must be pendingAdmin

Admin function for pending admin to accept role and update admin

_grantComp

function _grantComp(
address recipient,
uint256 amount
) external

Transfer COMP to the recipient

Note: If there is not enough COMP, we do not perform the transfer all.

Parameters

NameTypeDescription
recipientaddressThe address of the recipient to transfer COMP to
amountuint256The amount of COMP to (possibly) transfer

_setCompSupplySpeed

function _setCompSupplySpeed(
address cToken,
uint256 compSpeed
) external

Set COMP speed for a single market

Parameters

NameTypeDescription
cTokenaddressThe market whose COMP speed to update
compSpeeduint256New COMP speed for market

_setCompBorrowSpeed

function _setCompBorrowSpeed(
address cToken,
uint256 compSpeed
) external

Set COMP speed for a single market

Parameters

NameTypeDescription
cTokenaddressThe market whose COMP speed to update
compSpeeduint256New COMP speed for market

_setContributorCompSpeed

function _setContributorCompSpeed(
address contributor,
uint256 compSpeed
) external

Set COMP speed for a single contributor

Parameters

NameTypeDescription
contributoraddressThe contributor whose COMP speed to update
compSpeeduint256New COMP speed for contributor

_addMarket

function _addMarket(
address cToken
) external

Add a default market to claim rewards for in claimRewards()

Parameters

NameTypeDescription
cTokenaddressThe market to add

compSupplySpeeds

function compSupplySpeeds(
address
) external returns (uint256)

The portion of compRate that each market currently receives

Parameters

NameTypeDescription
``address

compBorrowSpeeds

function compBorrowSpeeds(
address
) external returns (uint256)

The portion of compRate that each market currently receives

Parameters

NameTypeDescription
``address

_setImplementation

function _setImplementation(
address implementation_
) external

Set logic contract address

Parameters

NameTypeDescription
implementation_address

AUTO_REWARDS_DISTRIBUTOR_ROLE

function AUTO_REWARDS_DISTRIBUTOR_ROLE() external returns (bytes32)

Role for AutoRewardsDistributor contracts