-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.ts
136 lines (131 loc) · 3.44 KB
/
constants.ts
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
export interface Addresses {
vaultFactory: string;
marketManager: string;
controller: string;
reputationToken: string;
syntheticZCBFactory: string;
fetcher: string;
// evenTheOdds?: string;
// reputationToken: string;
// balancerFactory: string;
// // Lower index is newer.
// marketFactories: MarketFactory[];
// info: {
// uploadBlockNumber: number;
// graphName?: string; // optional because the graph doesn't support every network
// };
}
// export type MarketFactory = {
// type: MarketFactoryType; // matches market factories that share markets
// subtype: MarketFactorySubType; // for determining which ABI to use
// address: string;
// collateral: string;
// ammFactory: string;
// fetcher: string;
// masterChef?: string;
// description?: string; // for humans to read
// version?: string; // release version. for humans to read
// } & (
// | {
// hasRewards: true;
// masterChef: string;
// }
// | {
// hasRewards: false;
// }
// );
// export const MARKET_TYPES = [
// "Trusted",
// "Crypto",
// "CryptoCurrency",
// "SportsLink",
// "MMALink",
// "MMA",
// "NBA",
// "MLB",
// "NFL",
// "Grouped",
// "CDS"
// ] as const;
// export const MARKET_TYPES = [
// "Trusted"
// ] as const;
// export type MarketFactoryType = typeof MARKET_TYPES[number];
// V1 was the first
// V2 includes initial odds
// V3 is after the major refactor
// export type MarketFactorySubType = "V1" | "V2" | "V3";
// export type MarketFactoryContractName =
// | "SportsLinkMarketFactoryV2"
// | "MMALinkMarketFactoryV2"
// | "NFLMarketFactoryV3"
// | "NBAMarketFactoryV3"
// | "MLBMarketFactoryV3"
// | "MMAMarketFactoryV3"
// | "CryptoMarketFactoryV3"
// | "GroupedMarketFactoryV3"
// | "CryptoCurrencyMarketFactoryV3"
// | "CDSMarketFactory"
// | "TrustedMarketFactoryV3";
// export type FetcherContractName =
// | "NBAFetcher"
// | "MMAFetcher"
// | "NFLFetcher"
// | "MLBFetcher"
// | "CryptoFetcher"
// | "GroupedFetcher"
// | "CryptoCurrencyFetcher"
// |"TrustedFetcher";
// export const MARKET_FACTORY_TYPE_TO_CONTRACT_NAME: {
// [Property in MarketFactoryType]: MarketFactoryContractName;
// } = {
// SportsLink: "SportsLinkMarketFactoryV2",
// MMALink: "MMALinkMarketFactoryV2",
// NFL: "NFLMarketFactoryV3",
// MLB: "MLBMarketFactoryV3",
// NBA: "NBAMarketFactoryV3",
// MMA: "MMAMarketFactoryV3",
// Crypto: "CryptoMarketFactoryV3",
// Grouped: "GroupedMarketFactoryV3",
// CryptoCurrency: "CryptoCurrencyMarketFactoryV3",
// Trusted: "TrustedMarketFactoryV3",
// CDS: "CDSMarketFactory"
// };
// export const marketFactoryTypeToFetcherName: {
// [Property in MarketFactoryType]: FetcherContractName;
// } = {
// SportsLink: "MMAFetcher",
// MMALink: "MMAFetcher",
// MMA: "MMAFetcher",
// NFL: "NFLFetcher",
// MLB: "MLBFetcher",
// NBA: "NBAFetcher",
// Crypto: "CryptoFetcher",
// Grouped: "GroupedFetcher",
// CryptoCurrency: "CryptoCurrencyFetcher",
// Trusted: "TrustedFetcher",
// CDS: "TrustedFetcher",
// };
export enum ChainId {
Mainnet = 1,
Ropsten = 3,
Rinkeby = 4,
Kovan = 42,
HardHat = 31337,
ArbitrumKovan4 = 212984383488152,
MaticMumbai = 80001,
MaticMainnet = 137,
}
export const graphChainNames: {
[chainId: number]: string;
} = {
1: "mainnet",
3: "ropsten",
4: "rinkeby",
42: "kovan",
80001: "mumbai",
137: "matic",
};
export type AddressMapping = {
[id in ChainId]?: Addresses;
};