aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-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
6 files changed, 31 insertions, 6 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);