@mixerx/config 0.5.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -12
- package/dist/assertions.d.ts +2 -34
- package/dist/assertions.js +200 -198
- package/dist/assertions.js.map +1 -1
- package/dist/check-shape.d.ts +0 -1
- package/dist/check-shape.js +2 -5
- package/dist/check-shape.js.map +1 -1
- package/dist/config.d.ts +5 -70
- package/dist/config.js +163 -347
- package/dist/config.js.map +1 -1
- package/dist/guards.d.ts +1 -2
- package/dist/guards.js +1 -1
- package/dist/guards.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +12 -41
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +55 -150
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/package.json +47 -32
- package/dist/assertions.d.ts.map +0 -1
- package/dist/check-shape.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/guards.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
package/dist/check-shape.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-shape.js","sourceRoot":"","sources":["../src/check-shape.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-shape.js","sourceRoot":"","sources":["../src/check-shape.ts"],"names":[],"mappings":";;AAAA,mDAAyD;AACzD,2CAAqC;AAErC,IAAI,CAAC;IACH,IAAA,sCAAsB,EAAC,kBAAM,CAAC,CAAC;AACjC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC","sourcesContent":["import { assertValidConfigShape } from './assertions.js';\r\nimport { config } from './config.js';\r\n\r\ntry {\r\n assertValidConfigShape(config);\r\n} catch (error) {\r\n const message = error instanceof Error ? error.message : String(error);\r\n console.error(`[mixerx-config] shape validation failed: ${message}`);\r\n process.exit(1);\r\n}\r\n"]}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,71 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const torn: Torn;
|
|
3
|
-
export declare const miningV2: Mining;
|
|
4
|
-
export declare const vesting: Vesting;
|
|
1
|
+
import { type InstanceCurrency, type Instances, type MixerXConfig, type NetworkConfig } from './types.js';
|
|
5
2
|
export declare const instances: Instances;
|
|
6
|
-
export declare const networkConfigByNetId:
|
|
7
|
-
export declare function getNetworkConfig(netId:
|
|
8
|
-
export declare function getInstancesForNetId(netId:
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const rewardSwap: RewardSwap;
|
|
11
|
-
export declare const tornadoTrees: TornadoTrees;
|
|
12
|
-
export declare const governance: Address;
|
|
13
|
-
export declare const governanceImpl: Address;
|
|
14
|
-
export declare const tornadoProxy: Address;
|
|
15
|
-
export declare const tornadoProxyLight: Address;
|
|
16
|
-
export declare const rewardVerifier: Address;
|
|
17
|
-
export declare const treeUpdateVerifier: Address;
|
|
18
|
-
export declare const withdrawVerifier: Address;
|
|
19
|
-
export declare const poseidonHasher2: Address;
|
|
20
|
-
export declare const poseidonHasher3: Address;
|
|
21
|
-
export declare const feeManager: Address;
|
|
22
|
-
export declare const tornadoStakingRewards: Address;
|
|
23
|
-
export declare const relayerRegistry: Address;
|
|
24
|
-
export declare const tornadoRouter: Address;
|
|
25
|
-
export declare const mixerXRouter: Address;
|
|
26
|
-
export declare const instanceRegistry: Address;
|
|
27
|
-
export declare const deployer: Address;
|
|
28
|
-
export declare const relayerRegistryProxy: Address;
|
|
29
|
-
export declare const aggregator: Address;
|
|
30
|
-
export declare const offchainOracle: Address;
|
|
31
|
-
export declare const governanceProxy: Address;
|
|
32
|
-
export declare const tornadoProxyMainnet: Address;
|
|
33
|
-
export declare const mixerxToken: TokenConfig;
|
|
34
|
-
export declare const wrappedStablecoin: Address;
|
|
35
|
-
declare const config: {
|
|
36
|
-
torn: Torn;
|
|
37
|
-
miningV2: Mining;
|
|
38
|
-
vesting: Vesting;
|
|
39
|
-
instances: Partial<Record<1 | 11155111, Record<string, InstanceCurrency>>>;
|
|
40
|
-
voucher: Voucher;
|
|
41
|
-
rewardSwap: RewardSwap;
|
|
42
|
-
tornadoTrees: TornadoTrees;
|
|
43
|
-
governance: Address;
|
|
44
|
-
governanceImpl: Address;
|
|
45
|
-
tornadoProxy: Address;
|
|
46
|
-
tornadoProxyLight: Address;
|
|
47
|
-
rewardVerifier: Address;
|
|
48
|
-
treeUpdateVerifier: Address;
|
|
49
|
-
withdrawVerifier: Address;
|
|
50
|
-
poseidonHasher2: Address;
|
|
51
|
-
poseidonHasher3: Address;
|
|
52
|
-
feeManager: Address;
|
|
53
|
-
tornadoStakingRewards: Address;
|
|
54
|
-
relayerRegistry: Address;
|
|
55
|
-
tornadoRouter: Address;
|
|
56
|
-
mixerXRouter: Address;
|
|
57
|
-
instanceRegistry: Address;
|
|
58
|
-
deployer: Address;
|
|
59
|
-
relayerRegistryProxy: Address;
|
|
60
|
-
aggregator: Address;
|
|
61
|
-
offchainOracle: Address;
|
|
62
|
-
governanceProxy: Address;
|
|
63
|
-
tornadoProxyMainnet: Address;
|
|
64
|
-
mixerxToken: TokenConfig;
|
|
65
|
-
wrappedStablecoin: Address;
|
|
66
|
-
networkConfigByNetId: Partial<Record<1 | 11155111, NetworkConfig>>;
|
|
67
|
-
getNetworkConfig: typeof getNetworkConfig;
|
|
68
|
-
getInstancesForNetId: typeof getInstancesForNetId;
|
|
69
|
-
};
|
|
70
|
-
export default config;
|
|
71
|
-
//# sourceMappingURL=config.d.ts.map
|
|
3
|
+
export declare const networkConfigByNetId: MixerXConfig['networkConfigByNetId'];
|
|
4
|
+
export declare function getNetworkConfig(netId: number): NetworkConfig | undefined;
|
|
5
|
+
export declare function getInstancesForNetId(netId: number): Readonly<Record<string, InstanceCurrency>> | undefined;
|
|
6
|
+
export declare const config: MixerXConfig;
|
package/dist/config.js
CHANGED
|
@@ -1,356 +1,172 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.config = exports.networkConfigByNetId = exports.instances = void 0;
|
|
4
4
|
exports.getNetworkConfig = getNetworkConfig;
|
|
5
5
|
exports.getInstancesForNetId = getInstancesForNetId;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
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
|
-
10: 11432596,
|
|
166
|
-
100: 11432597,
|
|
167
|
-
custom: 11432603,
|
|
168
|
-
},
|
|
169
|
-
symbol: 'ETH',
|
|
170
|
-
decimals: 18,
|
|
171
|
-
assetType: 'native',
|
|
172
|
-
},
|
|
173
|
-
fds: {
|
|
174
|
-
instanceAddress: {
|
|
175
|
-
100: '0x286eDD82b6B710f50b1e3f2b638632ADf6A6AD1F',
|
|
176
|
-
1000: '0xdC83d464F7C9cB0f4EbDA7De466Be5B91DacE2Cd',
|
|
177
|
-
10000: '0x5C8da61018405c6de62bED7BB7347381EF2c2E04',
|
|
178
|
-
100000: '0x7734799a883373578FA821341c10a1117da3558c',
|
|
179
|
-
custom: '0x847a59B96A91b48dA0a5bc6461c0A1621770D94D',
|
|
180
|
-
},
|
|
181
|
-
deploymentBlock: {
|
|
182
|
-
100: 11432598,
|
|
183
|
-
1000: 11432599,
|
|
184
|
-
10000: 11432600,
|
|
185
|
-
100000: 11432601,
|
|
186
|
-
custom: 11432602,
|
|
187
|
-
},
|
|
188
|
-
assetType: 'erc20',
|
|
189
|
-
tokenAddress: '0xC1D4F78a8253943255a81eA9eAE14B3F12223B98',
|
|
190
|
-
symbol: 'FDS',
|
|
191
|
-
decimals: 18,
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
exports.networkConfigByNetId = {
|
|
196
|
-
1: {
|
|
197
|
-
contracts: {
|
|
198
|
-
relayerRegistryAddress: '0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2',
|
|
199
|
-
relayerRegistry: 'relayer-registry.contract.tornadocash.eth',
|
|
200
|
-
aggregator: '0xE8F47A78A6D52D317D0D2FFFac56739fE14D1b49',
|
|
201
|
-
offchainOracleAddress: '0x07D91f5fb9Bf7798734C3f606dB065549F6893bb',
|
|
202
|
-
tornadoRouter: 'tornado-router.contract.tornadocash.eth',
|
|
203
|
-
deployer: 'deployer.contract.tornadocash.eth',
|
|
204
|
-
feeManager: 'fee-manager.contract.tornadocash.eth',
|
|
205
|
-
governance: 'governance.contract.tornadocash.eth',
|
|
206
|
-
governanceImpl: 'governance-impl.contract.tornadocash.eth',
|
|
207
|
-
governanceAddress: '0x5efda50f22d34f262c29268506c5fa42cb56a1ce',
|
|
208
|
-
instanceRegistry: 'instance-registry.contract.tornadocash.eth',
|
|
209
|
-
oldMixerXProxy: '0x722122df12d4e14e13ac3b6895a86e84145b6967',
|
|
210
|
-
poseidonHasher2: 'poseidon2.contract.tornadocash.eth',
|
|
211
|
-
poseidonHasher3: 'poseidon3.contract.tornadocash.eth',
|
|
212
|
-
rewardSwap: 'reward-swap.contract.tornadocash.eth',
|
|
213
|
-
rewardVerifier: 'reward-verifier.contract.tornadocash.eth',
|
|
214
|
-
tornadoProxy: 'tornado-proxy.contract.tornadocash.eth',
|
|
215
|
-
tornadoProxyLight: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17',
|
|
216
|
-
tornadoStakingRewards: 'staking-rewards.contract.tornadocash.eth',
|
|
217
|
-
tornadoTrees: 'tornado-trees.contract.tornadocash.eth',
|
|
218
|
-
treeUpdateVerifier: 'tree-update-verifier.contract.tornadocash.eth',
|
|
219
|
-
voucher: 'voucher.contract.tornadocash.eth',
|
|
220
|
-
withdrawVerifier: 'withdraw-verifier.contract.tornadocash.eth',
|
|
221
|
-
},
|
|
222
|
-
tokens: {
|
|
223
|
-
mixerXTokenAddress: '0x77777feddddffc19ff86db637967013e6c6a116c',
|
|
224
|
-
mixerXTokenSymbol: 'torn',
|
|
225
|
-
mixerXTokenDecimals: 18,
|
|
226
|
-
wrappedStablecoinAddress: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
11155111: {
|
|
230
|
-
contracts: {
|
|
231
|
-
fds: '0xC1D4F78a8253943255a81eA9eAE14B3F12223B98',
|
|
232
|
-
roles: '0xE2e96273089589bdC8A4cd1f4d9A6F55744dB226',
|
|
233
|
-
config: '0x1D038b72Db729BBaC35f3cc5eFBCf8417c377909',
|
|
234
|
-
pauser: '0x4764F8698bb55C917F59d101b03799AF7131ffE4',
|
|
235
|
-
feeManager: '0x97856926A518a5CB1852445d43255A8BbeAE48d6',
|
|
236
|
-
instanceRegistry: '0x380312c818615C44984679623fb66d8f250e5A2f',
|
|
237
|
-
instanceRegistryDeploymentBlock: 11472886,
|
|
238
|
-
relayerRegistryAddress: '0x486f1E74B0D907f1A50b3914E6D3709a71A017b7',
|
|
239
|
-
relayerRegistry: '0x486f1E74B0D907f1A50b3914E6D3709a71A017b7',
|
|
240
|
-
relayerRegistryDeploymentBlock: 11432581,
|
|
241
|
-
mixerXRouter: '0x2DB055DC5EDE42592A943e4ce430E18A85605506',
|
|
242
|
-
verifier: '0x9D9bb12960e4E1640B78353ea1de488Af276a5A0',
|
|
243
|
-
hasher: '0xd7BA55CEbf2E06D8f67A8c30236D85d65aFA8612',
|
|
244
|
-
huffVerifier: '0x0d01b5B3a43ce89F7f076BE2b72f259Bc422312c',
|
|
245
|
-
aggregator: '0x3BA62b05179EBa79E0DFD41b160C29c901550D23',
|
|
246
|
-
noteBackup: '0xb76f473f27CcbbacEd401dDb788dDa527F47ac46',
|
|
247
|
-
offchainOracleAddress: '0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8',
|
|
248
|
-
ensRegistryAddress: '0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4',
|
|
249
|
-
ensRegistryDeploymentBlock: 11003084,
|
|
250
|
-
ethPoolFactory: '0x63D6aE1924d21A3Ae401063dd95D46C052E1328C',
|
|
251
|
-
ethPoolFactoryDeploymentBlock: 11472900,
|
|
252
|
-
erc20PoolFactory: '0x5c1F8A3185b563799FfAF27429209d55D3d32cF5',
|
|
253
|
-
erc20PoolFactoryDeploymentBlock: 11472901,
|
|
254
|
-
},
|
|
255
|
-
tokens: {
|
|
256
|
-
mixerXTokenAddress: '0xC1D4F78a8253943255a81eA9eAE14B3F12223B98',
|
|
257
|
-
mixerXTokenSymbol: 'FDS',
|
|
258
|
-
mixerXTokenDecimals: 18,
|
|
259
|
-
wrappedStablecoinAddress: '0xC1D4F78a8253943255a81eA9eAE14B3F12223B98',
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
};
|
|
6
|
+
const guards_js_1 = require("./guards.js");
|
|
7
|
+
const types_js_1 = require("./types.js");
|
|
8
|
+
const frozenRecord = (value) => Object.freeze(Object.assign(Object.create(null), value));
|
|
9
|
+
const address = (value) => value;
|
|
10
|
+
const sepoliaEth = frozenRecord({
|
|
11
|
+
assetType: 'native',
|
|
12
|
+
decimals: 18,
|
|
13
|
+
denominations: Object.freeze(['0.1', '1', '10', '100']),
|
|
14
|
+
deploymentBlock: frozenRecord({
|
|
15
|
+
'0.1': 11_432_594,
|
|
16
|
+
'1': 11_432_595,
|
|
17
|
+
'10': 11_432_596,
|
|
18
|
+
'100': 11_432_597,
|
|
19
|
+
}),
|
|
20
|
+
instanceAddress: frozenRecord({
|
|
21
|
+
'0.1': address('0xAFE89CA19074E51c14a2BA007964942E2Ba80411'),
|
|
22
|
+
'1': address('0xd6D56d7a7057fEcE0cF62870e7D54f7699Cdd4c6'),
|
|
23
|
+
'10': address('0x2130be75E060f4888b9B1d26E76B6Cf54Da746cd'),
|
|
24
|
+
'100': address('0x40D77F4D922515eC56f211662AEDe755a5711652'),
|
|
25
|
+
}),
|
|
26
|
+
symbol: 'ETH',
|
|
27
|
+
});
|
|
28
|
+
const sepoliaFds = frozenRecord({
|
|
29
|
+
assetType: 'erc20',
|
|
30
|
+
decimals: 18,
|
|
31
|
+
denominations: Object.freeze(['100', '1000', '10000', '100000']),
|
|
32
|
+
deploymentBlock: frozenRecord({
|
|
33
|
+
'100': 11_432_598,
|
|
34
|
+
'1000': 11_432_599,
|
|
35
|
+
'10000': 11_432_600,
|
|
36
|
+
'100000': 11_432_601,
|
|
37
|
+
}),
|
|
38
|
+
instanceAddress: frozenRecord({
|
|
39
|
+
'100': address('0x286eDD82b6B710f50b1e3f2b638632ADf6A6AD1F'),
|
|
40
|
+
'1000': address('0xdC83d464F7C9cB0f4EbDA7De466Be5B91DacE2Cd'),
|
|
41
|
+
'10000': address('0x5C8da61018405c6de62bED7BB7347381EF2c2E04'),
|
|
42
|
+
'100000': address('0x7734799a883373578FA821341c10a1117da3558c'),
|
|
43
|
+
}),
|
|
44
|
+
symbol: 'FDS',
|
|
45
|
+
tokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
46
|
+
});
|
|
47
|
+
const sepoliaInstances = frozenRecord({ eth: sepoliaEth, fds: sepoliaFds });
|
|
48
|
+
// Mainnet owns separate placeholder records. Replace their values when verified
|
|
49
|
+
// deployments exist; changes to the Sepolia records must not alter this catalogue.
|
|
50
|
+
const mainnetEth = frozenRecord({
|
|
51
|
+
assetType: 'native',
|
|
52
|
+
decimals: 18,
|
|
53
|
+
denominations: Object.freeze(['0.1', '1', '10', '100']),
|
|
54
|
+
deploymentBlock: frozenRecord({
|
|
55
|
+
'0.1': 11_432_594,
|
|
56
|
+
'1': 11_432_595,
|
|
57
|
+
'10': 11_432_596,
|
|
58
|
+
'100': 11_432_597,
|
|
59
|
+
}),
|
|
60
|
+
instanceAddress: frozenRecord({
|
|
61
|
+
'0.1': address('0xAFE89CA19074E51c14a2BA007964942E2Ba80411'),
|
|
62
|
+
'1': address('0xd6D56d7a7057fEcE0cF62870e7D54f7699Cdd4c6'),
|
|
63
|
+
'10': address('0x2130be75E060f4888b9B1d26E76B6Cf54Da746cd'),
|
|
64
|
+
'100': address('0x40D77F4D922515eC56f211662AEDe755a5711652'),
|
|
65
|
+
}),
|
|
66
|
+
symbol: 'ETH',
|
|
67
|
+
});
|
|
68
|
+
const mainnetFds = frozenRecord({
|
|
69
|
+
assetType: 'erc20',
|
|
70
|
+
decimals: 18,
|
|
71
|
+
denominations: Object.freeze(['100', '1000', '10000', '100000']),
|
|
72
|
+
deploymentBlock: frozenRecord({
|
|
73
|
+
'100': 11_432_598,
|
|
74
|
+
'1000': 11_432_599,
|
|
75
|
+
'10000': 11_432_600,
|
|
76
|
+
'100000': 11_432_601,
|
|
77
|
+
}),
|
|
78
|
+
instanceAddress: frozenRecord({
|
|
79
|
+
'100': address('0x286eDD82b6B710f50b1e3f2b638632ADf6A6AD1F'),
|
|
80
|
+
'1000': address('0xdC83d464F7C9cB0f4EbDA7De466Be5B91DacE2Cd'),
|
|
81
|
+
'10000': address('0x5C8da61018405c6de62bED7BB7347381EF2c2E04'),
|
|
82
|
+
'100000': address('0x7734799a883373578FA821341c10a1117da3558c'),
|
|
83
|
+
}),
|
|
84
|
+
symbol: 'FDS',
|
|
85
|
+
tokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
86
|
+
});
|
|
87
|
+
const mainnetInstances = frozenRecord({ eth: mainnetEth, fds: mainnetFds });
|
|
88
|
+
exports.instances = frozenRecord({
|
|
89
|
+
// Provisional mainnet catalogue: contracts are not deployed there yet.
|
|
90
|
+
[types_js_1.MAINNET_NET_ID]: mainnetInstances,
|
|
91
|
+
[types_js_1.SEPOLIA_NET_ID]: sepoliaInstances,
|
|
92
|
+
});
|
|
93
|
+
const sepoliaNetworkConfig = frozenRecord({
|
|
94
|
+
contracts: frozenRecord({
|
|
95
|
+
aggregator: address('0x3BA62b05179EBa79E0DFD41b160C29c901550D23'),
|
|
96
|
+
config: address('0x1D038b72Db729BBaC35f3cc5eFBCf8417c377909'),
|
|
97
|
+
erc20PoolFactory: address('0x5c1F8A3185b563799FfAF27429209d55D3d32cF5'),
|
|
98
|
+
erc20PoolFactoryDeploymentBlock: 11_472_901,
|
|
99
|
+
ensRegistryAddress: address('0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4'),
|
|
100
|
+
ensRegistryDeploymentBlock: 11_003_084,
|
|
101
|
+
ethPoolFactory: address('0x63D6aE1924d21A3Ae401063dd95D46C052E1328C'),
|
|
102
|
+
ethPoolFactoryDeploymentBlock: 11_472_900,
|
|
103
|
+
fds: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
104
|
+
feeManager: address('0x97856926A518a5CB1852445d43255A8BbeAE48d6'),
|
|
105
|
+
hasher: address('0xd7BA55CEbf2E06D8f67A8c30236D85d65aFA8612'),
|
|
106
|
+
huffVerifier: address('0x0d01b5B3a43ce89F7f076BE2b72f259Bc422312c'),
|
|
107
|
+
instanceRegistry: address('0x380312c818615C44984679623fb66d8f250e5A2f'),
|
|
108
|
+
instanceRegistryDeploymentBlock: 11_472_886,
|
|
109
|
+
mixerXRouter: address('0x2DB055DC5EDE42592A943e4ce430E18A85605506'),
|
|
110
|
+
noteBackup: address('0xb76f473f27CcbbacEd401dDb788dDa527F47ac46'),
|
|
111
|
+
offchainOracleAddress: address('0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8'),
|
|
112
|
+
pauser: address('0x4764F8698bb55C917F59d101b03799AF7131ffE4'),
|
|
113
|
+
relayerRegistry: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
114
|
+
relayerRegistryAddress: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
115
|
+
relayerRegistryDeploymentBlock: 11_432_581,
|
|
116
|
+
roles: address('0xE2e96273089589bdC8A4cd1f4d9A6F55744dB226'),
|
|
117
|
+
verifier: address('0x9D9bb12960e4E1640B78353ea1de488Af276a5A0'),
|
|
118
|
+
}),
|
|
119
|
+
tokens: frozenRecord({
|
|
120
|
+
mixerXTokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
121
|
+
mixerXTokenDecimals: 18,
|
|
122
|
+
mixerXTokenSymbol: 'FDS',
|
|
123
|
+
wrappedStablecoinAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
124
|
+
}),
|
|
125
|
+
});
|
|
126
|
+
// Independent mainnet placeholders, not aliases of the Sepolia network object.
|
|
127
|
+
const mainnetNetworkConfig = frozenRecord({
|
|
128
|
+
contracts: frozenRecord({
|
|
129
|
+
aggregator: address('0x3BA62b05179EBa79E0DFD41b160C29c901550D23'),
|
|
130
|
+
config: address('0x1D038b72Db729BBaC35f3cc5eFBCf8417c377909'),
|
|
131
|
+
erc20PoolFactory: address('0x5c1F8A3185b563799FfAF27429209d55D3d32cF5'),
|
|
132
|
+
erc20PoolFactoryDeploymentBlock: 11_472_901,
|
|
133
|
+
ensRegistryAddress: address('0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4'),
|
|
134
|
+
ensRegistryDeploymentBlock: 11_003_084,
|
|
135
|
+
ethPoolFactory: address('0x63D6aE1924d21A3Ae401063dd95D46C052E1328C'),
|
|
136
|
+
ethPoolFactoryDeploymentBlock: 11_472_900,
|
|
137
|
+
fds: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
138
|
+
feeManager: address('0x97856926A518a5CB1852445d43255A8BbeAE48d6'),
|
|
139
|
+
hasher: address('0xd7BA55CEbf2E06D8f67A8c30236D85d65aFA8612'),
|
|
140
|
+
huffVerifier: address('0x0d01b5B3a43ce89F7f076BE2b72f259Bc422312c'),
|
|
141
|
+
instanceRegistry: address('0x380312c818615C44984679623fb66d8f250e5A2f'),
|
|
142
|
+
instanceRegistryDeploymentBlock: 11_472_886,
|
|
143
|
+
mixerXRouter: address('0x2DB055DC5EDE42592A943e4ce430E18A85605506'),
|
|
144
|
+
noteBackup: address('0xb76f473f27CcbbacEd401dDb788dDa527F47ac46'),
|
|
145
|
+
offchainOracleAddress: address('0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8'),
|
|
146
|
+
pauser: address('0x4764F8698bb55C917F59d101b03799AF7131ffE4'),
|
|
147
|
+
relayerRegistry: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
148
|
+
relayerRegistryAddress: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
149
|
+
relayerRegistryDeploymentBlock: 11_432_581,
|
|
150
|
+
roles: address('0xE2e96273089589bdC8A4cd1f4d9A6F55744dB226'),
|
|
151
|
+
verifier: address('0x9D9bb12960e4E1640B78353ea1de488Af276a5A0'),
|
|
152
|
+
}),
|
|
153
|
+
tokens: frozenRecord({
|
|
154
|
+
mixerXTokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
155
|
+
mixerXTokenDecimals: 18,
|
|
156
|
+
mixerXTokenSymbol: 'FDS',
|
|
157
|
+
wrappedStablecoinAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
exports.networkConfigByNetId = frozenRecord({
|
|
161
|
+
// Addresses and blocks are placeholders copied from Sepolia, not deployment evidence.
|
|
162
|
+
[types_js_1.MAINNET_NET_ID]: mainnetNetworkConfig,
|
|
163
|
+
[types_js_1.SEPOLIA_NET_ID]: sepoliaNetworkConfig,
|
|
164
|
+
});
|
|
263
165
|
function getNetworkConfig(netId) {
|
|
264
|
-
return exports.networkConfigByNetId[netId];
|
|
166
|
+
return (0, guards_js_1.isSupportedNetId)(netId) ? exports.networkConfigByNetId[netId] : undefined;
|
|
265
167
|
}
|
|
266
168
|
function getInstancesForNetId(netId) {
|
|
267
|
-
return exports.instances[netId];
|
|
169
|
+
return (0, guards_js_1.isSupportedNetId)(netId) ? exports.instances[netId] : undefined;
|
|
268
170
|
}
|
|
269
|
-
|
|
270
|
-
const networkConfig = getNetworkConfig(netId);
|
|
271
|
-
if (!networkConfig) {
|
|
272
|
-
throw new Error(`Missing network config for netId ${netId}`);
|
|
273
|
-
}
|
|
274
|
-
return networkConfig;
|
|
275
|
-
}
|
|
276
|
-
function requireContract(networkName, networkConfig, key) {
|
|
277
|
-
const value = networkConfig.contracts[key];
|
|
278
|
-
if (typeof value !== 'string' || value.length === 0) {
|
|
279
|
-
throw new Error(`Missing ${networkName} contract config: ${key}`);
|
|
280
|
-
}
|
|
281
|
-
return value;
|
|
282
|
-
}
|
|
283
|
-
const mainnetConfig = requireNetworkConfig(1);
|
|
284
|
-
const sepoliaConfig = requireNetworkConfig(11155111);
|
|
285
|
-
exports.voucher = { address: requireContract('mainnet', mainnetConfig, 'voucher'), duration: 12 };
|
|
286
|
-
exports.rewardSwap = { address: requireContract('mainnet', mainnetConfig, 'rewardSwap'), poolWeight: 1e11 };
|
|
287
|
-
exports.tornadoTrees = {
|
|
288
|
-
address: requireContract('mainnet', mainnetConfig, 'tornadoTrees'),
|
|
289
|
-
levels: 20,
|
|
290
|
-
};
|
|
291
|
-
exports.governance = { address: requireContract('mainnet', mainnetConfig, 'governance') };
|
|
292
|
-
exports.governanceImpl = { address: requireContract('mainnet', mainnetConfig, 'governanceImpl') };
|
|
293
|
-
exports.tornadoProxy = { address: requireContract('mainnet', mainnetConfig, 'tornadoProxy') };
|
|
294
|
-
exports.tornadoProxyLight = { address: requireContract('mainnet', mainnetConfig, 'tornadoProxyLight') };
|
|
295
|
-
exports.rewardVerifier = { address: requireContract('mainnet', mainnetConfig, 'rewardVerifier') };
|
|
296
|
-
exports.treeUpdateVerifier = { address: requireContract('mainnet', mainnetConfig, 'treeUpdateVerifier') };
|
|
297
|
-
exports.withdrawVerifier = { address: requireContract('mainnet', mainnetConfig, 'withdrawVerifier') };
|
|
298
|
-
exports.poseidonHasher2 = { address: requireContract('mainnet', mainnetConfig, 'poseidonHasher2') };
|
|
299
|
-
exports.poseidonHasher3 = { address: requireContract('mainnet', mainnetConfig, 'poseidonHasher3') };
|
|
300
|
-
exports.feeManager = { address: requireContract('mainnet', mainnetConfig, 'feeManager') };
|
|
301
|
-
exports.tornadoStakingRewards = {
|
|
302
|
-
address: requireContract('mainnet', mainnetConfig, 'tornadoStakingRewards'),
|
|
303
|
-
};
|
|
304
|
-
exports.relayerRegistry = { address: requireContract('mainnet', mainnetConfig, 'relayerRegistry') };
|
|
305
|
-
exports.tornadoRouter = { address: requireContract('mainnet', mainnetConfig, 'tornadoRouter') };
|
|
306
|
-
exports.mixerXRouter = { address: requireContract('sepolia', sepoliaConfig, 'mixerXRouter') };
|
|
307
|
-
exports.instanceRegistry = { address: requireContract('mainnet', mainnetConfig, 'instanceRegistry') };
|
|
308
|
-
exports.deployer = { address: requireContract('mainnet', mainnetConfig, 'deployer') };
|
|
309
|
-
exports.relayerRegistryProxy = { address: mainnetConfig.contracts.relayerRegistryAddress };
|
|
310
|
-
exports.aggregator = { address: mainnetConfig.contracts.aggregator };
|
|
311
|
-
exports.offchainOracle = { address: mainnetConfig.contracts.offchainOracleAddress };
|
|
312
|
-
exports.governanceProxy = { address: requireContract('mainnet', mainnetConfig, 'governanceAddress') };
|
|
313
|
-
exports.tornadoProxyMainnet = { address: requireContract('mainnet', mainnetConfig, 'oldMixerXProxy') };
|
|
314
|
-
exports.mixerxToken = {
|
|
315
|
-
address: mainnetConfig.tokens.mixerXTokenAddress,
|
|
316
|
-
symbol: mainnetConfig.tokens.mixerXTokenSymbol,
|
|
317
|
-
decimals: mainnetConfig.tokens.mixerXTokenDecimals,
|
|
318
|
-
};
|
|
319
|
-
exports.wrappedStablecoin = { address: mainnetConfig.tokens.wrappedStablecoinAddress };
|
|
320
|
-
const config = {
|
|
321
|
-
torn: exports.torn,
|
|
322
|
-
miningV2: exports.miningV2,
|
|
323
|
-
vesting: exports.vesting,
|
|
324
|
-
instances: exports.instances,
|
|
325
|
-
voucher: exports.voucher,
|
|
326
|
-
rewardSwap: exports.rewardSwap,
|
|
327
|
-
tornadoTrees: exports.tornadoTrees,
|
|
328
|
-
governance: exports.governance,
|
|
329
|
-
governanceImpl: exports.governanceImpl,
|
|
330
|
-
tornadoProxy: exports.tornadoProxy,
|
|
331
|
-
tornadoProxyLight: exports.tornadoProxyLight,
|
|
332
|
-
rewardVerifier: exports.rewardVerifier,
|
|
333
|
-
treeUpdateVerifier: exports.treeUpdateVerifier,
|
|
334
|
-
withdrawVerifier: exports.withdrawVerifier,
|
|
335
|
-
poseidonHasher2: exports.poseidonHasher2,
|
|
336
|
-
poseidonHasher3: exports.poseidonHasher3,
|
|
337
|
-
feeManager: exports.feeManager,
|
|
338
|
-
tornadoStakingRewards: exports.tornadoStakingRewards,
|
|
339
|
-
relayerRegistry: exports.relayerRegistry,
|
|
340
|
-
tornadoRouter: exports.tornadoRouter,
|
|
341
|
-
mixerXRouter: exports.mixerXRouter,
|
|
342
|
-
instanceRegistry: exports.instanceRegistry,
|
|
343
|
-
deployer: exports.deployer,
|
|
344
|
-
relayerRegistryProxy: exports.relayerRegistryProxy,
|
|
345
|
-
aggregator: exports.aggregator,
|
|
346
|
-
offchainOracle: exports.offchainOracle,
|
|
347
|
-
governanceProxy: exports.governanceProxy,
|
|
348
|
-
tornadoProxyMainnet: exports.tornadoProxyMainnet,
|
|
349
|
-
mixerxToken: exports.mixerxToken,
|
|
350
|
-
wrappedStablecoin: exports.wrappedStablecoin,
|
|
351
|
-
networkConfigByNetId: exports.networkConfigByNetId,
|
|
352
|
-
getNetworkConfig,
|
|
353
|
-
getInstancesForNetId,
|
|
354
|
-
};
|
|
355
|
-
exports.default = config;
|
|
171
|
+
exports.config = frozenRecord({ instances: exports.instances, networkConfigByNetId: exports.networkConfigByNetId });
|
|
356
172
|
//# sourceMappingURL=config.js.map
|