web3studio-helpers

3.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i web3studio-helpers

Weekly Downloads

3

Version

3.0.0

License

Apache-2.0

Unpacked Size

19 kB

Total Files

8

Last publish

Collaborators

  • web3studio-bot