Skip to content

Add ERC165 interface detection to AccessControl#2562

Merged
frangio merged 4 commits intoOpenZeppelin:masterfrom
frangio:accesscontrol-erc165
Mar 4, 2021
Merged

Add ERC165 interface detection to AccessControl#2562
frangio merged 4 commits intoOpenZeppelin:masterfrom
frangio:accesscontrol-erc165

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