-
Notifications
You must be signed in to change notification settings - Fork 84
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
Conversation
…nization through one call
267cedc
to
e189bee
Compare
let aragonId, tokenName, tokenSymbol | ||
|
||
before(async () => { | ||
aragonId = 'multisigdao-' + Math.floor(Math.random() * 1000) |
There was a problem hiding this comment.
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
).
There was a problem hiding this comment.
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.
There was a problem hiding this 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!)
@bingen can you take a look at these tests since it was you who mostly wrote them? |
Sure, I'll do! |
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
As for now it's also going to be an ENS name (see aragon/dao-templates#58 for reference and improvement)
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: