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

     1  // SPDX-License-Identifier: GPL-3.0
     2  
     3  pragma solidity ^0.8.14;
     4  
     5  contract One {
     6      string public word;
     7  
     8      function setMsg(string calldata whatever) public {
     9          word = whatever;
    10      }
    11  
    12      function getMsg() public view returns (string memory) {
    13          return word;
    14      }
    15  }
    16  
    17  contract Two {
    18      One o;
    19  
    20      constructor(address one) {
    21          o = One(one);
    22          o.setMsg("test");
    23      }
    24  
    25      function getMsg() public view returns (string memory) {
    26          return o.getMsg();
    27      }
    28  }