-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtypes.ts
More file actions
120 lines (107 loc) · 2.62 KB
/
types.ts
File metadata and controls
120 lines (107 loc) · 2.62 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import {
CONTRACT_NAMES,
PERIOD_TYPE,
SLO_TYPE,
TOKEN_NAMES,
USE_CASES,
} from './constants';
export type StackticalConfiguration = {
checkPastPeriods: boolean;
deployTokens: boolean;
tokens: Array<TokenConfiguration>;
ipfs: string;
chainlink: ChainlinkConfiguration;
addresses: DeployedContractAddresses;
bootstrap: BootstrapConfiguration;
messengers: Array<MessengerConfiguration>;
scripts: ScriptsConfiguration;
};
export type TokenConfiguration = {
factory: any;
name: TOKEN_NAMES;
address?: string;
};
export type PeriodBootstrapDefinition = {
periodType: PERIOD_TYPE;
amountOfPeriods: number;
expiredPeriods: number;
};
export type ScriptsConfiguration = {
deploy_sla?: Array<DeploySLAConfiguration>;
};
export type DeployedContractAddresses = {
[key: string]: string;
};
export type ChainlinkConfiguration = {
deployLocal: boolean;
deleteOldJobs: boolean;
cleanLocalFolder: boolean;
nodeFunds: string;
ethWsUrl: string;
ethHttpUrl?: string;
nodesConfiguration: Array<ChainlinkNodeConfiguration>;
};
export type ChainlinkNodeConfiguration = {
name: string;
restApiUrl: string;
restApiPort?: string;
email: string;
password: string;
};
export type PreCoordinatorConfiguration = {
oracles: Array<string>;
jobIds: Array<string>;
payments: Array<string>;
};
export type BootstrapConfiguration = {
allowance: Array<TokenAllowance>;
registry: {
periods: Array<PeriodBootstrapDefinition>;
stake: StakeBootstrapDefinition;
};
};
export type StakeBootstrapDefinition = {
stakingParameters: {
dslaDepositByPeriod?: string;
dslaPlatformReward?: string;
dslaMessengerReward?: string;
dslaUserReward?: string;
dslaBurnedByVerification?: string;
maxTokenLength?: string;
maxLeverage?: string;
burnDSLA?: boolean;
};
};
export type TokenAllowance = {
contract: CONTRACT_NAMES;
token: CONTRACT_NAMES | TOKEN_NAMES;
allowance: string;
};
export type MessengerConfiguration = {
contract: CONTRACT_NAMES;
useCaseName: USE_CASES;
externalAdapterUrl: string;
};
export type DeploySLAConfiguration = {
serviceMetadata: {
serviceName: string;
serviceDescription: string;
serviceImage: string;
serviceURL: string;
serviceAddress: string;
serviceTicker: string;
};
sloValue: number;
sloType: SLO_TYPE;
periodType: PERIOD_TYPE;
initialPeriodId: number;
finalPeriodId: number;
leverage: number;
messengerContract: CONTRACT_NAMES;
whitelisted: boolean;
extraData: Array<string>;
initialTokenSupply: string;
initialTokenSupplyDivisor: number;
deployerStakeTimes: number;
notDeployerStakeTimes: number;
};