Created
May 1, 2022 03:11
-
-
Save sekmet/afa698265373f70bf44031c1ade9102a to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.13+commit.abaa5c0e.js&optimize=true&runs=200&gist=
This file contains 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: MIT | |
pragma solidity ^0.8.10; | |
contract HelloWorld { | |
// a variable to store a number | |
uint public number; | |
// function to store an unsigned integer | |
function storeNumber(uint _number) public { | |
number = _number; | |
} | |
// function to retrieve it an unsigned integer. | |
function retrieveNumber() public view returns (uint) { | |
return number; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment