Skip to content

Commit e9712f7

Browse files
committed
feat: more rpc infura and alchemy
1 parent 176846a commit e9712f7

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ located under the [`data`](./data) directory.
119119

120120
Each deployment is stored as JSON with a structure like this, which is generated by Foundry:
121121

122-
```json
122+
```jsonc
123123
{
124124
"transactions": [...], // Deployment transactions
125125
"receipts": [...], // Transaction receipts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sablier/deployments",
33
"description": "Deployment data for the Sablier Protocol",
4-
"version": "1.0.0-alpha.49",
4+
"version": "1.0.0-alpha.50",
55
"author": {
66
"name": "Sablier Labs Ltd",
77
"url": "https://sablier.com"

src/chains/rpc.ts

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
1-
import * as viem from "viem/chains";
1+
import * as mainnets from "./mainnets";
22

33
type RPCGenerator = (apiKey: string) => string;
44

55
export const alchemyRPCs: Record<number, RPCGenerator> = {
6-
[viem.arbitrum.id]: (apiKey) => `https://arb-mainnet.g.alchemy.com/v2/${apiKey}`,
7-
[viem.avalanche.id]: (apiKey) => `https://avalanche-mainnet.g.alchemy.com/v2/${apiKey}`,
8-
[viem.base.id]: (apiKey) => `https://base-mainnet.g.alchemy.com/v2/${apiKey}`,
9-
[viem.bsc.id]: (apiKey) => `https://bsc-mainnet.g.alchemy.com/v2/${apiKey}`,
10-
[viem.mainnet.id]: (apiKey) => `https://eth-mainnet.g.alchemy.com/v2/${apiKey}`,
11-
[viem.linea.id]: (apiKey) => `https://linea-mainnet.g.alchemy.com/v2/${apiKey}`,
12-
[viem.optimism.id]: (apiKey) => `https://opt-mainnet.g.alchemy.com/v2/${apiKey}`,
13-
[viem.polygon.id]: (apiKey) => `https://polygon-mainnet.g.alchemy.com/v2/${apiKey}`,
14-
[viem.scroll.id]: (apiKey) => `https://scroll-mainnet.g.alchemy.com/v2/${apiKey}`,
15-
[viem.zksync.id]: (apiKey) => `https://zksync-mainnet.g.alchemy.com/v2/${apiKey}`,
6+
[mainnets.abstract.id]: (apiKey) => `https://abstract-mainnet.g.alchemy.com/v2/${apiKey}`,
7+
[mainnets.arbitrum.id]: (apiKey) => `https://arb-mainnet.g.alchemy.com/v2/${apiKey}`,
8+
[mainnets.avalanche.id]: (apiKey) => `https://avax-mainnet.g.alchemy.com/v2/${apiKey}`,
9+
[mainnets.base.id]: (apiKey) => `https://base-mainnet.g.alchemy.com/v2/${apiKey}`,
10+
[mainnets.berachain.id]: (apiKey) => `https://berachain-mainnet.g.alchemy.com/v2/${apiKey}`,
11+
[mainnets.blast.id]: (apiKey) => `https://blast-mainnet.g.alchemy.com/v2/${apiKey}`,
12+
[mainnets.bsc.id]: (apiKey) => `https://bnb-mainnet.g.alchemy.com/v2/${apiKey}`,
13+
[mainnets.ethereum.id]: (apiKey) => `https://eth-mainnet.g.alchemy.com/v2/${apiKey}`,
14+
[mainnets.gnosis.id]: (apiKey) => `https://gnosis-mainnet.g.alchemy.com/v2/${apiKey}`,
15+
[mainnets.linea.id]: (apiKey) => `https://linea-mainnet.g.alchemy.com/v2/${apiKey}`,
16+
[mainnets.optimism.id]: (apiKey) => `https://opt-mainnet.g.alchemy.com/v2/${apiKey}`,
17+
[mainnets.polygon.id]: (apiKey) => `https://polygon-mainnet.g.alchemy.com/v2/${apiKey}`,
18+
[mainnets.ronin.id]: (apiKey) => `https://ronin-mainnet.g.alchemy.com/v2/${apiKey}`,
19+
[mainnets.scroll.id]: (apiKey) => `https://scroll-mainnet.g.alchemy.com/v2/${apiKey}`,
20+
[mainnets.sei.id]: (apiKey) => `https://sei-mainnet.g.alchemy.com/v2/${apiKey}`,
21+
[mainnets.superseed.id]: (apiKey) => `https://superseed-mainnet.g.alchemy.com/v2/${apiKey}`,
22+
[mainnets.unichain.id]: (apiKey) => `https://unichain-mainnet.g.alchemy.com/v2/${apiKey}`,
23+
[mainnets.zksync.id]: (apiKey) => `https://zksync-mainnet.g.alchemy.com/v2/${apiKey}`,
1624
};
1725

1826
export const infuraRPCs: Record<number, RPCGenerator> = {
19-
[viem.arbitrum.id]: (apiKey) => `https://arbitrum-mainnet.infura.io/v3/${apiKey}`,
20-
[viem.avalanche.id]: (apiKey) => `https://avalanche-mainnet.infura.io/v3/${apiKey}`,
21-
[viem.bsc.id]: (apiKey) => `https://bsc-mainnet.infura.io/v3/${apiKey}`,
22-
[viem.mainnet.id]: (apiKey) => `https://mainnet.infura.io/v3/${apiKey}`,
23-
[viem.linea.id]: (apiKey) => `https://linea-mainnet.infura.io/v3/${apiKey}`,
24-
[viem.optimism.id]: (apiKey) => `https://optimism-mainnet.infura.io/v3/${apiKey}`,
25-
[viem.polygon.id]: (apiKey) => `https://polygon-mainnet.infura.io/v3/${apiKey}`,
26-
[viem.scroll.id]: (apiKey) => `https://scroll-mainnet.infura.io/v3/${apiKey}`,
27-
[viem.zksync.id]: (apiKey) => `https://zksync-mainnet.infura.io/v3/${apiKey}`,
27+
[mainnets.arbitrum.id]: (apiKey) => `https://arbitrum-mainnet.infura.io/v3/${apiKey}`,
28+
[mainnets.avalanche.id]: (apiKey) => `https://avalanche-mainnet.infura.io/v3/${apiKey}`,
29+
[mainnets.base.id]: (apiKey) => `https://base-mainnet.infura.io/v3/${apiKey}`,
30+
[mainnets.blast.id]: (apiKey) => `https://blast-mainnet.infura.io/v3/${apiKey}`,
31+
[mainnets.bsc.id]: (apiKey) => `https://bsc-mainnet.infura.io/v3/${apiKey}`,
32+
[mainnets.ethereum.id]: (apiKey) => `https://mainnet.infura.io/v3/${apiKey}`,
33+
[mainnets.linea.id]: (apiKey) => `https://linea-mainnet.infura.io/v3/${apiKey}`,
34+
[mainnets.optimism.id]: (apiKey) => `https://optimism-mainnet.infura.io/v3/${apiKey}`,
35+
[mainnets.polygon.id]: (apiKey) => `https://polygon-mainnet.infura.io/v3/${apiKey}`,
36+
[mainnets.scroll.id]: (apiKey) => `https://scroll-mainnet.infura.io/v3/${apiKey}`,
37+
[mainnets.zksync.id]: (apiKey) => `https://zksync-mainnet.infura.io/v3/${apiKey}`,
2838
};

0 commit comments

Comments
 (0)