contract ExampleContract { mapping(uint256 => uint256) public myMapping; function setMapping(uint256 key, uint256 value) public { myMapping[key] = value; } function getValue(uint256 key) public view returns (uint256) { return myMapping[key]; } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter