Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IAutopoolMainRewarder

Git Source

Interface for Tokemak's AutopoolMainRewarder contract

Used to stake autopool vault tokens and claim rewards

Functions

stake

Stakes autopool tokens for a given account

function stake(address account, uint256 amount) external;

Parameters

NameTypeDescription
accountaddressThe account to stake for
amountuint256The amount of autopool tokens to stake

withdraw

Withdraws staked autopool tokens

function withdraw(address account, uint256 amount, bool claim) external;

Parameters

NameTypeDescription
accountaddressThe account to withdraw for
amountuint256The amount to withdraw
claimboolWhether to claim rewards

getReward

Claims rewards for an account

function getReward(address account, address recipient, bool claimExtras) external;

Parameters

NameTypeDescription
accountaddressThe account to claim for
recipientaddressThe recipient of the rewards
claimExtrasboolWhether to claim extra rewards

balanceOf

Returns the balance of staked tokens for an account

function balanceOf(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe account to check

Returns

NameTypeDescription
<none>uint256The staked balance

earned

Returns the amount of earned rewards for an account

function earned(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe account to check

Returns

NameTypeDescription
<none>uint256The earned rewards

rewardToken

Returns the main reward token address

function rewardToken() external view returns (address);

Returns

NameTypeDescription
<none>addressThe reward token address

stakingToken

Returns the staking token (autopool vault token)

function stakingToken() external view returns (address);

Returns

NameTypeDescription
<none>addressThe staking token address

extraRewardsLength

Returns the number of extra reward contracts

function extraRewardsLength() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The count of extra rewards

extraRewards

Returns an extra reward contract at index

function extraRewards(uint256 index) external view returns (address);

Parameters

NameTypeDescription
indexuint256The index of the extra reward

Returns

NameTypeDescription
<none>addressThe extra reward contract address