Skip to content

Instantly share code, notes, and snippets.

@sekmet
Created May 1, 2022 03:11
Show Gist options
  • Save sekmet/afa698265373f70bf44031c1ade9102a to your computer and use it in GitHub Desktop.
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=
// 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