Skip to content

Commit

Permalink
Merge branch 'ThunderDeliverer-add-fraxtal' into devop/new-networks
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Nov 22, 2024
2 parents da7be41 + 02ea0c6 commit 78adce5
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.Mode]: 'https://explorer.mode.network/',
[NetworkNames.ProofOfPlayApex]: 'https://explorer.apex.proofofplay.com/',
[NetworkNames.Scroll]: 'https://api.scrollscan.com/',
[NetworkNames.Fraxtal]: 'https://api.fraxscan.com/',
};

export { NetworkEndpoints };
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const TokenList: Record<SupportedNetworkNames, string> = {
[NetworkNames.OpBNB]: `https://tokens.coingecko.com/${CoingeckoPlatform.OpBNB}/all.json`,
[NetworkNames.Scroll]: `https://tokens.coingecko.com/${CoingeckoPlatform.Scroll}/all.json`,
[NetworkNames.Rari]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/tokenlists/rari.json`,
[NetworkNames.Fraxtal]: `https://tokens.coingecko.com/${CoingeckoPlatform.Fraxtal}/all.json`,
};

const getKnownNetworkTokens = async (
Expand Down
26 changes: 26 additions & 0 deletions packages/extension/src/providers/ethereum/networks/fraxtal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import icon from './icons/fraxtal.svg';
import { CoingeckoPlatform, 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';

const fraxtalOptions: EvmNetworkOptions = {
name: NetworkNames.Fraxtal,
name_long: 'Fraxtal',
homePage: 'https://www.frax.com/',
blockExplorerTX: 'https://fraxscan.com/tx/[[txHash]]',
blockExplorerAddr: 'https://fraxscan.com/address/[[address]]',
chainID: '0xfc',
isTestNetwork: false,
currencyName: 'frxETH',
currencyNameLong: 'Frax Ether',
node: 'https://rpc.frax.com',
icon,
coingeckoID: 'fraxtal',
coingeckoPlatform: CoingeckoPlatform.Fraxtal,
activityHandler: wrapActivityHandler(EtherscanActivity),
};

const fraxtal = new EvmNetwork(fraxtalOptions);

export default fraxtal;
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 @@ -60,6 +60,7 @@ import scrollNode from './scroll';
import cotiDevnetNode from './coti-devnet';
import holeskyNode from './holesky';
import bitrockNode from './bitrock';
import fraxtalNode from './fraxtal';

export default {
sepolia: sepoliaNode,
Expand Down Expand Up @@ -133,4 +134,5 @@ export default {
cotiDevnet: cotiDevnetNode,
holesky: holeskyNode,
bitrock: bitrockNode,
frax: fraxtalNode,
};
2 changes: 2 additions & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export enum NetworkNames {
CotiDevnet = "CotiDevnet",
Holesky = "HOLESKY",
Bitrock = "bitrock",
Fraxtal = "fraxtal",
}

export enum CoingeckoPlatform {
Expand Down Expand Up @@ -152,4 +153,5 @@ export enum CoingeckoPlatform {
OpBNB = "opbnb",
Scroll = "scroll",
Bitrock = "bitrock",
Fraxtal = "fraxtal",
}

0 comments on commit 78adce5

Please sign in to comment.