-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from aragon/OS-1024/add-in-osx-commons-used-do…
…mains feat: add in osx-commons used domains in osx
- Loading branch information
Showing
9 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {SupportedNetworks} from '../networks'; | ||
import {ENSNetworkDomain, ENSNetworkDomainsMap} from './types'; | ||
|
||
export const commonDomain: ENSNetworkDomain = { | ||
daoEns: 'dao.eth', | ||
pluginEns: 'plugin.dao.eth', | ||
}; | ||
|
||
export const exceptionalDomains: ENSNetworkDomainsMap = { | ||
[SupportedNetworks.SEPOLIA]: { | ||
daoEns: 'aragon-dao.eth', | ||
pluginEns: 'plugin.aragon-dao.eth', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './types'; | ||
export * from './getters'; | ||
export * from './contracts'; | ||
export * from './ens'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { | ||
getDaoEnsDomain, | ||
getPluginEnsDomain, | ||
commonDomain, | ||
exceptionalDomains, | ||
} from '../../../deployments'; | ||
import {SupportedNetworks} from '../../../networks'; | ||
|
||
describe('Domains', () => { | ||
describe('getDaoEnsDomain', () => { | ||
it('should return the correct dao ens', () => { | ||
for (const network of Object.values(SupportedNetworks)) { | ||
if (exceptionalDomains[network]) { | ||
expect(getDaoEnsDomain(network)).toMatch( | ||
exceptionalDomains[network]?.daoEns ?? '' | ||
); | ||
} else { | ||
expect(getDaoEnsDomain(network)).toMatch(commonDomain.daoEns); | ||
} | ||
} | ||
}); | ||
}); | ||
describe('getPluginEnsDomain', () => { | ||
it('should return the correct plugin ens', () => { | ||
for (const network of Object.values(SupportedNetworks)) { | ||
if (exceptionalDomains[network]) { | ||
expect(getPluginEnsDomain(network)).toMatch( | ||
exceptionalDomains[network]?.daoEns ?? '' | ||
); | ||
} else { | ||
expect(getPluginEnsDomain(network)).toMatch(commonDomain.pluginEns); | ||
} | ||
} | ||
}); | ||
}); | ||
describe('add new network to exceptional domains', () => { | ||
beforeEach(() => { | ||
exceptionalDomains[SupportedNetworks.LOCAL] = { | ||
daoEns: 'new-dao.eth', | ||
pluginEns: 'plugin.new-dao.eth', | ||
}; | ||
}); | ||
it('should return the new exceptional dao ens', () => { | ||
expect(getDaoEnsDomain(SupportedNetworks.LOCAL)).toMatch( | ||
exceptionalDomains[SupportedNetworks.LOCAL]?.daoEns ?? '' | ||
); | ||
}); | ||
it('should return the new exceptional plugin ens', () => { | ||
expect(getPluginEnsDomain(SupportedNetworks.LOCAL)).toMatch( | ||
exceptionalDomains[SupportedNetworks.LOCAL]?.pluginEns ?? '' | ||
); | ||
}); | ||
}); | ||
}); |