Skip to content

Commit

Permalink
feat: add boojnet, update sepolia rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Oct 10, 2023
1 parent 9676859 commit 9943c60
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
14 changes: 12 additions & 2 deletions data/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const l1Networks = {
...sepolia,
name: "Sepolia Testnet",
rpcUrls: {
public: { http: ["https://sepolia.gateway.tenderly.co"] },
default: { http: ["https://sepolia.gateway.tenderly.co"] },
public: { http: ["https://ethereum-sepolia.publicnode.com"] },
default: { http: ["https://ethereum-sepolia.publicnode.com"] },
},
},
} as const;
Expand Down Expand Up @@ -144,6 +144,16 @@ export const eraNetworks: EraNetwork[] = [
l1Network: l1Networks.sepolia,
hidden: true,
},
{
id: 300,
key: "era-boojnet",
name: "zkSync Era Boojnet",
shortName: "Era Boojnet",
rpcUrl: "https://sepolia.era.zksync.dev",
getTokens: () => getTokensByNetworkId(300),
l1Network: l1Networks.sepolia,
hidden: true,
},
];

export type ZkSyncLiteNetwork = L2Network & { network: Network };
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@chenfengyuan/vue-qrcode": "^2.0.0",
"@headlessui/vue": "^1.7.7",
"@heroicons/vue": "^2.0.14",
"@matterlabs/token-library": "^2.9.0",
"@matterlabs/token-library": "^2.9.1",
"@metamask/logo": "^3.1.1",
"@pinia/nuxt": "^0.4.7",
"@semantic-release/changelog": "^6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions utils/zksync/era/token-library.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getTokenCollection } from "@matterlabs/token-library";

export const getTokensByNetworkId = async (networkId: number) => {
if (![270, 324, 280].includes(networkId)) throw new Error(`Network id ${networkId} is not supported`);
if (![270, 300, 324, 280].includes(networkId)) throw new Error(`Network id ${networkId} is not supported`);

const tokens = await getTokenCollection(networkId as 270 | 324 | 280);
const tokens = await getTokenCollection(networkId as 270 | 300 | 324 | 280);
return tokens.map((token) => {
const l2Address = token.l2Address === ETH_L1_ADDRESS ? ETH_L2_ADDRESS : checksumAddress(token.l2Address);
return {
Expand Down

0 comments on commit 9943c60

Please sign in to comment.