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

Draft EIP 1820 #1677

Merged
merged 14 commits into from
Mar 19, 2019
Merged

Draft EIP 1820 #1677

merged 14 commits into from
Mar 19, 2019

Conversation

nventuro
Copy link
Contributor

Closes #1676.

I only added the interface for the registry itself (the contract can be deployed in a testing environment using openzeppelin-test-helpers), as well as IERC1820 and ERC1820, which are intended to be used by contracts that will be registered in the global registry.

I chose those names to mimic the ERC165 naming scheme we already have (where a contract inherits from ERC165 in order to indicate that it supports an interface, and contracts may cast addresses to IERC165 to query support).

It'd also be nice to provide some sort of way to get an instance of the global registry without having the user hardcode its address, e.g. some sort of factory that returns IERC1820Registry(0x1820b744B33945482C17Dc37218C01D858EBc714).

@nventuro nventuro added feature New contracts, functions, or helpers. contracts Smart contract code. labels Mar 12, 2019
@nventuro nventuro added this to the v2.3 milestone Mar 12, 2019
@nventuro nventuro self-assigned this Mar 12, 2019
@nventuro nventuro requested a review from frangio March 12, 2019 23:44
@nventuro nventuro changed the title Draft eip 1820 Draft EIP 1820 Mar 13, 2019
@nventuro
Copy link
Contributor Author

Gah I forgot to update how the test helpers are used when updating the version.

contracts/drafts/ERC1820.sol Outdated Show resolved Hide resolved
contracts/drafts/ERC1820.sol Outdated Show resolved Hide resolved
contracts/drafts/ERC1820.sol Outdated Show resolved Hide resolved
contracts/drafts/ERC1820.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

test/drafts/ERC1820.test.js Outdated Show resolved Hide resolved
Co-Authored-By: nventuro <nicolas.venturo@gmail.com>
frangio
frangio previously approved these changes Mar 14, 2019
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@nventuro nventuro requested a review from frangio March 15, 2019 19:13
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏!

@nventuro nventuro merged commit 308a4c9 into OpenZeppelin:master Mar 19, 2019
@nventuro nventuro deleted the draft-eip-1820 branch March 19, 2019 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Smart contract code. feature New contracts, functions, or helpers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants