Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hardhat-change-network

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat-change-network

Hardhat TypeScript plugin boilerplate

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hardhat-change-network

Allows changing the current network in Hardhat.

Useful for multi-chain projects, where switching between two networks in a script may be desirable.

Warning: This is a bit of a hack, some modules may break.

Installation

yarn add hardhat-change-network

Import the plugin in your hardhat.config.js:

require("hardhat-change-network");

Or if you are using TypeScript, in your hardhat.config.ts:

import "hardhat-change-network";

Usage

Change the network to any network defined in hardhat.config.js with this simple call:

hre.changeNetwork('goerli');

You can also use this library to retrieve a standard web3 provider object for a given network:

const provider = hre.getProvider('goerli');

Keywords

FAQs

Package last updated on 07 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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