Skip to content

Commit

Permalink
feat: get EWC chain config from iam-contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Harasz committed Feb 14, 2022
1 parent 80b3048 commit 32236d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -60,7 +60,7 @@
"@babel/plugin-transform-runtime": "^7.15.8",
"@babel/runtime": "^7.12.5",
"@energyweb/ekc": "^0.6.5",
"@energyweb/iam-contracts": "^4.1.0",
"@energyweb/iam-contracts": "^4.2.1",
"@energyweb/staking-pool": "^1.0.0-rc.14",
"@ensdomains/ens": "^0.6.2",
"@ethersproject/abstract-provider": "5.4.1",
Expand Down
18 changes: 8 additions & 10 deletions src/config/chain.config.ts
Expand Up @@ -8,6 +8,13 @@ import {
VOLTA_IDENTITY_MANAGER_ADDRESS,
VOLTA_CLAIM_MANAGER_ADDRESS,
EWC_CHAIN_ID,
EWC_ADDRESS_1056,
EWC_CLAIM_MANAGER_ADDRESS,
EWC_DOMAIN_NOTIFER_ADDRESS,
EWC_ENS_REGISTRY_ADDRESS,
EWC_IDENTITY_MANAGER_ADDRESS,
EWC_PUBLIC_RESOLVER_ADDRESS,
EWC_RESOLVER_V1_ADDRESS,
} from '@energyweb/iam-contracts';
import { VOLTA_CHAIN_ID } from '../utils/constants';

Expand All @@ -28,15 +35,6 @@ export interface ChainConfig {

export type ChainId = number;

// TODO: Would be better if some of these were in @energyweb/iam-contracts
const EWC_CLAIM_MANAGER_ADDRESS = '0x23b026631A6f265d17CFee8aa6ced1B244f3920C';
const EWC_ENS_REGISTRY_ADDRESS = '0x0A6d64413c07E10E890220BBE1c49170080C6Ca0';
const EWC_RESOLVER_V1_ADDRESS = '0x70ad37DfeB1C05290F4bBd22188FA19Bc154A0ea';
const EWC_PUBLIC_RESOLVER_ADDRESS = '0xA517983Bd4Af4DF0Ed9b52DA4BC405d0A95eE7E2';
const EWC_DOMAIN_NOTIFER_ADDRESS = '0x5491Db3cC1f3AFf6C229e061735F92936004da3c';
const EWC_IDENTITY_MANAGER_ADDRESS = '0x2d1569f3a2006d21c0dc60eb13c8557b63ce5a8d';
const EwcAddress1056 = '0xE29672f34e92b56C9169f9D485fFc8b9A136BCE4';

/**
* Set of parameters to configure connection to chain with id received from wallet.
* If configuration for some chain is missing or should be reconfigured use `setChainConfig` before class instantiation
Expand Down Expand Up @@ -64,7 +62,7 @@ const chainConfig: Record<number, ChainConfig> = {
ensPublicResolverAddress: EWC_PUBLIC_RESOLVER_ADDRESS,
domainNotifierAddress: EWC_DOMAIN_NOTIFER_ADDRESS,
assetManagerAddress: EWC_IDENTITY_MANAGER_ADDRESS,
didRegistryAddress: EwcAddress1056,
didRegistryAddress: EWC_ADDRESS_1056,
claimManagerAddress: EWC_CLAIM_MANAGER_ADDRESS,
stakingPoolFactoryAddress: '', // This is not deployed on EWC
},
Expand Down

0 comments on commit 32236d0

Please sign in to comment.