Skip to content

Instantly share code, notes, and snippets.

@rpaskin
Last active June 30, 2021 21:04
Show Gist options
  • Save rpaskin/a6c8b9a639d5e17f536ad4f230a08508 to your computer and use it in GitHub Desktop.
Save rpaskin/a6c8b9a639d5e17f536ad4f230a08508 to your computer and use it in GitHub Desktop.
Solidity base example from the documentation
// 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 {
uint256 number;
/**
* @dev Store value in variable
* @param num value to store
*/
function store(uint256 num) public {
number = num;
}
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
return number;
}
}
@rpaskin
Copy link
Author

rpaskin commented Jun 30, 2021

update de versão de pragma e nomes dos métodos, código que vem de exemplo no Remix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment