Commit Graph

458 Commits

Author SHA1 Message Date
Denton Liu
c276086f3f Write about what fallback functions cannot do 2016-08-25 15:43:04 -04:00
Denton Liu
0268cbddc7 Document use of smaller storage variables 2016-08-25 13:20:54 -04:00
chriseth
f329d5e772 Merge pull request #925 from mocamircea/patch-10
Update contracts.rst
2016-08-25 18:06:30 +02:00
Mircea Moca
55be44dd5f Update contracts.rst
I left the example with contract C only, showing the access specifiers discussed at 186-188. The specifier of data is left public since nothing is related to accessor functions now.

Added a separate example with contracts C, D and E to show specifier's effect. 

Added a separate example to prove the synthesizing of accessor functions.

Added a new example to show the internal/external call of the accessor, according to existent discussion.
2016-08-25 11:43:17 +03:00
chriseth
c2665dc2fe Merge pull request #913 from chriseth/auction
Updated the function withdraw() in the SimpleAuction and BlindAuction…
2016-08-24 23:17:04 +02:00
Bob Summerwill
d49cfebbf7 Updated Solidity documentation's "building from source" section.
It now references install_deps.sh/.bat, and also adds instructions for Windows.
Cherry picked some further tweaks from Denton-L.  Thanks :-)
2016-08-24 14:06:36 -07:00
Denton Liu
ef117c2902 Fix creating contracts section 2016-08-24 11:43:56 -04:00
Denton Liu
2716d01f2c Rename "call data" to "calldata" 2016-08-24 11:43:56 -04:00
Denton Liu
89004edb2f Add comma 2016-08-24 11:43:56 -04:00
Denton Liu
41ad2110c2 Fix control-structures 2016-08-24 11:43:56 -04:00
Denton Liu
1655f3b7bf Update contracts.rst 2016-08-24 11:43:55 -04:00
Denton Liu
4bd96d9382 Fix description about how blocks work 2016-08-24 11:43:55 -04:00
Denton Liu
c65735fc19 Change XXX bit to XXX-bit 2016-08-24 11:43:55 -04:00
Denton Liu
72f2799556 Fix typo 2016-08-24 11:43:55 -04:00
Denton Liu
c58e460ba2 Change example code formatting 2016-08-24 11:43:55 -04:00
Denton Liu
02a72871d2 Change capitalisation 2016-08-24 11:43:55 -04:00
Denton Liu
ac799aff0e Remove trailing whitespaces 2016-08-24 11:43:55 -04:00
Dave Hoover
1bb53ad3e7 Small documentation update 2016-08-23 22:53:30 -05:00
chriseth
0d736fde6d Merge pull request #706 from Denton-L/withdrawal-pattern
Add Withdrawal Pattern Example
2016-08-20 02:57:07 +02:00
Mircea Moca
01dc055d42 Update contracts.rst
I think it's more clear now and without the risk of mentioning the yet discussed accessor concept
2016-08-19 17:47:57 +03:00
Denton Liu
e27493aa83 Remove throw from withdrawal pattern 2016-08-18 12:56:39 -04:00
Denton Liu
bbe7c493ad Document throwing on contract-creation fail 2016-08-18 12:47:41 -04:00
Alex Darby
41eaf3a0cc Updated the function withdraw() in the SimpleAuction and BlindAuction contracts to not use a 'throw' if a address send() fails. 2016-08-18 18:00:30 +02:00
Mircea Moca
ee51894e73 Update contracts.rst
Extended example according to the discussed stuff, clarification & typos
2016-08-18 14:16:01 +03:00
Denton Liu
c2cfc819a2 Document throwing on calling empty code 2016-08-17 14:13:53 -04:00
Denton Liu
1826579f80 Add documentation about throwing 2016-08-17 12:09:20 -04:00
chriseth
b2507e9f10 Merge pull request #839 from chriseth/checkcode
BREAKING: Make function calls throw if target does not have code.
2016-08-17 16:44:15 +02:00
chriseth
d6579a0a5f Merge pull request #888 from chriseth/throwOnDivZero
Throw on division by zero.
2016-08-17 16:43:13 +02:00
chriseth
774bb8ab3b Make function calls throw if target does not have code.
Low-level calls still just execute and will actually report "success".
This allows `x.call.value(y)()` for x being a non-contract account.
2016-08-17 11:30:40 +02:00
chriseth
9c83109549 BREAKING: return only exits current function/modifier 2016-08-17 11:29:31 +02:00
chriseth
e7084d9e16 Throw on division by zero. 2016-08-17 11:27:15 +02:00
chriseth
e4578982c6 Merge pull request #905 from ethereum/chriseth-patch-1
Docs: wording: recursive call exploit -> reentrancy exploit
2016-08-17 11:14:47 +02:00
chriseth
d5505e21eb Merge pull request #838 from chriseth/ecrecover
Make ecrecover return zero for malformed input.
2016-08-17 11:05:20 +02:00
chriseth
a63f94e042 Fix docs. (#916) 2016-08-17 11:04:40 +02:00
Alex Beregszaszi
ec3298535e Introduce hex literals (#832)
* Introduce hex keyword token

* Support hex literals

* Include tests for hex literals

* Document hex literals
2016-08-16 16:31:23 +02:00
gl367
c547f9c24b fix typo in costs modifier (#850) 2016-08-16 16:26:57 +02:00
chriseth
dbc95570cb Merge pull request #903 from mocamircea/patch-8
Update control-structures.rst
2016-08-16 16:24:04 +02:00
chriseth
480cf384bb Merge pull request #710 from chriseth/throwFailedCreate
BREAKING: Throw if contract creation fails.
2016-08-16 16:13:56 +02:00
Mircea Moca
b2d6097653 Update control-structures.rst
Splitted example.
2016-08-16 16:30:44 +03:00
chriseth
70994f4996 Merge pull request #904 from mocamircea/patch-9
Update control-structures.rst
2016-08-16 15:08:05 +02:00
Mircea Moca
d24c431ce5 Update control-structures.rst 2016-08-16 16:06:08 +03:00
chriseth
d731225d02 Actually better to return zero on error. 2016-08-16 14:53:01 +02:00
chriseth
2a560b798b Throw if contract creation fails. 2016-08-16 14:49:44 +02:00
Jacob Benjamin Cholewa
c9a9a4a797 Update index.rst
Added a link for Syntastic. A vim plugin that provide compile checking using the solc compiler.
2016-08-16 13:12:19 +02:00
chriseth
0c2dc34075 Wording: recursive call exploit -> reentrancy exploit 2016-08-16 11:22:24 +02:00
Mircea Moca
ae0654443c Update control-structures.rst
typo -> coherence with previous occurrence in the document of C/JavaScript
2016-08-16 10:45:04 +03:00
Mircea Moca
1c81d2a481 Update control-structures.rst 2016-08-16 10:41:50 +03:00
Denton Liu
0b3ad9262c Fix code 2016-08-12 11:08:53 -04:00
Denton Liu
269a6d1379 Reference inspiration 2016-08-12 11:03:58 -04:00
chriseth
c5203344a0 Merge pull request #886 from mocamircea/patch-6
Update units-and-global-variables.rst
2016-08-12 16:17:13 +02:00
Mircea Moca
6615487266 Update units-and-global-variables.rst
Coherence -> at the bottom of the document Wei is used several times, not "wei".
2016-08-12 16:54:25 +03:00
Mircea Moca
76f5c67dcc Update units-and-global-variables.rst
"Suffixes of" is wrong and misleading. "seconds", "minutes" etc. are suffixes of literal numbers.
2016-08-12 16:33:22 +03:00
chriseth
c389f894b5 Merge pull request #858 from Denton-L/quotes-docs
Document existence of single-quotes
2016-08-12 15:20:02 +02:00
chriseth
0d894a6832 Merge pull request #844 from Denton-L/remove-after
BREAKING: Remove after
2016-08-12 15:09:55 +02:00
Denton Liu
0f1fb33d58 Add minor corrections 2016-08-11 14:34:36 -04:00
chriseth
69e5409bc5 Merge pull request #857 from cholewa1992/patch-1
Update installing-solidity.rst
2016-08-11 18:53:28 +02:00
Denton Liu
1634a79bd8 Correct all UTF-8 spellings 2016-08-11 11:10:47 -04:00
Denton Liu
2a492f59c9 Add double-quotes to style guide 2016-08-11 11:10:47 -04:00
Denton Liu
f2389b3314 Change i.e. to e.g. 2016-08-11 11:10:47 -04:00
Denton Liu
e4f9e1f788 Mention single-quotes 2016-08-11 11:10:47 -04:00
Denton Liu
581114da3e Correct UTF-8 spellings 2016-08-11 11:10:47 -04:00
Denton Liu
058e5f0159 Update contracts and descriptions 2016-08-11 10:45:47 -04:00
Denton Liu
4737100d00 Change withdrawal example
The example is now a "King of the Ether"-esque contract. This is
actually relevant as they suffered an attack because of an almost
identical issue.

See the post-mortem here:
https://www.kingoftheether.com/postmortem.html
2016-08-11 10:35:45 -04:00
Denton Liu
1ff7ba0b06 Remove after keyword from documentation 2016-08-11 10:15:59 -04:00
chriseth
5a3740378f Merge pull request #824 from Denton-L/fix-typo
Fix typo
2016-08-10 21:22:49 +02:00
Denton Liu
666c46ac29 Use store example 2016-08-10 11:11:13 -04:00
Denton Liu
b688d33055 Change example to auction 2016-08-10 10:42:51 -04:00
Denton Liu
a6c9d85399 Remove trailing whitespace 2016-08-10 10:42:51 -04:00
Denton Liu
617daa1f00 Fix withdrawal pattern documentation 2016-08-10 10:40:55 -04:00
Denton Liu
82365f21c0 Link to withdraw pattern 2016-08-10 10:40:55 -04:00
Denton Liu
efb48659dd Add section about withdrawal pattern 2016-08-10 10:40:55 -04:00
Jacob Benjamin Cholewa
adfb2f2b9f Update installing-solidity.rst
The JsonCpp library is also a needed dependency
2016-08-10 15:23:54 +02:00
Denton Liu
279518a536 Add missing s 2016-08-08 13:33:09 -04:00
Denton Liu
838a91b38c Refix typo 2016-08-08 13:32:54 -04:00
chriseth
2fcc6ec335 Merge pull request #820 from mocamircea/patch-3
Update layout-of-source-files.rst
2016-08-08 15:49:37 +02:00
chriseth
b13e581397 Merge pull request #819 from mocamircea/patch-2
Update layout-of-source-files.rst
2016-08-08 15:48:48 +02:00
Denton Liu
2204c597fb Fix typo 2016-08-05 11:59:10 -04:00
Mircea Moca
6846bb5dfd Update layout-of-source-files.rst
An example of natspec comment.
2016-08-05 14:16:14 +03:00
Mircea Moca
396c02e507 Update layout-of-source-files.rst
better reading
2016-08-05 11:45:52 +03:00
Mircea Moca
0c2e7b7ee0 Update layout-of-source-files.rst
The phrase eds with the given example.
2016-08-05 11:30:40 +03:00
chriseth
3c93a22d47 Merge pull request #666 from axic/feature/unicode-escape
Support unicode escape characters
2016-08-05 08:47:52 +02:00
Alex Beregszaszi
b881dbb292 Document \n, \xNN and \uNNNN 2016-08-04 17:35:34 +01:00
Alex Beregszaszi
fefe9bdee7 Fix String Literals documentation about implicit conversions 2016-08-04 17:35:34 +01:00
chriseth
a3d79f7ec6 Build using solidity-standalone. 2016-08-04 11:04:13 +02:00
chriseth
08c6a4e7ba Merge pull request #776 from chriseth/deploydocs
Deploydocs
2016-08-01 16:10:26 +02:00
chriseth
23a4d07821 Merge pull request #750 from ethereum/chriseth-patch-2
Correct source map definition.
2016-08-01 12:44:38 +02:00
chriseth
267b32df83 Merge pull request #764 from Denton-L/make-safe
Throw if send() fails in example code
2016-08-01 12:43:21 +02:00
chriseth
66133469e9 Merge pull request #732 from Denton-L/document-precedence
Document precedence
2016-08-01 12:40:24 +02:00
chriseth
d5e536a4fb Made snippet work as is. 2016-08-01 12:14:17 +02:00
cseberino
a20e03135b Update contracts.rst 2016-08-01 12:12:06 +02:00
Denton Liu
e3a942c738 Throw if send() fails in example code 2016-07-29 14:04:47 -04:00
Denton Liu
5687beb424 Add unary operations to the table 2016-07-28 15:25:58 -04:00
Denton Liu
7a20324142 Link to order of precedence table 2016-07-28 15:19:04 -04:00
chriseth
4f0f9fcdbe Mix is discontinued 2016-07-27 17:42:21 +02:00
Denton Liu
8bf96b1c43 Remove >>> and >>>= operators 2016-07-27 10:30:20 -04:00
Denton Liu
71438157ce Revert "Remove comma operator"
This reverts commit 1ec74f8cc4.
2016-07-27 10:26:39 -04:00
chriseth
c8aa39e587 Correct source map definition. 2016-07-27 16:06:04 +02:00
Manidos
fe45221952 Update contracts.rst
I've changed line 88, because **if (msg.sender == creator)** threw an exception in solidity browser compier.

Untitled:25:13: Error: Operator == not compatible with types address and contract TokenCreator
        if (msg.sender == creator)
            ^-------------------^
2016-07-27 13:27:56 +06:00
Denton Liu
ca5e6a6bd4 Fix assignment operators 2016-07-26 14:01:01 -04:00
Denton Liu
1ec74f8cc4 Remove comma operator 2016-07-26 13:54:17 -04:00
chriseth
2dbadbabb3 Merge pull request #721 from ethers/patch-5
mixedCase for modifiers
2016-07-26 18:25:46 +02:00
DennisBPeterson
6a6f0623b0 Added tx.origin caution 2016-07-21 17:06:53 -04:00
Weiyang Zhu
b8d75340af Missing '_' in modifier 'timedTransitions' 2016-07-21 14:10:53 +08:00
Denton Liu
5d09211d50 Add link to operator table 2016-07-20 15:48:55 -04:00
Denton Liu
dfe55a929d Create order of precedence table 2016-07-20 15:48:54 -04:00
chriseth
9f7a55d2b2 Source mapping documentation. 2016-07-20 19:45:45 +02:00
chriseth
e10297a2ef Merge pull request #704 from ethereum/malleability
Expanded malleability risks.
2016-07-18 19:34:35 +02:00
ethers
70f7df6430 mixedCase for modifiers 2016-07-14 03:29:15 -07:00
Denton Liu
5d113600aa Fix typos 2016-07-12 17:06:49 -04:00
Denton Liu
f8aec4d89e Update copyright 2016-07-11 17:04:44 -04:00
chriseth
efad1e05ac Merge pull request #680 from Denton-L/fix-679
Add section about default values of variables
2016-07-08 20:15:28 +02:00
chriseth
e5061615ce Merge pull request #689 from redsquirrel/patch-1
Removing "easy" language
2016-07-08 20:12:42 +02:00
Denton Liu
cf0579a86e Incorporate changes 2016-07-08 14:07:58 -04:00
chriseth
f8d67a8ea6 Merge pull request #700 from Denton-L/sec
Minor Changes to #693
2016-07-08 19:54:01 +02:00
Denton Liu
d94d2fc901 Repharse sentence 2016-07-08 12:27:04 -04:00
chriseth
8df9d49c44 Merge pull request #703 from raineorshine/patch-2
Documentation: Add Solidity Tools
2016-07-08 17:55:27 +02:00
Denton Liu
06fa66b2e6 Mention dangers of polymorphism 2016-07-07 16:34:05 -04:00
Denton Liu
ab3531ffc3 Incorporate corrections 2016-07-07 13:53:57 -04:00
chriseth
b71144dd53 Expanded malleability risks. 2016-07-06 18:33:38 +02:00
Raine Revere
f737aa9a1b Documentation: Add Solidity Tools 2016-07-06 09:39:32 -06:00
svantetobias
d45f241069 Fixed mix-up of variable names in Sent event
event Sent(address from, address to, uint amount) defines "amount" variable but it is two times referred to as "value", which can be a bit confusing for the reader.
2016-07-06 10:53:08 +02:00
Denton Liu
811980afe6 Reformat code 2016-07-05 11:55:09 -04:00
Denton Liu
70e5af11ef Correct grammar and language 2016-07-05 11:55:09 -04:00
Denton Liu
14f57568dc Apply fixes 2016-07-05 11:44:39 -04:00
Denton Liu
d4d7d9854a Add reference to default values in mapping section 2016-07-04 10:52:08 -04:00
Denton Liu
cb5fc23014 Fix incorrect directives 2016-07-04 10:51:02 -04:00
chriseth
3b494348ea Fixes. 2016-07-04 15:39:31 +02:00
chriseth
2df142c496 Security Considerations 2016-07-04 15:27:53 +02:00
Dave Hoover
20c02594ed Removing "easy" language
I'm trying to steer us away from language that over-simplifies the complexity of writing secure smart contracts.
2016-06-27 08:51:07 -04:00
chriseth
2ccfea8b54 Merge pull request #672 from pjdelport/patch-1
Update link to atom-ethereum-interface package
2016-06-27 10:41:43 +02:00
Dave Hoover
b31bd4a2e4 Fixing library examples that don't compile.
Addressing https://github.com/ethereum/solidity/issues/684
2016-06-25 07:11:45 -05:00
Denton Liu
0db67b8895 Add section about default values of variables 2016-06-22 13:35:15 -04:00
chriseth
b23c300792 Merge pull request #658 from graup/graup-patch-1
Fix typo in Libraries section
2016-06-21 17:52:35 +02:00
chriseth
00c89cdb49 Merge pull request #555 from Denton-L/single-line-functions
Added a Clause in Style Guide about Single Line Function Declarations
2016-06-21 17:16:56 +02:00
chriseth
957da9803e Merge pull request #669 from fabioberger/patch-2
Fix two documentation typos
2016-06-21 17:12:19 +02:00
chriseth
263676a259 Merge pull request #673 from pjdelport/patch-2
Restore correct inline code sample
2016-06-21 17:10:37 +02:00
Pi Delport
d9ee41f4a8 Add missing inline code tag 2016-06-20 16:16:10 +02:00
Pi Delport
d88956e864 Restore correct inline code sample
(This appears to have been accidentally broken in a73428b4.)
2016-06-20 15:37:56 +02:00
Pi Delport
04544c25a6 Update link to atom-ethereum-interface package 2016-06-20 12:44:26 +02:00
Fabio Berger
9272c8ab32 Fix two documentation typos 2016-06-20 01:41:46 +01:00
Fabio Berger
4139eddb1d Fix mis-typed word. The recipient will run out of gas, not go out of gas 2016-06-19 02:19:57 +01:00
Fabio Berger
38b1c3d492 Added missing word in sentence 2016-06-18 05:05:38 +01:00
Paul Grau
6aa069403a Fix typo in Libraries section 2016-06-17 23:13:03 +02:00
chriseth
31aa67f1ca Merge pull request #640 from chriseth/globalPaths
Allow remappings to change depending on the context.
2016-06-10 17:58:25 +02:00
chriseth
dc7ba37925 Merge pull request #616 from chriseth/docs
Removed some problems in documentation examples.
2016-06-10 12:50:42 +02:00
chriseth
39c031bfca Typo. 2016-06-09 00:36:31 +02:00
chriseth
3150ab2bcf Allow remappings to change depending on the context. 2016-06-08 18:16:46 +02:00
chriseth
63b6305689 Merge pull request #618 from chriseth/inlineArrays
Document inline arrays.
2016-06-08 18:09:18 +02:00
chriseth
e97ac4fb49 Merge pull request #612 from Denton-L/global-variables
Cleaned up and modified global variables documentation
2016-06-06 22:27:58 +02:00
Giacomo Tazzari
07837e0abb Up-to-date build instructions for Ubuntu 14.04 2016-06-05 17:40:03 +02:00