StakingInterface

details

All methods must be stateless because this code will be executed by delegatecall call, use immutable fields.v1.6.1

notice

Interface for accessing main contracts from a staking contract

methods

bid(uint256)

notice

Bid for tokens by transferring ETH

bondWorker(address)

notice

Bond worker in the staking escrow

params

_worker

Worker address

cancelBid()

notice

Cancel bid and refund deposited ETH

claim()

notice

Claimed tokens will be deposited and locked as stake in the StakingEscrow contract

constructor

notice

Constructor sets addresses of the contracts

params

_escrow

Escrow contract

_policyManager

PolicyManager contract

_token

Token contract

_workLock

WorkLock contract

depositAndIncrease(uint256,uint256)

notice

Deposit tokens to the staking escrow

params

_index

Index of the sub-stake

_value

Amount of tokens which will be locked

depositAsStaker(uint256,uint16)

notice

Deposit tokens to the staking escrow

params

_periods

Amount of periods during which tokens will be locked

_value

Amount of token to deposit

divideStake(uint256,uint256,uint16)

notice

Divide stake into two parts

params

_index

Index of stake

_newValue

New stake value

_periods

Amount of periods for extending stake

lockAndCreate(uint256,uint16)

notice

Lock some tokens in the staking escrow

params

_periods

Amount of periods during which tokens will be locked

_value

Amount of tokens which should lock

lockAndIncrease(uint256,uint256)

notice

Lock some tokens in the staking escrow

params

_index

Index of the sub-stake

_value

Amount of tokens which will be locked

lockReStake(uint16)

notice

Lock reStake parameter in the staking escrow

params

_lockReStakeUntilPeriod

Can’t change reStake value until this period

mergeStake(uint256,uint256)

notice

Merge two sub-stakes into one

params

_index1

Index of the first sub-stake

_index2

Index of the second sub-stake

mint()

notice

Mint tokens in the staking escrow

prolongStake(uint256,uint16)

notice

Prolong active sub stake

params

_index

Index of the sub stake

_periods

Amount of periods for extending sub stake

refund()

notice

Refund ETH for the completed work

setMinFeeRate(uint256)

notice

Set the minimum fee that the staker will accept in the policy manager contract

setReStake(bool)

notice

Set reStake parameter in the staking escrow

params

_reStake

Value for parameter

setSnapshots(bool)

notice

Set snapshots parameter in the staking escrow

params

_enableSnapshots

Value for parameter

setWindDown(bool)

notice

Set windDown parameter in the staking escrow

params

_windDown

Value for parameter

withdrawAsStaker(uint256)

notice

Withdraw available amount of tokens from the staking escrow to the staking contract

params

_value

Amount of token to withdraw

withdrawCompensation()

notice

Withdraw compensation after force refund

withdrawPolicyFee()

notice

Withdraw available policy fees from the policy manager to the staking contract