New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zetachain/networks

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zetachain/networks - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0-rc.1

24

data/networks.json

@@ -93,32 +93,28 @@ {

{
"url": "https://rpc.ankr.com/zetachain_evm_testnet",
"url": "https://zetachain-athens-evm.blockpi.network/v1/rpc/public",
"type": "evm"
},
{
"url": "https://rpc.ankr.com/zetachain_tendermint_testnet",
"url": "https://zetachain-athens.blockpi.network/rpc/v1/public",
"type": "tendermint-rpc"
},
{
"url": "https://rpc.ankr.com/http/zetachain_testnet",
"url": "https://zetachain-athens.blockpi.network/lcd/v1/public",
"type": "cosmos-http"
},
{
"url": "https://api.athens2.zetachain.com/evm",
"type": "evm-rpc"
"url": "wss://zetachain-athens.blockpi.network/rpc/v1/public/websocket",
"type": "tendermint-ws"
},
{
"url": "https://api.athens2.zetachain.com/tendermint",
"url": "https://zetachain-testnet.nodejumper.io:443",
"type": "tendermint-rpc"
},
{
"url": "https://api.athens2.zetachain.com/tendermint",
"type": "tendermint-http"
"url": "https://zetachain-testnet.nodejumper.io:1317",
"type": "cosmos-http"
},
{
"url": "wss://api-lb.athens2.zetachain.com:26657/websocket",
"type": "tendermint-ws"
},
{
"url": "https://api.athens2.zetachain.com/",
"type": "cosmos-http"
"url": "https://zetachain-testnet.nodejumper.io:9090",
"type": "cosmos-grpc"
}

@@ -125,0 +121,0 @@ ]

@@ -30,5 +30,5 @@ "use strict";

exports.chainNameById = exports.getHardhatConfigNetworks = exports.networks = void 0;
const dotenv = __importStar(require("dotenv"));
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const dotenv = __importStar(require("dotenv"));
exports.networks = JSON.parse(fs_1.default

@@ -73,9 +73,9 @@ .readFileSync(path_1.default.resolve(__dirname, "..", "data", "networks.json"))

return {
7001: "athens",
97: "bsc-testnet",
5: "goerli",
1001: "klaytn-baobab",
5: "goerli",
7001: "athens",
80001: "polygon-mumbai",
97: "bsc-testnet",
}[chainId];
};
exports.chainNameById = chainNameById;
{
"name": "@zetachain/networks",
"version": "0.1.0",
"version": "1.0.0-rc.1",
"description": "",

@@ -10,4 +10,2 @@ "main": "dist/index.js",

"build": "rm -rf dist && tsc",
"lint:fix": "npx eslint . --ext .js,.ts --fix",
"lint": "npx eslint . --ext .js,.ts",
"prepublishOnly": "npm run build"

@@ -20,14 +18,3 @@ },

"@types/node": "^20.2.0",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"ajv": "^8.12.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-typescript-sort-keys": "^2.3.0",
"prettier": "^2.8.8",
"ts-node": "^10.9.1",

@@ -38,7 +25,3 @@ "typescript": "^5.0.4"

"dotenv": "^16.1.4"
},
"files": [
"dist",
"data"
]
}
}

@@ -5,40 +5,2 @@ # ZetaChain Blockchain Networks Registry

## Building a dapp on ZetaChain
If you're looking to build a dapp on ZetaChain, we recommend using the Hardhat
[template](https://github.com/zeta-chain/template). This template has all the
networks preconfigured, so you don't need to install this package manually.
## Installation
To install this package in Hardhat project, add it as a development dependency:
```
yarn add --dev @zetachain/networks
```
## Usage
In your `hardhat.config.ts` file, import the `getHardhatConfigNetworks` function
from `@zetachain/networks`:
```ts
import { getHardhatConfigNetworks } from "@zetachain/networks";
const config: HardhatUserConfig = {
networks: {
...getHardhatConfigNetworks(),
},
};
```
In this configuration, the `getHardhatConfigNetworks` function returns all
available networks from ZetaChain and spreads them into the `networks` object.
This way, the Hardhat environment is configured to interact with all the
networks connected to ZetaChain.
`getHardhatConfigNetworks` reads the private key from `PRIVATE_KEY` environment
variable and defaults to an empty account array if the variable not set, and
throws an error if the private key is invalid.
## Prerequisites

@@ -45,0 +7,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc