@rhinestone/shared-configs 1.14.0 → 1.15.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/dist/configs/contracts.dev.json +190 -0
- package/dist/configs/contracts.json +190 -0
- package/dist/scripts/__tests__/hoistUniform.test.d.ts +1 -0
- package/dist/scripts/__tests__/hoistUniform.test.js +84 -0
- package/dist/scripts/generate.js +5 -2
- package/dist/scripts/hoistUniform.d.ts +30 -0
- package/dist/scripts/hoistUniform.js +62 -0
- package/dist/src/__tests__/chainFactsClient.test.js +46 -0
- package/dist/src/chainFactsClient.d.ts +26 -2
- package/dist/src/chainFactsClient.js +43 -1
- package/dist/src/generated/contracts.dev.js +35 -262
- package/dist/src/generated/contracts.js +35 -262
- package/dist/src/generated/packageVersion.d.ts +1 -1
- package/dist/src/generated/packageVersion.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"1": {
|
|
3
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
4
|
+
"acrossBridge": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
|
|
5
|
+
"spokepool": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
|
|
6
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
7
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
8
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
9
|
+
"oftProxy": "0xd6ac32d80975195aF535faE83c67EA1d36486321"
|
|
10
|
+
},
|
|
11
|
+
"10": {
|
|
12
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
13
|
+
"acrossBridge": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
|
|
14
|
+
"spokepool": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
|
|
15
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
16
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
17
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
18
|
+
"oftProxy": "0x5B64E414f4dEA97062D6B552852FFbAcaf6d462b"
|
|
19
|
+
},
|
|
20
|
+
"56": {
|
|
21
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
22
|
+
"acrossBridge": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
23
|
+
"spokepool": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
24
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
25
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
26
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
27
|
+
},
|
|
28
|
+
"100": {},
|
|
29
|
+
"130": {
|
|
30
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
31
|
+
"acrossBridge": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
32
|
+
"spokepool": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
33
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
34
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
35
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
36
|
+
"oftProxy": "0x0c9365ACEB4788F2f2D21823fbd0ff44542c6B54"
|
|
37
|
+
},
|
|
38
|
+
"137": {
|
|
39
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
40
|
+
"acrossBridge": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
|
|
41
|
+
"spokepool": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
|
|
42
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
43
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
44
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
45
|
+
"oftProxy": "0x81E23Ed7B30780dd7DFc1F1641D255906280934a"
|
|
46
|
+
},
|
|
47
|
+
"143": {
|
|
48
|
+
"acrossBridge": "0xd2ecb3afe598b746F8123CaE365a598DA831A449",
|
|
49
|
+
"spokepool": "0xd2ecb3afe598b746F8123CaE365a598DA831A449"
|
|
50
|
+
},
|
|
51
|
+
"146": {
|
|
52
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
53
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
54
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
55
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
56
|
+
},
|
|
57
|
+
"999": {
|
|
58
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
59
|
+
"acrossBridge": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04",
|
|
60
|
+
"spokepool": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04",
|
|
61
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
62
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
63
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
64
|
+
},
|
|
65
|
+
"1868": {
|
|
66
|
+
"acrossBridge": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
|
|
67
|
+
"spokepool": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96"
|
|
68
|
+
},
|
|
69
|
+
"4663": {
|
|
70
|
+
"acrossBridge": "0xD29C85F15DF544bA632C9E25829fd29d767d7978",
|
|
71
|
+
"spokepool": "0xD29C85F15DF544bA632C9E25829fd29d767d7978"
|
|
72
|
+
},
|
|
73
|
+
"8453": {
|
|
74
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
75
|
+
"acrossBridge": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
76
|
+
"spokepool": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
77
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
78
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
79
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
80
|
+
},
|
|
81
|
+
"9745": {
|
|
82
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
83
|
+
"acrossBridge": "0x50039fAEfebef707cFD94D6d462fE6D10B39207a",
|
|
84
|
+
"spokepool": "0x50039fAEfebef707cFD94D6d462fE6D10B39207a",
|
|
85
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
86
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
87
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
88
|
+
"oftProxy": "0xB01c27A13Ac8044ACB2315C3c9b877bc8C83ce27"
|
|
89
|
+
},
|
|
90
|
+
"9746": {
|
|
91
|
+
"ecoArbiter": "0x8A061029AE4c5Cf69b5368119B3b0C80B31F55fE",
|
|
92
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
93
|
+
"ecoHyperProver": "0xe2d2562779550Ef6C3C9D7D59E0FaC1851fDA178",
|
|
94
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
95
|
+
},
|
|
96
|
+
"42161": {
|
|
97
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
98
|
+
"acrossBridge": "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
|
|
99
|
+
"spokepool": "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
|
|
100
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
101
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
102
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
103
|
+
"oftProxy": "0x8886505Fc68b53B0D5156DbB68CFAdA878c89f89"
|
|
104
|
+
},
|
|
105
|
+
"43114": {
|
|
106
|
+
"acrossBridge": "0xFE9D541c92E4e90437C7152A00244886dE37a658",
|
|
107
|
+
"spokepool": "0xFE9D541c92E4e90437C7152A00244886dE37a658"
|
|
108
|
+
},
|
|
109
|
+
"57073": {
|
|
110
|
+
"ecoArbiter": "0x1BeBAfb3D05d84A5Bfd94800c88d1342f755d8AB",
|
|
111
|
+
"acrossBridge": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4",
|
|
112
|
+
"spokepool": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4",
|
|
113
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
114
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
115
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
116
|
+
"oftProxy": "0xF2b7be8804F89bf8382604cb6D292fb057Ec2280"
|
|
117
|
+
},
|
|
118
|
+
"84532": {
|
|
119
|
+
"ecoArbiter": "0x8A061029AE4c5Cf69b5368119B3b0C80B31F55fE",
|
|
120
|
+
"acrossBridge": "0x82B564983aE7274c86695917BBf8C99ECb6F0F8F",
|
|
121
|
+
"spokepool": "0x82B564983aE7274c86695917BBf8C99ECb6F0F8F",
|
|
122
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
123
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
124
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
125
|
+
},
|
|
126
|
+
"421614": {
|
|
127
|
+
"ecoArbiter": "0x8A061029AE4c5Cf69b5368119B3b0C80B31F55fE",
|
|
128
|
+
"acrossBridge": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75",
|
|
129
|
+
"spokepool": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75",
|
|
130
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
131
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
132
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
133
|
+
},
|
|
134
|
+
"747474": {},
|
|
135
|
+
"11155111": {
|
|
136
|
+
"ecoArbiter": "0x8A061029AE4c5Cf69b5368119B3b0C80B31F55fE",
|
|
137
|
+
"acrossBridge": "0x5ef6C01E11889d86803e0B23e3cB3F9E9d97B662",
|
|
138
|
+
"spokepool": "0x5ef6C01E11889d86803e0B23e3cB3F9E9d97B662",
|
|
139
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
140
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
141
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
142
|
+
},
|
|
143
|
+
"11155420": {
|
|
144
|
+
"ecoArbiter": "0x8A061029AE4c5Cf69b5368119B3b0C80B31F55fE",
|
|
145
|
+
"acrossBridge": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
146
|
+
"spokepool": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
147
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
148
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
149
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
150
|
+
},
|
|
151
|
+
"*": {
|
|
152
|
+
"addressBook": "0xb7Eed4f2c3c3EE7349f80414ffb04dA6c247924E",
|
|
153
|
+
"allocator": "0xC7732071e3a1be6cfCE6D13bb05699A31a457679",
|
|
154
|
+
"caller": "0xcBb2af2EAc15Fd261c542aBd65DE33eF653A7dc7",
|
|
155
|
+
"multiCaller": "0xcBb2af2EAc15Fd261c542aBd65DE33eF653A7dc7",
|
|
156
|
+
"emissary": "0x1c61d49eef44eF278D2fd8Ae7d2C6806A8Ac4263",
|
|
157
|
+
"emissaryImpl": "0xE183EA1693556b85E8243Ed60184feCc9B4Cff6f",
|
|
158
|
+
"intentExecutor": "0xbF9b5b917a83f8adaC17B0752846D41D8D7b7E17",
|
|
159
|
+
"intentExecutorImpl": "0x97ddB09859AC7a38C69A84cB7d22Cd01EE0efBB5",
|
|
160
|
+
"intentExecutorAdapter": "0xd244839c3f90deC5a21c03DAd5d1695Fcc991807",
|
|
161
|
+
"intentExecutorAdapterGasRefund": "0x1CF61dd99558088bc6d33464Fdc3A50158d96671",
|
|
162
|
+
"multicallAdapter": "0x2033BAf793ece4a38f0CBae47AF8435620E296c6",
|
|
163
|
+
"oftFeeAdapter": "0xBE6cB8e0aC7cd44c0E364DD9cFeD45Fa2E717426",
|
|
164
|
+
"multicallHandler": "0xcc57378369bbC7B5bFD2b2F3E8A9f733c16c5F63",
|
|
165
|
+
"singlecallAdapter": "0xa4fC159E93F3D3E08b67D1228D57d5769B3Bff92",
|
|
166
|
+
"ecoHandler": "0xcc57378369bbC7B5bFD2b2F3E8A9f733c16c5F63",
|
|
167
|
+
"paymaster": "0xf2d0A6572252931a685dd4a64db3198eBdC7a4b6",
|
|
168
|
+
"relayerPot": "0xDD6430ad62de02cF8d37Fc3Bc34c6855F34BCbE8",
|
|
169
|
+
"router": "0x8a525Dc484f893Ca64fef507746EBd5036eeC256",
|
|
170
|
+
"routerImpl": "0xb59E7Df2B636a66Bff03CA554407B920bB150109",
|
|
171
|
+
"safeRelayExecutor": "0x781388759EacB9892f60D77D9A99c9BE2F7F4ada",
|
|
172
|
+
"samechainArbiter": "0x8fA7720Eee299223f25De8DC03C68A28541dCD10",
|
|
173
|
+
"samechainAdapter": "0xca9f2c72e9DDa98a5286607f8693744396851C34",
|
|
174
|
+
"smartSessionEmissary": "0x60731dE80D78548875f8A67C4FeC2a8660194e0c",
|
|
175
|
+
"smartSessionLens": "0xE1B629162B08b8Baefa2B30Ee34D6cAB63580320",
|
|
176
|
+
"swapper": "0x8206052a213AA7cafB18ec7898e8D1D421C02100",
|
|
177
|
+
"acrossHandler": "0xF6fC9aa0DA8621f5596024f34E277032E5A80AE8",
|
|
178
|
+
"across7579Arbiter": "0x1b19973F7a29E950ad4FaF8872745B6378005517",
|
|
179
|
+
"acrossMulticallArbiter": "0x8343FBBA0526deC1c952A098057021027648bcf9",
|
|
180
|
+
"relayArbiter": "0xf50962E8f230D83c67002597992ce0f9EBDD49c0",
|
|
181
|
+
"relayDepository": "0x4cd00e387622c35bddb9b4c962c136462338bc31",
|
|
182
|
+
"relayRouter": "0xb92fe925dc43a0ecde6c8b1a2709c170ec4fff4f",
|
|
183
|
+
"compact": "0x00000000000000171ede64904551eeDF3C6C9788",
|
|
184
|
+
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
185
|
+
"feeCollector": "0xfeebabe17996b3346cf80f04a1f072102a90cf09",
|
|
186
|
+
"appFeeCollector": "0xc9dc20145135368d5184dB9Ee6598c885a7f03e1",
|
|
187
|
+
"appFeePot": "0xb83E1d9C267e1f99529f8cE4CE20899f1FCAdBCc",
|
|
188
|
+
"tokenTransferProxy": "0x21416a06e81fe115a5c8bf554b2b01383bd9b9f3"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"1": {
|
|
3
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
4
|
+
"acrossBridge": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
|
|
5
|
+
"spokepool": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
|
|
6
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
7
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
8
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
9
|
+
"oftProxy": "0x7cbcf2E2B6e29e539326bf5730353D6106D6DA0a"
|
|
10
|
+
},
|
|
11
|
+
"10": {
|
|
12
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
13
|
+
"acrossBridge": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
|
|
14
|
+
"spokepool": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
|
|
15
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
16
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
17
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
18
|
+
"oftProxy": "0x4a16B761367f8545cbF0dcFb90c6a190D53d5A4B"
|
|
19
|
+
},
|
|
20
|
+
"56": {
|
|
21
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
22
|
+
"acrossBridge": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
23
|
+
"spokepool": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
24
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
25
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
26
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
27
|
+
},
|
|
28
|
+
"100": {},
|
|
29
|
+
"130": {
|
|
30
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
31
|
+
"acrossBridge": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
32
|
+
"spokepool": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
33
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
34
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
35
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
36
|
+
"oftProxy": "0xB3bAE89d1F4FbDD56708c3aDc92d54F3e5B2C47e"
|
|
37
|
+
},
|
|
38
|
+
"137": {
|
|
39
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
40
|
+
"acrossBridge": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
|
|
41
|
+
"spokepool": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
|
|
42
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
43
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
44
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
45
|
+
"oftProxy": "0xcaee1Bf3C17B128985C808ed4055Fd83C32EcC71"
|
|
46
|
+
},
|
|
47
|
+
"143": {
|
|
48
|
+
"acrossBridge": "0xd2ecb3afe598b746F8123CaE365a598DA831A449",
|
|
49
|
+
"spokepool": "0xd2ecb3afe598b746F8123CaE365a598DA831A449"
|
|
50
|
+
},
|
|
51
|
+
"146": {
|
|
52
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
53
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
54
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
55
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
56
|
+
},
|
|
57
|
+
"999": {
|
|
58
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
59
|
+
"acrossBridge": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04",
|
|
60
|
+
"spokepool": "0x35E63eA3eb0fb7A3bc543C71FB66412e1F6B0E04",
|
|
61
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
62
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
63
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
64
|
+
},
|
|
65
|
+
"1868": {
|
|
66
|
+
"acrossBridge": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96",
|
|
67
|
+
"spokepool": "0x3baD7AD0728f9917d1Bf08af5782dCbD516cDd96"
|
|
68
|
+
},
|
|
69
|
+
"4663": {
|
|
70
|
+
"acrossBridge": "0xD29C85F15DF544bA632C9E25829fd29d767d7978",
|
|
71
|
+
"spokepool": "0xD29C85F15DF544bA632C9E25829fd29d767d7978"
|
|
72
|
+
},
|
|
73
|
+
"8453": {
|
|
74
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
75
|
+
"acrossBridge": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
76
|
+
"spokepool": "0x09aea4b2242abC8bb4BB78D537A67a245A7bEC64",
|
|
77
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
78
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
79
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9"
|
|
80
|
+
},
|
|
81
|
+
"9745": {
|
|
82
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
83
|
+
"acrossBridge": "0x50039fAEfebef707cFD94D6d462fE6D10B39207a",
|
|
84
|
+
"spokepool": "0x50039fAEfebef707cFD94D6d462fE6D10B39207a",
|
|
85
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
86
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
87
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
88
|
+
"oftProxy": "0x2C8d441698332996C754402c35273b6566C8701d"
|
|
89
|
+
},
|
|
90
|
+
"9746": {
|
|
91
|
+
"ecoArbiter": "0xA212A6ACCC8db0e4cdf4394D0A851c70Fc27A8F0",
|
|
92
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
93
|
+
"ecoHyperProver": "0xe2d2562779550Ef6C3C9D7D59E0FaC1851fDA178",
|
|
94
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
95
|
+
},
|
|
96
|
+
"42161": {
|
|
97
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
98
|
+
"acrossBridge": "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
|
|
99
|
+
"spokepool": "0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A",
|
|
100
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
101
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
102
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
103
|
+
"oftProxy": "0x4a263e771D73489e15a62e56FD49Dee6A26885A1"
|
|
104
|
+
},
|
|
105
|
+
"43114": {
|
|
106
|
+
"acrossBridge": "0xFE9D541c92E4e90437C7152A00244886dE37a658",
|
|
107
|
+
"spokepool": "0xFE9D541c92E4e90437C7152A00244886dE37a658"
|
|
108
|
+
},
|
|
109
|
+
"57073": {
|
|
110
|
+
"ecoArbiter": "0x2e7627CCfAe4eDb336eEb5a70f08415B0F1a2b8C",
|
|
111
|
+
"acrossBridge": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4",
|
|
112
|
+
"spokepool": "0xeF684C38F94F48775959ECf2012D7E864ffb9dd4",
|
|
113
|
+
"ecoPortal": "0xEC000064576f9C95a8623Bc0eff3db6d296ea6df",
|
|
114
|
+
"ecoHyperProver": "0xeC0008acc34d3D0CAa6758Ce788091e473812e28",
|
|
115
|
+
"ecoVaultAddress": "0x9f70b0c839fe2D7190A09Ae87ED658b6D1CbA4F9",
|
|
116
|
+
"oftProxy": "0x357e9f70e93A106EC1E3E86E514147ee47b20694"
|
|
117
|
+
},
|
|
118
|
+
"84532": {
|
|
119
|
+
"ecoArbiter": "0xA212A6ACCC8db0e4cdf4394D0A851c70Fc27A8F0",
|
|
120
|
+
"acrossBridge": "0x82B564983aE7274c86695917BBf8C99ECb6F0F8F",
|
|
121
|
+
"spokepool": "0x82B564983aE7274c86695917BBf8C99ECb6F0F8F",
|
|
122
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
123
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
124
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
125
|
+
},
|
|
126
|
+
"421614": {
|
|
127
|
+
"ecoArbiter": "0xA212A6ACCC8db0e4cdf4394D0A851c70Fc27A8F0",
|
|
128
|
+
"acrossBridge": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75",
|
|
129
|
+
"spokepool": "0x7E63A5f1a8F0B4d0934B2f2327DAED3F6bb2ee75",
|
|
130
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
131
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
132
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
133
|
+
},
|
|
134
|
+
"747474": {},
|
|
135
|
+
"11155111": {
|
|
136
|
+
"ecoArbiter": "0xA212A6ACCC8db0e4cdf4394D0A851c70Fc27A8F0",
|
|
137
|
+
"acrossBridge": "0x5ef6C01E11889d86803e0B23e3cB3F9E9d97B662",
|
|
138
|
+
"spokepool": "0x5ef6C01E11889d86803e0B23e3cB3F9E9d97B662",
|
|
139
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
140
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
141
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
142
|
+
},
|
|
143
|
+
"11155420": {
|
|
144
|
+
"ecoArbiter": "0xA212A6ACCC8db0e4cdf4394D0A851c70Fc27A8F0",
|
|
145
|
+
"acrossBridge": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
146
|
+
"spokepool": "0x4e8E101924eDE233C13e2D8622DC8aED2872d505",
|
|
147
|
+
"ecoPortal": "0x06EFdb68dbF245ECb49E3aE10Cd0f893B674443c",
|
|
148
|
+
"ecoHyperProver": "0xad707D5756B534d55Fc2e96F61a95Fc03E4C0A0e",
|
|
149
|
+
"ecoVaultAddress": "0xfc6695ed50c06ac1102371168c33b3cfab7c884b"
|
|
150
|
+
},
|
|
151
|
+
"*": {
|
|
152
|
+
"addressBook": "0x4b9e821f89F0952efe6A60719dcA953eCF980D4D",
|
|
153
|
+
"allocator": "0x22376d253286450b3622270345Cccc564C2a5C9B",
|
|
154
|
+
"caller": "0xFdaD21fFcd9f08D7feaA7A76D8133565502Ec350",
|
|
155
|
+
"multiCaller": "0xFdaD21fFcd9f08D7feaA7A76D8133565502Ec350",
|
|
156
|
+
"emissary": "0x00000000000191E0ffEca3835B693Aa1DDeE8d40",
|
|
157
|
+
"emissaryImpl": "0x4A150C45657E4C33879a29aA133277f32757Ec4e",
|
|
158
|
+
"intentExecutor": "0x00000000005aD9ce1f5035FD62CA96CEf16AdAAF",
|
|
159
|
+
"intentExecutorImpl": "0x194DE341d4791e9b8922eE1bC018DFd1fD1b115A",
|
|
160
|
+
"intentExecutorAdapter": "0xa5DAC04a6cCF0eb19cE091b6B400Fc4FCD13Da1e",
|
|
161
|
+
"intentExecutorAdapterGasRefund": "0xA36E04937BE2C53fA97396b3D254d6cCE6680dc8",
|
|
162
|
+
"multicallAdapter": "0x4cf546ed0F6a4EC4155449686257f698D5044B1F",
|
|
163
|
+
"oftFeeAdapter": "0xf97FF38ad127b32233aF500a40eCc6cd202E16d7",
|
|
164
|
+
"multicallHandler": "0x200FAb4dEA0388FF9056B3B61f82F981B1de0244",
|
|
165
|
+
"singlecallAdapter": "0xAc373dCFA558C78853D0C09A019e44b2f7410bfE",
|
|
166
|
+
"ecoHandler": "0x200FAb4dEA0388FF9056B3B61f82F981B1de0244",
|
|
167
|
+
"paymaster": "0x1d7df6Ddc7328Ac827EB4D7f171C60AFB7f9A599",
|
|
168
|
+
"relayerPot": "0x000000000050a4BbBc2e57804395A0C209353E1c",
|
|
169
|
+
"router": "0x000000000004598D17aaD017bF0734a364c5588b",
|
|
170
|
+
"routerImpl": "0xB8722E9F60c3d021cb84d150E85cBc52C3Bfd4b9",
|
|
171
|
+
"safeRelayExecutor": "0x781388759EacB9892f60D77D9A99c9BE2F7F4ada",
|
|
172
|
+
"samechainArbiter": "0x000000000006e2569CaF8Ff021810790e0A0D740",
|
|
173
|
+
"samechainAdapter": "0x63ff8Da121e51BC4f4f67df9c37eD2587A119Aeb",
|
|
174
|
+
"smartSessionEmissary": "0xad568B3F825A8d5FFc06DD3253526B64D810Ae89",
|
|
175
|
+
"smartSessionLens": "0xE1B629162B08b8Baefa2B30Ee34D6cAB63580320",
|
|
176
|
+
"swapper": "0x40CE38e0cbB8ec54a601256E4FacfED5679bccD0",
|
|
177
|
+
"acrossHandler": "0x505549590d0F107C65a61FD9f71f8dd3f92C393E",
|
|
178
|
+
"across7579Arbiter": "0x28a4D41776968c1201A807ec51fFB405362B8882",
|
|
179
|
+
"acrossMulticallArbiter": "0xA162fabb9a0EeF2736485A587aAAB3d015e14224",
|
|
180
|
+
"relayArbiter": "0xad549C787B8C00B4E880e327c3Ad3965275cEdfd",
|
|
181
|
+
"relayDepository": "0x4cd00e387622c35bddb9b4c962c136462338bc31",
|
|
182
|
+
"relayRouter": "0xb92fe925dc43a0ecde6c8b1a2709c170ec4fff4f",
|
|
183
|
+
"compact": "0x00000000000000171ede64904551eeDF3C6C9788",
|
|
184
|
+
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
185
|
+
"feeCollector": "0xfeebabe17996b3346cf80f04a1f072102a90cf09",
|
|
186
|
+
"appFeeCollector": "0xdcc703c0E500B653Ca82273B7BFAd8045D85a470",
|
|
187
|
+
"appFeePot": "0x134760a4cC835c4031d772B10D639004443D2A1c",
|
|
188
|
+
"tokenTransferProxy": "0x5afce415b4370e5efd8b9be784d21c331beab965"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const bun_test_1 = require("bun:test");
|
|
4
|
+
const hoistUniform_1 = require("../hoistUniform");
|
|
5
|
+
const resolve = (contracts, chainId) => ({
|
|
6
|
+
...(contracts["*"] ?? {}),
|
|
7
|
+
...(contracts[chainId] ?? {}),
|
|
8
|
+
});
|
|
9
|
+
(0, bun_test_1.describe)("hoistUniformAddresses", () => {
|
|
10
|
+
(0, bun_test_1.test)("hoists an address that is identical on every chain carrying it", () => {
|
|
11
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
12
|
+
"1": { permit2: "0xAA", spokepool: "0x11" },
|
|
13
|
+
"10": { permit2: "0xAA", spokepool: "0x22" },
|
|
14
|
+
});
|
|
15
|
+
(0, bun_test_1.expect)(out["*"].permit2).toBe("0xAA");
|
|
16
|
+
(0, bun_test_1.expect)(out["1"].permit2).toBeUndefined();
|
|
17
|
+
(0, bun_test_1.expect)(out["10"].permit2).toBeUndefined();
|
|
18
|
+
});
|
|
19
|
+
(0, bun_test_1.test)("leaves an address that differs between chains", () => {
|
|
20
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
21
|
+
"1": { spokepool: "0x11" },
|
|
22
|
+
"10": { spokepool: "0x22" },
|
|
23
|
+
});
|
|
24
|
+
// No wildcard is created when there is nothing to hoist, so read through it.
|
|
25
|
+
(0, bun_test_1.expect)(out["*"]?.spokepool).toBeUndefined();
|
|
26
|
+
(0, bun_test_1.expect)(out["1"].spokepool).toBe("0x11");
|
|
27
|
+
(0, bun_test_1.expect)(out["10"].spokepool).toBe("0x22");
|
|
28
|
+
});
|
|
29
|
+
(0, bun_test_1.test)("does not hoist a key seen on only one chain", () => {
|
|
30
|
+
// One chain is no evidence of uniformity — oftProxy looks uniform on a
|
|
31
|
+
// single-chain sample and has a different address on all seven.
|
|
32
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
33
|
+
"1": { oftProxy: "0x11" },
|
|
34
|
+
"10": { permit2: "0xAA" },
|
|
35
|
+
"56": { permit2: "0xAA" },
|
|
36
|
+
});
|
|
37
|
+
(0, bun_test_1.expect)(out["*"].oftProxy).toBeUndefined();
|
|
38
|
+
(0, bun_test_1.expect)(out["1"].oftProxy).toBe("0x11");
|
|
39
|
+
(0, bun_test_1.expect)(out["*"].permit2).toBe("0xAA");
|
|
40
|
+
});
|
|
41
|
+
(0, bun_test_1.test)("resolution is unchanged for every chain that already had the key", () => {
|
|
42
|
+
const before = {
|
|
43
|
+
"*": { router: "0xRR" },
|
|
44
|
+
"1": { permit2: "0xAA", spokepool: "0x11" },
|
|
45
|
+
"10": { permit2: "0xAA", spokepool: "0x22" },
|
|
46
|
+
};
|
|
47
|
+
const after = (0, hoistUniform_1.hoistUniformAddresses)(before);
|
|
48
|
+
for (const chain of ["1", "10"]) {
|
|
49
|
+
(0, bun_test_1.expect)(resolve(after, chain)).toEqual(resolve(before, chain));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
(0, bun_test_1.test)("a chain the map has never seen resolves the uniform addresses", () => {
|
|
53
|
+
// The reason this exists: chains arrive at runtime via facts while this map
|
|
54
|
+
// is baked into the image, so an unknown chain gets the bare wildcard.
|
|
55
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
56
|
+
"1": { permit2: "0xAA" },
|
|
57
|
+
"10": { permit2: "0xAA" },
|
|
58
|
+
});
|
|
59
|
+
(0, bun_test_1.expect)(out["*"].permit2).toBe("0xAA");
|
|
60
|
+
});
|
|
61
|
+
(0, bun_test_1.test)("preserves pre-existing wildcard entries", () => {
|
|
62
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
63
|
+
"*": { router: "0xRR" },
|
|
64
|
+
"1": { permit2: "0xAA" },
|
|
65
|
+
"10": { permit2: "0xAA" },
|
|
66
|
+
});
|
|
67
|
+
(0, bun_test_1.expect)(out["*"].router).toBe("0xRR");
|
|
68
|
+
(0, bun_test_1.expect)(out["*"].permit2).toBe("0xAA");
|
|
69
|
+
});
|
|
70
|
+
(0, bun_test_1.test)("is a no-op when nothing is uniform", () => {
|
|
71
|
+
const input = { "1": { spokepool: "0x11" } };
|
|
72
|
+
(0, bun_test_1.expect)((0, hoistUniform_1.hoistUniformAddresses)(input)).toEqual(input);
|
|
73
|
+
});
|
|
74
|
+
(0, bun_test_1.test)("compares addresses case-insensitively", () => {
|
|
75
|
+
const out = (0, hoistUniform_1.hoistUniformAddresses)({
|
|
76
|
+
"1": { permit2: "0xAA" },
|
|
77
|
+
"10": { permit2: "0xaa" },
|
|
78
|
+
});
|
|
79
|
+
// Same address, different casing: uniform, so it hoists and neither chain
|
|
80
|
+
// keeps a redundant entry.
|
|
81
|
+
(0, bun_test_1.expect)(out["*"].permit2).toBeDefined();
|
|
82
|
+
(0, bun_test_1.expect)(Object.keys(out["1"])).not.toContain("permit2");
|
|
83
|
+
});
|
|
84
|
+
});
|
package/dist/scripts/generate.js
CHANGED
|
@@ -9,6 +9,7 @@ const promises_1 = require("node:fs/promises");
|
|
|
9
9
|
const node_os_1 = __importDefault(require("node:os"));
|
|
10
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const validation_1 = require("./validation");
|
|
12
|
+
const hoistUniform_1 = require("./hoistUniform");
|
|
12
13
|
function renderNetworkEnum(name, entries) {
|
|
13
14
|
const lines = entries.map((entry) => entry.viemChain
|
|
14
15
|
? ` ${entry.enumKey} = ${entry.viemChain}.id,`
|
|
@@ -473,9 +474,11 @@ async function generate() {
|
|
|
473
474
|
throw new Error("ABI signatures are empty. yeet-orchestrator-file likely failed silently.");
|
|
474
475
|
}
|
|
475
476
|
const overrides = loadContractOverrides(sharedConfigsRoot);
|
|
476
|
-
const prodContractsMerged = mergeContracts(prodContracts, overrides.prod ?? {});
|
|
477
477
|
const devOverrides = overrides.dev ?? overrides.staging ?? {};
|
|
478
|
-
|
|
478
|
+
// Hoist after merging overrides, so an override that makes an address uniform
|
|
479
|
+
// (or breaks its uniformity) is reflected in what lands in the wildcard.
|
|
480
|
+
const prodContractsMerged = (0, hoistUniform_1.hoistUniformAddresses)(mergeContracts(prodContracts, overrides.prod ?? {}));
|
|
481
|
+
const stagingContractsMerged = (0, hoistUniform_1.hoistUniformAddresses)(mergeContracts(stagingContracts, devOverrides));
|
|
479
482
|
await (0, promises_1.writeFile)(node_path_1.default.join(generatedDir, "contracts.ts"), `${renderContracts(prodContractsMerged)}\n`);
|
|
480
483
|
await (0, promises_1.writeFile)(node_path_1.default.join(configsDir, "contracts.json"), `${JSON.stringify(prodContractsMerged, null, 2)}\n`);
|
|
481
484
|
await (0, promises_1.writeFile)(node_path_1.default.join(generatedDir, "contracts.dev.ts"), `${renderContracts(stagingContractsMerged)}\n`);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type RawContracts = Record<string, Record<string, string>>;
|
|
2
|
+
/**
|
|
3
|
+
* Hoist every address that is identical on all chains carrying it into the `*`
|
|
4
|
+
* wildcard, leaving each chain with only what genuinely differs there.
|
|
5
|
+
*
|
|
6
|
+
* Consumers resolve a chain as `{ ...wildcard, ...chainSpecific }`, so this
|
|
7
|
+
* changes nothing for a chain that already had the key. What it changes is the
|
|
8
|
+
* chain the map has never heard of: chains now arrive at runtime in the facts
|
|
9
|
+
* artifact while this map is baked into the consumer's image, so a new chain
|
|
10
|
+
* falls back to the bare wildcard and every address missing from it resolves to
|
|
11
|
+
* `undefined`. That is not theoretical — it is why the first quote to Ink 500'd
|
|
12
|
+
* (RHI-5703): `permit2` was absent from the wildcard, so a `spender: undefined`
|
|
13
|
+
* reached viem, which threw inside a `catch` that then discarded the chain.
|
|
14
|
+
*
|
|
15
|
+
* Hoisted only with evidence: at least two chains carrying the key, and exactly
|
|
16
|
+
* one distinct address between them. One chain proves nothing about uniformity,
|
|
17
|
+
* and a key whose value varies is genuinely per-chain (`spokepool` has 16
|
|
18
|
+
* distinct addresses across 18 chains, `oftProxy` 7 across 7).
|
|
19
|
+
*
|
|
20
|
+
* Keys that split by *network* rather than by chain are deliberately left
|
|
21
|
+
* per-chain — the eco family is one mainnet address and one testnet address.
|
|
22
|
+
* A single wildcard value would hand a new testnet the mainnet portal, and a
|
|
23
|
+
* confidently wrong address is worse than a missing one.
|
|
24
|
+
*
|
|
25
|
+
* Note this widens resolution: a chain that never had `acrossHandler` now
|
|
26
|
+
* resolves one. Capability is gated by `settlementLayers` in the registry, not
|
|
27
|
+
* by the presence of a key here, so that is safe — but it does mean this file
|
|
28
|
+
* stops being a record of what is deployed where.
|
|
29
|
+
*/
|
|
30
|
+
export declare const hoistUniformAddresses: (contracts: RawContracts) => RawContracts;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hoistUniformAddresses = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Hoist every address that is identical on all chains carrying it into the `*`
|
|
6
|
+
* wildcard, leaving each chain with only what genuinely differs there.
|
|
7
|
+
*
|
|
8
|
+
* Consumers resolve a chain as `{ ...wildcard, ...chainSpecific }`, so this
|
|
9
|
+
* changes nothing for a chain that already had the key. What it changes is the
|
|
10
|
+
* chain the map has never heard of: chains now arrive at runtime in the facts
|
|
11
|
+
* artifact while this map is baked into the consumer's image, so a new chain
|
|
12
|
+
* falls back to the bare wildcard and every address missing from it resolves to
|
|
13
|
+
* `undefined`. That is not theoretical — it is why the first quote to Ink 500'd
|
|
14
|
+
* (RHI-5703): `permit2` was absent from the wildcard, so a `spender: undefined`
|
|
15
|
+
* reached viem, which threw inside a `catch` that then discarded the chain.
|
|
16
|
+
*
|
|
17
|
+
* Hoisted only with evidence: at least two chains carrying the key, and exactly
|
|
18
|
+
* one distinct address between them. One chain proves nothing about uniformity,
|
|
19
|
+
* and a key whose value varies is genuinely per-chain (`spokepool` has 16
|
|
20
|
+
* distinct addresses across 18 chains, `oftProxy` 7 across 7).
|
|
21
|
+
*
|
|
22
|
+
* Keys that split by *network* rather than by chain are deliberately left
|
|
23
|
+
* per-chain — the eco family is one mainnet address and one testnet address.
|
|
24
|
+
* A single wildcard value would hand a new testnet the mainnet portal, and a
|
|
25
|
+
* confidently wrong address is worse than a missing one.
|
|
26
|
+
*
|
|
27
|
+
* Note this widens resolution: a chain that never had `acrossHandler` now
|
|
28
|
+
* resolves one. Capability is gated by `settlementLayers` in the registry, not
|
|
29
|
+
* by the presence of a key here, so that is safe — but it does mean this file
|
|
30
|
+
* stops being a record of what is deployed where.
|
|
31
|
+
*/
|
|
32
|
+
const hoistUniformAddresses = (contracts) => {
|
|
33
|
+
const perChain = Object.entries(contracts).filter(([id]) => id !== "*");
|
|
34
|
+
const addressesByKey = new Map();
|
|
35
|
+
for (const [, entries] of perChain) {
|
|
36
|
+
for (const [key, address] of Object.entries(entries)) {
|
|
37
|
+
const seen = addressesByKey.get(key) ?? new Set();
|
|
38
|
+
seen.add(address.toLowerCase());
|
|
39
|
+
addressesByKey.set(key, seen);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const chainsCarrying = (key) => perChain.filter(([, entries]) => key in entries).length;
|
|
43
|
+
const uniform = [...addressesByKey.entries()]
|
|
44
|
+
.filter(([key, addresses]) => addresses.size === 1 && chainsCarrying(key) > 1)
|
|
45
|
+
.map(([key]) => key);
|
|
46
|
+
if (uniform.length === 0) {
|
|
47
|
+
return contracts;
|
|
48
|
+
}
|
|
49
|
+
const wildcard = { ...(contracts["*"] ?? {}) };
|
|
50
|
+
for (const key of uniform) {
|
|
51
|
+
const source = perChain.find(([, entries]) => key in entries);
|
|
52
|
+
if (source) {
|
|
53
|
+
wildcard[key] = source[1][key];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const hoisted = { "*": wildcard };
|
|
57
|
+
for (const [chainId, entries] of perChain) {
|
|
58
|
+
hoisted[chainId] = Object.fromEntries(Object.entries(entries).filter(([key, address]) => !(key in wildcard) || wildcard[key] !== address));
|
|
59
|
+
}
|
|
60
|
+
return hoisted;
|
|
61
|
+
};
|
|
62
|
+
exports.hoistUniformAddresses = hoistUniformAddresses;
|
|
@@ -467,4 +467,50 @@ function clientWith(extra = {}) {
|
|
|
467
467
|
(0, bun_test_1.expect)(client.getSnapshot().source).toBe("bundled");
|
|
468
468
|
});
|
|
469
469
|
});
|
|
470
|
+
(0, bun_test_1.describe)("contracts", () => {
|
|
471
|
+
const CONTRACTS = {
|
|
472
|
+
prod: { "*": { permit2: "0xPP" }, "1": { spokepool: "0x11" } },
|
|
473
|
+
dev: { "*": { permit2: "0xPP" }, "1": { spokepool: "0xDD" } },
|
|
474
|
+
};
|
|
475
|
+
(0, bun_test_1.it)("installs contracts carried by the artifact", async () => {
|
|
476
|
+
serveSigned({ ...payload(), contracts: CONTRACTS });
|
|
477
|
+
const client = clientWith();
|
|
478
|
+
(0, bun_test_1.expect)(await client.refresh()).toBe(true);
|
|
479
|
+
(0, bun_test_1.expect)(client.getContracts("prod")["1"].spokepool).toBe("0x11");
|
|
480
|
+
(0, bun_test_1.expect)(client.getContracts("dev")["1"].spokepool).toBe("0xDD");
|
|
481
|
+
});
|
|
482
|
+
// Every artifact published before contracts existed is this shape, and the
|
|
483
|
+
// consumer has to stay exactly where it was rather than lose its addresses.
|
|
484
|
+
(0, bun_test_1.it)("keeps the bundled contracts when the artifact omits them", async () => {
|
|
485
|
+
serveSigned(payload());
|
|
486
|
+
const client = clientWith();
|
|
487
|
+
(0, bun_test_1.expect)(await client.refresh()).toBe(true);
|
|
488
|
+
(0, bun_test_1.expect)(client.getSnapshot().source).toBe("remote");
|
|
489
|
+
(0, bun_test_1.expect)(client.getContracts("prod")).toEqual(clientWith().getSnapshot().contracts.prod);
|
|
490
|
+
});
|
|
491
|
+
// A bad contracts block must not cost the consumer a chain update it would
|
|
492
|
+
// otherwise have taken — chains install, contracts fall back, error reported.
|
|
493
|
+
bun_test_1.it.each([
|
|
494
|
+
["a missing half", { prod: CONTRACTS.prod }],
|
|
495
|
+
["a non-object entry", { prod: { "1": "nope" }, dev: CONTRACTS.dev }],
|
|
496
|
+
["a non-string address", { prod: { "1": { permit2: 5 } }, dev: CONTRACTS.dev }],
|
|
497
|
+
["an unusable chain key", { prod: { "01": { permit2: "0xPP" } }, dev: CONTRACTS.dev }],
|
|
498
|
+
])("rejects %s without failing the read", async (_label, contracts) => {
|
|
499
|
+
const phases = [];
|
|
500
|
+
serveSigned({ ...payload(), contracts });
|
|
501
|
+
const client = clientWith({
|
|
502
|
+
onError: (_e, phase) => phases.push(phase),
|
|
503
|
+
});
|
|
504
|
+
(0, bun_test_1.expect)(await client.refresh()).toBe(true);
|
|
505
|
+
(0, bun_test_1.expect)(client.getSnapshot().source).toBe("remote");
|
|
506
|
+
(0, bun_test_1.expect)(phases).toContain("parse");
|
|
507
|
+
(0, bun_test_1.expect)(client.getContracts("prod")).toEqual(clientWith().getSnapshot().contracts.prod);
|
|
508
|
+
});
|
|
509
|
+
(0, bun_test_1.it)("accepts the wildcard key alongside chain ids", async () => {
|
|
510
|
+
serveSigned({ ...payload(), contracts: CONTRACTS });
|
|
511
|
+
const client = clientWith();
|
|
512
|
+
(0, bun_test_1.expect)(await client.refresh()).toBe(true);
|
|
513
|
+
(0, bun_test_1.expect)(client.getContracts("prod")["*"].permit2).toBe("0xPP");
|
|
514
|
+
});
|
|
515
|
+
});
|
|
470
516
|
});
|