StakeManager

Contract used for manager staking

Methods

stake

function stake(
    DataTypes.ApeStaked memory apeStaked,
    DataTypes.BakcStaked memory bakcStaked,
    DataTypes.CoinStaked memory coinStaked
) external 

stake ape & bakc & coin

Parameters

NameTypeDescription

apeStaked

DataTypes.ApeStaked

the data struct for ape staking

bakcStaked

DataTypes.BakcOffer

the data struct for bakc staking

coinStaked

DataTypes.CoinOffer

the data struct for coin staking

approveOperator

function approveOperator(address operator) external

approve a operator for unStake

Parameters

NameTypeDescription

operator

address

the address of operator

revokeOperator

function revokeOperator() external 

remove the operator for msg.sender

unStake

function unStake(IStakeProxy proxy) external 

UnStake the proxy

Parameters

NameTypeDescription

proxy

address

the address of stake proxy

claim

function claim(IStakeProxy proxy) external

Claim rewards for msg.sender from stake proxy

Parameters

NameTypeDescription

proxy

address

the address of stake proxy

claimFor

function claimFor(IStakeProxy proxy, address staker) external

Claim rewards for staker from stake proxy

Parameters

NameTypeDescription

proxy

address

the address of stake proxy

staker

address

the address of staker to receive rewards

borrowETH

function borrowETH(
    uint256 amount,
    address apeAsset,
    uint256 apeTokenId
) external

Borrow ETH when the ape staked

Paremeters

NameType

amount

uint256

the amount of ETH need to borrow

apeAsset

address

the address of ape used as collateral

apeTokenId

uint256

the token id of ape used as collateral

View methods

claimable

function claimable(IStakeProxy proxy, address staker) external view returns (uint256)

Query claimable rewards amount for staker from stake proxy

Paremeters

NameTypeDescription

proxy

address

the address of stake proxy

staker

address

the sddress of staker to receive rewards

Returns

NameTypeDescription

amount

uint256

the amount of claimable rewards

Last updated