diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index e46d0d650..83fe44ceb 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -537,7 +537,7 @@ For example, :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Test { diff --git a/docs/assembly.rst b/docs/assembly.rst index b54800d46..34710c0f2 100644 --- a/docs/assembly.rst +++ b/docs/assembly.rst @@ -140,7 +140,7 @@ Local Solidity variables are available for assignments, for example: .. code:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract C { uint b; diff --git a/docs/common-patterns.rst b/docs/common-patterns.rst index 5dcc33ed6..a92b1f0ff 100644 --- a/docs/common-patterns.rst +++ b/docs/common-patterns.rst @@ -28,7 +28,7 @@ you receive the funds of the person who is now the richest. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract WithdrawalContract { address public richest; @@ -62,7 +62,7 @@ This is as opposed to the more intuitive sending pattern: :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract SendContract { address payable public richest; diff --git a/docs/contracts/constant-state-variables.rst b/docs/contracts/constant-state-variables.rst index 06bc4189e..60b3f1158 100644 --- a/docs/contracts/constant-state-variables.rst +++ b/docs/contracts/constant-state-variables.rst @@ -26,7 +26,7 @@ Not all types for constants and immutables are implemented at this time. The onl :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract C { uint constant X = 32**22 + 8; diff --git a/docs/contracts/inheritance.rst b/docs/contracts/inheritance.rst index 533f74da4..5269baf3d 100644 --- a/docs/contracts/inheritance.rst +++ b/docs/contracts/inheritance.rst @@ -39,7 +39,7 @@ Details are given in the following example. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Owned { @@ -127,7 +127,7 @@ destruction request. The way this is done is problematic, as seen in the following example:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract owned { constructor() { owner = msg.sender; } @@ -157,7 +157,7 @@ explicitly in the final override, but this function will bypass ``Base1.destroy``. The way around this is to use ``super``:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract owned { constructor() { owner = msg.sender; } @@ -214,7 +214,7 @@ The following example demonstrates changing mutability and visibility: :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Base { @@ -405,7 +405,7 @@ equivalent to ``constructor() {}``. For example: :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; abstract contract A { uint public a; @@ -442,7 +442,7 @@ linearization rules explained below. If the base constructors have arguments, derived contracts need to specify all of them. This can be done in two ways:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Base { uint x; @@ -523,7 +523,7 @@ One area where inheritance linearization is especially important and perhaps not :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Base1 { constructor() {} diff --git a/docs/control-structures.rst b/docs/control-structures.rst index f06041f79..14c7d52cf 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -192,7 +192,7 @@ is compiled so recursive creation-dependencies are not possible. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract D { uint public x; @@ -248,7 +248,7 @@ which only need to be created if there is a dispute. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract D { uint public x; diff --git a/docs/examples/blind-auction.rst b/docs/examples/blind-auction.rst index 3034b6915..9608ff5b3 100644 --- a/docs/examples/blind-auction.rst +++ b/docs/examples/blind-auction.rst @@ -25,7 +25,7 @@ to receive their money - contracts cannot activate themselves. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract SimpleAuction { // Parameters of the auction. Times are either @@ -186,7 +186,7 @@ invalid bids. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract BlindAuction { struct Bid { diff --git a/docs/examples/micropayment.rst b/docs/examples/micropayment.rst index 4b0e81a89..fba32f564 100644 --- a/docs/examples/micropayment.rst +++ b/docs/examples/micropayment.rst @@ -142,7 +142,7 @@ The full contract :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract ReceiverPays { address owner = msg.sender; @@ -339,7 +339,7 @@ The full contract :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract SimplePaymentChannel { address payable public sender; // The account sending payments. diff --git a/docs/examples/safe-remote.rst b/docs/examples/safe-remote.rst index bae6a3a50..041750878 100644 --- a/docs/examples/safe-remote.rst +++ b/docs/examples/safe-remote.rst @@ -26,7 +26,7 @@ you can use state machine-like constructs inside a contract. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Purchase { uint public value; @@ -143,4 +143,4 @@ you can use state machine-like constructs inside a contract. seller.transfer(3 * value); } - } \ No newline at end of file + } diff --git a/docs/examples/voting.rst b/docs/examples/voting.rst index 56a880edf..330450434 100644 --- a/docs/examples/voting.rst +++ b/docs/examples/voting.rst @@ -33,7 +33,7 @@ of votes. :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; /// @title Voting with delegation. contract Ballot { diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index 3a6d5dfd6..1ac3a6bc9 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -201,7 +201,7 @@ Never use tx.origin for authorization. Let's say you have a wallet contract like :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // THIS CONTRACT CONTAINS A BUG - DO NOT USE contract TxUserWallet { @@ -222,7 +222,7 @@ Now someone tricks you into sending Ether to the address of this attack wallet: :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; interface TxUserWallet { function transferTo(address payable dest, uint amount) external; diff --git a/docs/style-guide.rst b/docs/style-guide.rst index 73a65df08..a0868f0c3 100644 --- a/docs/style-guide.rst +++ b/docs/style-guide.rst @@ -300,7 +300,7 @@ Within a grouping, place the ``view`` and ``pure`` functions last. Yes:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract A { constructor() { @@ -337,7 +337,7 @@ Yes:: No:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract A { @@ -758,7 +758,7 @@ manner as modifiers if the function declaration is long or hard to read. Yes:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // Base contracts just to make this compile contract B { @@ -790,7 +790,7 @@ Yes:: No:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // Base contracts just to make this compile @@ -1012,7 +1012,7 @@ As shown in the example below, if the contract name is ``Congress`` and the libr Yes:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // Owned.sol @@ -1048,7 +1048,7 @@ and in ``Congress.sol``:: No:: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // owned.sol diff --git a/docs/types/reference-types.rst b/docs/types/reference-types.rst index 336cf5b2e..2c7452360 100644 --- a/docs/types/reference-types.rst +++ b/docs/types/reference-types.rst @@ -434,7 +434,7 @@ Array slices are useful to ABI-decode secondary data passed in function paramete :: // SPDX-License-Identifier: GPL-3.0 - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; contract Proxy { /// @dev Address of the client contract managed by proxy i.e., this contract diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index 008855179..d0aeea520 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -693,7 +693,7 @@ have to be updated manually.) .. code-block:: Solidity - pragma solidity >0.6.99 <0.8.0; + pragma solidity >=0.7.0; // SPDX-License-Identifier: GPL-3.0 abstract contract C { // FIXME: remove constructor visibility and make the contract abstract