github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-london/self-destruct.sol (about)

     1  // SPDX-License-Identifier: GPL-3.0
     2  
     3  pragma solidity ^0.8.14;
     4  
     5  contract Storage {
     6      address payable private owner;
     7      uint256 number;
     8  
     9      constructor() {
    10          owner = payable(msg.sender);
    11      }
    12  
    13      function store(uint256 num) public {
    14          number = num;
    15      }
    16  
    17      function retrieve() public view returns (uint256) {
    18          return number;
    19      }
    20  
    21      function close() public {
    22          selfdestruct(owner);
    23      }
    24  }