Skip to content

Commit

Permalink
feat(Networks): add support for Stability Testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
deblanco committed Feb 21, 2024
1 parent b893e86 commit 4db0f0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/common/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { providers } from "ethers";
import type { GasStationFunction } from "./gas-station";
import { gasStation } from "./gas-station";

export type networkCurrency = "ETH" | "MATIC" | "XDC" | "HBAR";
export type networkCurrency = "ETH" | "MATIC" | "XDC" | "HBAR" | "FREE";

type SupportedNetwork = {
explorer: string;
Expand All @@ -23,6 +23,7 @@ export enum NetworkCmdName {
XDCApothem = "xdcapothem",
HederaMainnet = "hederamainnet",
HederaTestnet = "hederatestnet",
StabilityTestnet = "stabilitytestnet",
}

const defaultInfuraProvider =
Expand Down Expand Up @@ -103,6 +104,13 @@ export const supportedNetwork: {
networkName: NetworkCmdName.HederaTestnet,
currency: "HBAR",
},
[NetworkCmdName.StabilityTestnet]: {
explorer: "https://stability-testnet.blockscout.com/",
provider: jsonRpcProvider("https://free.testnet.stabilityprotocol.com"),
networkId: 20180427,
networkName: NetworkCmdName.StabilityTestnet,
currency: "FREE",
},
};

export const getSupportedNetwork = (networkCmdName: string): SupportedNetwork => {
Expand Down

0 comments on commit 4db0f0c

Please sign in to comment.