aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'packages/web3-wrapper')
-rw-r--r--packages/web3-wrapper/CHANGELOG.json18
-rw-r--r--packages/web3-wrapper/CHANGELOG.md16
-rw-r--r--packages/web3-wrapper/package.json14
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts17
4 files changed, 49 insertions, 16 deletions
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json
index c87ef3bac..35e4383fd 100644
--- a/packages/web3-wrapper/CHANGELOG.json
+++ b/packages/web3-wrapper/CHANGELOG.json
@@ -1,5 +1,23 @@
[
{
+ "timestamp": 1525477860,
+ "version": "0.6.3",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
+ "timestamp": 1525428773,
+ "version": "0.6.2",
+ "changes": [
+ {
+ "note": "Dependencies updated"
+ }
+ ]
+ },
+ {
"timestamp": 1524044013,
"version": "0.6.1",
"changes": [
diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md
index f5bda9ad9..3358c9a01 100644
--- a/packages/web3-wrapper/CHANGELOG.md
+++ b/packages/web3-wrapper/CHANGELOG.md
@@ -5,11 +5,19 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
+## v0.6.3 - _May 5, 2018_
+
+ * Dependencies updated
+
+## v0.6.2 - _May 4, 2018_
+
+ * Dependencies updated
+
## v0.6.1 - _April 18, 2018_
* Dependencies updated
-## v0.6.0 - _April 12, 2018_
+## v0.6.0 - _April 11, 2018_
* Make `isAddress` and `toWei` static (#501)
* Add static methods `toUnitAmount` and `toBaseUnitAmount` (#501)
@@ -24,19 +32,19 @@ CHANGELOG
* Rename `signTransactionAsync` to `signMessageAsync` for clarity (#465)
-## v0.3.0 - _March 18, 2018_
+## v0.3.0 - _March 17, 2018_
* Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync` (#426)
* Add `web3Wrapper.isZeroExWeb3Wrapper` for runtime instanceOf checks (#426)
* Add a `getProvider` method (#444)
-## v0.2.0 - _March 4, 2018_
+## v0.2.0 - _March 3, 2018_
* Ensure all returned user addresses are lowercase (#373)
* Add `web3Wrapper.callAsync` (#413)
* Make `web3Wrapper.estimateGas` accept whole `txData` instead of `data` (#413)
* Remove `web3Wrapper.getContractInstance` (#413)
-## v0.1.12 - _February 9, 2018_
+## v0.1.12 - _February 8, 2018_
* Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
index 118330707..bc38df00d 100644
--- a/packages/web3-wrapper/package.json
+++ b/packages/web3-wrapper/package.json
@@ -1,6 +1,6 @@
{
"name": "@0xproject/web3-wrapper",
- "version": "0.6.1",
+ "version": "0.6.3",
"description": "Wraps around web3 and gives a nicer interface",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
@@ -8,7 +8,7 @@
"build:watch": "tsc -w",
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"clean": "shx rm -rf lib scripts",
- "lint": "tslint --project . 'src/**/*.ts'",
+ "lint": "tslint --project .",
"test": "run-s clean build run_mocha",
"test:circleci": "yarn test:coverage",
"run_mocha": "mocha lib/test/**/*_test.js --bail --exit",
@@ -40,8 +40,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md",
"devDependencies": {
- "@0xproject/monorepo-scripts": "^0.1.18",
- "@0xproject/tslint-config": "^0.4.16",
+ "@0xproject/monorepo-scripts": "^0.1.19",
+ "@0xproject/tslint-config": "^0.4.17",
"@types/lodash": "4.14.104",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
@@ -58,9 +58,9 @@
"typescript": "2.7.1"
},
"dependencies": {
- "@0xproject/types": "^0.6.1",
- "@0xproject/typescript-typings": "^0.2.0",
- "@0xproject/utils": "^0.5.2",
+ "@0xproject/types": "^0.6.3",
+ "@0xproject/typescript-typings": "^0.3.1",
+ "@0xproject/utils": "^0.6.1",
"ethers": "^3.0.15",
"lodash": "^4.17.4",
"web3": "^0.20.0"
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index 5e6ff3239..349e1ed7e 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -29,7 +29,7 @@ export class Web3Wrapper {
public isZeroExWeb3Wrapper = true;
public abiDecoder: AbiDecoder;
private _web3: Web3;
- private _defaults: Partial<TxData>;
+ private _txDefaults: Partial<TxData>;
private _jsonRpcRequestId: number;
/**
* Check if an address is a valid Ethereum address
@@ -83,10 +83,10 @@ export class Web3Wrapper {
* Instantiates a new Web3Wrapper.
* @param provider The Web3 provider instance you would like the Web3Wrapper to use for interacting with
* the backing Ethereum node.
- * @param defaults Override TxData defaults sent with RPC requests to the backing Ethereum node.
+ * @param txDefaults Override TxData defaults sent with RPC requests to the backing Ethereum node.
* @return An instance of the Web3Wrapper class.
*/
- constructor(provider: Provider, defaults?: Partial<TxData>) {
+ constructor(provider: Provider, txDefaults?: Partial<TxData>) {
if (_.isUndefined((provider as any).sendAsync)) {
// Web3@1.0 provider doesn't support synchronous http requests,
// so it only has an async `send` method, instead of a `send` and `sendAsync` in web3@0.x.x`
@@ -96,7 +96,7 @@ export class Web3Wrapper {
this.abiDecoder = new AbiDecoder([]);
this._web3 = new Web3();
this._web3.setProvider(provider);
- this._defaults = defaults || {};
+ this._txDefaults = txDefaults || {};
this._jsonRpcRequestId = 0;
}
/**
@@ -104,7 +104,7 @@ export class Web3Wrapper {
* @return TxData defaults (e.g gas, gasPrice, nonce, etc...)
*/
public getContractDefaults(): Partial<TxData> {
- return this._defaults;
+ return this._txDefaults;
}
/**
* Retrieve the Web3 provider
@@ -324,6 +324,13 @@ export class Web3Wrapper {
const txHash = await promisify<string>(this._web3.eth.sendTransaction)(txData);
return txHash;
}
+ /**
+ * Waits for a transaction to be mined and returns the transaction receipt.
+ * @param txHash Transaction hash
+ * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
+ * @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
+ * @return Transaction receipt with decoded log args.
+ */
public async awaitTransactionMinedAsync(
txHash: string,
pollingIntervalMs = 1000,