aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-26 00:40:45 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-09-26 02:04:34 +0800
commite3e9ce53d7c8d5c1228ad7165660c8cb014b0f36 (patch)
tree58b563fd53b6319a3ada3c5f592c7cb04360a590
parent3ca00c73f9bac055f44bb5e3e27fdcb7ced0ee5c (diff)
downloaddexon-solidity-e3e9ce53d7c8d5c1228ad7165660c8cb014b0f36.tar.gz
dexon-solidity-e3e9ce53d7c8d5c1228ad7165660c8cb014b0f36.tar.zst
dexon-solidity-e3e9ce53d7c8d5c1228ad7165660c8cb014b0f36.zip
Set 0.5.x specific example code to be compilable with >0.4.99 <0.6.0 (e.g. 0.5.x only)
-rw-r--r--docs/050-breaking-changes.rst2
-rw-r--r--docs/abi-spec.rst2
-rw-r--r--docs/common-patterns.rst4
-rw-r--r--docs/contracts.rst12
-rw-r--r--docs/control-structures.rst12
-rw-r--r--docs/frequently-asked-questions.rst2
-rw-r--r--docs/introduction-to-smart-contracts.rst2
-rw-r--r--docs/security-considerations.rst4
8 files changed, 20 insertions, 20 deletions
diff --git a/docs/050-breaking-changes.rst b/docs/050-breaking-changes.rst
index 5a7add5d..51864571 100644
--- a/docs/050-breaking-changes.rst
+++ b/docs/050-breaking-changes.rst
@@ -327,7 +327,7 @@ New version:
::
- pragma solidity >0.4.25;
+ pragma solidity >0.4.99 <0.6.0;
contract OtherContract {
uint x;
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst
index 55ea82c7..76d461ef 100644
--- a/docs/abi-spec.rst
+++ b/docs/abi-spec.rst
@@ -468,7 +468,7 @@ For example,
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract Test {
constructor() public { b = hex"12345678901234567890123456789012"; }
diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst
index 5f20349d..56536dcc 100644
--- a/docs/common-patterns.rst
+++ b/docs/common-patterns.rst
@@ -28,7 +28,7 @@ become the new richest.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract WithdrawalContract {
address public richest;
@@ -65,7 +65,7 @@ This is as opposed to the more intuitive sending pattern:
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract SendContract {
address payable public richest;
diff --git a/docs/contracts.rst b/docs/contracts.rst
index e6654f90..315d1815 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -331,7 +331,7 @@ inheritable properties of contracts and may be overridden by derived contracts.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract owned {
constructor() public { owner = msg.sender; }
@@ -500,7 +500,7 @@ The following statements are considered modifying the state:
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract C {
function f(uint a, uint b) public view returns (uint) {
@@ -545,7 +545,7 @@ In addition to the list of state modifying statements explained above, the follo
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract C {
function f(uint a, uint b) public pure returns (uint) {
@@ -633,7 +633,7 @@ Like any function, the fallback function can execute complex operations as long
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract Test {
// This function is called for all messages sent to
@@ -900,7 +900,7 @@ Details are given in the following example.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract owned {
constructor() public { owner = msg.sender; }
@@ -1060,7 +1060,7 @@ equivalent to ``constructor() public {}``. For example:
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract A {
uint public a;
diff --git a/docs/control-structures.rst b/docs/control-structures.rst
index e710eb6d..80311a63 100644
--- a/docs/control-structures.rst
+++ b/docs/control-structures.rst
@@ -222,7 +222,7 @@ is compiled so recursive creation-dependencies are not possible.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract D {
uint public x;
@@ -345,7 +345,7 @@ the two variables have the same name but disjoint scopes.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract C {
function minimalScoping() pure public {
{
@@ -366,7 +366,7 @@ In any case, you will get a warning about the outer variable being shadowed.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
// This will report a warning
contract C {
function f() pure public returns (uint) {
@@ -386,7 +386,7 @@ In any case, you will get a warning about the outer variable being shadowed.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
// This will not compile
contract C {
function f() pure public returns (uint) {
@@ -433,7 +433,7 @@ a message string for ``require``, but not for ``assert``.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract Sharer {
function sendHalf(address payable addr) public payable returns (uint balance) {
@@ -479,7 +479,7 @@ The following example shows how an error string can be used together with revert
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract VendingMachine {
function buy(uint amount) public payable {
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index d9b5f417..7b7dd0b0 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -282,7 +282,7 @@ In the case of a ``contract A`` calling a new instance of ``contract B``, parent
You will need to make sure that you have both contracts aware of each other's presence and that ``contract B`` has a ``payable`` constructor.
In this example::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract B {
constructor() public payable {}
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst
index fba9fed3..2d4777e8 100644
--- a/docs/introduction-to-smart-contracts.rst
+++ b/docs/introduction-to-smart-contracts.rst
@@ -80,7 +80,7 @@ registering with username and password — all you need is an Ethereum keypair.
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
contract Coin {
// The keyword "public" makes those variables
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index e7c7a0a8..3305c1e1 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -182,7 +182,7 @@ Never use tx.origin for authorization. Let's say you have a wallet contract like
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
contract TxUserWallet {
@@ -202,7 +202,7 @@ Now someone tricks you into sending ether to the address of this attack wallet:
::
- pragma solidity >0.4.24;
+ pragma solidity >0.4.99 <0.6.0;
interface TxUserWallet {
function transferTo(address payable dest, uint amount) external;