github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-shanghai/public-mapping.sol (about) 1 // SPDX-License-Identifier: GPL-3.0 2 3 pragma solidity ^0.8.14; 4 5 contract AA { 6 mapping(uint256 => uint256) public objects; 7 8 function Set() public { 9 objects[0] = 42; 10 } 11 } 12 13 contract BB { 14 // insert address of deployed First here 15 AA a; 16 17 function setContract(address addr) public { 18 a = AA(addr); 19 } 20 21 function get() public view returns (uint256) { 22 return a.objects(0); 23 } 24 }