aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-cov
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-03-30 01:02:46 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-03-30 01:02:46 +0800
commit665011174bab7cfc6ec53e0044d60e1463222aee (patch)
tree44bc55bd390044d6cbfe8e0f7dddb621a8be7249 /packages/sol-cov
parentd106079d9b69191d9cdc6d9323dbae3e4b45daf2 (diff)
parentc4dd9658e791a9f821ea3b6eb4326bcba53b081a (diff)
downloaddexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar.gz
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar.bz2
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar.lz
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar.xz
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.tar.zst
dexon-sol-tools-665011174bab7cfc6ec53e0044d60e1463222aee.zip
Merge branch 'development' into feature/website/wallet-wrap
* development: (35 commits) Fix CHANGELOG Update Yarn.lock Standardize changelog dates and format Fix stubbing of a non-existent property Remove redundant cast Move common types out of web3 types Add monorepo_scripts to npmignore Add typeRoots Add clean-state tests Remove nested .gitignore files since `yarn publish` gets confused by them and ignores their contents on the top-level scope Remove WETH hack now that updated WETH address is in TokenRegistry Revert TokenRegistry address on Kovan Improve rounding error message Portal fill with mixed decimals Add error popover if TokenRegistry on network user is browsing on don't include the requisite default tokens for 0x Portal to function Set timeout for compiler tests Remove redundant types Add missing param comments Fix a comment Add a comment ...
Diffstat (limited to 'packages/sol-cov')
-rw-r--r--packages/sol-cov/.npmignore1
-rw-r--r--packages/sol-cov/package.json11
-rw-r--r--packages/sol-cov/src/coverage_subprovider.ts14
-rw-r--r--packages/sol-cov/tsconfig.json2
4 files changed, 13 insertions, 15 deletions
diff --git a/packages/sol-cov/.npmignore b/packages/sol-cov/.npmignore
index 87bc30436..037786e46 100644
--- a/packages/sol-cov/.npmignore
+++ b/packages/sol-cov/.npmignore
@@ -3,3 +3,4 @@ yarn-error.log
/src/
/scripts/
tsconfig.json
+/lib/src/monorepo_scripts/
diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json
index 106c47d13..1e3124822 100644
--- a/packages/sol-cov/package.json
+++ b/packages/sol-cov/package.json
@@ -39,7 +39,9 @@
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
"dependencies": {
"@0xproject/subproviders": "^0.8.2",
- "@0xproject/utils": "^0.3.4",
+ "@0xproject/utils": "^0.4.3",
+ "@0xproject/typescript-typings": "^0.0.1",
+ "@0xproject/types": "^0.4.1",
"ethereumjs-util": "^5.1.1",
"glob": "^7.1.2",
"istanbul": "^0.4.5",
@@ -47,8 +49,7 @@
"semaphore-async-await": "^1.5.1",
"solidity-coverage": "^0.4.10",
"solidity-parser-antlr": "^0.2.7",
- "solidity-parser-sc": "^0.4.4",
- "web3": "^0.20.0"
+ "solidity-parser-sc": "^0.4.4"
},
"devDependencies": {
"@0xproject/monorepo-scripts": "^0.1.14",
@@ -57,7 +58,6 @@
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
"chai": "^4.0.1",
- "chai-typescript-typings": "^0.0.6",
"copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1",
"mocha": "^4.0.1",
@@ -67,8 +67,7 @@
"sinon": "^4.0.0",
"tslint": "5.8.0",
"typedoc": "0xProject/typedoc",
- "typescript": "2.7.1",
- "web3-typescript-typings": "^0.9.11"
+ "typescript": "2.7.1"
},
"publishConfig": {
"access": "public"
diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-cov/src/coverage_subprovider.ts
index 37682c45f..1c80dca7b 100644
--- a/packages/sol-cov/src/coverage_subprovider.ts
+++ b/packages/sol-cov/src/coverage_subprovider.ts
@@ -1,14 +1,14 @@
import { Callback, ErrorCallback, NextCallback, Subprovider } from '@0xproject/subproviders';
+import { BlockParam, CallData, JSONRPCRequestPayload, TransactionTrace, TxData } from '@0xproject/types';
import { promisify } from '@0xproject/utils';
import * as _ from 'lodash';
import { Lock } from 'semaphore-async-await';
-import * as Web3 from 'web3';
import { constants } from './constants';
import { CoverageManager } from './coverage_manager';
import { TraceInfoExistingContract, TraceInfoNewContract } from './types';
-interface MaybeFakeTxData extends Web3.TxData {
+interface MaybeFakeTxData extends TxData {
isFakeTransaction?: boolean;
}
@@ -58,7 +58,7 @@ export class CoverageSubprovider extends Subprovider {
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method
- public handleRequest(payload: Web3.JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) {
+ public handleRequest(payload: JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) {
switch (payload.method) {
case 'eth_sendTransaction':
const txData = payload.params[0];
@@ -110,8 +110,8 @@ export class CoverageSubprovider extends Subprovider {
cb();
}
private async _onCallExecutedAsync(
- callData: Partial<Web3.CallData>,
- blockNumber: Web3.BlockParam,
+ callData: Partial<CallData>,
+ blockNumber: BlockParam,
err: Error | null,
callResult: string,
cb: Callback,
@@ -125,7 +125,7 @@ export class CoverageSubprovider extends Subprovider {
params: [txHash, { disableMemory: true, disableStack: true, disableStorage: true }], // TODO For now testrpc just ignores those parameters https://github.com/trufflesuite/ganache-cli/issues/489
};
const jsonRPCResponsePayload = await this.emitPayloadAsync(payload);
- const trace: Web3.TransactionTrace = jsonRPCResponsePayload.result;
+ const trace: TransactionTrace = jsonRPCResponsePayload.result;
const coveredPcs = _.map(trace.structLogs, log => log.pc);
if (address === constants.NEW_CONTRACT) {
const traceInfo: TraceInfoNewContract = {
@@ -147,7 +147,7 @@ export class CoverageSubprovider extends Subprovider {
this._coverageManager.appendTraceInfo(traceInfo);
}
}
- private async _recordCallTraceAsync(callData: Partial<Web3.CallData>, blockNumber: Web3.BlockParam): Promise<void> {
+ private async _recordCallTraceAsync(callData: Partial<CallData>, blockNumber: BlockParam): Promise<void> {
// We don't want other transactions to be exeucted during snashotting period, that's why we lock the
// transaction execution for all transactions except our fake ones.
await this._lock.acquire();
diff --git a/packages/sol-cov/tsconfig.json b/packages/sol-cov/tsconfig.json
index 44e43719b..7b93af0da 100644
--- a/packages/sol-cov/tsconfig.json
+++ b/packages/sol-cov/tsconfig.json
@@ -7,8 +7,6 @@
"./src/**/*",
"./test/**/*",
"../../node_modules/types-bn/index.d.ts",
- "../../node_modules/web3-typescript-typings/index.d.ts",
- "../../node_modules/chai-typescript-typings/index.d.ts",
"../../node_modules/types-ethereumjs-util/index.d.ts"
]
}