aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils/src/coverage.ts
blob: b39fa5de41eae6539794cbb445b12deb8d845eba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { CoverageSubprovider } from '@0xproject/sol-cov';
import * as _ from 'lodash';

let coverageSubprovider: CoverageSubprovider;

export function getCoverageSubproviderSingleton(): CoverageSubprovider {
    if (_.isUndefined(coverageSubprovider)) {
        const artifactsPath = './src/artifacts';
        const contractsPath = './src/contracts';
        const networkId = 50;
        coverageSubprovider = new CoverageSubprovider(artifactsPath, contractsPath, networkId);
    }
    return coverageSubprovider;
}