Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ERC165 interface detection to AccessControl #2562

Merged
merged 4 commits into from
Mar 4, 2021

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Mar 4, 2021

It's been pointed out that it can be useful for platforms like OpenZeppelin Defender to be able to detect if a contract supports AccessControl, so this adds ERC165 interface detection.

I didn't think this needed documentation.

Gas

With optimizations enabled, this increased deployment cost of AccessControl and AccessControlEnumerable by 35k and 40k gas respectively.

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

@frangio frangio requested a review from Amxx March 4, 2021 20:48
@frangio frangio merged commit 29ffe6f into OpenZeppelin:master Mar 4, 2021
@frangio frangio deleted the accesscontrol-erc165 branch March 4, 2021 21:50
frangio added a commit that referenced this pull request Mar 4, 2021
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
(cherry picked from commit 29ffe6f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants