-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.ts
239 lines (215 loc) · 8.59 KB
/
config.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
export type ConfigType = {
language: string;
translateLists: string[];
mobileMaxWidth: number;
tabletMaxWidth: number;
ethMockPrice: number;
oceanApp: {
// URI of single metadata cache instance for all networks.
// While ocean.js includes this value for each network as part of its ConfigHelper,
// it is assumed to be the same for all networks.
// In components can be accessed with the useMarketMetadata hook:
// const { appConfig } = useMarketMetadata()
// return appConfig.metadataCacheUri
metadataCacheUri: string;
// List of chainIds which metadata cache queries will return by default.
// This preselects the Chains user preferences.
chainIds: number[];
// List of all supported chainIds. Used to populate the Chains user preferences list.
chainIdsSupported: number[];
infuraProjectId: string;
defaultDatatokenTemplateIndex: number;
// The ETH address the marketplace fee will be sent to.
marketFeeAddress: string;
// publisher market fee that is taken upon ordering an asset, it is an absolute value, it is declared on erc20 creation
publisherMarketOrderFee: string;
// fee recieved by the publisher market when a dt is bought from a fixed rate exchange, percent
publisherMarketFixedSwapFee: string;
// consume market fee that is taken upon ordering an asset, it is an absolute value, it is specified on order
consumeMarketOrderFee: string;
// fee recieved by the consume market when a dt is bought from a fixed rate exchange, percent
consumeMarketFixedSwapFee: string;
// Used for conversion display, can be whatever coingecko API supports
// see: https://api.coingecko.com/api/v3/simple/supported_vs_currencies
currencies: string[];
// Tokens to fetch the spot prices from coingecko, against above currencies.
// Refers to Coingecko API tokenIds.
coingeckoTokenIds: string[];
// Config for https://github.com/oceanprotocol/use-dark-mode
darkModeConfig: {
classNameDark: string;
classNameLight: string;
storageKey: string;
};
// Used to show or hide the fixed or free price options
// tab to publishers during the price creation.
allowFixedPricing: string;
allowFreePricing: string;
// Set the default privacy policy to initially display
// this should be the slug of your default policy markdown file
defaultPrivacyPolicySlug: string;
// This enables / disables the use of a GDPR compliant
// privacy preference center to manage cookies on the market
// If set to true a gdpr.json file inside the content directory
// is used to create and show a privacy preference center / cookie banner
// To learn more about how to configure and use this, please refer to the readme
privacyPreferenceCenter: string;
};
routes: {
homepage: string;
chatgptPrompts: string;
midjourneyPrompts: string;
challanges: string;
ecosystem: string;
profile: string;
explorer: {
ethMainnet: string;
ethGoerli: string;
polygon: string;
mumbai: string;
binance: string;
moonriver: string;
energyWebChain: string;
};
};
network: {
networkTokenDecimals: number;
acceptedChainId: number;
chains: {
[key: number]: string;
};
rpcUrl: string;
pleaseSelectNetwork: { [key: number]: string };
};
oceanNetwork: {
contract: string;
networkDecimals: number;
};
did: string;
BackendOrderTimeBuffer: number;
};
const config: ConfigType = {
language: 'en',
translateLists: ['common'],
mobileMaxWidth: 767,
tabletMaxWidth: 1199,
ethMockPrice: 1646.13,
oceanApp: {
// URI of single metadata cache instance for all networks.
// While ocean.js includes this value for each network as part of its ConfigHelper,
// it is assumed to be the same for all networks.
// In components can be accessed with the useMarketMetadata hook:
// const { appConfig } = useMarketMetadata()
// return appConfig.metadataCacheUri
metadataCacheUri:
process.env.NEXT_PUBLIC_METADATACACHE_URI ||
'https://v4.aquarius.oceanprotocol.com',
// List of chainIds which metadata cache queries will return by default.
// This preselects the Chains user preferences.
chainIds: [1, 137, 56, 246, 1285],
// List of all supported chainIds. Used to populate the Chains user preferences list.
chainIdsSupported: [1, 137, 56, 246, 1285, 5, 80001],
infuraProjectId: process.env.NEXT_PUBLIC_INFURA_PROJECT_ID || 'xxx',
defaultDatatokenTemplateIndex: 2,
// The ETH address the marketplace fee will be sent to.
marketFeeAddress:
process.env.NEXT_PUBLIC_MARKET_FEE_ADDRESS ||
'0x9984b2453eC7D99a73A5B3a46Da81f197B753C8d',
// publisher market fee that is taken upon ordering an asset, it is an absolute value, it is declared on erc20 creation
publisherMarketOrderFee:
process.env.NEXT_PUBLIC_PUBLISHER_MARKET_ORDER_FEE || '0',
// fee recieved by the publisher market when a dt is bought from a fixed rate exchange, percent
publisherMarketFixedSwapFee:
process.env.NEXT_PUBLIC_PUBLISHER_MARKET_FIXED_SWAP_FEE || '0',
// consume market fee that is taken upon ordering an asset, it is an absolute value, it is specified on order
consumeMarketOrderFee:
process.env.NEXT_PUBLIC_CONSUME_MARKET_ORDER_FEE || '0',
// fee recieved by the consume market when a dt is bought from a fixed rate exchange, percent
consumeMarketFixedSwapFee:
process.env.NEXT_PUBLIC_CONSUME_MARKET_FIXED_SWAP_FEE || '0',
// Used for conversion display, can be whatever coingecko API supports
// see: https://api.coingecko.com/api/v3/simple/supported_vs_currencies
currencies: [
'EUR',
'USD',
'CAD',
'GBP',
'SGD',
'HKD',
'CNY',
'JPY',
'INR',
'RUB',
'ETH',
'BTC',
'LINK',
],
// Tokens to fetch the spot prices from coingecko, against above currencies.
// Refers to Coingecko API tokenIds.
coingeckoTokenIds: ['ocean-protocol', 'h2o', 'ethereum', 'matic-network'],
// Config for https://github.com/oceanprotocol/use-dark-mode
darkModeConfig: {
classNameDark: 'dark',
classNameLight: 'light',
storageKey: 'oceanDarkMode',
},
// Used to show or hide the fixed or free price options
// tab to publishers during the price creation.
allowFixedPricing: process.env.NEXT_PUBLIC_ALLOW_FIXED_PRICING || 'true',
allowFreePricing: process.env.NEXT_PUBLIC_ALLOW_FREE_PRICING || 'true',
// Set the default privacy policy to initially display
// this should be the slug of your default policy markdown file
defaultPrivacyPolicySlug: '/privacy/en',
// This enables / disables the use of a GDPR compliant
// privacy preference center to manage cookies on the market
// If set to true a gdpr.json file inside the content directory
// is used to create and show a privacy preference center / cookie banner
// To learn more about how to configure and use this, please refer to the readme
privacyPreferenceCenter:
process.env.NEXT_PUBLIC_PRIVACY_PREFERENCE_CENTER || 'false',
},
routes: {
homepage: '/homepage',
chatgptPrompts: '/chatgpt-prompts',
midjourneyPrompts: '/midjourney-prompts',
challanges: '/challanges',
ecosystem: '/ecosystem',
profile: '/profile',
explorer: {
ethMainnet: 'https://etherscan.io/address/',
ethGoerli: 'https://goerli.etherscan.io/address/',
polygon: 'https://polygonscan.com/address/',
mumbai: 'https://mumbai.polygonscan.com/address/',
binance: 'https://bscscan.com/address/',
moonriver: 'https://moonriver.moonscan.io/address/',
energyWebChain: 'https://explorer.energyweb.org/address/',
},
},
network: {
networkTokenDecimals: 18,
acceptedChainId:
parseInt(process.env.NEXT_PUBLIC_ACCEPTED_CHAIN_ID || '0', 10) || 80001,
chains: {
137: 'Polygon Mainnet',
80001: 'Mumbai Testnet',
},
rpcUrl:
process.env.NEXT_PUBLIC_RPC_URL ||
'https://matic-mumbai.chainstacklabs.com/',
pleaseSelectNetwork: {
137: 'Please select Polygon Mainnet from wallet.',
80001: 'Please select Mumbai Testnet from wallet.',
},
},
oceanNetwork: {
contract:
process.env.NEXT_PUBLIC_OCEAN_CONTRACT ||
'0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8',
networkDecimals: 18,
},
did: 'did:op:2497bdb5c4eed690bfb47f81d3d37d9cc6aaf2a05527a392d622396854372a92',
BackendOrderTimeBuffer: process.env.NEXT_PUBLIC_BACKEND_ORDER_TIME_BUFFER
? parseInt(process.env.NEXT_PUBLIC_BACKEND_ORDER_TIME_BUFFER, 10)
: 10000,
};
export default config;