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

     1  // SPDX-License-Identifier: GPL-3.0
     2  
     3  pragma solidity ^0.8.14;
     4  
     5  contract tester {
     6      string public A;
     7      event logTest(uint256 n);
     8  
     9      function test(
    10          uint256 mul,
    11          uint256 shift,
    12          uint256 add,
    13          uint256 log
    14      ) public returns (uint256 a) {
    15          a = 7;
    16          for (uint256 i = 0; i < mul; i++) {
    17              a = (a * 10007) % 100000007;
    18          }
    19          for (uint256 i = 0; i < shift; i++) {
    20              a = i << 7;
    21          }
    22          for (uint256 i = 0; i < add; i++) {
    23              a = (a + 100000009) % 10007;
    24          }
    25          for (uint256 i = 0; i < log; i++) {
    26              emit logTest(i);
    27          }
    28      }
    29  
    30      function storeString(string memory a) public {
    31          A = a;
    32      }
    33  }