Rename node-endpoint to rpc-url for clarity

This commit is contained in:
Fabio Berger 2018-11-26 15:57:49 +00:00
parent 6e39f11db1
commit c6592148a7

View File

@ -6,8 +6,8 @@ import * as yargs from 'yargs';
import { runMigrationsAsync } from './migration'; import { runMigrationsAsync } from './migration';
const args = yargs const args = yargs
.option('node-endpoint', { .option('rpc-url', {
describe: 'Endpoint where backing Ethereum node is hosted', describe: 'Endpoint where backing Ethereum JSON RPC interface is available',
type: 'string', type: 'string',
demandOption: false, demandOption: false,
default: 'http://localhost:8545', default: 'http://localhost:8545',
@ -18,12 +18,12 @@ const args = yargs
demandOption: true, demandOption: true,
}) })
.example( .example(
'$0 --node-endpoint http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', '$0 --rpc-url http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631',
'Full usage example', 'Full usage example',
).argv; ).argv;
(async () => { (async () => {
const rpcSubprovider = new RPCSubprovider(args['node-endpoint']); const rpcSubprovider = new RPCSubprovider(args['rpc-url']);
const provider = new Web3ProviderEngine(); const provider = new Web3ProviderEngine();
provider.addProvider(rpcSubprovider); provider.addProvider(rpcSubprovider);
provider.start(); provider.start();