Skip to content

Instantly share code, notes, and snippets.

@mswezey23
Created March 11, 2019 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mswezey23/4510a1d149ff83ae34968f8214c799b0 to your computer and use it in GitHub Desktop.
Save mswezey23/4510a1d149ff83ae34968f8214c799b0 to your computer and use it in GitHub Desktop.
pragma solidity 0.5.5;
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/math/SafeMath.sol";
contract StoreVsCalculate {
using SafeMath for uint256;
uint256[] _result;
function storeResult(uint256 input) public {
uint256 result = input * 36000;
_result.push(result);
}
function calcResult(uint256 input) public returns(uint256) {
return input * 36000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment