Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cyberliem
Created June 10, 2020 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyberliem/d5f5038dd03244b4ae4fa0de0b041d61 to your computer and use it in GitHub Desktop.
Save cyberliem/d5f5038dd03244b4ae4fa0de0b041d61 to your computer and use it in GitHub Desktop.
Simple storage
pragma solidity ^0.5.10;
contract SimpleStorage {
mapping(uint => uint) testData;
function set(uint x, uint y) public {
testData[x]=y;
}
function get(uint x) public view returns (uint) {
return testData[x];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment