Created
June 20, 2021 16:58
-
-
Save hadv/99d2648dd445ad73a14c8d45b1ff6553 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.8; | |
import "./Storage.sol"; | |
contract Machine { | |
Storage public s; | |
constructor(Storage addr) public { | |
s = addr; | |
calculateResult = 0; | |
} | |
function saveValue(uint x) public returns (bool) { | |
s.setValue(x); | |
return true; | |
} | |
function getValue() public view returns (uint) { | |
return s.val(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment