WorkLockPoolingContract

author

@vzotova and @roma_k*

notice

Contract acts as delegate for sub-stakers and owner

methods

bid(uint256)

details

Hide method from StakingInterface

calculateAndSaveTokensAmount()

notice

Calculate and save number of claimed tokens for specified delegator

cancelBid()

details

Hide method from StakingInterface

claim()

details

Hide method from StakingInterface

claimTokensFromWorkLock()

notice

Claim tokens in WorkLock and save number of claimed tokens

depositTokens(uint256)

notice

Transfer tokens as delegator

params

_value

Amount of tokens to transfer

disableDeposit()

notice

Disable deposit

enableDeposit()

notice

Enabled deposit

escrowETH()

notice

Delegator can transfer ETH directly to workLock

getAvailableETH(address)

notice

Get available ether for delegator

getAvailableRefund(address)

notice

Get available refund for delegator

getAvailableReward()

notice

Get available reward for all delegators and owner

getAvailableReward(address)

notice

Get available reward in tokens for delegator

getAvailableWorkerReward()

notice

Get available reward in tokens for worker node owner

getCumulativeReward()

notice

Get cumulative reward

getWorkerFraction()

notice

Calculate worker’s fraction depending on deposited tokens

initialize(address)

params

_router

Interface router contract address

initialize(uint256,address,address)

notice

Initialize function for using with OpenZeppelin proxy

params

_router

StakingInterfaceRouter address

_workerFraction

Share of token reward that worker node owner will get. Use value up to BASIS_FRACTION, if _workerFraction = BASIS_FRACTION -> means 100% reward as commission

_workerOwner

Owner of worker node, only this address can withdraw worker commission

isFallbackAllowed()

notice

Calling fallback function is allowed only for the owner

isOwner()

returns

_0

true if msg.sender is the owner of the contract.

owner()

returns

_0

the address of the owner.

refund()

notice

Withdraw compensation and refund from WorkLock and save these numbers

renounceOwnership()

details

Allows the current owner to relinquish control of the contract.

notice

Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the onlyOwner modifier anymore.

router()

details

Returns address of StakingInterfaceRouter

transferOwnership(address)

details

Allows the current owner to transfer control of the contract to a newOwner.

params

newOwner

The address to transfer ownership to.

withdrawAll()

notice

Withdraw reward, deposit and fee to delegator

withdrawCompensation()

details

Hide method from StakingInterface

withdrawETH()

notice

Withdraw available amount of ETH to delegator

withdrawRefund()

notice

Withdraw available amount of ETH to delegator

withdrawTokens(uint256)

notice

Withdraw reward to delegator

params

_value

Amount of tokens to withdraw

withdrawWorkerReward()

notice

Withdraw reward in tokens to worker node owner