Skip to content

Commit

Permalink
Merge pull request #478 from NickKelly1/devop/add-format-network
Browse files Browse the repository at this point in the history
Add Forma network
  • Loading branch information
kvhnuke authored Aug 15, 2024
2 parents 8c76488 + 90b311a commit 9266125
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/extension/src/libs/nft-handlers/simplehash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default async (
[NetworkNames.ZkSync]: "zksync-era",
[NetworkNames.ZkSyncGoerli]: "zksync-era-testnet",
[NetworkNames.Base]: "base",
[NetworkNames.Forma]: "forma",
};
if (!Object.keys(supportedNetworks).includes(network.name))
throw new Error("Simplehash: network not supported");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.Sanko]: "https://explorer.sanko.xyz/",
[NetworkNames.Degen]: "https://explorer.degen.tips/",
[NetworkNames.Ham]: "https://explorer.ham.fun/",
[NetworkNames.Forma]: "https://explorer.forma.art/",
};

export { NetworkEndpoints };
25 changes: 25 additions & 0 deletions packages/extension/src/providers/ethereum/networks/forma.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NetworkNames } from "@enkryptcom/types";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import { EtherscanActivity } from "../libs/activity-handlers";
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";
import shNFTHandler from "@/libs/nft-handlers/simplehash";

const formaOptions: EvmNetworkOptions = {
name: NetworkNames.Forma,
name_long: "Forma",
homePage: "https://forma.art/",
blockExplorerTX: "https://explorer.forma.art/tx/[[txHash]]",
blockExplorerAddr: "https://explorer.forma.art/address/[[address]]",
chainID: "0xf043a",
isTestNetwork: false,
currencyName: "TIA",
currencyNameLong: "TIA",
node: "https://rpc.forma.art",
icon: require("./icons/forma.png"),
activityHandler: wrapActivityHandler(EtherscanActivity),
NFTHandler: shNFTHandler,
};

const forma = new EvmNetwork(formaOptions);

export default forma;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/extension/src/providers/ethereum/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import blastNode from "./blast";
import sankoNode from "./dmt";
import degenNode from "./degen";
import hamNode from "./ham";
import formaNode from "./forma";

export default {
sepolia: sepoliaNode,
Expand Down Expand Up @@ -99,4 +100,5 @@ export default {
sanko: sankoNode,
degen: degenNode,
ham: hamNode,
forma: formaNode,
};
1 change: 1 addition & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export enum NetworkNames {
Sanko = "sanko",
Degen = "degen",
Ham = "ham",
Forma = "Forma"
}

export enum CoingeckoPlatform {
Expand Down

1 comment on commit 9266125

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.