Skip to content

Commit

Permalink
Update state.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
msinkec committed Jan 6, 2022
1 parent bfdf69d commit d91b21e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/state.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ For a contract to keep state and able to be called multiple times while carrying
State Decorator
===============
Declare any property that is part of the state with a decorator ``@state``.
The state property can be used the same way as a regular property. Note, that an explicit constructor definition isn't allowed when the contract contains state properties.
The state property can be used the same way as a regular property.

.. code-block:: solidity
contract Counter {
@state
int counter;
constructor(int counter) {
this.counter = counter;
}
}
Propagate the State
Expand Down

0 comments on commit d91b21e

Please sign in to comment.