github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-istanbul/gas-test.sol (about) 1 pragma solidity ^0.8.4; 2 contract tester { 3 string public A; 4 event logTest(uint n); 5 function test(uint mul,uint shift,uint add,uint log) public returns (uint a){ 6 a = 7; 7 for (uint i=0;i<mul;i++){ 8 a = (a*10007)%100000007; 9 } 10 for (uint i=0;i<shift;i++){ 11 a = i<<7; 12 } 13 for (uint i=0;i<add;i++){ 14 a = (a + 100000009) % 10007; 15 } 16 for (uint i=0;i<log;i++){ 17 emit logTest(i); 18 } 19 } 20 21 function storeString(string memory a) public { 22 A = a; 23 } 24 }