aboutsummaryrefslogtreecommitdiffstats
path: root/docs/structure-of-a-contract.rst
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-05-13 22:32:35 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-05-18 23:35:32 +0800
commitd4ad3231a294bad3b5c81cde6e27ff38ecef7f76 (patch)
tree1a4de5d0b70e0f983dc4d98a678c42018a9c4fad /docs/structure-of-a-contract.rst
parent4b9e9cad562b96fc1d6eeb59a2115544c89cf72a (diff)
downloaddexon-solidity-d4ad3231a294bad3b5c81cde6e27ff38ecef7f76.tar.gz
dexon-solidity-d4ad3231a294bad3b5c81cde6e27ff38ecef7f76.tar.zst
dexon-solidity-d4ad3231a294bad3b5c81cde6e27ff38ecef7f76.zip
Removed trailing whitespace
Diffstat (limited to 'docs/structure-of-a-contract.rst')
-rw-r--r--docs/structure-of-a-contract.rst20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/structure-of-a-contract.rst b/docs/structure-of-a-contract.rst
index 0968ffc8..6685566d 100644
--- a/docs/structure-of-a-contract.rst
+++ b/docs/structure-of-a-contract.rst
@@ -26,7 +26,7 @@ State variables are values which are permanently stored in contract storage.
}
See the :ref:`types` section for valid state variable types and
-:ref:`visibility-and-accessors` for possible choices for
+:ref:`visibility-and-accessors` for possible choices for
visibility.
.. _structure-functions:
@@ -46,7 +46,7 @@ Functions are the executable units of code within a contract.
:ref:`function-calls` can happen internally or externally
and have different levels of visibility (:ref:`visibility-and-accessors`)
-towards other contracts.
+towards other contracts.
.. _structure-function-modifiers:
@@ -57,15 +57,15 @@ Function modifiers can be used to amend the semantics of functions in a declarat
(see :ref:`modifiers` in contracts section).
::
-
+
contract Purchase {
address public seller;
-
+
modifier onlySeller() { // Modifier
if (msg.sender != seller) throw;
_
}
-
+
function abort() onlySeller { // Modifier usage
// ...
}
@@ -82,14 +82,14 @@ Events are convenience interfaces with the EVM logging facilities.
contract SimpleAuction {
event HighestBidIncreased(address bidder, uint amount); // Event
-
+
function bid() {
// ...
HighestBidIncreased(msg.sender, msg.value); // Triggering event
}
}
-See :ref:`events` in contracts section for information on how events are declared
+See :ref:`events` in contracts section for information on how events are declared
and can be used from within a dapp.
.. _structure-structs-types:
@@ -97,7 +97,7 @@ and can be used from within a dapp.
Structs Types
=============
-Structs are custom defined types that can group several variables (see
+Structs are custom defined types that can group several variables (see
:ref:`structs` in types section).
::
@@ -116,11 +116,11 @@ Structs are custom defined types that can group several variables (see
Enum Types
==========
-Enums can be used to create custom types with a finite set of values (see
+Enums can be used to create custom types with a finite set of values (see
:ref:`enums` in types section).
::
-
+
contract Purchase {
enum State { Created, Locked, Inactive } // Enum
}