aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/bugs_by_version.json780
-rw-r--r--docs/contracts.rst6
-rw-r--r--docs/contributing.rst14
-rw-r--r--docs/control-structures.rst18
-rw-r--r--docs/grammar.txt2
-rw-r--r--docs/index.rst32
-rw-r--r--docs/installing-solidity.rst18
-rw-r--r--docs/introduction-to-smart-contracts.rst39
-rw-r--r--docs/layout-of-source-files.rst70
-rw-r--r--docs/make.bat484
-rw-r--r--docs/security-considerations.rst3
-rw-r--r--docs/units-and-global-variables.rst4
-rw-r--r--docs/using-the-compiler.rst2
13 files changed, 739 insertions, 733 deletions
diff --git a/docs/bugs_by_version.json b/docs/bugs_by_version.json
index 560b6fa9..ab200036 100644
--- a/docs/bugs_by_version.json
+++ b/docs/bugs_by_version.json
@@ -1,565 +1,565 @@
{
"0.1.0": {
"bugs": [
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-07-10"
- },
+ },
"0.1.1": {
"bugs": [
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-08-04"
- },
+ },
"0.1.2": {
"bugs": [
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-08-20"
- },
+ },
"0.1.3": {
"bugs": [
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-09-25"
- },
+ },
"0.1.4": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-09-30"
- },
+ },
"0.1.5": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-10-07"
- },
+ },
"0.1.6": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-10-16"
- },
+ },
"0.1.7": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-11-17"
- },
+ },
"0.2.0": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2015-12-02"
- },
+ },
"0.2.1": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2016-01-30"
- },
+ },
"0.2.2": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
- "ArrayAccessCleanHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
+ "ArrayAccessCleanHigherOrderBits",
"AncientCompiler"
- ],
+ ],
"released": "2016-02-17"
- },
+ },
"0.3.0": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
- "CleanBytesHigherOrderBits",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
+ "CleanBytesHigherOrderBits",
"ArrayAccessCleanHigherOrderBits"
- ],
+ ],
"released": "2016-03-11"
- },
+ },
"0.3.1": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
"CleanBytesHigherOrderBits"
- ],
+ ],
"released": "2016-03-31"
- },
+ },
"0.3.2": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
- "OptimizerClearStateOnCodePathJoin",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
+ "OptimizerClearStateOnCodePathJoin",
"CleanBytesHigherOrderBits"
- ],
+ ],
"released": "2016-04-18"
- },
+ },
"0.3.3": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
"OptimizerClearStateOnCodePathJoin"
- ],
+ ],
"released": "2016-05-27"
- },
+ },
"0.3.4": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
"OptimizerClearStateOnCodePathJoin"
- ],
+ ],
"released": "2016-05-31"
- },
+ },
"0.3.5": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
- "SendFailsForZeroEther",
- "DynamicAllocationInfiniteLoop",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
+ "SendFailsForZeroEther",
+ "DynamicAllocationInfiniteLoop",
"OptimizerClearStateOnCodePathJoin"
- ],
+ ],
"released": "2016-06-10"
- },
+ },
"0.3.6": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
"SendFailsForZeroEther"
- ],
+ ],
"released": "2016-08-10"
- },
+ },
"0.4.0": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
"LibrariesNotCallableFromPayableFunctions"
- ],
+ ],
"released": "2016-09-08"
- },
+ },
"0.4.1": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
- "OptimizerStaleKnowledgeAboutSHA3",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
+ "OptimizerStaleKnowledgeAboutSHA3",
"LibrariesNotCallableFromPayableFunctions"
- ],
+ ],
"released": "2016-09-09"
- },
+ },
"0.4.10": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
- ],
+ ],
"released": "2017-03-15"
- },
+ },
"0.4.11": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
"SkipEmptyStringLiteral"
- ],
+ ],
"released": "2017-05-03"
- },
+ },
"0.4.12": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput"
- ],
+ ],
"released": "2017-07-03"
- },
+ },
"0.4.13": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
"ECRecoverMalformedInput"
- ],
+ ],
"released": "2017-07-06"
- },
+ },
"0.4.14": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
"DelegateCallReturnValue"
- ],
+ ],
"released": "2017-07-31"
- },
+ },
"0.4.15": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
+ "NestedArrayFunctionCallDecoder",
"ZeroFunctionSelector"
- ],
+ ],
"released": "2017-08-08"
- },
+ },
"0.4.16": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
+ "NestedArrayFunctionCallDecoder",
"ZeroFunctionSelector"
- ],
+ ],
"released": "2017-08-24"
- },
+ },
"0.4.17": {
"bugs": [
- "EventStructWrongData",
- "NestedArrayFunctionCallDecoder",
+ "EventStructWrongData",
+ "NestedArrayFunctionCallDecoder",
"ZeroFunctionSelector"
- ],
+ ],
"released": "2017-09-21"
- },
+ },
"0.4.18": {
"bugs": [
- "EventStructWrongData",
+ "EventStructWrongData",
"NestedArrayFunctionCallDecoder"
- ],
+ ],
"released": "2017-10-18"
- },
+ },
"0.4.19": {
"bugs": [
- "EventStructWrongData",
+ "EventStructWrongData",
"NestedArrayFunctionCallDecoder"
- ],
+ ],
"released": "2017-11-30"
- },
+ },
"0.4.2": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
- "HighOrderByteCleanStorage",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
+ "HighOrderByteCleanStorage",
"OptimizerStaleKnowledgeAboutSHA3"
- ],
+ ],
"released": "2016-09-17"
- },
+ },
"0.4.20": {
"bugs": [
- "EventStructWrongData",
+ "EventStructWrongData",
"NestedArrayFunctionCallDecoder"
- ],
+ ],
"released": "2018-02-14"
- },
+ },
"0.4.21": {
"bugs": [
- "EventStructWrongData",
+ "EventStructWrongData",
"NestedArrayFunctionCallDecoder"
- ],
+ ],
"released": "2018-03-07"
- },
+ },
"0.4.22": {
"bugs": [
- "EventStructWrongData",
+ "EventStructWrongData",
"OneOfTwoConstructorsSkipped"
- ],
+ ],
"released": "2018-04-16"
- },
+ },
"0.4.23": {
"bugs": [
"EventStructWrongData"
- ],
+ ],
"released": "2018-04-19"
- },
+ },
"0.4.24": {
"bugs": [
"EventStructWrongData"
- ],
+ ],
"released": "2018-05-16"
- },
+ },
"0.4.3": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
"HighOrderByteCleanStorage"
- ],
+ ],
"released": "2016-10-25"
- },
+ },
"0.4.4": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
"IdentityPrecompileReturnIgnored"
- ],
+ ],
"released": "2016-10-31"
- },
+ },
"0.4.5": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
- "IdentityPrecompileReturnIgnored",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
+ "IdentityPrecompileReturnIgnored",
"OptimizerStateKnowledgeNotResetForJumpdest"
- ],
+ ],
"released": "2016-11-21"
- },
+ },
"0.4.6": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
- "ConstantOptimizerSubtraction",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
+ "ConstantOptimizerSubtraction",
"IdentityPrecompileReturnIgnored"
- ],
+ ],
"released": "2016-11-22"
- },
+ },
"0.4.7": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
- ],
+ ],
"released": "2016-12-15"
- },
+ },
"0.4.8": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
- ],
+ ],
"released": "2017-01-13"
- },
+ },
"0.4.9": {
"bugs": [
- "NestedArrayFunctionCallDecoder",
- "ZeroFunctionSelector",
- "DelegateCallReturnValue",
- "ECRecoverMalformedInput",
- "SkipEmptyStringLiteral",
+ "NestedArrayFunctionCallDecoder",
+ "ZeroFunctionSelector",
+ "DelegateCallReturnValue",
+ "ECRecoverMalformedInput",
+ "SkipEmptyStringLiteral",
"ConstantOptimizerSubtraction"
- ],
+ ],
"released": "2017-01-31"
}
} \ No newline at end of file
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 669a374f..8fd1c89e 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -406,7 +406,8 @@ inheritable properties of contracts and may be overridden by derived contracts.
/// The `return 7` statement assigns 7 to the return value but still
/// executes the statement `locked = false` in the modifier.
function f() public noReentrancy returns (uint) {
- require(msg.sender.call(""));
+ (bool success,) = msg.sender.call("");
+ require(success);
return 7;
}
}
@@ -645,7 +646,8 @@ Like any function, the fallback function can execute complex operations as long
contract Caller {
function callTest(Test test) public returns (bool) {
- require(address(test).call(abi.encodeWithSignature("nonExistingFunction()")));
+ (bool success,) = address(test).call(abi.encodeWithSignature("nonExistingFunction()"));
+ require(success);
// results in test.x becoming == 1.
// If someone sends ether to that contract,
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 160e73b3..8a83ca55 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -207,13 +207,13 @@ Next, build Solidity (or just the ``solfuzzer`` binary) with AFL as your compile
At this stage you should be able to see a message similar to the following:
::
-
- Scanning dependencies of target solfuzzer
- [ 98%] Building CXX object test/tools/CMakeFiles/solfuzzer.dir/fuzzer.cpp.o
- afl-cc 2.52b by <lcamtuf@google.com>
- afl-as 2.52b by <lcamtuf@google.com>
+
+ Scanning dependencies of target solfuzzer
+ [ 98%] Building CXX object test/tools/CMakeFiles/solfuzzer.dir/fuzzer.cpp.o
+ afl-cc 2.52b by <lcamtuf@google.com>
+ afl-as 2.52b by <lcamtuf@google.com>
[+] Instrumented 1949 locations (64-bit, non-hardened mode, ratio 100%).
- [100%] Linking CXX executable solfuzzer
+ [100%] Linking CXX executable solfuzzer
If the instrumentation messages did not appear, try switching the cmake flags pointing to AFL's clang binaries:
@@ -228,7 +228,7 @@ Othwerise, upon execution the fuzzer will halt with an error saying binary is no
::
- afl-fuzz 2.52b by <lcamtuf@google.com>
+ afl-fuzz 2.52b by <lcamtuf@google.com>
... (truncated messages)
[*] Validating target binary...
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index d0e58908..5810aaa7 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -135,23 +135,15 @@ the gas can be specified with special options ``.value()`` and ``.gas()``, respe
contract Consumer {
InfoFeed feed;
- function setFeed(address addr) public { feed = InfoFeed(addr); }
+ function setFeed(InfoFeed addr) public { feed = addr; }
function callFeed() public { feed.info.value(10).gas(800)(); }
}
-The modifier ``payable`` has to be used for ``info``, because otherwise, the `.value()`
-option would not be available.
+You need to use the modifier ``payable`` with the ``info`` function because
+otherwise, the ``.value()`` option would not be available.
-Note that the expression ``InfoFeed(addr)`` performs an explicit type conversion stating
-that "we know that the type of the contract at the given address is ``InfoFeed``" and
-this does not execute a constructor. Explicit type conversions have to be
-handled with extreme caution. Never call a function on a contract where you
-are not sure about its type.
-
-We could also have used ``function setFeed(InfoFeed _feed) { feed = _feed; }`` directly.
-Be careful about the fact that ``feed.info.value(10).gas(800)``
-only (locally) sets the value and amount of gas sent with the function call and only the
-parentheses at the end perform the actual call.
+.. warning::
+ Be careful that ``feed.info.value(10).gas(800)`` only locally sets the ``value`` and amount of ``gas`` sent with the function call, and the parentheses at the end perform the actual call.
Function calls cause exceptions if the called contract does not exist (in the
sense that the account does not contain code) or if the called contract itself
diff --git a/docs/grammar.txt b/docs/grammar.txt
index 809fcffc..43ef07a9 100644
--- a/docs/grammar.txt
+++ b/docs/grammar.txt
@@ -131,7 +131,7 @@ HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'')
StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
Identifier = [a-zA-Z_$] [a-zA-Z_$0-9]*
-HexNumber = '0x' [0-9a-fA-F]+
+HexNumber = '0' [xX] [0-9a-fA-F]+
DecimalNumber = [0-9]+ ( '.' [0-9]* )? ( [eE] [0-9]+ )?
TupleExpression = '(' ( Expression? ( ',' Expression? )* )? ')'
diff --git a/docs/index.rst b/docs/index.rst
index d59d476e..a19a0bd3 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -34,7 +34,8 @@ crowdfunding, blind auctions, multi-signature wallets and more.
Translations
------------
-This documentation is translated into several languages by community volunteers, but the English version stands as a reference.
+This documentation is translated into several languages by community volunteers
+with varying degrees of completeness and up-to-dateness. The English version stands as a reference.
* `Simplified Chinese <http://solidity-cn.readthedocs.io>`_ (in progress)
* `Spanish <https://solidity-es.readthedocs.io>`_
@@ -45,20 +46,23 @@ This documentation is translated into several languages by community volunteers,
Useful links
------------
+General
+~~~~~~~
+
* `Ethereum <https://ethereum.org>`_
* `Changelog <https://github.com/ethereum/solidity/blob/develop/Changelog.md>`_
-* `Story Backlog <https://www.pivotaltracker.com/n/projects/1189488>`_
-
* `Source Code <https://github.com/ethereum/solidity/>`_
* `Ethereum Stackexchange <https://ethereum.stackexchange.com/>`_
-* `Gitter Chat <https://gitter.im/ethereum/solidity/>`_
+* `Language Users Chat <https://gitter.im/ethereum/solidity/>`_
+
+* `Compiler Developers Chat <https://gitter.im/ethereum/solidity-dev/>`_
Available Solidity Integrations
--------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Generic:
@@ -122,7 +126,7 @@ Discontinued:
Solidity plugin for Microsoft Visual Studio that includes the Solidity compiler.
Solidity Tools
---------------
+~~~~~~~~~~~~~~
* `Dapp <https://dapp.tools/dapp/>`_
Build tool, package manager, and deployment assistant for Solidity.
@@ -141,21 +145,21 @@ Solidity Tools
* `ABI to solidity interface converter <https://gist.github.com/chriseth/8f533d133fa0c15b0d6eaf3ec502c82b>`_
A script for generating contract interfaces from the ABI of a smart contract.
-
-* `Securify <https://securify.ch/>`_
+
+* `Securify <https://securify.ch/>`_
Fully automated online static analyzer for smart contracts, providing a security report based on vulnerability patterns.
-
+
* `Sūrya <https://github.com/ConsenSys/surya/>`_
Utility tool for smart contract systems, offering a number of visual outputs and information about the contracts' structure. Also supports querying the function call graph.
-
-* `EVM Lab <https://github.com/ethereum/evmlab/>`_
+
+* `EVM Lab <https://github.com/ethereum/evmlab/>`_
Rich tool package to interact with the EVM. Includes a VM, Etherchain API, and a trace-viewer with gas cost display.
.. note::
Information like variable names, comments, and source code formatting is lost in the compilation process and it is not possible to completely recover the original source code. Decompiling smart contracts to view the original source code might not be possible, or the end result that useful.
Third-Party Solidity Parsers and Grammars
------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* `solidity-parser <https://github.com/ConsenSys/solidity-parser>`_
Solidity parser for JavaScript
@@ -171,11 +175,11 @@ in Solidity followed by the basics about :ref:`blockchains <blockchain-basics>`
and the :ref:`Ethereum Virtual Machine <the-ethereum-virtual-machine>`.
The next section will explain several *features* of Solidity by giving
-useful :ref:`example contracts <voting>`
+useful :ref:`example contracts <voting>`.
Remember that you can always try out the contracts
`in your browser <https://remix.ethereum.org>`_!
-The last and most extensive section will cover all aspects of Solidity in depth.
+The fourth and most extensive section will cover all aspects of Solidity in depth.
If you still have questions, you can try searching or asking on the
`Ethereum Stackexchange <https://ethereum.stackexchange.com/>`_
diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst
index 910f80cf..34806f4a 100644
--- a/docs/installing-solidity.rst
+++ b/docs/installing-solidity.rst
@@ -22,7 +22,7 @@ Remix
`Access Remix online <https://remix.ethereum.org/>`_, you don't need to install anything.
If you want to use it without connection to the Internet, go to
-https://github.com/ethereum/browser-solidity/tree/gh-pages and download the .ZIP file as
+https://github.com/ethereum/remix-live/tree/gh-pages and download the ``.zip`` file as
explained on that page.
Further options on this page detail installing commandline Solidity compiler software
@@ -35,7 +35,7 @@ npm / Node.js
=============
Use `npm` for a convenient and portable way to install `solcjs`, a Solidity compiler. The
-`solcjs` program has fewer features than all options further down this page. Our
+`solcjs` program has fewer features than all options further down this page. Our
:ref:`commandline-compiler` documentation assumes you are using
the full-featured compiler, `solc`. So if you install `solcjs` from `npm` then you will
stop reading the documentation here and then continue to `solc-js <https://github.com/ethereum/solc-js>`_.
@@ -92,7 +92,7 @@ If you want to use the cutting edge developer version:
sudo add-apt-repository ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install solc
-
+
We are also releasing a `snap package <https://snapcraft.io/>`_, which is installable in all the `supported Linux distros <https://snapcraft.io/docs/core/install>`_. To install the latest stable version of solc:
.. code-block:: bash
@@ -123,13 +123,13 @@ We will re-add the pre-built bottles soon.
brew tap ethereum/ethereum
brew install solidity
-If you need a specific version of Solidity you can install a
+If you need a specific version of Solidity you can install a
Homebrew formula directly from Github.
-View
+View
`solidity.rb commits on Github <https://github.com/ethereum/homebrew-ethereum/commits/master/solidity.rb>`_.
-Follow the history links until you have a raw file link of a
+Follow the history links until you have a raw file link of a
specific commit of ``solidity.rb``.
Install it using ``brew``:
@@ -272,7 +272,7 @@ Building Solidity is quite similar on Linux, macOS and other Unices:
or even easier:
.. code-block:: bash
-
+
#note: this will install binaries solc and soltest at usr/local/bin
./scripts/build.sh
@@ -302,7 +302,7 @@ If you are interested what CMake options are available run ``cmake .. -LH``.
SMT Solvers
-----------
-Solidity can be built against SMT solvers and will do so by default if
+Solidity can be built against SMT solvers and will do so by default if
they are found in the system. Each solver can be disabled by a `cmake` option.
*Note: In some cases, this can also be a potential workaround for build failures.*
@@ -313,7 +313,7 @@ Inside the build folder you can disable them, since they are enabled by default:
.. code-block:: bash
# disables only Z3 SMT Solver.
- cmake .. -DUSE_Z3=OFF
+ cmake .. -DUSE_Z3=OFF
# disables only CVC4 SMT Solver.
cmake .. -DUSE_CVC4=OFF
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst
index f5769363..7bfee0a1 100644
--- a/docs/introduction-to-smart-contracts.rst
+++ b/docs/introduction-to-smart-contracts.rst
@@ -33,14 +33,14 @@ Storage
The first line simply tells that the source code is written for
Solidity version 0.4.0 or anything newer that does not break functionality
(up to, but not including, version 0.5.0). This is to ensure that the
-contract does not suddenly behave differently with a new compiler version. The keyword ``pragma`` is called that because, in general,
-pragmas are instructions for the compiler about how to treat the
+contract is not compilable with a new (breaking) compiler version, where it could behave differently.
+So-called pragmas are common instrutions for compilers about how to treat the
source code (e.g. `pragma once <https://en.wikipedia.org/wiki/Pragma_once>`_).
A contract in the sense of Solidity is a collection of code (its *functions*) and
data (its *state*) that resides at a specific address on the Ethereum
blockchain. The line ``uint storedData;`` declares a state variable called ``storedData`` of
-type ``uint`` (unsigned integer of 256 bits). You can think of it as a single slot
+type ``uint`` (*u*nsigned *int*eger of *256* bits). You can think of it as a single slot
in a database that can be queried and altered by calling functions of the
code that manages the database. In the case of Ethereum, this is always the owning
contract. And in this case, the functions ``set`` and ``get`` can be used to modify
@@ -49,8 +49,8 @@ or retrieve the value of the variable.
To access a state variable, you do not need the prefix ``this.`` as is common in
other languages.
-This contract does not do much yet (due to the infrastructure
-built by Ethereum) apart from allowing anyone to store a single number that is accessible by
+This contract does not do much yet apart from (due to the infrastructure
+built by Ethereum) allowing anyone to store a single number that is accessible by
anyone in the world without a (feasible) way to prevent you from publishing
this number. Of course, anyone could just call ``set`` again with a different value
and overwrite your number, but the number will still be stored in the history
@@ -72,9 +72,9 @@ Subcurrency Example
The following contract will implement the simplest form of a
cryptocurrency. It is possible to generate coins out of thin air, but
-only the person that created the contract will be able to do that (it is trivial
+only the person that created the contract will be able to do that (it is easy
to implement a different issuance scheme).
-Furthermore, anyone can send coins to each other without any need for
+Furthermore, anyone can send coins to each other without a need for
registering with username and password — all you need is an Ethereum keypair.
@@ -84,7 +84,7 @@ registering with username and password — all you need is an Ethereum keypair.
contract Coin {
// The keyword "public" makes those variables
- // readable from outside.
+ // easily readable from outside.
address public minter;
mapping (address => uint) public balances;
@@ -99,12 +99,13 @@ registering with username and password — all you need is an Ethereum keypair.
}
function mint(address receiver, uint amount) public {
- if (msg.sender != minter) return;
+ require(msg.sender == minter);
+ require(amount < 1e60);
balances[receiver] += amount;
}
function send(address receiver, uint amount) public {
- if (balances[msg.sender] < amount) return;
+ require(amount <= balances[msg.sender], "Insufficient balance.");
balances[msg.sender] -= amount;
balances[receiver] += amount;
emit Sent(msg.sender, receiver, amount);
@@ -116,15 +117,15 @@ This contract introduces some new concepts, let us go through them one by one.
The line ``address public minter;`` declares a state variable of type address
that is publicly accessible. The ``address`` type is a 160-bit value
that does not allow any arithmetic operations. It is suitable for
-storing addresses of contracts or keypairs belonging to external
+storing addresses of contracts or of keypairs belonging to external
persons. The keyword ``public`` automatically generates a function that
allows you to access the current value of the state variable
from outside of the contract.
Without this keyword, other contracts have no way to access the variable.
The code of the function generated by the compiler is roughly equivalent
-to the following::
+to the following (ignore ``external`` and ``view`` for now)::
- function minter() returns (address) { return minter; }
+ function minter() external view returns (address) { return minter; }
Of course, adding a function exactly like that will not work
because we would have a
@@ -137,17 +138,17 @@ The next line, ``mapping (address => uint) public balances;`` also
creates a public state variable, but it is a more complex datatype.
The type maps addresses to unsigned integers.
Mappings can be seen as `hash tables <https://en.wikipedia.org/wiki/Hash_table>`_ which are
-virtually initialized such that every possible key exists and is mapped to a
+virtually initialized such that every possible key exists from the start and is mapped to a
value whose byte-representation is all zeros. This analogy does not go
too far, though, as it is neither possible to obtain a list of all keys of
a mapping, nor a list of all values. So either keep in mind (or
better, keep a list or use a more advanced data type) what you
-added to the mapping or use it in a context where this is not needed,
-like this one. The :ref:`getter function<getter-functions>` created by the ``public`` keyword
+added to the mapping or use it in a context where this is not needed.
+The :ref:`getter function<getter-functions>` created by the ``public`` keyword
is a bit more complex in this case. It roughly looks like the
following::
- function balances(address _account) public view returns (uint) {
+ function balances(address _account) external view returns (uint) {
return balances[_account];
}
@@ -162,7 +163,9 @@ a so-called "event" which is emitted in the last line of the function
listen for those events being emitted on the blockchain without much
cost. As soon as it is emitted, the listener will also receive the
arguments ``from``, ``to`` and ``amount``, which makes it easy to track
-transactions. In order to listen for this event, you would use ::
+transactions. In order to listen for this event, you would use the following
+JavaScript code (which assumes that ``Coin`` is a contract object created via
+web3.js or a similar module)::
Coin.Sent().watch({}, '', function(error, result) {
if (!error) {
diff --git a/docs/layout-of-source-files.rst b/docs/layout-of-source-files.rst
index 5cbb6cff..c1a1669a 100644
--- a/docs/layout-of-source-files.rst
+++ b/docs/layout-of-source-files.rst
@@ -96,43 +96,44 @@ filesystem, it can also map to resources discovered via e.g. ipfs, http or git.
Use in Actual Compilers
-----------------------
-When the compiler is invoked, it is not only possible to specify how to
-discover the first element of a path, but it is possible to specify path prefix
-remappings so that e.g. ``github.com/ethereum/dapp-bin/library`` is remapped to
-``/usr/local/dapp-bin/library`` and the compiler will read the files from there.
-If multiple remappings can be applied, the one with the longest key is tried first.
-An empty prefix is not allowed. Furthermore, these remappings can depend on the context,
-which allows you to configure packages to import e.g. different versions of a library
-of the same name.
+When invoking the compiler, you can specify how to discover the first element
+of a path, and also path prefix remappings. For
+example you can setup a remapping so that everything imported from the virtual
+directory ``github.com/ethereum/dapp-bin/library`` would actually be read from
+your local directory ``/usr/local/dapp-bin/library``.
+If multiple remappings apply, the one with the longest key is tried first.
+An empty prefix is not allowed. The remappings can depend on a context,
+which allows you to configure packages to import e.g., different versions of a
+library of the same name.
**solc**:
-For solc (the commandline compiler), these remappings are provided as
+For solc (the commandline compiler), you provide these path remappings as
``context:prefix=target`` arguments, where both the ``context:`` and the
-``=target`` parts are optional (where target defaults to prefix in that
+``=target`` parts are optional (``target`` defaults to ``prefix`` in this
case). All remapping values that are regular files are compiled (including
-their dependencies). This mechanism is completely backwards-compatible (as long
-as no filename contains = or :) and thus not a breaking change. All imports
-in files in or below the directory ``context`` that import a file that
-starts with ``prefix`` are redirected by replacing ``prefix`` by ``target``.
+their dependencies).
-So as an example, if you clone
-``github.com/ethereum/dapp-bin/`` locally to ``/usr/local/dapp-bin``, you can use
-the following in your source file:
+This mechanism is backwards-compatible (as long
+as no filename contains ``=`` or ``:``) and thus not a breaking change. All
+files in or below the ``context`` directory that import a file that starts with
+``prefix`` are redirected by replacing ``prefix`` by ``target``.
+
+For example, if you clone ``github.com/ethereum/dapp-bin/`` locally to
+``/usr/local/dapp-bin``, you can use the following in your source file:
::
import "github.com/ethereum/dapp-bin/library/iterable_mapping.sol" as it_mapping;
-and then run the compiler as
+Then run the compiler:
.. code-block:: bash
solc github.com/ethereum/dapp-bin/=/usr/local/dapp-bin/ source.sol
-As a more complex example, suppose you rely on some module that uses a
-very old version of dapp-bin. That old version of dapp-bin is checked
-out at ``/usr/local/dapp-bin_old``, then you can use
+As a more complex example, suppose you rely on a module that uses an old
+version of dapp-bin that you checked out to ``/usr/local/dapp-bin_old``, then you can run:
.. code-block:: bash
@@ -140,28 +141,29 @@ out at ``/usr/local/dapp-bin_old``, then you can use
module2:github.com/ethereum/dapp-bin/=/usr/local/dapp-bin_old/ \
source.sol
-so that all imports in ``module2`` point to the old version but imports
-in ``module1`` get the new version.
+This means that all imports in ``module2`` point to the old version but imports
+in ``module1`` point to the new version.
+
+.. note::
-Note that solc only allows you to include files from certain directories:
-They have to be in the directory (or subdirectory) of one of the explicitly
-specified source files or in the directory (or subdirectory) of a remapping
-target. If you want to allow direct absolute includes, just add the
-remapping ``/=/``.
+ ``solc`` only allows you to include files from certain directories. They have
+ to be in the directory (or subdirectory) of one of the explicitly specified
+ source files or in the directory (or subdirectory) of a remapping target. If
+ you want to allow direct absolute includes, add the remapping ``/=/``.
If there are multiple remappings that lead to a valid file, the remapping
with the longest common prefix is chosen.
**Remix**:
-`Remix <https://remix.ethereum.org/>`_
-provides an automatic remapping for github and will also automatically retrieve
-the file over the network:
-You can import the iterable mapping by e.g.
-``import "github.com/ethereum/dapp-bin/library/iterable_mapping.sol" as it_mapping;``.
+`Remix <https://remix.ethereum.org/>`_ provides an automatic remapping for
+GitHub and automatically retrieves the file over the network. You can import
+the iterable mapping as above, e.g.
-Other source code providers may be added in the future.
+::
+ import "github.com/ethereum/dapp-bin/library/iterable_mapping.sol" as it_mapping;
+Remix may add other source code providers in the future.
.. index:: ! comment, natspec
diff --git a/docs/make.bat b/docs/make.bat
index de2bccf7..bc06e706 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -1,242 +1,242 @@
-@ECHO OFF
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set BUILDDIR=_build
-set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
-set I18NSPHINXOPTS=%SPHINXOPTS% .
-if NOT "%PAPER%" == "" (
- set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
- set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
-)
-
-if "%1" == "" goto help
-
-if "%1" == "help" (
- :help
- echo.Please use `make ^<target^>` where ^<target^> is one of
- echo. html to make standalone HTML files
- echo. dirhtml to make HTML files named index.html in directories
- echo. singlehtml to make a single large HTML file
- echo. pickle to make pickle files
- echo. json to make JSON files
- echo. htmlhelp to make HTML files and a HTML help project
- echo. qthelp to make HTML files and a qthelp project
- echo. devhelp to make HTML files and a Devhelp project
- echo. epub to make an epub
- echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
- echo. text to make text files
- echo. man to make manual pages
- echo. texinfo to make Texinfo files
- echo. gettext to make PO message catalogs
- echo. changes to make an overview over all changed/added/deprecated items
- echo. xml to make Docutils-native XML files
- echo. pseudoxml to make pseudoxml-XML files for display purposes
- echo. linkcheck to check all external links for integrity
- echo. doctest to run all doctests embedded in the documentation if enabled
- goto end
-)
-
-if "%1" == "clean" (
- for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
- del /q /s %BUILDDIR%\*
- goto end
-)
-
-
-%SPHINXBUILD% 2> nul
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.http://sphinx-doc.org/
- exit /b 1
-)
-
-if "%1" == "html" (
- %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/html.
- goto end
-)
-
-if "%1" == "dirhtml" (
- %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
- goto end
-)
-
-if "%1" == "singlehtml" (
- %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
- goto end
-)
-
-if "%1" == "pickle" (
- %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can process the pickle files.
- goto end
-)
-
-if "%1" == "json" (
- %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can process the JSON files.
- goto end
-)
-
-if "%1" == "htmlhelp" (
- %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can run HTML Help Workshop with the ^
-.hhp project file in %BUILDDIR%/htmlhelp.
- goto end
-)
-
-if "%1" == "qthelp" (
- %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; now you can run "qcollectiongenerator" with the ^
-.qhcp project file in %BUILDDIR%/qthelp, like this:
- echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Solidity.qhcp
- echo.To view the help file:
- echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Solidity.ghc
- goto end
-)
-
-if "%1" == "devhelp" (
- %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished.
- goto end
-)
-
-if "%1" == "epub" (
- %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The epub file is in %BUILDDIR%/epub.
- goto end
-)
-
-if "%1" == "latex" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "latexpdf" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- cd %BUILDDIR%/latex
- make all-pdf
- cd %BUILDDIR%/..
- echo.
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "latexpdfja" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- cd %BUILDDIR%/latex
- make all-pdf-ja
- cd %BUILDDIR%/..
- echo.
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "text" (
- %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The text files are in %BUILDDIR%/text.
- goto end
-)
-
-if "%1" == "man" (
- %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The manual pages are in %BUILDDIR%/man.
- goto end
-)
-
-if "%1" == "texinfo" (
- %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
- goto end
-)
-
-if "%1" == "gettext" (
- %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
- goto end
-)
-
-if "%1" == "changes" (
- %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
- if errorlevel 1 exit /b 1
- echo.
- echo.The overview file is in %BUILDDIR%/changes.
- goto end
-)
-
-if "%1" == "linkcheck" (
- %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
- if errorlevel 1 exit /b 1
- echo.
- echo.Link check complete; look for any errors in the above output ^
-or in %BUILDDIR%/linkcheck/output.txt.
- goto end
-)
-
-if "%1" == "doctest" (
- %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
- if errorlevel 1 exit /b 1
- echo.
- echo.Testing of doctests in the sources finished, look at the ^
-results in %BUILDDIR%/doctest/output.txt.
- goto end
-)
-
-if "%1" == "xml" (
- %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The XML files are in %BUILDDIR%/xml.
- goto end
-)
-
-if "%1" == "pseudoxml" (
- %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
- goto end
-)
-
-:end
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. texinfo to make Texinfo files
+ echo. gettext to make PO message catalogs
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. xml to make Docutils-native XML files
+ echo. pseudoxml to make pseudoxml-XML files for display purposes
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.http://sphinx-doc.org/
+ exit /b 1
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Solidity.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Solidity.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "latexpdf" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ cd %BUILDDIR%/latex
+ make all-pdf
+ cd %BUILDDIR%/..
+ echo.
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "latexpdfja" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ cd %BUILDDIR%/latex
+ make all-pdf-ja
+ cd %BUILDDIR%/..
+ echo.
+ echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "texinfo" (
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+ goto end
+)
+
+if "%1" == "gettext" (
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+if "%1" == "xml" (
+ %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The XML files are in %BUILDDIR%/xml.
+ goto end
+)
+
+if "%1" == "pseudoxml" (
+ %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+ goto end
+)
+
+:end
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index 066a31ea..3bcd9566 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -86,7 +86,8 @@ as it uses ``call`` which forwards all remaining gas by default:
mapping(address => uint) shares;
/// Withdraw your share.
function withdraw() public {
- if (msg.sender.call.value(shares[msg.sender])(""))
+ (bool success,) = msg.sender.call.value(shares[msg.sender])("");
+ if (success)
shares[msg.sender] = 0;
}
}
diff --git a/docs/units-and-global-variables.rst b/docs/units-and-global-variables.rst
index 28c9e6ab..55911dc6 100644
--- a/docs/units-and-global-variables.rst
+++ b/docs/units-and-global-variables.rst
@@ -191,8 +191,8 @@ For more information, see the section on :ref:`address`.
must align in order for the called contract to correctly access the storage variables of the calling contract by name.
This is of course not the case if storage pointers are passed as function arguments as in the case for
the high-level libraries.
-
-
+
+
.. note::
The use of ``callcode`` is discouraged and will be removed in the future.
diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst
index b286e1a3..0a64d840 100644
--- a/docs/using-the-compiler.rst
+++ b/docs/using-the-compiler.rst
@@ -83,6 +83,8 @@ Input Description
[
"bzzr://56ab...",
"ipfs://Qma...",
+ // If files are used, their directories should be added to the command line via
+ // `--allow-paths <path>`.
"file:///tmp/path/to/file.sol"
]
},