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

     1  pragma solidity 0.4.24;
     2  contract AA {
     3      mapping(uint => uint) public objects;
     4  
     5      function Set() {
     6          objects[0] = 42;
     7      }
     8  }
     9  
    10  contract BB {
    11      // insert address of deployed First here
    12      AA a;
    13      function setContract(address addr) {
    14          a = AA(addr);
    15      }
    16  
    17      function get() returns(uint) {
    18          return a.objects(0);
    19      }
    20  }