Created
February 21, 2019 14:13
-
-
Save ankitbrahmbhatt1997/d6f4e2c34c63481c70d84cbd696f975f to your computer and use it in GitHub Desktop.
getting a refund
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
function getRefund() public { | |
// REQUIRED CONDITIONS FOR GETTING A REFUND | |
require(block.number > deadline); | |
require(raisedAmount < goal); | |
require(contributions[msg.sender] > 0); | |
msg.sender.transfer(contributions[msg.sender]); | |
contributions[msg.sender] = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment