-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathutils.ts
More file actions
45 lines (34 loc) · 1.17 KB
/
utils.ts
File metadata and controls
45 lines (34 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { Address } from 'viem';
import { getConfig, getDeployed } from 'configs/deployed.js';
export const getLocatorAddress = (): Address => {
const deployed = getDeployed();
return deployed.lidoLocator.proxy.address as Address;
};
export const getTokenMasterAddress = (): Address => {
const config = getConfig();
const deployed = getDeployed();
if (config.TOKEN_MANAGER) {
return config.TOKEN_MANAGER;
}
return deployed['app:aragon-token-manager'].proxy.address as Address;
};
export const getVotingAddress = (): Address => {
const config = getConfig();
const deployed = getDeployed();
if (config.VOTING) {
return config.VOTING;
}
return deployed['app:aragon-voting'].proxy.address as Address;
};
export const getValidatorConsolidationRequestsAddress = (): Address => {
const config = getConfig();
const deployed = getDeployed();
if (config.VALIDATOR_CONSOLIDATION_REQUESTS) {
return config.VALIDATOR_CONSOLIDATION_REQUESTS;
}
return deployed.validatorConsolidationRequests.address as Address;
};
export const getDashboardImplAddress = (): Address => {
const deployed = getDeployed();
return deployed.dashboardImpl.address as Address;
};