Skip to content

BGTIncentiveFeeCollector

0x1984Baf659607Cc5f206c55BB3B00eb3E180190B | ABI JSON

Git Source

Collects the fees on the incentives posted on reward vaults and auction them for WBERA. Accrued WBERA serves as a payout for the stakers of WBERAStakerVault.sol.

Inherits: IBGTIncentiveFeeCollector, UUPSUpgradeable, OwnableUpgradeable, PausableUpgradeable

Constants

MANAGER_ROLE

solidity
bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

PAUSER_ROLE

solidity
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

WBERA

The WBERA token address, serves as payout token.

solidity
address public constant WBERA = 0x6969696969696969696969696969696969696969;

State Variables

payoutAmount

The amount of WBERA required to claim fees.

solidity
uint256 public payoutAmount;

queuedPayoutAmount

The queued payout amount that will be activated on next claim.

solidity
uint256 public queuedPayoutAmount;

wberaStakerVault

The address of the WBERA staker vault.

solidity
address public wberaStakerVault;

View Functions

hasRole

solidity
function hasRole(bytes32 role, address account) public view virtual override returns (bool);

owner

solidity
function owner() public view virtual override returns (address);

paused

solidity
function paused() public view virtual override returns (bool);

proxiableUUID

solidity
function proxiableUUID() external view virtual override notDelegated returns (bytes32);

queuedPayoutAmount

solidity
function queuedPayoutAmount() external view returns (uint256);

Functions

claimFees

Claims the accumulated fees for the given tokens.

The caller must transfer the payout amount to the staking vault.

Emits:

solidity
function claimFees(address _recipient, address[] calldata _feeTokens) external whenNotPaused;

Parameters

NameTypeDescription
_recipientaddressThe address to receive the claimed tokens.
_feeTokensaddress[]The array of fee token addresses to claim.

initialize

Initializes the contract.

Emits:

solidity
function initialize(address governance, uint256 _payoutAmount, address _wberaStakerVault) external initializer;

Parameters

NameTypeDescription
governanceaddressThe address that will have the DEFAULT_ADMIN_ROLE.
_payoutAmountuint256The amount of WBERA required to claim fees.
_wberaStakerVaultaddressThe address of the WBERA staker vault.

pause

Pauses the contract.

Emits:

solidity
function pause() external onlyRole(PAUSER_ROLE);

queuePayoutAmountChange

Queues a change to the payout amount.

Emits:

solidity
function queuePayoutAmountChange(uint256 _newPayoutAmount) external onlyRole(DEFAULT_ADMIN_ROLE);

Parameters

NameTypeDescription
_newPayoutAmountuint256The new payout amount.

unpause

Unpauses the contract.

Emits:

solidity
function unpause() external onlyRole(MANAGER_ROLE);

upgradeToAndCall

solidity
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual override onlyRole(DEFAULT_ADMIN_ROLE);

wberaStakerVault

solidity
function wberaStakerVault() external view returns (address);

Events

IncentiveFeesClaimed

Emitted when incentive fees are claimed.

solidity
event IncentiveFeesClaimed(address indexed caller, address indexed recipient);

Parameters

NameTypeDescription
calleraddressThe address that called the claim function.
recipientaddressThe address that received the tokens.

IncentiveFeeTokenClaimed

Emitted when a specific incentive fee token is claimed.

solidity
event IncentiveFeeTokenClaimed(
    address indexed caller, address indexed recipient, address indexed token, uint256 amount
);

Parameters

NameTypeDescription
calleraddressThe address that called the claim function.
recipientaddressThe address that received the tokens.
tokenaddressThe token that was claimed.
amountuint256The amount of tokens claimed.

Initialized

Emitted when the contract is initialized.

solidity
event Initialized(uint64 version);

Parameters

NameTypeDescription
versionuint64The initialization version.

OwnershipTransferred

Emitted when ownership is transferred.

solidity
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

Parameters

NameTypeDescription
previousOwneraddressThe previous owner.
newOwneraddressThe new owner.

Paused

Emitted when the contract is paused.

solidity
event Paused(address account);

Parameters

NameTypeDescription
accountaddressThe account that paused the contract.

PayoutAmountSet

Emitted when the payout amount is set.

solidity
event PayoutAmountSet(uint256 oldAmount, uint256 newAmount);

Parameters

NameTypeDescription
oldAmountuint256The previous payout amount.
newAmountuint256The new payout amount.

QueuedPayoutAmount

Emitted when a payout amount change is queued.

solidity
event QueuedPayoutAmount(uint256 newAmount, uint256 currentAmount);

Parameters

NameTypeDescription
newAmountuint256The new queued payout amount.
currentAmountuint256The current payout amount.

RoleAdminChanged

Emitted when the admin role for a role is changed.

solidity
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

Parameters

NameTypeDescription
rolebytes32The role whose admin was changed.
previousAdminRolebytes32The previous admin role.
newAdminRolebytes32The new admin role.

RoleGranted

Emitted when a role is granted to an account.

solidity
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

Parameters

NameTypeDescription
rolebytes32The role that was granted.
accountaddressThe account that received the role.
senderaddressThe account that granted the role.

RoleRevoked

Emitted when a role is revoked from an account.

solidity
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

Parameters

NameTypeDescription
rolebytes32The role that was revoked.
accountaddressThe account that lost the role.
senderaddressThe account that revoked the role.

Unpaused

Emitted when the contract is unpaused.

solidity
event Unpaused(address account);

Parameters

NameTypeDescription
accountaddressThe account that unpaused the contract.

Upgraded

Emitted when the implementation is upgraded.

solidity
event Upgraded(address indexed implementation);

Parameters

NameTypeDescription
implementationaddressThe new implementation address.