Skip to content

BGTStaker

0x791fb53432eED7e2fbE4cf8526ab6feeA604Eb6d

State Variables

FEE_COLLECTOR

The fee collector contract that is allowed to notify rewards.

solidity
address public FEE_COLLECTOR;

Functions

constructor

solidity
constructor();

initialize

solidity
function initialize(
    address _bgt,
    address _feeCollector,
    address _governance,
    address _rewardToken
)
    external
    initializer;

onlyBGT

solidity
modifier onlyBGT();

onlyFeeCollector

solidity
modifier onlyFeeCollector();

_authorizeUpgrade

solidity
function _authorizeUpgrade(address newImplementation) internal override onlyOwner;

notifyRewardAmount

solidity
function notifyRewardAmount(uint256 reward) external onlyFeeCollector;

recoverERC20

solidity
function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner;

setRewardsDuration

solidity
function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner;

stake

solidity
function stake(address account, uint256 amount) external onlyBGT;

withdraw

solidity
function withdraw(address account, uint256 amount) external onlyBGT;

getReward

Claim the reward of the caller.

solidity
function getReward() external returns (uint256);

_safeTransferFromStakeToken

Override the internal function to prevent transferring BGT.

solidity
function _safeTransferFromStakeToken(address from, uint256 amount) internal override;

_safeTransferStakeToken

Override the internal function to prevent transferring BGT.

solidity
function _safeTransferStakeToken(address to, uint256 amount) internal override;

Events

Recovered

Emitted when a token has been recovered.

solidity
event Recovered(address token, uint256 amount);

Parameters

NameTypeDescription
tokenaddressThe token that has been recovered.
amountuint256The amount of token recovered.