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

     1  pragma solidity ^0.4.24;
     2  
     3  contract SimpleStorage {
     4     uint storedData;
     5  
     6     event Set(uint256);
     7     event Get(address, uint256);
     8     event Deadlock();
     9  
    10     function set(uint x) public {
    11         storedData = x;
    12         emit Set(x);
    13     }
    14  
    15     function get(address _to) public view returns (uint) {
    16         require(_to != address(0));
    17         emit Get(_to, storedData);
    18         return storedData;
    19     }
    20  
    21     function infinite() public {
    22         while(true)
    23         {
    24             storedData++;
    25         }
    26         emit Deadlock();
    27     }
    28  }
    29