Skip to content

Commit

Permalink
Merge branch 'NickKelly1-devop/add-rari-chain' into devop/release-prep
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Aug 15, 2024
2 parents 822feec + 3221008 commit a6a05e3
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 1 deletion.
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 @@ -28,6 +28,7 @@ export default async (
[NetworkNames.Base]: "base",
[NetworkNames.Blast]: "blast",
[NetworkNames.ImmutableZkevm]: "immutable-zkevm",
[NetworkNames.Rari]: "rari",
[NetworkNames.Forma]: "forma",
[NetworkNames.Godwoken]: "godwoken",
[NetworkNames.Linea]: "linea",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.Degen]: "https://explorer.degen.tips/",
[NetworkNames.Ham]: "https://explorer.ham.fun/",
[NetworkNames.ImmutableZkevm]: "https://explorer.immutable.com/",
[NetworkNames.Rari]: "https://mainnet.explorer.rarichain.org/",
[NetworkNames.Forma]: "https://explorer.forma.art/",
[NetworkNames.Linea]: "https://api.lineascan.build/",
[NetworkNames.MantaPacific]: "https://pacific-explorer.manta.network/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const supportedNetworks: Record<SupportedNetworkNames, SupportedNetwork> = {
[NetworkNames.ProofOfPlayApex]: {
tbName: "apex",
cgPlatform: undefined,
},
[NetworkNames.Godwoken]: {
tbName: "ckb",
cgPlatform: CoingeckoPlatform.Godwoken,
Expand All @@ -166,6 +167,10 @@ const supportedNetworks: Record<SupportedNetworkNames, SupportedNetwork> = {
tbName: "scrl",
cgPlatform: CoingeckoPlatform.Scroll,
},
[NetworkNames.Rari]: {
tbName: "rari",
cgPlatform: undefined,
},
};

const getTokens = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const TokenList: Record<SupportedNetworkNames, string> = {
[NetworkNames.Mode]: `https://tokens.coingecko.com/${CoingeckoPlatform.Mode}/all.json`,
[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`,
};

const getKnownNetworkTokens = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export type SupportedNetworkNames =
| NetworkNames.MantaPacific
| NetworkNames.Mode
| NetworkNames.OpBNB
| NetworkNames.Scroll;
| NetworkNames.Scroll
| NetworkNames.Rari;
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 @@ -46,6 +46,7 @@ import degenNode from "./degen";
import hamNode from "./ham";
import zcdNode from "./zcd";
import immutableZkevmNode from "./immutable-zkevm";
import rariNode from "./rari";
import formaNode from "./forma";
import godwokenNode from "./godwoken";
import lineaNode from "./linea";
Expand Down Expand Up @@ -114,6 +115,7 @@ export default {
ham: hamNode,
zcd: zcdNode,
immutableZkevm: immutableZkevmNode,
rari: rariNode,
forma: formaNode,
godwoken: godwokenNode,
linea: lineaNode,
Expand Down
28 changes: 28 additions & 0 deletions packages/extension/src/providers/ethereum/networks/rari.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { NetworkNames } 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 rariOptions: EvmNetworkOptions = {
name: NetworkNames.Rari,
name_long: "Rari",
homePage: "https://rarichain.org/",
blockExplorerTX: "https://mainnet.explorer.rarichain.org/tx/[[txHash]]",
blockExplorerAddr:
"https://mainnet.explorer.rarichain.org/address/[[address]]",
chainID: "0x52415249",
isTestNetwork: false,
currencyName: "ETH",
currencyNameLong: "Rari ETH",
node: "https://mainnet.rpc.rarichain.org/http",
icon: require("./icons/rari.png"),
NFTHandler: shNFTHandler,
assetsInfoHandler,
activityHandler: wrapActivityHandler(EtherscanActivity),
};

const rari = new EvmNetwork(rariOptions);

export default rari;
1 change: 1 addition & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export enum NetworkNames {
Palm = "palm",
ProofOfPlayApex = "ProofOfPlayApex",
Scroll = "scroll",
Rari = "rari",
}

export enum CoingeckoPlatform {
Expand Down

1 comment on commit a6a05e3

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