Skip to content

Instantly share code, notes, and snippets.

@elmariachi111
Last active October 21, 2021 14:15
Show Gist options
  • Select an option

  • Save elmariachi111/2ebb7ac395980684f7c8b3e2ddc48053 to your computer and use it in GitHub Desktop.

Select an option

Save elmariachi111/2ebb7ac395980684f7c8b3e2ddc48053 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8;
import '@openzeppelin/contracts/access/Ownable.sol';
contract Storage is Ownable {
uint256 number;
constructor() Ownable() {}
function store(uint256 num) public onlyOwner {
number = num;
}
function retrieve() public view returns (uint256){
return number;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment