Skip to content

Commit

Permalink
Merge branch 'NickKelly1-devop/add-manta-pacific-network' into devop/…
Browse files Browse the repository at this point in the history
…release-prep
  • Loading branch information
kvhnuke committed Aug 15, 2024
2 parents 66fa06c + 8f2045c commit 15bfaf4
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 7 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 @@ -31,6 +31,7 @@ export default async (
[NetworkNames.Forma]: "forma",
[NetworkNames.Godwoken]: "godwoken",
[NetworkNames.Linea]: "linea",
[NetworkNames.MantaPacific]: "manta",
};
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 @@ -62,6 +62,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.ImmutableZkevm]: "https://explorer.immutable.com/",
[NetworkNames.Forma]: "https://explorer.forma.art/",
[NetworkNames.Linea]: "https://api.lineascan.build/",
[NetworkNames.MantaPacific]: "https://pacific-explorer.manta.network/",
};

export { NetworkEndpoints };
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ const supportedNetworks: Record<SupportedNetworkNames, SupportedNetwork> = {
tbName: "linea",
cgPlatform: CoingeckoPlatform.Linea,
},
[NetworkNames.MantaPacific]: {
tbName: "manta",
cgPlatform: CoingeckoPlatform.MantaPacific,
},
};

const getTokens = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const TokenList: Record<SupportedNetworkNames, string> = {
[NetworkNames.Degen]: `https://tokens.coingecko.com/${CoingeckoPlatform.Degen}/all.json`,
[NetworkNames.Godwoken]: `https://tokens.coingecko.com/${CoingeckoPlatform.Godwoken}/all.json`,
[NetworkNames.Linea]: `https://tokens.coingecko.com/${CoingeckoPlatform.Linea}/all.json`,
[NetworkNames.MantaPacific]: `https://tokens.coingecko.com/${CoingeckoPlatform.MantaPacific}/all.json`,
};

const getKnownNetworkTokens = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ export type SupportedNetworkNames =
| NetworkNames.Degen
| NetworkNames.Blast
| NetworkNames.Godwoken
| NetworkNames.Linea;
| NetworkNames.Linea
| NetworkNames.MantaPacific;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions packages/extension/src/providers/ethereum/networks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ import blastNode from "./blast";
import sankoNode from "./dmt";
import degenNode from "./degen";
import hamNode from "./ham";
<<<<<<< HEAD
import zcdNode from "./zcd";
import immutableZkevmNode from "./immutable-zkevm";
import formaNode from "./forma";
import godwokenNode from "./godwoken";
=======
import lineaNode from "./linea";
>>>>>>> 038fec6090829b22db483c800d7701b36f74285b
import mantaPacificNode from "./manta-pacific";

export default {
sepolia: sepoliaNode,
Expand Down Expand Up @@ -109,12 +107,10 @@ export default {
sanko: sankoNode,
degen: degenNode,
ham: hamNode,
<<<<<<< HEAD
zcd: zcdNode,
immutableZkevm: immutableZkevmNode,
forma: formaNode,
godwoken: godwokenNode,
=======
linea: lineaNode,
>>>>>>> 038fec6090829b22db483c800d7701b36f74285b
mantaPacific: mantaPacificNode,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { NetworkNames, CoingeckoPlatform } from "@enkryptcom/types";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";
import { EtherscanActivity } from "../libs/activity-handlers";
import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";
import shNFTHandler from "@/libs/nft-handlers/simplehash";

const mantaPacificOptions: EvmNetworkOptions = {
name: NetworkNames.MantaPacific,
name_long: "Manta Pacific",
homePage: "https://pacific-info.manta.network/",
blockExplorerTX: "https://pacific-explorer.manta.network/tx/[[txHash]]",
blockExplorerAddr:
"https://pacific-explorer.manta.network/address/[[address]]",
chainID: "0xa9",
isTestNetwork: false,
currencyName: "ETH",
currencyNameLong: "Ethereum",
node: "wss://pacific-rpc.manta.network/ws",
icon: require("./icons/manta-pacific.png"),
coingeckoPlatform: CoingeckoPlatform.MantaPacific,
NFTHandler: shNFTHandler,
assetsInfoHandler,
activityHandler: wrapActivityHandler(EtherscanActivity),
};

const mantapacific = new EvmNetwork(mantaPacificOptions);

export default mantapacific;
2 changes: 2 additions & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export enum NetworkNames {
Forma = "Forma",
Godwoken = "godwoken",
Linea = "Linea",
MantaPacific = "MantaPacific",
}

export enum CoingeckoPlatform {
Expand Down Expand Up @@ -133,4 +134,5 @@ export enum CoingeckoPlatform {
ImmutableZkevm = "immutable",
Godwoken = "godwoken",
Linea = "linea",
MantaPacific = "manta-pacific",
}

1 comment on commit 15bfaf4

@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.