Commit 3f054b71 by github-actions

Merge upstream master into patched/master

parents 6b0844b4 d95cdaae
......@@ -34,15 +34,11 @@ library Address {
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
return account.code.length > 0;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment