Skip to content

Commit

Permalink
devop: added degen
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Jul 23, 2024
1 parent 42d04e3 commit 5d528b3
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const newNetworks = [
NetworkNames.Telos,
NetworkNames.Blast,
NetworkNames.Sanko,
NetworkNames.Degen,
];
const newSwaps: NetworkNames[] = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.Rollux]: "https://explorer.rollux.com/",
[NetworkNames.Blast]: "https://blastscan.io/",
[NetworkNames.Sanko]: "https://explorer.sanko.xyz/",
[NetworkNames.Degen]: "https://explorer.degen.tips/",
};

export { NetworkEndpoints };
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ const supportedNetworks: Record<SupportedNetworkNames, SupportedNetwork> = {
tbName: "sanko",
cgPlatform: CoingeckoPlatform.Sanko,
},
[NetworkNames.Degen]: {
tbName: "degen",
cgPlatform: CoingeckoPlatform.Degen,
},
};

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

const getKnownNetworkTokens = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ export type SupportedNetworkNames =
| NetworkNames.Telos
| NetworkNames.Rollux
| NetworkNames.Sanko
| NetworkNames.Degen
| NetworkNames.Blast;
27 changes: 27 additions & 0 deletions packages/extension/src/providers/ethereum/networks/degen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { CoingeckoPlatform, NetworkNames } from "@enkryptcom/types";
import { EvmNetwork, EvmNetworkOptions } from "../types/evm-network";
import assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";
import { EtherscanActivity } from "../libs/activity-handlers";
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler";

const ethOptions: EvmNetworkOptions = {
name: NetworkNames.Degen,
name_long: "Degen",
homePage: "https://www.degen.tips/",
blockExplorerTX: "https://explorer.degen.tips/tx/[[txHash]]",
blockExplorerAddr: "https://explorer.degen.tips/address/[[address]]",
chainID: "0x27bc86aa",
isTestNetwork: false,
currencyName: "DEGEN",
currencyNameLong: "DEGEN",
node: "https://rpc.degen.tips",
icon: require("./icons/degen.png"),
coingeckoID: "degen-base",
coingeckoPlatform: CoingeckoPlatform.Degen,
assetsInfoHandler,
activityHandler: wrapActivityHandler(EtherscanActivity),
};

const eth = new EvmNetwork(ethOptions);

export default eth;
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 @@ -41,6 +41,7 @@ import cagaAnkara from "./cagaAnkara";
import telosNode from "./tlos";
import blastNode from "./blast";
import sankoNode from "./dmt";
import degenNode from "./degen";

export default {
sepolia: sepoliaNode,
Expand Down Expand Up @@ -95,4 +96,5 @@ export default {
telos: telosNode,
blast: blastNode,
sanko: sankoNode,
degen: degenNode,
};
1 change: 1 addition & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export enum NetworkNames {
Blast = "blast",
Sanko = "sanko",
Degen = "degen",
Ham = "ham",
}

export enum CoingeckoPlatform {
Expand Down

1 comment on commit 5d528b3

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