Socket
Book a DemoInstallSign in
Socket

web3studio-helpers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3studio-helpers

Common code shared across w3s truffle projects

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

Web3studio Helpers

Common Setup and scripts for w3s projects

Truffle Setup License

This project contains common code used to bootstrap tests and common scripts.


Truffle Setup

Create a truffle-config.js, and a global test setup file.

// truffle-config.js
module.exports = require('web3studio-helpers/truffle-config')(__dirname, {
  // defaults
  mainnetGasPrice: '0',
  solcVersion: '0.5.4',
  ignoreFilesGlobs: ['**/node_modules/**', '**/Migrations.sol']
});
// test/global.js
require('web3studio-helpers/truffleTestGlobals');

For coverage requirements, drop a .istanbul.yml file in the root of the package:

# .istanbul.yml
check:
  global:
    statements: 100
    lines: 100
    branches: 100
    functions: 100

Environment Variables

You'll need to set some environment variables to use the config on a testnet or mainnet. You can do so either via your shell or with a .env file

# .env
INFURA_API_KEY="<YOUR_INFURA_KEY>"
SEED_PHRASE="<YOUR_WALLET_SEED_PHRASE>"

License

Apache 2.0

FAQs

Package last updated on 05 Jun 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.