UNPKG

@0x/contracts-test-utils

Version:
34 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.web3Wrapper = exports.provider = exports.providerConfigs = exports.txDefaults = void 0; const dev_utils_1 = require("@0x/dev-utils"); const web3_wrapper_1 = require("@0x/web3-wrapper"); const _ = require("lodash"); const constants_1 = require("./constants"); exports.txDefaults = { from: dev_utils_1.devConstants.TESTRPC_FIRST_ADDRESS, gas: dev_utils_1.devConstants.GAS_LIMIT, gasPrice: constants_1.constants.DEFAULT_GAS_PRICE, }; exports.providerConfigs = { total_accounts: constants_1.constants.NUM_TEST_ACCOUNTS, shouldUseInProcessGanache: true, shouldAllowUnlimitedContractSize: true, hardfork: 'istanbul', gasLimit: 100e6, unlocked_accounts: [ '0x6cc5f688a315f3dc28a7781717a9a798a59fda7b', '0x55dc8f21d20d4c6ed3c82916a438a413ca68e335', '0x8ed95d1746bf1e4dab58d8ed4724f1ef95b20db0', '0xf977814e90da44bfa03b6295a0616a897441acec', // Binance: USDC, TUSD ], }; exports.provider = dev_utils_1.web3Factory.getRpcProvider(exports.providerConfigs); exports.provider.stop(); const isCoverageEnabled = dev_utils_1.env.parseBoolean(dev_utils_1.EnvVars.SolidityCoverage); const enabledSubproviderCount = _.filter([isCoverageEnabled], _.identity.bind(_)).length; if (enabledSubproviderCount > 1) { throw new Error(`Only one of profiler or revert trace subproviders can be enabled at a time`); } exports.web3Wrapper = new web3_wrapper_1.Web3Wrapper(exports.provider); //# sourceMappingURL=web3_wrapper.js.map