@mixerx/config 0.5.2 → 1.0.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 +35 -19
- package/dist/assertions.d.ts +2 -34
- package/dist/assertions.js +196 -195
- 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 +85 -342
- 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 -146
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/package.json +27 -12
- 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/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,351 +1,94 @@
|
|
|
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
|
-
10: '0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF',
|
|
88
|
-
100: '0xA160cdAB225685dA1d56aa342Ad8841c3b53f291',
|
|
89
|
-
},
|
|
90
|
-
symbol: 'ETH',
|
|
91
|
-
decimals: 18,
|
|
92
|
-
assetType: 'native',
|
|
93
|
-
},
|
|
94
|
-
dai: {
|
|
95
|
-
instanceAddress: {
|
|
96
|
-
100: '0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3',
|
|
97
|
-
1000: '0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144',
|
|
98
|
-
10000: '0x07687e702b410Fa43f4cB4Af7FA097918ffD2730',
|
|
99
|
-
100000: '0x23773E65ed146A459791799d01336DB287f25334',
|
|
100
|
-
},
|
|
101
|
-
assetType: 'erc20',
|
|
102
|
-
tokenAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
|
|
103
|
-
symbol: 'DAI',
|
|
104
|
-
decimals: 18,
|
|
105
|
-
},
|
|
106
|
-
cdai: {
|
|
107
|
-
instanceAddress: {
|
|
108
|
-
5000: '0x22aaA7720ddd5388A3c0A3333430953C68f1849b',
|
|
109
|
-
50000: '0x03893a7c7463AE47D46bc7f091665f1893656003',
|
|
110
|
-
500000: '0x2717c5e28cf931547B621a5dddb772Ab6A35B701',
|
|
111
|
-
5000000: '0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af',
|
|
112
|
-
},
|
|
113
|
-
assetType: 'erc20',
|
|
114
|
-
tokenAddress: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
|
|
115
|
-
symbol: 'cDAI',
|
|
116
|
-
decimals: 8,
|
|
117
|
-
},
|
|
118
|
-
usdc: {
|
|
119
|
-
instanceAddress: {
|
|
120
|
-
100: '0xd96f2B1c14Db8458374d9Aca76E26c3D18364307',
|
|
121
|
-
1000: '0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D',
|
|
122
|
-
10000: '0xD691F27f38B395864Ea86CfC7253969B409c362d',
|
|
123
|
-
},
|
|
124
|
-
assetType: 'erc20',
|
|
125
|
-
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
126
|
-
symbol: 'USDC',
|
|
127
|
-
decimals: 6,
|
|
128
|
-
},
|
|
129
|
-
usdt: {
|
|
130
|
-
instanceAddress: {
|
|
131
|
-
100: '0x169AD27A470D064DEDE56a2D3ff727986b15D52B',
|
|
132
|
-
1000: '0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f',
|
|
133
|
-
10000: '0xF67721A2D8F736E75a49FdD7FAd2e31D8676542a',
|
|
134
|
-
100000: '0x9AD122c22B14202B4490eDAf288FDb3C7cb3ff5E',
|
|
135
|
-
},
|
|
136
|
-
assetType: 'erc20',
|
|
137
|
-
tokenAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
|
138
|
-
symbol: 'USDT',
|
|
139
|
-
decimals: 6,
|
|
140
|
-
},
|
|
141
|
-
wbtc: {
|
|
142
|
-
instanceAddress: {
|
|
143
|
-
0.1: '0x178169B423a011fff22B9e3F3abeA13414dDD0F1',
|
|
144
|
-
1: '0x610B717796ad172B316836AC95a2ffad065CeaB4',
|
|
145
|
-
10: '0xbB93e510BbCD0B7beb5A853875f9eC60275CF498',
|
|
146
|
-
},
|
|
147
|
-
assetType: 'erc20',
|
|
148
|
-
tokenAddress: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
|
|
149
|
-
symbol: 'WBTC',
|
|
150
|
-
decimals: 8,
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
11155111: {
|
|
154
|
-
eth: {
|
|
155
|
-
instanceAddress: {
|
|
156
|
-
0.1: '0xD4B7CAC6B5058f663B091F61b318C03e8fF96f83',
|
|
157
|
-
1: '0x3aE1bD6D47D07C920E104C9EE5E54659322c1D45',
|
|
158
|
-
10: '0x4da182822057Ae7eD93e6948a27BaaA83EB897dC',
|
|
159
|
-
100: '0x5A8CDA79FBEb43aA7223455D2e8466b4655cFFC4',
|
|
160
|
-
custom: '0x87554FB5f8ad6B57154EC7a6C622f0ed29E265F5',
|
|
161
|
-
},
|
|
162
|
-
deploymentBlock: {
|
|
163
|
-
0.1: 11326739,
|
|
164
|
-
1: 11326740,
|
|
165
|
-
10: 11326741,
|
|
166
|
-
100: 11326742,
|
|
167
|
-
custom: 11326749,
|
|
168
|
-
},
|
|
169
|
-
symbol: 'ETH',
|
|
170
|
-
decimals: 18,
|
|
171
|
-
assetType: 'native',
|
|
172
|
-
},
|
|
173
|
-
fds: {
|
|
174
|
-
instanceAddress: {
|
|
175
|
-
100: '0xA7f1a697370592f1F07990334029b7F99d4977E1',
|
|
176
|
-
1000: '0xadAe4098eA94ce347038c17B413dBB776849dc4A',
|
|
177
|
-
10000: '0xB765Ef16389F4A82A924Ebf65719dcB424Fd757e',
|
|
178
|
-
100000: '0xA97f7c5D0b0BC39E37bB5937BE7fB48b2dFef572',
|
|
179
|
-
custom: '0x82ECBe6869df1012b166Ff94565164c75f5342E9',
|
|
180
|
-
},
|
|
181
|
-
deploymentBlock: {
|
|
182
|
-
100: 11326743,
|
|
183
|
-
1000: 11326744,
|
|
184
|
-
10000: 11326745,
|
|
185
|
-
100000: 11326747,
|
|
186
|
-
custom: 11326748,
|
|
187
|
-
},
|
|
188
|
-
assetType: 'erc20',
|
|
189
|
-
tokenAddress: '0x01785f6e2cDE21CBee0B2f9387567b60C9C68649',
|
|
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: '0x01785f6e2cDE21CBee0B2f9387567b60C9C68649',
|
|
232
|
-
roles: '0xd12FeD801D93A9907cD3fD8CBAA77624F2B32f99',
|
|
233
|
-
config: '0x9359a2174a34B3b8e0fCBD79d2fa6251459D9927',
|
|
234
|
-
pauser: '0x09A96e3Fe1300E45185CEFF37945db8e0DADDbe1',
|
|
235
|
-
feeManager: '0xA10162DA4604Bdc85F5abe51a908A05F05EbaBd1',
|
|
236
|
-
instanceRegistry: '0x0A34A1460C9BfCC03392C3D30369bD989479EA8B',
|
|
237
|
-
relayerRegistryAddress: '0x5F2fCDa06AE4f053A46d61a963ec87F6a9792FC6',
|
|
238
|
-
relayerRegistry: '0x5F2fCDa06AE4f053A46d61a963ec87F6a9792FC6',
|
|
239
|
-
relayerRegistryDeploymentBlock: 11326726,
|
|
240
|
-
mixerXRouter: '0x63999614C9A4C937Ab810881Ab8C23183d72dD34',
|
|
241
|
-
verifier: '0x56289d15A6dE5a7c513384Faef7680473923Ff22',
|
|
242
|
-
hasher: '0xEE49375F729157912eDbC791BA1A845DE8Da336C',
|
|
243
|
-
huffVerifier: '0xF5035f83E9F8E40B72BD1E1e8E409f73Af559E22',
|
|
244
|
-
aggregator: '0xC9186051ca202D3233FBf5e515392bf20914f6e8',
|
|
245
|
-
noteBackup: '0xa383850583560fa7fC18570a46aD01C4C6eCC349',
|
|
246
|
-
offchainOracleAddress: '0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8',
|
|
247
|
-
ensRegistryAddress: '0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4',
|
|
248
|
-
ensRegistryDeploymentBlock: 11003084,
|
|
249
|
-
},
|
|
250
|
-
tokens: {
|
|
251
|
-
mixerXTokenAddress: '0x01785f6e2cDE21CBee0B2f9387567b60C9C68649',
|
|
252
|
-
mixerXTokenSymbol: 'FDS',
|
|
253
|
-
mixerXTokenDecimals: 18,
|
|
254
|
-
wrappedStablecoinAddress: '0x01785f6e2cDE21CBee0B2f9387567b60C9C68649',
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
};
|
|
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 eth = 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 fds = 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, fds });
|
|
48
|
+
exports.instances = frozenRecord({
|
|
49
|
+
[types_js_1.SEPOLIA_NET_ID]: sepoliaInstances,
|
|
50
|
+
});
|
|
51
|
+
const sepoliaNetworkConfig = frozenRecord({
|
|
52
|
+
contracts: frozenRecord({
|
|
53
|
+
aggregator: address('0x3BA62b05179EBa79E0DFD41b160C29c901550D23'),
|
|
54
|
+
config: address('0x1D038b72Db729BBaC35f3cc5eFBCf8417c377909'),
|
|
55
|
+
erc20PoolFactory: address('0x5c1F8A3185b563799FfAF27429209d55D3d32cF5'),
|
|
56
|
+
erc20PoolFactoryDeploymentBlock: 11_472_901,
|
|
57
|
+
ensRegistryAddress: address('0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4'),
|
|
58
|
+
ensRegistryDeploymentBlock: 11_003_084,
|
|
59
|
+
ethPoolFactory: address('0x63D6aE1924d21A3Ae401063dd95D46C052E1328C'),
|
|
60
|
+
ethPoolFactoryDeploymentBlock: 11_472_900,
|
|
61
|
+
fds: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
62
|
+
feeManager: address('0x97856926A518a5CB1852445d43255A8BbeAE48d6'),
|
|
63
|
+
hasher: address('0xd7BA55CEbf2E06D8f67A8c30236D85d65aFA8612'),
|
|
64
|
+
huffVerifier: address('0x0d01b5B3a43ce89F7f076BE2b72f259Bc422312c'),
|
|
65
|
+
instanceRegistry: address('0x380312c818615C44984679623fb66d8f250e5A2f'),
|
|
66
|
+
instanceRegistryDeploymentBlock: 11_472_886,
|
|
67
|
+
mixerXRouter: address('0x2DB055DC5EDE42592A943e4ce430E18A85605506'),
|
|
68
|
+
noteBackup: address('0xb76f473f27CcbbacEd401dDb788dDa527F47ac46'),
|
|
69
|
+
offchainOracleAddress: address('0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8'),
|
|
70
|
+
pauser: address('0x4764F8698bb55C917F59d101b03799AF7131ffE4'),
|
|
71
|
+
relayerRegistry: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
72
|
+
relayerRegistryAddress: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),
|
|
73
|
+
relayerRegistryDeploymentBlock: 11_432_581,
|
|
74
|
+
roles: address('0xE2e96273089589bdC8A4cd1f4d9A6F55744dB226'),
|
|
75
|
+
verifier: address('0x9D9bb12960e4E1640B78353ea1de488Af276a5A0'),
|
|
76
|
+
}),
|
|
77
|
+
tokens: frozenRecord({
|
|
78
|
+
mixerXTokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
79
|
+
mixerXTokenDecimals: 18,
|
|
80
|
+
mixerXTokenSymbol: 'FDS',
|
|
81
|
+
wrappedStablecoinAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
exports.networkConfigByNetId = frozenRecord({
|
|
85
|
+
[types_js_1.SEPOLIA_NET_ID]: sepoliaNetworkConfig,
|
|
86
|
+
});
|
|
258
87
|
function getNetworkConfig(netId) {
|
|
259
|
-
return exports.networkConfigByNetId[netId];
|
|
88
|
+
return (0, guards_js_1.isSupportedNetId)(netId) ? exports.networkConfigByNetId[netId] : undefined;
|
|
260
89
|
}
|
|
261
90
|
function getInstancesForNetId(netId) {
|
|
262
|
-
return exports.instances[netId];
|
|
91
|
+
return (0, guards_js_1.isSupportedNetId)(netId) ? exports.instances[netId] : undefined;
|
|
263
92
|
}
|
|
264
|
-
|
|
265
|
-
const networkConfig = getNetworkConfig(netId);
|
|
266
|
-
if (!networkConfig) {
|
|
267
|
-
throw new Error(`Missing network config for netId ${netId}`);
|
|
268
|
-
}
|
|
269
|
-
return networkConfig;
|
|
270
|
-
}
|
|
271
|
-
function requireContract(networkName, networkConfig, key) {
|
|
272
|
-
const value = networkConfig.contracts[key];
|
|
273
|
-
if (typeof value !== 'string' || value.length === 0) {
|
|
274
|
-
throw new Error(`Missing ${networkName} contract config: ${key}`);
|
|
275
|
-
}
|
|
276
|
-
return value;
|
|
277
|
-
}
|
|
278
|
-
const mainnetConfig = requireNetworkConfig(1);
|
|
279
|
-
const sepoliaConfig = requireNetworkConfig(11155111);
|
|
280
|
-
exports.voucher = { address: requireContract('mainnet', mainnetConfig, 'voucher'), duration: 12 };
|
|
281
|
-
exports.rewardSwap = { address: requireContract('mainnet', mainnetConfig, 'rewardSwap'), poolWeight: 1e11 };
|
|
282
|
-
exports.tornadoTrees = {
|
|
283
|
-
address: requireContract('mainnet', mainnetConfig, 'tornadoTrees'),
|
|
284
|
-
levels: 20,
|
|
285
|
-
};
|
|
286
|
-
exports.governance = { address: requireContract('mainnet', mainnetConfig, 'governance') };
|
|
287
|
-
exports.governanceImpl = { address: requireContract('mainnet', mainnetConfig, 'governanceImpl') };
|
|
288
|
-
exports.tornadoProxy = { address: requireContract('mainnet', mainnetConfig, 'tornadoProxy') };
|
|
289
|
-
exports.tornadoProxyLight = { address: requireContract('mainnet', mainnetConfig, 'tornadoProxyLight') };
|
|
290
|
-
exports.rewardVerifier = { address: requireContract('mainnet', mainnetConfig, 'rewardVerifier') };
|
|
291
|
-
exports.treeUpdateVerifier = { address: requireContract('mainnet', mainnetConfig, 'treeUpdateVerifier') };
|
|
292
|
-
exports.withdrawVerifier = { address: requireContract('mainnet', mainnetConfig, 'withdrawVerifier') };
|
|
293
|
-
exports.poseidonHasher2 = { address: requireContract('mainnet', mainnetConfig, 'poseidonHasher2') };
|
|
294
|
-
exports.poseidonHasher3 = { address: requireContract('mainnet', mainnetConfig, 'poseidonHasher3') };
|
|
295
|
-
exports.feeManager = { address: requireContract('mainnet', mainnetConfig, 'feeManager') };
|
|
296
|
-
exports.tornadoStakingRewards = {
|
|
297
|
-
address: requireContract('mainnet', mainnetConfig, 'tornadoStakingRewards'),
|
|
298
|
-
};
|
|
299
|
-
exports.relayerRegistry = { address: requireContract('mainnet', mainnetConfig, 'relayerRegistry') };
|
|
300
|
-
exports.tornadoRouter = { address: requireContract('mainnet', mainnetConfig, 'tornadoRouter') };
|
|
301
|
-
exports.mixerXRouter = { address: requireContract('sepolia', sepoliaConfig, 'mixerXRouter') };
|
|
302
|
-
exports.instanceRegistry = { address: requireContract('mainnet', mainnetConfig, 'instanceRegistry') };
|
|
303
|
-
exports.deployer = { address: requireContract('mainnet', mainnetConfig, 'deployer') };
|
|
304
|
-
exports.relayerRegistryProxy = { address: mainnetConfig.contracts.relayerRegistryAddress };
|
|
305
|
-
exports.aggregator = { address: mainnetConfig.contracts.aggregator };
|
|
306
|
-
exports.offchainOracle = { address: mainnetConfig.contracts.offchainOracleAddress };
|
|
307
|
-
exports.governanceProxy = { address: requireContract('mainnet', mainnetConfig, 'governanceAddress') };
|
|
308
|
-
exports.tornadoProxyMainnet = { address: requireContract('mainnet', mainnetConfig, 'oldMixerXProxy') };
|
|
309
|
-
exports.mixerxToken = {
|
|
310
|
-
address: mainnetConfig.tokens.mixerXTokenAddress,
|
|
311
|
-
symbol: mainnetConfig.tokens.mixerXTokenSymbol,
|
|
312
|
-
decimals: mainnetConfig.tokens.mixerXTokenDecimals,
|
|
313
|
-
};
|
|
314
|
-
exports.wrappedStablecoin = { address: mainnetConfig.tokens.wrappedStablecoinAddress };
|
|
315
|
-
const config = {
|
|
316
|
-
torn: exports.torn,
|
|
317
|
-
miningV2: exports.miningV2,
|
|
318
|
-
vesting: exports.vesting,
|
|
319
|
-
instances: exports.instances,
|
|
320
|
-
voucher: exports.voucher,
|
|
321
|
-
rewardSwap: exports.rewardSwap,
|
|
322
|
-
tornadoTrees: exports.tornadoTrees,
|
|
323
|
-
governance: exports.governance,
|
|
324
|
-
governanceImpl: exports.governanceImpl,
|
|
325
|
-
tornadoProxy: exports.tornadoProxy,
|
|
326
|
-
tornadoProxyLight: exports.tornadoProxyLight,
|
|
327
|
-
rewardVerifier: exports.rewardVerifier,
|
|
328
|
-
treeUpdateVerifier: exports.treeUpdateVerifier,
|
|
329
|
-
withdrawVerifier: exports.withdrawVerifier,
|
|
330
|
-
poseidonHasher2: exports.poseidonHasher2,
|
|
331
|
-
poseidonHasher3: exports.poseidonHasher3,
|
|
332
|
-
feeManager: exports.feeManager,
|
|
333
|
-
tornadoStakingRewards: exports.tornadoStakingRewards,
|
|
334
|
-
relayerRegistry: exports.relayerRegistry,
|
|
335
|
-
tornadoRouter: exports.tornadoRouter,
|
|
336
|
-
mixerXRouter: exports.mixerXRouter,
|
|
337
|
-
instanceRegistry: exports.instanceRegistry,
|
|
338
|
-
deployer: exports.deployer,
|
|
339
|
-
relayerRegistryProxy: exports.relayerRegistryProxy,
|
|
340
|
-
aggregator: exports.aggregator,
|
|
341
|
-
offchainOracle: exports.offchainOracle,
|
|
342
|
-
governanceProxy: exports.governanceProxy,
|
|
343
|
-
tornadoProxyMainnet: exports.tornadoProxyMainnet,
|
|
344
|
-
mixerxToken: exports.mixerxToken,
|
|
345
|
-
wrappedStablecoin: exports.wrappedStablecoin,
|
|
346
|
-
networkConfigByNetId: exports.networkConfigByNetId,
|
|
347
|
-
getNetworkConfig,
|
|
348
|
-
getInstancesForNetId,
|
|
349
|
-
};
|
|
350
|
-
exports.default = config;
|
|
93
|
+
exports.config = frozenRecord({ instances: exports.instances, networkConfigByNetId: exports.networkConfigByNetId });
|
|
351
94
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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","sourcesContent":["import { isSupportedNetId } from './guards.js';\r\nimport {\r\n SEPOLIA_NET_ID,\r\n type EvmAddress,\r\n type InstanceCurrency,\r\n type Instances,\r\n type MixerXConfig,\r\n type NetworkConfig,\r\n} from './types.js';\r\n\r\nconst frozenRecord = <T extends object>(value: T): Readonly<T> =>\r\n Object.freeze(Object.assign(Object.create(null) as T, value));\r\n\r\nconst address = (value: string): EvmAddress => value as EvmAddress;\r\n\r\nconst eth = frozenRecord({\n assetType: 'native',\r\n decimals: 18,\r\n denominations: Object.freeze(['0.1', '1', '10', '100']),\n deploymentBlock: frozenRecord({\r\n '0.1': 11_432_594,\r\n '1': 11_432_595,\r\n '10': 11_432_596,\r\n '100': 11_432_597,\n }),\r\n instanceAddress: frozenRecord({\r\n '0.1': address('0xAFE89CA19074E51c14a2BA007964942E2Ba80411'),\r\n '1': address('0xd6D56d7a7057fEcE0cF62870e7D54f7699Cdd4c6'),\r\n '10': address('0x2130be75E060f4888b9B1d26E76B6Cf54Da746cd'),\r\n '100': address('0x40D77F4D922515eC56f211662AEDe755a5711652'),\n }),\r\n symbol: 'ETH',\r\n} as const satisfies InstanceCurrency);\r\n\r\nconst fds = frozenRecord({\n assetType: 'erc20',\r\n decimals: 18,\r\n denominations: Object.freeze(['100', '1000', '10000', '100000']),\n deploymentBlock: frozenRecord({\r\n '100': 11_432_598,\r\n '1000': 11_432_599,\r\n '10000': 11_432_600,\r\n '100000': 11_432_601,\n }),\r\n instanceAddress: frozenRecord({\r\n '100': address('0x286eDD82b6B710f50b1e3f2b638632ADf6A6AD1F'),\r\n '1000': address('0xdC83d464F7C9cB0f4EbDA7De466Be5B91DacE2Cd'),\r\n '10000': address('0x5C8da61018405c6de62bED7BB7347381EF2c2E04'),\r\n '100000': address('0x7734799a883373578FA821341c10a1117da3558c'),\n }),\r\n symbol: 'FDS',\r\n tokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),\r\n} as const satisfies InstanceCurrency);\r\n\r\nconst sepoliaInstances = frozenRecord({ eth, fds });\r\n\r\nexport const instances: Instances = frozenRecord({\r\n [SEPOLIA_NET_ID]: sepoliaInstances,\r\n});\r\n\r\nconst sepoliaNetworkConfig: NetworkConfig = frozenRecord({\n contracts: frozenRecord({\n aggregator: address('0x3BA62b05179EBa79E0DFD41b160C29c901550D23'),\r\n config: address('0x1D038b72Db729BBaC35f3cc5eFBCf8417c377909'),\r\n erc20PoolFactory: address('0x5c1F8A3185b563799FfAF27429209d55D3d32cF5'),\r\n erc20PoolFactoryDeploymentBlock: 11_472_901,\r\n ensRegistryAddress: address('0x0b7EBb6ACE899Fcb22Df0742Bd9F830192E8a3e4'),\r\n ensRegistryDeploymentBlock: 11_003_084,\r\n ethPoolFactory: address('0x63D6aE1924d21A3Ae401063dd95D46C052E1328C'),\r\n ethPoolFactoryDeploymentBlock: 11_472_900,\r\n fds: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),\r\n feeManager: address('0x97856926A518a5CB1852445d43255A8BbeAE48d6'),\r\n hasher: address('0xd7BA55CEbf2E06D8f67A8c30236D85d65aFA8612'),\r\n huffVerifier: address('0x0d01b5B3a43ce89F7f076BE2b72f259Bc422312c'),\r\n instanceRegistry: address('0x380312c818615C44984679623fb66d8f250e5A2f'),\r\n instanceRegistryDeploymentBlock: 11_472_886,\r\n mixerXRouter: address('0x2DB055DC5EDE42592A943e4ce430E18A85605506'),\r\n noteBackup: address('0xb76f473f27CcbbacEd401dDb788dDa527F47ac46'),\r\n offchainOracleAddress: address('0xF9c08FF64d019466EBaD54D5AACdEedEB6E564B8'),\r\n pauser: address('0x4764F8698bb55C917F59d101b03799AF7131ffE4'),\r\n relayerRegistry: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),\r\n relayerRegistryAddress: address('0x486f1E74B0D907f1A50b3914E6D3709a71A017b7'),\r\n relayerRegistryDeploymentBlock: 11_432_581,\r\n roles: address('0xE2e96273089589bdC8A4cd1f4d9A6F55744dB226'),\r\n verifier: address('0x9D9bb12960e4E1640B78353ea1de488Af276a5A0'),\r\n }),\r\n tokens: frozenRecord({\n mixerXTokenAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),\r\n mixerXTokenDecimals: 18,\r\n mixerXTokenSymbol: 'FDS',\r\n wrappedStablecoinAddress: address('0xC1D4F78a8253943255a81eA9eAE14B3F12223B98'),\r\n }),\r\n});\r\n\r\nexport const networkConfigByNetId: MixerXConfig['networkConfigByNetId'] = frozenRecord({\r\n [SEPOLIA_NET_ID]: sepoliaNetworkConfig,\r\n});\r\n\r\nexport function getNetworkConfig(netId: number): NetworkConfig | undefined {\r\n return isSupportedNetId(netId) ? networkConfigByNetId[netId] : undefined;\r\n}\r\n\r\nexport function getInstancesForNetId(\r\n netId: number,\r\n): Readonly<Record<string, InstanceCurrency>> | undefined {\r\n return isSupportedNetId(netId) ? instances[netId] : undefined;\r\n}\r\n\r\nexport const config: MixerXConfig = frozenRecord({ instances, networkConfigByNetId });\n"]}
|
package/dist/guards.d.ts
CHANGED
package/dist/guards.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isSupportedNetId = isSupportedNetId;
|
|
4
4
|
const types_js_1 = require("./types.js");
|
|
5
5
|
function isSupportedNetId(value) {
|
|
6
|
-
return types_js_1.SUPPORTED_NET_IDS.includes(value);
|
|
6
|
+
return Number.isSafeInteger(value) && types_js_1.SUPPORTED_NET_IDS.includes(value);
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=guards.js.map
|
package/dist/guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;AAEA,4CAEC;AAJD,yCAAkE;AAElE,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,OAAO,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAK,4BAAuC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACjG,CAAC","sourcesContent":["import { SUPPORTED_NET_IDS, type availableIds } from './types.js';\r\n\r\nexport function isSupportedNetId(value: number): value is availableIds {\r\n return Number.isSafeInteger(value) && (SUPPORTED_NET_IDS as readonly number[]).includes(value);\r\n}\r\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './types.js';
|
|
2
|
-
export { default as config, torn, miningV2, vesting, instances, voucher, rewardSwap, tornadoTrees, governance, governanceImpl, tornadoProxy, tornadoProxyLight, rewardVerifier, treeUpdateVerifier, withdrawVerifier, poseidonHasher2, poseidonHasher3, feeManager, tornadoStakingRewards, relayerRegistry, tornadoRouter, mixerXRouter, instanceRegistry, deployer, relayerRegistryProxy, aggregator, offchainOracle, governanceProxy, tornadoProxyMainnet, mixerxToken, wrappedStablecoin, networkConfigByNetId, getNetworkConfig, getInstancesForNetId, } from './config.js';
|
|
3
|
-
export { isSupportedNetId } from './guards.js';
|
|
4
2
|
export { assertValidConfigShape } from './assertions.js';
|
|
5
|
-
|
|
3
|
+
export { config, getInstancesForNetId, getNetworkConfig, instances, networkConfigByNetId, } from './config.js';
|
|
4
|
+
export { isSupportedNetId } from './guards.js';
|