|
1 | | -export const DEFAULT_IPFS_GATEWAY = 'https://ipfs-gateway.v8-bellecour.iex.ec'; |
2 | | - |
3 | | -export const DEFAULT_IEXEC_IPFS_NODE = |
4 | | - 'https://ipfs-upload.v8-bellecour.iex.ec'; |
5 | | - |
| 1 | +export type ChainId = number; |
| 2 | + |
| 3 | +export interface ChainConfig { |
| 4 | + name: string; |
| 5 | + dataprotectorContractAddress: string; |
| 6 | + sharingContractAddress: string; |
| 7 | + subgraphUrl: string; |
| 8 | + ipfsGateway: string; |
| 9 | + ipfsNode: string; |
| 10 | + smsDebugURL: string; |
| 11 | +} |
| 12 | + |
| 13 | +export const CHAIN_CONFIG: Record<ChainId, ChainConfig> = { |
| 14 | + // Bellecour |
| 15 | + 134: { |
| 16 | + name: 'bellecour', |
| 17 | + dataprotectorContractAddress: '0x3a4ab33f3d605e75b6d00a32a0fa55c3628f6a59', |
| 18 | + sharingContractAddress: '0x1390c3c6a545198809f1c7c5dd2600ef74d60925', |
| 19 | + subgraphUrl: 'https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2', |
| 20 | + ipfsGateway: 'https://ipfs-gateway.v8-bellecour.iex.ec', |
| 21 | + ipfsNode: 'https://ipfs-upload.v8-bellecour.iex.ec', |
| 22 | + smsDebugURL: 'https://sms-debug.iex.ec', |
| 23 | + }, |
| 24 | + |
| 25 | + // Arbitrum |
| 26 | + 42161: { |
| 27 | + name: 'arbitrum', |
| 28 | + dataprotectorContractAddress: '0xYourArbitrumContractAddress', |
| 29 | + sharingContractAddress: '0xYourArbitrumSharingAddress', |
| 30 | + subgraphUrl: 'https://api.thegraph.com/subgraphs/name/your/arbitrum-subgraph', |
| 31 | + ipfsGateway: 'https://your-arbitrum-ipfs-gateway', |
| 32 | + ipfsNode: 'https://your-arbitrum-ipfs-node', |
| 33 | + smsDebugURL: 'https://your-arbitrum-sms-url', |
| 34 | + }, |
| 35 | + |
| 36 | + // Avalanche |
| 37 | + 43114: { |
| 38 | + name: 'avalanche', |
| 39 | + dataprotectorContractAddress: '0xYourAvalancheContractAddress', |
| 40 | + sharingContractAddress: '0xYourAvalancheSharingAddress', |
| 41 | + subgraphUrl: 'https://api.thegraph.com/subgraphs/name/your/avalanche-subgraph', |
| 42 | + ipfsGateway: 'https://your-avalanche-ipfs-gateway', |
| 43 | + ipfsNode: 'https://your-avalanche-ipfs-node', |
| 44 | + smsDebugURL: 'https://your-avalanche-sms-url', |
| 45 | + }, |
| 46 | +}; |
| 47 | + |
| 48 | +export const DEFAULT_CHAIN_ID = 134; |
6 | 49 | export const DEFAULT_DATA_NAME = ''; |
7 | | - |
8 | | -// Original DataProtector smart-contract |
9 | | -export const DEFAULT_CONTRACT_ADDRESS = |
10 | | - '0x3a4Ab33F3D605e75b6D00A32A0Fa55C3628F6A59'.toLowerCase(); |
11 | | - |
12 | | -export const DEFAULT_SHARING_CONTRACT_ADDRESS = |
13 | | - '0x1390c3c6a545198809F1C7c5Dd2600ef74D60925'.toLowerCase(); |
14 | | - |
15 | | -export const DEFAULT_SUBGRAPH_URL = |
16 | | - 'https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2'; |
17 | | - |
18 | | -export const DEFAULT_DEBUG_SMS_URL = 'https://sms-debug.iex.ec'; |
19 | | - |
20 | 50 | export const WORKERPOOL_ADDRESS = 'prod-v8-bellecour.main.pools.iexec.eth'; |
21 | | - |
22 | 51 | export const SCONE_TAG = ['tee', 'scone']; |
23 | | - |
24 | 52 | export const DEFAULT_MAX_PRICE = 0; |
25 | | - |
26 | 53 | export const MAX_DESIRED_DATA_ORDER_PRICE = 0; |
27 | | - |
28 | 54 | export const MAX_DESIRED_APP_ORDER_PRICE = 0; |
29 | | - |
30 | 55 | export const MAX_DESIRED_WORKERPOOL_ORDER_PRICE = 0; |
31 | | - |
32 | 56 | export const KEY_PURPOSE_SELECTOR = 'keyHasPurpose(bytes32,uint256)'; |
33 | | - |
34 | 57 | export const GROUP_MEMBER_PURPOSE = 4; |
0 commit comments