Created
August 6, 2017 05:30
-
-
Save seanavery/7e09c79078c1b18ed2a9c3700d2f7464 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 contractExists(address adrs) internal returns (bool) { | |
uint length; | |
assembly { | |
length := extcodesize(adrs) | |
} | |
if (length > 0) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment