@latticexyz/entrykit 2.2.22-c6d50216477653deec25be867619a65bff768f4f → 2.2.22-d2c77c206d94a00082a25939b786df04d8249fcb
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.
|
@@ -189,40 +189,20 @@ function userOpExecutor({ executor }) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
// src/getBundlerTransport.ts
|
|
192
|
-
import { wiresaw } from "@latticexyz/common/internal";
|
|
193
192
|
function getBundlerTransport(chain) {
|
|
194
|
-
const ethRpcUrl = chain.rpcUrls.default.http[0];
|
|
195
193
|
const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return wiresaw({
|
|
207
|
-
wiresaw: http(wiresawHttpUrl),
|
|
208
|
-
fallbackBundler: http(bundlerHttpUrl),
|
|
209
|
-
fallbackEth: http(ethRpcUrl)
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
if (bundlerHttpUrl) {
|
|
213
|
-
return http(bundlerHttpUrl);
|
|
214
|
-
}
|
|
215
|
-
if (chain.id === 31337) {
|
|
216
|
-
return userOpExecutor({
|
|
217
|
-
executor: createClient({
|
|
218
|
-
chain,
|
|
219
|
-
transport: fallback([webSocket(), http()]),
|
|
220
|
-
account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
|
|
221
|
-
pollingInterval: 10
|
|
222
|
-
}).extend(transactionQueue())
|
|
223
|
-
});
|
|
194
|
+
const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
|
|
195
|
+
executor: createClient({
|
|
196
|
+
chain,
|
|
197
|
+
transport: fallback([webSocket(), http()]),
|
|
198
|
+
account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
|
|
199
|
+
pollingInterval: 10
|
|
200
|
+
}).extend(transactionQueue())
|
|
201
|
+
}) : null;
|
|
202
|
+
if (!bundlerTransport) {
|
|
203
|
+
throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
|
|
224
204
|
}
|
|
225
|
-
|
|
205
|
+
return bundlerTransport;
|
|
226
206
|
}
|
|
227
207
|
|
|
228
208
|
// src/EntryKitConfigProvider.tsx
|