From 626742e5afb6bda38ebd82ce4d966ea0f97170fc Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Tue, 20 Mar 2018 13:32:48 -0300 Subject: [PATCH] Add notice to isContract helper on constract constructors --- contracts/AddressUtils.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/AddressUtils.sol b/contracts/AddressUtils.sol index d3c2a5046..08ec4725d 100644 --- a/contracts/AddressUtils.sol +++ b/contracts/AddressUtils.sol @@ -7,6 +7,8 @@ library AddressUtils { /** * Returns whether there is code in the target address + * @dev This function will return false if invoked during the constructor of a contract, + * as the code is not actually created until after the constructor finishes. * @param addr address address to check * @return whether there is code in the target address */ @@ -16,4 +18,4 @@ library AddressUtils { return size > 0; } -} \ No newline at end of file +}