Skip to content

Commit 9d8c6b6

Browse files
feat: use Morpho RPC for TAC (#78)
1 parent 66a1336 commit 9d8c6b6

File tree

4 files changed

+51
-19
lines changed

4 files changed

+51
-19
lines changed

apps/fallback/src/lib/wagmi-config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ const httpConfig: HttpTransportConfig = {
3636
timeout: 30_000,
3737
};
3838

39-
function createFallbackTransport(rpcs: { url: string; batch: HttpTransportConfig["batch"] }[]) {
39+
function createFallbackTransport(rpcs: ({ url: string } & HttpTransportConfig)[]) {
4040
return fallback(
4141
[
42-
...rpcs.map((rpc) => http(rpc.url, { ...httpConfig, batch: rpc.batch })),
42+
...rpcs.map((rpc) => http(rpc.url, { ...httpConfig, ...(({ url, ...rest }) => rest)(rpc) })),
4343
unstable_connector(injected, { key: "injected", name: "Injected", retryCount: 0 }),
4444
],
4545
{ retryCount: 6, retryDelay: 100 },
@@ -150,9 +150,14 @@ const transports: Record<(typeof chains)[number]["id"], Transport> = {
150150
[customChains.katana.id]: createFallbackTransport(
151151
customChains.katana.rpcUrls.default.http.map((url) => ({ url, batch: false })),
152152
),
153-
[customChains.tac.id]: createFallbackTransport(
154-
customChains.tac.rpcUrls.default.http.map((url) => ({ url, batch: false })),
155-
),
153+
[customChains.tac.id]: createFallbackTransport([
154+
{
155+
url: `https://v1-indexer.marble.live/rpc/${customChains.tac.id}`,
156+
batch: false,
157+
methods: { include: ["eth_getLogs"] },
158+
},
159+
...customChains.tac.rpcUrls.default.http.map((url) => ({ url, batch: false })),
160+
]),
156161
// [customChains.basecamp.id]: createFallbackTransport(
157162
// customChains.basecamp.rpcUrls.default.http.map((url) => ({ url, batch: false })),
158163
// ),

0 commit comments

Comments
 (0)