@latticexyz/entrykit 2.2.22-ee974a22927644f43e02e8ba221f436c023824f2 → 2.2.22-f06e8f25dd013c43d943e71a401fa4aeefd399fa

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.
@@ -139,11 +139,8 @@ var debug2 = debug.extend("quarry");
139
139
 
140
140
  // src/quarry/transports/userOpExecutor.ts
141
141
  import { setBalance } from "viem/actions";
142
- function userOpExecutor({
143
- executor,
144
- fallbackEth
145
- }) {
146
- return (opts) => {
142
+ function userOpExecutor({ executor }) {
143
+ return () => {
147
144
  debug2("using a local user op executor", executor.account.address);
148
145
  if (executor.chain.id === 31337) {
149
146
  debug2("setting executor balance");
@@ -178,9 +175,7 @@ function userOpExecutor({
178
175
  if (method === "eth_estimateUserOperationGas") {
179
176
  return await estimateUserOperationGas(params);
180
177
  }
181
- debug2(`userOpExecutor: method "${method}" not overridden, falling back to fallback transport`);
182
- const { request: fallbackRequest } = fallbackEth(opts);
183
- return fallbackRequest({ method, params });
178
+ throw new Error(`userOpExecutor: method "${method}" not supported`);
184
179
  };
185
180
  return createTransport({
186
181
  key: "userOpExecutor",
@@ -192,41 +187,20 @@ function userOpExecutor({
192
187
  }
193
188
 
194
189
  // src/getBundlerTransport.ts
195
- import { wiresaw } from "@latticexyz/common/internal";
196
190
  function getBundlerTransport(chain) {
197
- const ethRpcUrl = chain.rpcUrls.default.http[0];
198
191
  const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
199
- const wiresawWebSocketUrl = chain.rpcUrls.wiresaw?.webSocket?.[0];
200
- if (wiresawWebSocketUrl) {
201
- return wiresaw({
202
- wiresaw: webSocket(wiresawWebSocketUrl),
203
- fallbackBundler: http(bundlerHttpUrl),
204
- fallbackEth: http(ethRpcUrl)
205
- });
206
- }
207
- const wiresawHttpUrl = chain.rpcUrls.wiresaw?.http[0];
208
- if (wiresawHttpUrl) {
209
- return wiresaw({
210
- wiresaw: http(wiresawHttpUrl),
211
- fallbackBundler: http(bundlerHttpUrl),
212
- fallbackEth: http(ethRpcUrl)
213
- });
214
- }
215
- if (bundlerHttpUrl) {
216
- return http(bundlerHttpUrl);
217
- }
218
- if (chain.id === 31337) {
219
- return userOpExecutor({
220
- executor: createClient({
221
- chain,
222
- transport: fallback([webSocket(), http()]),
223
- account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
224
- pollingInterval: 10
225
- }).extend(transactionQueue()),
226
- fallbackEth: http(ethRpcUrl)
227
- });
192
+ const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
193
+ executor: createClient({
194
+ chain,
195
+ transport: fallback([webSocket(), http()]),
196
+ account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
197
+ pollingInterval: 10
198
+ }).extend(transactionQueue())
199
+ }) : null;
200
+ if (!bundlerTransport) {
201
+ throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
228
202
  }
229
- throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
203
+ return bundlerTransport;
230
204
  }
231
205
 
232
206
  // src/EntryKitConfigProvider.tsx