Skip to content

Commit

Permalink
Merge pull request #358 from w3hc/feature/arthera-testnet
Browse files Browse the repository at this point in the history
Add Arthera network support
  • Loading branch information
kvhnuke authored Oct 18, 2023
2 parents c0fe6e5 + 5f10ba6 commit 837a3fc
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const NetworkEndpoints: Record<string, string> = {
[NetworkNames.MaticZK]: "https://api-zkevm.polygonscan.com/",
[NetworkNames.Base]: "https://api.basescan.org/",
[NetworkNames.Celo]: "https://explorer.celo.org/mainnet/",
[NetworkNames.Arthera]: "https://explorer-test.arthera.net/",
};

export { NetworkEndpoints };
24 changes: 24 additions & 0 deletions packages/extension/src/providers/ethereum/networks/aa.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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 assetsInfoHandler from "@/providers/ethereum/libs/assets-handlers/assetinfo-mew";

const artheraOptions: EvmNetworkOptions = {
name: NetworkNames.Arthera,
name_long: "Arthera",
homePage: "https://arthera.net/",
blockExplorerTX: "https://explorer-test.arthera.net/tx/[[txHash]]",
blockExplorerAddr: "https://explorer-test.arthera.net/address/[[address]]",
chainID: "0x2803",
isTestNetwork: true,
currencyName: "AA",
currencyNameLong: "Arthera",
node: "wss://ws-test.arthera.net",
icon: require("./icons/aa.svg"),
activityHandler: wrapActivityHandler(EtherscanActivity),
};

const arthera = new EvmNetwork(artheraOptions);

export default arthera;
42 changes: 42 additions & 0 deletions packages/extension/src/providers/ethereum/networks/icons/aa.svg
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 @@ -30,6 +30,7 @@ import sepoliaNode from "./sepolia";
import baseNode from "./base";
import celoNode from "./celo";
import shibNode from "./shib";
import artheraNode from "./aa";

export default {
goerli: goerliNode,
Expand Down Expand Up @@ -73,4 +74,5 @@ export default {
base: baseNode,
celo: celoNode,
shib: shibNode,
arthera: artheraNode,
};
1 change: 1 addition & 0 deletions packages/types/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export enum NetworkNames {
Celo = "CELO",
Litecoin = "LTC",
Dogecoin = "DOGE",
Arthera = "AA",
}

export enum CoingeckoPlatform {
Expand Down

1 comment on commit 837a3fc

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