aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-08-24 01:58:33 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-08-24 01:58:33 +0800
commit57c104119c409c053eb977553c92341c3ca83afd (patch)
tree7f1129fd01001604e7412e33ccef202c1ff90612 /packages/web3-wrapper
parentcd5c73550b969fe0a87524143ce617749935427a (diff)
parent6e27324a341801e1a2d8d6989d749dfe021ae39b (diff)
downloaddexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar.gz
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar.bz2
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar.lz
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar.xz
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.tar.zst
dexon-sol-tools-57c104119c409c053eb977553c92341c3ca83afd.zip
Merge branch 'development' into feature/forwarder-helper/init
* development: (187 commits) Remove trailing slash Fix linter Stop nesting interfaces and add necessary type exports Remove duplicate type and remove nested interface Add support for rending the Tuple type Add missing keyu Remove excessive timestamp Improve doc commebnt Remove docs catch-all endpoint Fix comments Look for all TS mapped types Add catch and exit with non-zero Remove superfluous dep Fix CHANGELOG entry Fix double assignment Upgrade Typedoc to 0.12.0, which works with TS 3.x Fix prettier issues Enable dry run of release publishing and handle git tags existing update yarn.lock Missing/superfluous type exports from connect ...
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r--packages/web3-wrapper/CHANGELOG.json18
-rw-r--r--packages/web3-wrapper/package.json21
-rw-r--r--packages/web3-wrapper/src/index.ts47
-rw-r--r--packages/web3-wrapper/src/monorepo_scripts/postpublish.ts8
-rw-r--r--packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts8
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts1
6 files changed, 69 insertions, 34 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json
index 422059cc0..b9cde2f95 100644
--- a/packages/web3-wrapper/CHANGELOG.json
+++ b/packages/web3-wrapper/CHANGELOG.json
@@ -1,5 +1,23 @@
[
{
+ "version": "2.0.0",
+ "changes": [
+ {
+ "note":
+ "Export types: `BlockParam`, `TxData`, `Provider`, `TransactionReceipt`, `Transaction`, `TraceParams`, `TransactionTrace``, BlockWithoutTransactionDat`a, `LogEntry`, `FilterObject`, `CallData`, `TransactionReceiptWithDecodedLogs`, `BlockWithTransactionData``, LogTopi`c, `JSONRPCRequestPayload`, `TransactionReceiptStatus`, `DecodedLogArgs`, `StructLog`, `JSONRPCErrorCallback``, BlockParamLitera`l, `ContractEventArg`, `DecodedLogEntry`, `LogEntryEvent`, `OpCode`, `TxDataPayable`, `JSONRPCResponsePayload``, RawLogEntr`y, `DecodedLogEntryEvent`, `LogWithDecodedArgs`, `AbiDefinition`, `RawLog`, `FunctionAbi`, `EventAbi`, `EventParameter``, MethodAb`i, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability` and `StateMutability`",
+ "pr": 924
+ },
+ {
+ "note": "Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC`",
+ "pr": 924
+ },
+ {
+ "note": "Export `AbiDecoder` class",
+ "pr": 924
+ }
+ ]
+ },
+ {
"version": "1.2.0",
"changes": [
{
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
index d672db7e4..3b347ac6f 100644
--- a/packages/web3-wrapper/package.json
+++ b/packages/web3-wrapper/package.json
@@ -9,8 +9,8 @@
"types": "lib/src/index.d.ts",
"scripts": {
"watch_without_deps": "tsc -w",
- "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
- "clean": "shx rm -rf lib scripts",
+ "build": "tsc",
+ "clean": "shx rm -rf lib generated_docs",
"lint": "tslint --project .",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s clean build test",
@@ -18,21 +18,11 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
"test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
- "manual:postpublish": "yarn build; node ./scripts/postpublish.js",
- "docs:stage": "node scripts/stage_docs.js",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES",
- "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
"postpublish": {
- "docPublishConfigs": {
- "extraFileIncludes": [
- "../types/src/index.ts",
- "../ethereum-types/src/index.ts"
- ],
- "s3BucketPath": "s3://doc-jsons/web3-wrapper/",
- "s3StagingBucketPath": "s3://staging-doc-jsons/web3-wrapper/"
- }
+ "assets": []
}
},
"license": "Apache-2.0",
@@ -45,7 +35,6 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md",
"devDependencies": {
- "@0xproject/monorepo-scripts": "^1.0.5",
"@0xproject/tslint-config": "^1.0.5",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
@@ -60,7 +49,7 @@
"nyc": "^11.0.1",
"shx": "^0.2.2",
"tslint": "5.11.0",
- "typedoc": "0xProject/typedoc",
+ "typedoc": "0.12.0",
"typescript": "3.0.1"
},
"dependencies": {
diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts
index 5d3d135e4..7cdd25e55 100644
--- a/packages/web3-wrapper/src/index.ts
+++ b/packages/web3-wrapper/src/index.ts
@@ -1,11 +1,54 @@
export { Web3Wrapper } from './web3_wrapper';
export { marshaller } from './marshaller';
+
+export { AbiDecoder } from '@0xproject/utils';
+
+export {
+ BlockParam,
+ TxData,
+ Provider,
+ TransactionReceipt,
+ Transaction,
+ TraceParams,
+ TransactionTrace,
+ BlockWithoutTransactionData,
+ LogEntry,
+ FilterObject,
+ CallData,
+ TransactionReceiptWithDecodedLogs,
+ BlockWithTransactionData,
+ LogTopic,
+ JSONRPCRequestPayload,
+ TransactionReceiptStatus,
+ DecodedLogArgs,
+ StructLog,
+ JSONRPCErrorCallback,
+ BlockParamLiteral,
+ ContractEventArg,
+ DecodedLogEntry,
+ LogEntryEvent,
+ OpCode,
+ TxDataPayable,
+ JSONRPCResponsePayload,
+ RawLogEntry,
+ DecodedLogEntryEvent,
+ LogWithDecodedArgs,
+ AbiDefinition,
+ RawLog,
+ FunctionAbi,
+ EventAbi,
+ EventParameter,
+ MethodAbi,
+ ConstructorAbi,
+ FallbackAbi,
+ DataItem,
+ ConstructorStateMutability,
+ StateMutability,
+} from 'ethereum-types';
export {
Web3WrapperErrors,
NodeType,
CallDataRPC,
- CallTxDataBaseRPC,
- AbstractBlockRPC,
BlockWithoutTransactionDataRPC,
BlockWithTransactionDataRPC,
TransactionRPC,
diff --git a/packages/web3-wrapper/src/monorepo_scripts/postpublish.ts b/packages/web3-wrapper/src/monorepo_scripts/postpublish.ts
deleted file mode 100644
index dcb99d0f7..000000000
--- a/packages/web3-wrapper/src/monorepo_scripts/postpublish.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { postpublishUtils } from '@0xproject/monorepo-scripts';
-
-import * as packageJSON from '../package.json';
-import * as tsConfigJSON from '../tsconfig.json';
-
-const cwd = `${__dirname}/..`;
-// tslint:disable-next-line:no-floating-promises
-postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);
diff --git a/packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts b/packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts
deleted file mode 100644
index e732ac8eb..000000000
--- a/packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { postpublishUtils } from '@0xproject/monorepo-scripts';
-
-import * as packageJSON from '../package.json';
-import * as tsConfigJSON from '../tsconfig.json';
-
-const cwd = `${__dirname}/..`;
-// tslint:disable-next-line:no-floating-promises
-postpublishUtils.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd);
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index dd35e2094..ea78f8801 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -237,6 +237,7 @@ export class Web3Wrapper {
/**
* Retrieves an accounts Ether balance in wei
* @param owner Account whose balance you wish to check
+ * @param defaultBlock The block depth at which to fetch the balance (default=latest)
* @returns Balance in wei
*/
public async getBalanceInWeiAsync(owner: string, defaultBlock?: BlockParam): Promise<BigNumber> {