laconicd-deprecated/tests/solidity/suites/basic/contracts/Storage.sol

30 lines
517 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.5.11;
/**
* @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 + 1;
number = num;
}
/**
* @dev Return value
* @return value of 'number'
*/
function retrieve() public view returns (uint256){
return number;
}
}