solidity/docs/contracts.rst

36 lines
1.1 KiB
ReStructuredText
Raw Permalink Normal View History

2015-12-07 20:16:25 +00:00
.. index:: ! contract
.. _contracts:
2015-12-07 20:16:25 +00:00
##########
Contracts
##########
2016-09-05 14:29:08 +00:00
Contracts in Solidity are similar to classes in object-oriented languages. They
2019-12-12 11:52:18 +00:00
contain persistent data in state variables, and functions that can modify these
2016-03-10 19:53:13 +00:00
variables. Calling a function on a different contract (instance) will perform
2019-12-12 11:52:18 +00:00
an EVM function call and thus switch the context such that state variables
in the calling contract are
inaccessible. A contract and its functions need to be called for anything to happen.
There is no "cron" concept in Ethereum to call a function at a particular event automatically.
2015-12-07 20:16:25 +00:00
2019-01-07 10:04:31 +00:00
.. include:: contracts/creating-contracts.rst
2015-12-07 20:16:25 +00:00
2019-01-07 10:58:11 +00:00
.. include:: contracts/visibility-and-getters.rst
2015-12-07 20:16:25 +00:00
.. include:: contracts/function-modifiers.rst
2015-12-07 20:16:25 +00:00
2019-01-07 13:14:26 +00:00
.. include:: contracts/constant-state-variables.rst
2019-01-07 13:27:32 +00:00
.. include:: contracts/functions.rst
2019-01-07 13:50:21 +00:00
.. include:: contracts/events.rst
2021-02-04 14:58:06 +00:00
.. include:: contracts/errors.rst
2015-12-07 20:16:25 +00:00
2019-01-07 14:37:33 +00:00
.. include:: contracts/inheritance.rst
.. include:: contracts/abstract-contracts.rst
2019-01-07 16:49:34 +00:00
.. include:: contracts/interfaces.rst
2018-09-20 20:07:04 +00:00
2019-01-07 17:05:27 +00:00
.. include:: contracts/libraries.rst
2018-01-19 15:52:23 +00:00
2019-01-07 17:08:00 +00:00
.. include:: contracts/using-for.rst