aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/contract-wrappers/CHANGELOG.json13
-rw-r--r--packages/contract-wrappers/package.json2
-rw-r--r--packages/ethereum-types/src/index.ts1
-rw-r--r--packages/order-watcher/CHANGELOG.json13
-rw-r--r--packages/order-watcher/package.json2
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts6
-rw-r--r--yarn.lock10
7 files changed, 40 insertions, 7 deletions
diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json
index 2f8a02a1a..1c9af4971 100644
--- a/packages/contract-wrappers/CHANGELOG.json
+++ b/packages/contract-wrappers/CHANGELOG.json
@@ -1,12 +1,21 @@
[
{
- "timestamp": 1537541580,
+ "version": "2.0.0",
+ "changes": [
+ {
+ "note":
+ "Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too."
+ }
+ ]
+ },
+ {
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
- ]
+ ],
+ "timestamp": 1537541580
},
{
"version": "1.0.3",
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index 331ff1701..8f60759f6 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -82,7 +82,7 @@
"@0xproject/utils": "^1.0.9",
"@0xproject/web3-wrapper": "^2.0.3",
"ethereum-types": "^1.0.7",
- "ethereumjs-blockstream": "5.0.0",
+ "ethereumjs-blockstream": "6.0.0",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",
"js-sha3": "^0.7.0",
diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts
index 8f8f4b7e6..a3ff2fddb 100644
--- a/packages/ethereum-types/src/index.ts
+++ b/packages/ethereum-types/src/index.ts
@@ -181,6 +181,7 @@ export interface CallData extends CallTxDataBase {
export interface FilterObject {
fromBlock?: number | string;
toBlock?: number | string;
+ blockHash?: string;
address?: string;
topics?: LogTopic[];
}
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index dec154f0f..1b19a4cdd 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -1,12 +1,21 @@
[
{
- "timestamp": 1537541580,
+ "version": "2.0.0",
+ "changes": [
+ {
+ "note":
+ "Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too."
+ }
+ ]
+ },
+ {
"version": "1.0.4",
"changes": [
{
"note": "Dependencies updated"
}
- ]
+ ],
+ "timestamp": 1537541580
},
{
"version": "1.0.3",
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
index 8ce57364f..f764b6518 100644
--- a/packages/order-watcher/package.json
+++ b/packages/order-watcher/package.json
@@ -82,7 +82,7 @@
"@0xproject/web3-wrapper": "^2.0.3",
"bintrees": "^1.0.2",
"ethereum-types": "^1.0.7",
- "ethereumjs-blockstream": "5.0.0",
+ "ethereumjs-blockstream": "6.0.0",
"ethers": "3.0.22",
"lodash": "^4.17.5"
},
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index dc634a57f..2f574b76a 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -447,6 +447,12 @@ export class Web3Wrapper {
* @returns The corresponding log entries
*/
public async getLogsAsync(filter: FilterObject): Promise<LogEntry[]> {
+ if (!_.isUndefined(filter.blockHash) && (!_.isUndefined(filter.fromBlock) || !_.isUndefined(filter.toBlock))) {
+ throw new Error(
+ `Cannot specify 'blockHash' as well as 'fromBlock'/'toBlock' in the filter supplied to 'getLogsAsync'`,
+ );
+ }
+
let fromBlock = filter.fromBlock;
if (_.isNumber(fromBlock)) {
fromBlock = utils.numberToHex(fromBlock);
diff --git a/yarn.lock b/yarn.lock
index aa30946a8..950b39fd8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5203,6 +5203,14 @@ ethereumjs-blockstream@5.0.0:
source-map-support "0.5.6"
uuid "3.2.1"
+ethereumjs-blockstream@6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/ethereumjs-blockstream/-/ethereumjs-blockstream-6.0.0.tgz#79d726d1f358935eb65195e91d40344c31e87eff"
+ dependencies:
+ immutable "3.8.2"
+ source-map-support "0.5.6"
+ uuid "3.2.1"
+
ethereumjs-tx@0xProject/ethereumjs-tx#fake-tx-include-signature-by-default:
version "1.3.4"
resolved "https://codeload.github.com/0xProject/ethereumjs-tx/tar.gz/29d1153889c389591f74b2401da8a0c6ad40f9a7"
@@ -6053,7 +6061,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep:
ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default"
ethereumjs-util "^5.2.0"
ethereumjs-vm "2.3.5"
- ethereumjs-wallet "~0.6.0"
+ ethereumjs-wallet "0.6.0"
fake-merkle-patricia-tree "~1.0.1"
heap "~0.2.6"
js-scrypt "^0.2.0"