Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
3f054b71
Commit
3f054b71
authored
Dec 15, 2021
by
github-actions
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream master into patched/master
parents
6b0844b4
d95cdaae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
Address.sol
contracts/utils/Address.sol
+4
-8
No files found.
contracts/utils/Address.sol
View file @
3f054b71
...
@@ -34,15 +34,11 @@ library Address {
...
@@ -34,15 +34,11 @@ library Address {
* ====
* ====
*/
*/
function isContract(address account) internal view returns (bool) {
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize
, which returns 0 for contracts in
// This method relies on extcodesize
/address.code.length, which returns 0
//
construction, since the code is only stored at the end of the
//
for contracts in construction, since the code is only stored at the end
// constructor execution.
//
of the
constructor execution.
uint256 size;
return account.code.length > 0;
assembly {
size := extcodesize(account)
}
return size > 0;
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment