Skip to content

Commit

Permalink
delegating stakes api implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatmikh committed Aug 9, 2019
1 parent 836500b commit 4098a21
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/api/api-staking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,29 @@ The value is on the contract account and thus inaccessible to the sender.
``Output parameter`` : none


- **function freezeForContract(address contract_) payable public**
Stake the specified amount of money to the given contract account.
The value is on the contract account and thus inaccessible to the sender.
(address contract_) payable public {
``Input parameter`` : "msg.value" the value to be staked.
``Input parameter`` : address - the contract to stake for.
``Output parameter`` : none


- **function melt(uint224 val) public**
Unstake the specified value of tokens.
The value is put to the melting queue and can be withdrawn after `freezeGap`.
``Input parameter`` : "val" - value to unstake.
``Output parameter`` : none


- **function meltFromContract(address contract_, uint224 val) public**
Function to unstake the specified value of money from the contract account.
The value is put to the melting queue and can be withdrawn after `kFreezeStake`.
``Input parameter`` : "val" - value to unstake.
``Input parameter`` : address - the contract to unstake from.
``Output parameter`` : none

- **function withdraw() public**
Withdraw the previously unstaked amount of tokens provided the `freezeGap` time had passed since its unstake.
Every 'unstake' call must match 'withdraw' call.
Expand Down

0 comments on commit 4098a21

Please sign in to comment.