# WorkLock¶

notice

The WorkLock distribution contract

## methods¶

### bid()¶

notice

Bid for tokens by transferring ETH

### cancelBid()¶

notice

Cancel bid and refund deposited ETH

### claim()¶

notice

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

### constructor¶

#### params¶

_boostingRefund

Coefficient to boost refund ETH

_endBidDate

Timestamp when bidding will end

_endCancellationDate

Timestamp when cancellation will ends

_escrow

Escrow contract

_minAllowedBid

Minimum allowed ETH amount for bidding

_stakingPeriods

Amount of periods during which tokens will be locked after claiming

_startBidDate

Timestamp when bidding starts

_token

Token contract

### ethToTokens(uint256)¶

details

This value will be fixed only after end of bidding

notice

Calculate amount of tokens that will be get for specified amount of ETH

### ethToWork(uint256)¶

details

This value will be fixed only after end of bidding

notice

Calculate amount of work that need to be done to refund specified amount of ETH

notice

Make force refund to bidders who can get tokens more than maximum allowed

#### params¶

_biddersForRefund

Sorted list of unique bidders. Only bidders who must receive a refund

notice

Get available refund for bidder

### getBiddersLength()¶

notice

Get length of bidders array

notice

Get remaining work to full refund

### isClaimingAvailable()¶

notice

Checks if claiming available

### isOwner()¶

#### returns¶

_0

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

_0

### refund()¶

notice

Refund ETH for the completed work

### 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.

### shutdown()¶

notice

Cancels distribution, makes possible to retrieve all bids and owner gets all tokens

### tokenDeposit(uint256)¶

notice

Deposit tokens to contract

#### params¶

_value

Amount of tokens to transfer

details

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

#### params¶

newOwner

The address to transfer ownership to.

### verifyBiddingCorrectness(uint256)¶

details

Method stops working when the remaining gas is less than _gasToSaveState and saves the state in nextBidderToCheck. If all bidders have been checked then nextBidderToCheck will be equal to the length of the bidders array

notice

Check that the claimed tokens are within maxAllowableLockedTokens for all participants, starting from the last point nextBidderToCheck

### withdrawCompensation()¶

notice

Withdraw compensation after force refund

### workToETH(uint256,uint256)¶

details

This value will be fixed only after end of bidding

notice

Calculate amount of ETH that will be refund for completing specified amount of work