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

feat(Beta): allow different name for token and organization #58

Merged
merged 5 commits into from
Jan 8, 2019

Conversation

sohkai
Copy link
Contributor

@sohkai sohkai commented Dec 12, 2018

Adds the ability to specify a different token name from the organization's registered aragonID name.

This is especially important, as aragonID names lose a lot of freedom during UTS46 normalization (e.g. all uppercase characters).

Parameterizes the tests so that the suite is run for both types of organization creation, and adds a few more tests:

@sohkai sohkai requested a review from bingen December 12, 2018 19:18
@sohkai sohkai changed the title [WIP] Beta: allow different name for token and organization feat(Beta): allow different name for token and organization Dec 13, 2018
@sohkai sohkai requested review from izqui and bingen and removed request for bingen December 13, 2018 13:28
@sohkai
Copy link
Contributor Author

sohkai commented Dec 13, 2018

@bingen @izqui now ready for review :).

@sohkai sohkai force-pushed the beta-allow-different-token-organization-name branch from 267cedc to e189bee Compare December 13, 2018 13:34
let aragonId, tokenName, tokenSymbol

before(async () => {
aragonId = 'multisigdao-' + Math.floor(Math.random() * 1000)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You would not believe how long it took me to realize that namehash('MultisigDao-<number>.aragonid.eth') doesn't create the same hash as the one the contract makes (sha3(namehash('aragonid.eth') + sha3('MultisigDao-<number>'))), due to the UTS46 normalization 😄 .

This bit was previously also giving aragonID incorrect ENS nodes to register (without the Math.floor(), Math.random() * 1000 gives something like 123.1234).

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, wow, good catch both! And sorry about the first one, I didn't think of it.

Copy link
Contributor

@izqui izqui left a comment

Choose a reason for hiding this comment

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

Contracts look good, I will take a closer look at the tests at another time (look like an amazing improvement!)

@sohkai sohkai added this to the A1 Sprint: 3.1 milestone Jan 2, 2019
@izqui
Copy link
Contributor

izqui commented Jan 3, 2019

@bingen can you take a look at these tests since it was you who mostly wrote them?

@bingen
Copy link
Contributor

bingen commented Jan 3, 2019

Sure, I'll do!

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.

Everything looking good to me. Nice job!

let aragonId, tokenName, tokenSymbol

before(async () => {
aragonId = 'multisigdao-' + Math.floor(Math.random() * 1000)
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, wow, good catch both! And sorry about the first one, I didn't think of it.

bingen pushed a commit to aragonlabs/enigma-voting that referenced this pull request Jan 3, 2019
As for now it's also going to be an ENS name (see
aragon/dao-templates#58 for reference and improvement)
@sohkai sohkai changed the base branch from master to next January 8, 2019 00:43
@sohkai sohkai merged commit 0164cad into next Jan 8, 2019
@sohkai sohkai deleted the beta-allow-different-token-organization-name branch January 8, 2019 00:44
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.

3 participants