Skip to content

Commit 651a171

Browse files
committed
feat: add "default" field in Chain type
1 parent dccd1b7 commit 651a171

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/chains/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export function fill(slug: string, chain: ViemChain): Sablier.Chain {
4646
isZK: Boolean(config.zk[chain.id]),
4747
rpc: {
4848
alchemy: alchemyRPCs[chain.id],
49+
default: chain.rpcUrls.default.http[0],
4950
infura: infuraRPCs[chain.id],
5051
},
5152
slug,

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export namespace Sablier {
2525
rpc: {
2626
/** Alchemy RPC URL generator. */
2727
alchemy?: (apiKey: string) => string;
28+
/** Default RPC URL. */
29+
default: string;
2830
/** Infura RPC URL generator. */
2931
infura?: (apiKey: string) => string;
3032
};

tests/chains.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe.runIf(envVarsSet)("Ping JSON-RPC server", () => {
8585
};
8686

8787
await expect(
88-
axios.post(chain.rpcUrls.default.http[0], rpcRequest, {
88+
axios.post(chain.rpc.default, rpcRequest, {
8989
headers: { "Content-Type": "application/json" },
9090
timeout: 10_000, // 10 seconds
9191
}),

0 commit comments

Comments
 (0)