mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adjust docs example to work with v0.8.0
This commit is contained in:
@@ -59,7 +59,7 @@ complete contract):
|
||||
::
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.4.0 <0.8.0;
|
||||
pragma solidity >=0.4.0 <0.9.0;
|
||||
|
||||
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
|
||||
contract Fund {
|
||||
@@ -83,7 +83,7 @@ as it uses ``call`` which forwards all remaining gas by default:
|
||||
::
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.6.2 <0.8.0;
|
||||
pragma solidity >=0.6.2 <0.9.0;
|
||||
|
||||
// THIS CONTRACT CONTAINS A BUG - DO NOT USE
|
||||
contract Fund {
|
||||
@@ -103,7 +103,7 @@ outlined further below:
|
||||
::
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.4.11 <0.8.0;
|
||||
pragma solidity >=0.4.11 <0.9.0;
|
||||
|
||||
contract Fund {
|
||||
/// @dev Mapping of ether shares of the contract.
|
||||
@@ -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.6.99 <0.9.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.6.99 <0.9.0;
|
||||
|
||||
interface TxUserWallet {
|
||||
function transferTo(address payable dest, uint amount) external;
|
||||
@@ -283,7 +283,7 @@ field of a ``struct`` that is the base type of a dynamic storage array. The
|
||||
::
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.6.0 <0.8.0;
|
||||
pragma solidity >=0.6.0 <0.9.0;
|
||||
|
||||
contract Map {
|
||||
mapping (uint => uint)[] array;
|
||||
|
||||
Reference in New Issue
Block a user