npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ethereum-test-network

v0.1.6

Published

Hardhat network to spin up for testing

Downloads

433

Readme

TypeScript version Node.js version APLv2 Build Status - Travis Build Status - GitHub Actions

Just a wrapper around hardhat-network

NPM

npm i --save-dev ethereum-test-network

Yarn

yarn add --dev ethereum-test-network

Use its

import { TestNetwork } from 'ethereum-test-network';

describe('eth test network', () => {
  let testnetwork: TestNetwork;

  // Act before assertions
  beforeEach(async () => {
    testnetwork = await TestNetwork.init();
  });
  afterEach(async () => {
    await testnetwork.close();
  });

  it('should check block number', async () => {
    const provider = new ethers.providers.JsonRpcProvider(JSON_RPC_PROVIDER);
    const blockNumber = await provider.getBlockNumber();
    expect(blockNumber).toBe(0);
  });
});

Defaults

const DEFAULT_CHAIN_ID = 123;
const DEFAULT_NETWORK_ID = 234;
const DEFAULT_GENESIS_ACCOUNTS = [
  {
    balance: '0x295BE96E64066972000000',
    privateKey:
      '0xa3dac6ca0b1c61f5f0a0b3a0acf93c9a52fd94e8e33d243d3b3a8b8c5dc37f0b', // 0xaaE062157B53077da1414ec3579b4CBdF7a4116f
  },
  {
    balance: '0x295BE96E64066972000000',
    privateKey:
      '0xfc6e27fbc1cc2eb3f04dab6259d926280d4aa8acb8c83f3de506ab9d589d6cc2', // 0xbbDBFf23Df1e064f458aCd943E48179bD3271fA0
  },
  {
    balance: '0x295BE96E64066972000000',
    privateKey:
      '0x735e4ab2cd08798dee1a5fc3a7af4bbdeece90c7dbdf878ceec556c84bd5ec88', // 0xcc5a0dc5152D368D55A10f68f874A05A4dd65bee
  },
];
const DEFAULT_JSON_RPC_PORT = 8545;
const DEFAULT_BLOCK_GAS_LIMIT = 6000000;

Available Scripts

  • clean - remove coverage data, Jest cache and transpiled files,
  • build - transpile TypeScript to ES6,
  • build:watch - interactive watch mode to automatically transpile source files,
  • lint - lint source files and tests,
  • test - run tests,
  • test:watch - interactive watch mode to automatically re-run tests

Additional Informations

License

Licensed under the APLv2. See the LICENSE file for details.