aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-utils/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-30 21:24:56 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-30 23:01:37 +0800
commitd0e7046a8998bc131f7e486da5501efda53fed53 (patch)
tree5635f1e707fb9d5bbfdb18022d36facaae63b0c1 /packages/dev-utils/src
parent52ad16b9200ff892b0880891e467e2b371bf8220 (diff)
downloaddexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar.gz
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar.bz2
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar.lz
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar.xz
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.tar.zst
dexon-sol-tools-d0e7046a8998bc131f7e486da5501efda53fed53.zip
Remove constructor arg
Diffstat (limited to 'packages/dev-utils/src')
-rw-r--r--packages/dev-utils/src/blockchain_lifecycle.ts3
-rw-r--r--packages/dev-utils/src/rpc.ts6
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/dev-utils/src/blockchain_lifecycle.ts b/packages/dev-utils/src/blockchain_lifecycle.ts
index bb4908a0d..c46902f76 100644
--- a/packages/dev-utils/src/blockchain_lifecycle.ts
+++ b/packages/dev-utils/src/blockchain_lifecycle.ts
@@ -1,11 +1,10 @@
-import { constants } from './constants';
import { RPC } from './rpc';
export class BlockchainLifecycle {
private _rpc: RPC;
private _snapshotIdsStack: number[];
constructor() {
- this._rpc = new RPC(constants.RPC_URL);
+ this._rpc = new RPC();
this._snapshotIdsStack = [];
}
// TODO: In order to run these tests on an actual node, we should check if we are running against
diff --git a/packages/dev-utils/src/rpc.ts b/packages/dev-utils/src/rpc.ts
index 36f8b1ef9..47a359263 100644
--- a/packages/dev-utils/src/rpc.ts
+++ b/packages/dev-utils/src/rpc.ts
@@ -1,11 +1,13 @@
import * as ethUtil from 'ethereumjs-util';
import * as request from 'request-promise-native';
+import { constants } from './constants';
+
export class RPC {
private _url: string;
private _id: number;
- constructor(url: string) {
- this._url = url;
+ constructor() {
+ this._url = constants.RPC_URL;
this._id = 0;
}
public async takeSnapshotAsync(): Promise<number> {