Web3studio Helpers
Common Setup and scripts for w3s projects
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.jsmoduleexports = __dirname // defaults mainnetGasPrice: '0' solcVersion: '0.5.4' ignoreFilesGlobs: '**/node_modules/**' '**/Migrations.sol';
// test/global.js;
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>"