Created
April 24, 2022 14:01
-
-
Save TobeTek/d7428d768d0e1522a7f04853a481dde5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @author Tobe:) | |
* @title BasicStorage | |
* @dev Store & retrieve unsigned integer | |
*/ | |
contract HelloWorld { | |
uint256 number; | |
/** | |
* @dev Store value in state variable | |
* @param num value to store | |
*/ | |
function storeNumber(uint256 num) public { | |
number = num; | |
} | |
/** | |
* @dev Returns value of state variable | |
* @return value of 'number' | |
*/ | |
function retrieveNumber() public view returns (uint256){ | |
return number; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment