diff options
Diffstat (limited to 'test/utils/web3_factory.ts')
-rw-r--r-- | test/utils/web3_factory.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/utils/web3_factory.ts b/test/utils/web3_factory.ts index b20070c74..4785fa858 100644 --- a/test/utils/web3_factory.ts +++ b/test/utils/web3_factory.ts @@ -6,6 +6,7 @@ import ProviderEngine = require('web3-provider-engine'); import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); import * as Web3 from 'web3'; +import * as Web3_beta from 'web3_beta'; import {constants} from './constants'; import {EmptyWalletSubProvider} from '../../src/subproviders/empty_wallet_subprovider'; @@ -28,4 +29,9 @@ export const web3Factory = { provider.start(); return provider; }, + getProviderBeta(): Web3.Provider { + const rpcUrl = `http://${constants.RPC_HOST}:${constants.RPC_PORT}`; + const providerBeta = new Web3_beta.providers.HttpProvider(rpcUrl); + return providerBeta; + }, }; |