Skip to content

Instantly share code, notes, and snippets.

@skmgoldin
Created November 12, 2017 20:01
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 skmgoldin/79b5a451f2607f5902ab13468520404f to your computer and use it in GitHub Desktop.
Save skmgoldin/79b5a451f2607f5902ab13468520404f to your computer and use it in GitHub Desktop.
function canBeWhitelisted(string _domain) constant public returns (bool) {
bytes32 domainHash = keccak256(_domain);
uint challengeID = listings[domainHash].challengeID;
// Ensures that the application was made,
// the application period has ended,
// the domain can be whitelisted,
// and either: the challengeID == 0, or the challenge has been resolved.
if (
appWasMade(_domain) &&
isExpired(listings[domainHash].applicationExpiry) &&
!isWhitelisted(_domain) &&
(!challenges[challengeID].isInitialized() || challenges[challengeID].isResolved())
) { return true; }
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment