-
-
Save CinnamonGrrrl/bd41df495d92cc5f8c3237cf36e120a9 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
import "./Clock.sol"; | |
contract Funding { | |
[...] | |
uint public finishesAt; | |
Clock clock; | |
function Funding(uint _duration, address _clockAddress) public { | |
owner = msg.sender; | |
clock = Clock(_clockAddress); | |
finishesAt = clock.getNow() + _duration; | |
} | |
function isFinished() public view returns (bool) { | |
return finishesAt <= clock.getNow(); | |
} | |
[...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment