Skip to content

Commit

Permalink
Update api-staking.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatmikh committed Jun 9, 2019
1 parent af15276 commit a5259e1
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions doc/api/api-staking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,22 @@ Contract overview
-----------------

``Bios.sol`` - is the main kernel smartcontract with all the logic about consensus and staking. Its based on the ``QueueHelper`` that brings queue implementation code.

its global variables defined as follows:

.. container:: codeset

.. sourcecode:: solidity

uint32 constant freezeGap = 5 seconds; // time gap before withdrawing melted stake

/// Public data shared with client code.
mapping(address=>uint) public stakes; // stakes map reside in slot #0
address[] public sealers; // sealers array reside in slot #1

/// Public contract state.
uint constant public version = 1; // contract code version
mapping(address=>Queue) public melting; // melting stakes queues


Functions
---------

- **function freeze() payable public**
Stake the specified amount of money.
Stake the specified amount of tokens.
The value is on the contract account and thus inaccessible to the sender.
Input parameter: "msg.value" the value to be staked.
``Input parameter`` : "msg.value" the value to be staked.



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


- **function withdraw() public**
Expand Down

0 comments on commit a5259e1

Please sign in to comment.