mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Issue warning when using deprecated SELFDESTRUCT
This commit is contained in:
@@ -19,6 +19,7 @@ if they are marked ``virtual``. For details, please see
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.1 <0.9.0;
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
|
||||
contract owned {
|
||||
constructor() { owner = payable(msg.sender); }
|
||||
|
||||
@@ -40,7 +40,7 @@ Details are given in the following example.
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.0 <0.9.0;
|
||||
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
|
||||
contract Owned {
|
||||
constructor() { owner = payable(msg.sender); }
|
||||
@@ -130,6 +130,7 @@ seen in the following example:
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.0 <0.9.0;
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
|
||||
contract owned {
|
||||
constructor() { owner = payable(msg.sender); }
|
||||
@@ -162,6 +163,7 @@ explicitly in the final override, but this function will bypass
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.0 <0.9.0;
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
|
||||
contract owned {
|
||||
constructor() { owner = payable(msg.sender); }
|
||||
|
||||
@@ -144,6 +144,7 @@ The full contract
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.0 <0.9.0;
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
contract ReceiverPays {
|
||||
address owner = msg.sender;
|
||||
|
||||
@@ -341,6 +342,7 @@ The full contract
|
||||
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.7.0 <0.9.0;
|
||||
// This will report a warning due to deprecated selfdestruct
|
||||
contract SimplePaymentChannel {
|
||||
address payable public sender; // The account sending payments.
|
||||
address payable public recipient; // The account receiving the payments.
|
||||
|
||||
Reference in New Issue
Block a user