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

     1  // SPDX-License-Identifier: GPL-3.0
     2  
     3  pragma solidity ^0.8.14;
     4  
     5  contract MyContract {
     6      uint256 x = 0;
     7  
     8      function foo(uint256 _x) public {
     9          x = 10 + _x;
    10      }
    11  
    12      function bar() public returns (uint256) {
    13          address(this).call(abi.encodeWithSignature("foo(uint256)", 1));
    14          return x; // returns 11
    15      }
    16  }