Skip to content

Instantly share code, notes, and snippets.

@apogiatzis
Last active May 3, 2022 23:06
Show Gist options
  • Save apogiatzis/d3ae478695eec5353638340c362792b2 to your computer and use it in GitHub Desktop.
Save apogiatzis/d3ae478695eec5353638340c362792b2 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint number;
/**
* @dev Store value in variable
* @param _number value to store
*/
function storeNumber(uint _number) public {
number = _number;
}
/**
* @dev Return value
* @return value of 'number'
*/
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