Skip to content

Commit

Permalink
Chains package sync helixconf (#869)
Browse files Browse the repository at this point in the history
* Synchronize helixconf

* Changeset
  • Loading branch information
JayJay1024 authored Nov 7, 2024
1 parent b870e3e commit ab5a9ed
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-suits-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@helixbridge/chains": patch
---

Synchronize helixconf
2 changes: 1 addition & 1 deletion packages/chains/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"preset": "@helixbridge/jest-presets/node"
},
"dependencies": {
"@helixbridge/helixconf": "1.1.18",
"@helixbridge/helixconf": "v1.2.0-beta",
"viem": "^2.21.19"
}
}
9 changes: 9 additions & 0 deletions packages/chains/src/chains/celo-testnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Chain } from "../types";
import { celoAlfajores } from "viem/chains";

export const celoTestnet: Chain = {
...celoAlfajores,
network: "celo-testnet",
name: "Celo Alfajores",
logo: "https://raw.githubusercontent.com/helix-bridge/helix-ui/main/packages/assets/images/chains/celo.png",
};
1 change: 1 addition & 0 deletions packages/chains/src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ export * from "./zksync";
export * from "./zksync-sepolia";
export * from "./zircuit";
export * from "./zircuit-sepolia";
export * from "./celo-testnet";
4 changes: 3 additions & 1 deletion packages/chains/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export enum ChainID {
AVALANCHE = 43_114,
ZIRCUIT_SEPOLIA = 48899,
ZIRCUIT = 48900,
CELO_TESTNET = 44787,
}
/* eslint-enable no-unused-vars */

Expand Down Expand Up @@ -67,7 +68,8 @@ export type Network =
| "avalanche"
| "bsc"
| "zircuit"
| "zircuit-sepolia";
| "zircuit-sepolia"
| "celo-testnet";

export interface Chain extends ViemChain {
id: ChainID;
Expand Down
5 changes: 5 additions & 0 deletions packages/chains/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
zircuitSepolia,
zkSync,
zksyncSepolia,
celoTestnet,
} from "../chains";
import { ChainID, type Network } from "../types";

Expand Down Expand Up @@ -59,6 +60,7 @@ export function getChains() {
zkSync,
zircuit,
zircuitSepolia,
celoTestnet,
];
}

Expand Down Expand Up @@ -145,6 +147,9 @@ export function getChainByIdOrNetwork(chainIdOrNetwork: ChainID | Network | null
case ChainID.ZIRCUIT_SEPOLIA:
case "zircuit-sepolia":
return zircuitSepolia;
case ChainID.CELO_TESTNET:
case "celo-testnet":
return celoTestnet;
default:
return;
}
Expand Down
36 changes: 15 additions & 21 deletions pnpm-lock.yaml

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

0 comments on commit ab5a9ed

Please sign in to comment.