aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst6
-rw-r--r--docs/contributing.rst55
-rw-r--r--docs/index.rst1
-rw-r--r--docs/installing-solidity.rst6
-rw-r--r--docs/security-considerations.rst4
-rw-r--r--docs/units-and-global-variables.rst4
6 files changed, 75 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index d3a89c1e..a22a3544 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -447,6 +447,12 @@ In particular, the following operations will consume more gas than the stipend p
Please ensure you test your fallback function thoroughly to ensure the execution cost is less than 2300 gas before deploying a contract.
+.. warning::
+ Contracts that receive Ether but do not define a fallback function
+ throw an exception, sending back the Ether (this was different
+ before Solidity v0.4.0). So if you want your contract to receive Ether,
+ you have to implement a fallback function.
+
::
contract Test {
diff --git a/docs/contributing.rst b/docs/contributing.rst
new file mode 100644
index 00000000..cef6dfd2
--- /dev/null
+++ b/docs/contributing.rst
@@ -0,0 +1,55 @@
+############
+Contributing
+############
+
+Help is always appreciated!
+
+To get started, you can try :ref:`building-from-source` in order to familiarize
+yourself with the components of Solidity and the build process. Also, it may be
+useful to become well-versed at writing smart-contracts in Solidity.
+
+In particular, we need help in the following areas:
+
+* Improving the documentation
+* Responding to questions from other users on `StackExchange
+ <http://ethereum.stackexchange.com/>`_ and the `Solidity Gitter
+ <https://gitter.im/ethereum/solidity>`_
+* Fixing and responding to `Solidity's GitHub issues
+ <https://github.com/ethereum/solidity/issues>`_
+
+How to Report Issues
+====================
+
+To report an issue, please use the
+`GitHub issues tracker <https://github.com/ethereum/solidity/issues>`_. When
+reporting issues, please mention the following details:
+
+* Which version of Solidity you are using
+* Which platform are you running on
+* How to reproduce the issue
+* What was the result of the issue
+* What the expected behaviour is
+
+Workflow for Pull Requests
+==========================
+
+In order to contribute, please fork off of the ``develop`` branch and make your
+changes there. Your commit messages should detail *why* you made your change, as
+opposed to *what* you did.
+
+If you need to pull in any changes from ``develop`` after making your fork (for
+example, to resolve potential merge conflicts), please avoid using ``git merge``
+and instead, ``git rebase`` your branch.
+
+Additionally, if you are writing a new feature, please ensure you write appropriate
+Boost test cases and place them under ``test/``.
+
+However, if you are making a larger change, please consult with the Gitter
+channel, first.
+
+Finally, please make sure you respect the `coding standards
+<https://raw.githubusercontent.com/ethereum/cpp-ethereum/develop/CodingStandards.txt>`_
+for this project. Also, even though we do CI testing, please test your code and
+ensure that it builds locally before submitting a pull request.
+
+Thank you for your help!
diff --git a/docs/index.rst b/docs/index.rst
index 5f8977e8..a5ab3f86 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -113,4 +113,5 @@ Contents
security-considerations.rst
style-guide.rst
common-patterns.rst
+ contributing.rst
frequently-asked-questions.rst
diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst
index 9226b558..ad27e528 100644
--- a/docs/installing-solidity.rst
+++ b/docs/installing-solidity.rst
@@ -1,3 +1,7 @@
+.. index:: ! installing
+
+.. _installing-solidity:
+
###################
Installing Solidity
###################
@@ -68,6 +72,8 @@ We will re-add the pre-built bottles soon.
brew linkapps solidity
+.. _building-from-source:
+
Building from Source
====================
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index f8d099e4..7e846674 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -103,7 +103,9 @@ and stall those. Please be explicit about such cases in the documentation of you
Sending and Receiving Ether
===========================
-- If a contract receives Ether (without a function being called), the fallback function is executed. The contract can only rely
+- If a contract receives Ether (without a function being called), the fallback function is executed.
+ If it does not have a fallback function, the Ether will be rejected (by throwing an exception).
+ During the execution of the fallback function, the contract can only rely
on the "gas stipend" (2300 gas) being available to it at that time. This stipend is not enough to access storage in any way.
To be sure that your contract can receive Ether in that way, check the gas requirements of the fallback function
(for example in the "details" section in browser-solidity).
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst
index 64ee3408..9ee334cf 100644
--- a/docs/units-and-global-variables.rst
+++ b/docs/units-and-global-variables.rst
@@ -109,6 +109,10 @@ This means that the following are all identical::
If padding is needed, explicit type conversions can be used: ``sha3("\x00\x12")`` is the
same as ``sha3(uint16(0x12))``.
+Note that constants will be packed using the minimum number of bytes required to store them.
+This means that, for example, ``sha3(0) == sha3(uint8(0))`` and
+``sha3(0x12345678) == sha3(uint32(0x12345678))``.
+
It might be that you run into Out-of-Gas for ``sha256``, ``ripemd160`` or ``ecrecover`` on a *private blockchain*. The reason for this is that those are implemented as so-called precompiled contracts and these contracts only really exist after they received the first message (although their contract code is hardcoded). Messages to non-existing contracts are more expensive and thus the execution runs into an Out-of-Gas error. A workaround for this problem is to first send e.g. 1 Wei to each of the contracts before you use them in your actual contracts. This is not an issue on the official or test net.
.. _address_related: