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

Expose APMNamehash #310

Merged
merged 2 commits into from
May 23, 2018
Merged

Expose APMNamehash #310

merged 2 commits into from
May 23, 2018

Conversation

sohkai
Copy link
Contributor

@sohkai sohkai commented May 14, 2018

Exposes APMNamehash.sol to let packages like the DAO kits to get an APM namehash without reimplementing it.

@sohkai sohkai requested review from izqui and bingen May 14, 2018 08:20
Copy link
Contributor

@bingen bingen left a comment

Choose a reason for hiding this comment

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

Where is APM_NODE being used in dao-kits? Good question about apmNameHash too. So, is APM_NODE anywhere else? (Otherwise, what's the point of separating it?)

@sohkai
Copy link
Contributor Author

sohkai commented May 15, 2018

@bingen See aragon/dao-templates#1 (comment)

@bingen
Copy link
Contributor

bingen commented May 16, 2018

I see, thanks. Then I would expose APMNamehash and keep APM_NODE inside it. As I see in that PR, APM_NODE is only used to compute apmNamehash just below (although not using the function) and I haven't seen any other use of APM_NODE anywhere else. APMNamehash contract is really small and to me it seems easier to read with the constant there than with an import and having to open another file.


contract APMNamehash {
bytes32 constant public ETH_NODE = keccak256(bytes32(0), keccak256("eth"));
bytes32 constant public APM_NODE = keccak256(ETH_NODE, keccak256("aragonpm"));
Copy link
Contributor

Choose a reason for hiding this comment

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

I would keep this one inside APMNamehash and avoid the need for APMConstants.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See e3637df

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.379% when pulling 894d77f on expose-apm-namehash into 5f24c49 on dev.

@sohkai sohkai changed the title Add APMConstants to expose APM's namehash Expose APMNamehash May 17, 2018
@sohkai sohkai merged commit 37d973f into dev May 23, 2018
@sohkai sohkai deleted the expose-apm-namehash branch May 23, 2018 13:30
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.

4 participants