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(@embark/core): Support directives in ENS config #1165

Merged
merged 1 commit into from Dec 7, 2018

Conversation

emizzle
Copy link
Collaborator

@emizzle emizzle commented Dec 6, 2018

Support directives in ENS configurations, such that subdomains can be registered to addresses of deployed tokens.

The following directives are supported:

"register": {
      "rootDomain": "embark.eth",
      "subdomains": {
        "status": "0x4a17f35f0a9927fb4141aa91cbbc72c1b31598de",
        "mytoken": "$MyToken",
        "MyToken2": "$MyToken2"
      }
    }

Add unit test for these directives.

Support directives in ENS configurations, such that subdomains can be registered to addresses of deployed tokens.

The following directives are supported:
```
"register": {
      "rootDomain": "embark.eth",
      "subdomains": {
        "status": "0x4a17f35f0a9927fb4141aa91cbbc72c1b31598de",
        "mytoken": "$MyToken",
        "MyToken2": "$MyToken2"
      }
    }
```

Add unit test for these directives.
@emizzle emizzle requested a review from a team December 6, 2018 22:20
Copy link
Collaborator

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

Nice one

if (directives && directives.length) {
this.embark.registerActionForEvent("contracts:deploy:afterAll", async (deployActionCb) => {
this.events.request("contracts:contract", directives[1], (contract) => {
if(!contract) return deployActionCb(); // if the contract is not registered in the config, it will be undefined here
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should print a warning so that the user knows that he tried to register something to an address we don't know about.

@iurimatias iurimatias merged commit 7511156 into master Dec 7, 2018
@0x-r4bbit 0x-r4bbit deleted the feat/ens-directives branch December 10, 2018 09:16
@0x-r4bbit
Copy link
Contributor

We shouldn't forget to add documentation for this.

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.

None yet

5 participants