Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

Commit 559e84f

Browse files
authored
chore(fallback): migrate to fallback rpc endpoint for log data (#124)
* chore: migrate to fallback rpc endpoint for log data * chore: update URL * docs: describe api whitelisting * docs: remove comment * chore: update function for stable
1 parent 84a26e8 commit 559e84f

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

apps/fallback/src/app/dashboard/borrow-subpage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export function BorrowSubPage() {
6868
address: morpho?.address,
6969
fromBlock: morpho?.fromBlock,
7070
reverseChronologicalOrder: true,
71+
// This event is explictly whitelisted for our private RPC log service
7172
eventName: "SupplyCollateral",
7273
args: { onBehalf: userAddress },
7374
strict: true,

apps/fallback/src/app/dashboard/earn-subpage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export function EarnSubPage() {
6969
address: factoryV1_1 ? [factoryV1_1.address].concat(factory ? [factory.address] : []) : [],
7070
fromBlock: factory?.fromBlock ?? factoryV1_1?.fromBlock,
7171
reverseChronologicalOrder: true,
72+
// This event is explictly whitelisted for our private RPC log service
7273
eventName: "CreateMetaMorpho",
7374
strict: true,
7475
query: { enabled: chainId !== undefined },

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ function createFallbackTransport(rpcs: ({ url: string } & HttpTransportConfig)[]
5151
);
5252
}
5353

54-
function createPonderHttp(chainId: number) {
54+
function createFallbackRpcHttp(chainId: number) {
5555
return [
5656
{
57-
url: `https://v1-indexer.marble.live/rpc/${chainId}`,
57+
url: `https://fallback-rpc.vercel.app/${chainId}`,
5858
batch: false,
5959
methods: { include: ["eth_getLogs"] },
6060
},
@@ -99,44 +99,44 @@ const chains = [
9999
const transports: Record<(typeof chains)[number]["id"], Transport> = {
100100
// full support
101101
[mainnet.id]: createFallbackTransport([
102-
...createPonderHttp(mainnet.id),
102+
...createFallbackRpcHttp(mainnet.id),
103103
{ url: "https://rpc.mevblocker.io", batch: { batchSize: 10 } },
104104
{ url: "https://rpc.ankr.com/eth", batch: { batchSize: 10 } },
105105
{ url: "https://eth-pokt.nodies.app", batch: false },
106106
{ url: "https://eth.drpc.org", batch: false },
107107
{ url: "https://eth.merkle.io", batch: false },
108108
]),
109109
[base.id]: createFallbackTransport([
110-
...createPonderHttp(base.id),
110+
...createFallbackRpcHttp(base.id),
111111
{ url: "https://base.gateway.tenderly.co", batch: { batchSize: 10 } },
112112
{ url: "https://base.drpc.org", batch: false },
113113
{ url: "https://mainnet.base.org", batch: { batchSize: 10 } },
114114
{ url: "https://base.lava.build", batch: false },
115115
]),
116116
[polygon.id]: createFallbackTransport([
117-
...createPonderHttp(polygon.id),
117+
...createFallbackRpcHttp(polygon.id),
118118
{ url: "https://polygon.gateway.tenderly.co", batch: { batchSize: 10 } },
119119
{ url: "https://polygon.drpc.org", batch: false },
120120
]),
121121
[unichain.id]: createFallbackTransport([
122-
...createPonderHttp(unichain.id),
122+
...createFallbackRpcHttp(unichain.id),
123123
{ url: "https://unichain.gateway.tenderly.co", batch: { batchSize: 10 } },
124124
{ url: "https://mainnet.unichain.org", batch: false },
125125
{ url: "https://unichain.drpc.org", batch: false },
126126
]),
127127
[customChains.katana.id]: createFallbackTransport([
128-
...createPonderHttp(customChains.katana.id),
128+
...createFallbackRpcHttp(customChains.katana.id),
129129
{ url: "https://katana.gateway.tenderly.co", batch: { batchSize: 10 } },
130130
...customChains.katana.rpcUrls.default.http.map((url) => ({ url, batch: false })),
131131
]),
132132
[arbitrum.id]: createFallbackTransport([
133-
...createPonderHttp(arbitrum.id),
133+
...createFallbackRpcHttp(arbitrum.id),
134134
{ url: "https://arbitrum.gateway.tenderly.co", batch: { batchSize: 10 } },
135135
{ url: "https://rpc.ankr.com/arbitrum", batch: { batchSize: 10 } },
136136
{ url: "https://arbitrum.drpc.org", batch: false },
137137
]),
138138
[customChains.hyperevm.id]: createFallbackTransport([
139-
...createPonderHttp(customChains.hyperevm.id),
139+
...createFallbackRpcHttp(customChains.hyperevm.id),
140140
...customChains.hyperevm.rpcUrls.default.http.map((url) => ({ url, batch: false })),
141141
]),
142142
// fallback support
@@ -196,7 +196,7 @@ const transports: Record<(typeof chains)[number]["id"], Transport> = {
196196
{ url: "https://mainnet.mode.network", batch: false },
197197
{ url: "https://mode.drpc.org", batch: false },
198198
]),
199-
[customChains.monad.id]: createFallbackTransport([...createPonderHttp(customChains.monad.id)]),
199+
[customChains.monad.id]: createFallbackTransport([...createFallbackRpcHttp(customChains.monad.id)]),
200200
[hemi.id]: createFallbackTransport([{ url: "https://rpc.hemi.network/rpc", batch: false }]),
201201
[lisk.id]: createFallbackTransport([
202202
{ url: "https://lisk.gateway.tenderly.co", batch: { batchSize: 10 } },
@@ -207,17 +207,17 @@ const transports: Record<(typeof chains)[number]["id"], Transport> = {
207207
...soneium.rpcUrls.default.http.map((url) => ({ url, batch: false })),
208208
]),
209209
[sei.id]: createFallbackTransport([
210-
...createPonderHttp(sei.id),
210+
...createFallbackRpcHttp(sei.id),
211211
{ url: "https://sei-public.nodies.app", batch: false, key: "sei-nodies-maxNum-2000" },
212212
{ url: "https://sei.therpc.io", batch: false, key: "sei-therpc-maxNum-2000" },
213213
{ url: "https://sei.drpc.org", batch: false, key: "sei-drpc-maxNum-2000" },
214214
]),
215215
[customChains.tac.id]: createFallbackTransport([
216-
...createPonderHttp(customChains.tac.id),
216+
...createFallbackRpcHttp(customChains.tac.id),
217217
...customChains.tac.rpcUrls.default.http.map((url) => ({ url, batch: false })),
218218
]),
219219
[customChains.stable.id]: createFallbackTransport([
220-
...createPonderHttp(customChains.stable.id),
220+
...createFallbackRpcHttp(customChains.stable.id),
221221
...customChains.stable.rpcUrls.default.http.map((url) => ({ url, batch: false })),
222222
]),
223223
// [customChains.basecamp.id]: createFallbackTransport(

0 commit comments

Comments
 (0)