Skip to content

Commit

Permalink
👷 Retry load balancing
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Jul 10, 2024
1 parent cb7c0e7 commit 322b91a
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions ponder.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createConfig, mergeAbis } from "@ponder/core";
import { http, fallback, parseAbiItem } from "viem";
import { createConfig, loadBalance, mergeAbis } from "@ponder/core";
import { http, parseAbiItem } from "viem";
import {
interactionCampaignAbi,
referralCampaignAbi,
Expand All @@ -23,20 +23,17 @@ export default createConfig({
// Testnets
arbitrumSepolia: {
chainId: 421614,
transport: fallback(
[
http(
`https://arb-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`
),
http(
`https://arbitrum-sepolia.blockpi.network/v1/rpc/${process.env.BLOCKPI_API_KEY_ARB_SEPOLIA}`
),
],
{
retryCount: 5,
retryDelay: 300,
}
),
transport: loadBalance([
http(
`https://arb-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`
),
http(
`https://arbitrum-sepolia.blockpi.network/v1/rpc/${process.env.BLOCKPI_API_KEY_ARB_SEPOLIA}`
),
http(
`https://arb-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`
),
]),
pollingInterval: 10_000,
maxRequestsPerSecond: 64,
},
Expand Down

0 comments on commit 322b91a

Please sign in to comment.