Skip to content

Commit dfaa8ee

Browse files
committed
admin: updated dist files
1 parent fa4a290 commit dfaa8ee

25 files changed

+131
-103
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ Changelog
44
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
55

66

7-
ethers/v5.6.0 (2022-03-09 02:13)
7+
ethers/v5.6.0 (2022-03-09 14:57)
88
--------------------------------
99

10-
- Fix missing events on certain network conditions. ([#1798](https://github.com/ethers-io/ethers.js/issues/1798), [#1814](https://github.com/ethers-io/ethers.js/issues/1814), [#1830](https://github.com/ethers-io/ethers.js/issues/1830), [#2274](https://github.com/ethers-io/ethers.js/issues/2274), [#2652](https://github.com/ethers-io/ethers.js/issues/2652); [f67a9a8](https://github.com/ethers-io/ethers.js/commit/f67a9a8569cdfd0ef9ce5fbf09866aab6e4814d4))
10+
- Tweaked test case to re-order transaction after event listeners added. ([fa4a290](https://github.com/ethers-io/ethers.js/commit/fa4a29028d97d598b43b2f5ff98077e8cadf56a4))
11+
- Ignore errors when resolving ENS resolver properties. ([d160bac](https://github.com/ethers-io/ethers.js/commit/d160bac273775f928a9441b0275dbdb6032368fa))
12+
- Enable CCIP Read for ENS resolvers. ([#2478](https://github.com/ethers-io/ethers.js/issues/2478); [be518c3](https://github.com/ethers-io/ethers.js/commit/be518c32ec7db9dd4769b57cdf130eb333aebb72))
13+
- Fix missing events on certain network conditions. ([#1798](https://github.com/ethers-io/ethers.js/issues/1798), [#1814](https://github.com/ethers-io/ethers.js/issues/1814), [#1830](https://github.com/ethers-io/ethers.js/issues/1830), [#2274](https://github.com/ethers-io/ethers.js/issues/2274), [#2652](https://github.com/ethers-io/ethers.js/issues/2652); [f67a9a8](https://github.com/ethers-io/ethers.js/commit/f67a9a8569cdfd0ef9ce5fbf09866aab6e4814d4), [f46aa75](https://github.com/ethers-io/ethers.js/commit/f46aa75ef1f3428e640cd046db3f080d264b32f3))
1114
- Added defaultProvider option to omit specific Providers. ([bae215e](https://github.com/ethers-io/ethers.js/commit/bae215eb7fb3efea8473a544579abac1bebb7ef0))
1215
- Add support for pending blocks. ([#2225](https://github.com/ethers-io/ethers.js/issues/2225); [54e6e57](https://github.com/ethers-io/ethers.js/commit/54e6e57fcece4c1718a577ecbeb1af97998e8bdc))
1316
- Help URLs for errors. ([#2489](https://github.com/ethers-io/ethers.js/issues/2489); [38e825c](https://github.com/ethers-io/ethers.js/commit/38e825cee624ff935ec6b70023cf288126a6bb85), [c562150](https://github.com/ethers-io/ethers.js/commit/c562150d2678710f50e5ee3ffa88d0e62d6f696f))

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.esm.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18754,6 +18754,8 @@ class Event {
1875418754
defineReadOnly(this, "tag", tag);
1875518755
defineReadOnly(this, "listener", listener);
1875618756
defineReadOnly(this, "once", once);
18757+
this._lastBlockNumber = -2;
18758+
this._inflight = false;
1875718759
}
1875818760
get event() {
1875918761
switch (this.type) {
@@ -18915,6 +18917,7 @@ class Resolver {
1891518917
// e.g. keccak256("addr(bytes32,uint256)")
1891618918
const tx = {
1891718919
to: this.address,
18920+
ccipReadEnabled: true,
1891818921
data: hexConcat([selector, namehash(this.name), (parameters || "0x")])
1891918922
};
1892018923
// Wildcard support; use EIP-2544 to resolve the request
@@ -18926,6 +18929,11 @@ class Resolver {
1892618929
}
1892718930
try {
1892818931
let result = yield this.provider.call(tx);
18932+
if ((arrayify(result).length % 32) === 4) {
18933+
logger$t.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, {
18934+
transaction: tx, data: result
18935+
});
18936+
}
1892918937
if (parseBytes) {
1893018938
result = _parseBytes(result, 0);
1893118939
}
@@ -18935,7 +18943,7 @@ class Resolver {
1893518943
if (error.code === Logger.errors.CALL_EXCEPTION) {
1893618944
return null;
1893718945
}
18938-
return null;
18946+
throw error;
1893918947
}
1894018948
});
1894118949
}
@@ -19248,8 +19256,6 @@ class BaseProvider extends Provider {
1924819256
}
1924919257
this._maxInternalBlockNumber = -1024;
1925019258
this._lastBlockNumber = -2;
19251-
this._lastFilterBlockNumber = -2;
19252-
this._lastFilterComplete = true;
1925319259
this._maxFilterBlockRange = 10;
1925419260
this._pollingInterval = 4000;
1925519261
this._fastQueryDate = 0;
@@ -19477,8 +19483,6 @@ class BaseProvider extends Provider {
1947719483
// First polling cycle
1947819484
if (this._lastBlockNumber === -2) {
1947919485
this._lastBlockNumber = blockNumber - 1;
19480-
this._lastFilterBlockNumber = blockNumber - 1;
19481-
this._lastFilterComplete = true;
1948219486
}
1948319487
// Find all transaction hashes we are waiting on
1948419488
this._events.forEach((event) => {
@@ -19498,30 +19502,30 @@ class BaseProvider extends Provider {
1949819502
}
1949919503
case "filter": {
1950019504
// We only allow a single getLogs to be in-flight at a time
19501-
if (this._lastFilterComplete) {
19502-
this._lastFilterComplete = false;
19505+
if (!event._inflight) {
19506+
event._inflight = true;
1950319507
// Filter from the last known event; due to load-balancing
1950419508
// and some nodes returning updated block numbers before
1950519509
// indexing events, a logs result with 0 entries cannot be
1950619510
// trusted and we must retry a range which includes it again
1950719511
const filter = event.filter;
19508-
filter.fromBlock = this._lastFilterBlockNumber + 1;
19512+
filter.fromBlock = event._lastBlockNumber + 1;
1950919513
filter.toBlock = blockNumber;
1951019514
// Prevent fitler ranges from growing too wild
1951119515
if (filter.toBlock - this._maxFilterBlockRange > filter.fromBlock) {
1951219516
filter.fromBlock = filter.toBlock - this._maxFilterBlockRange;
1951319517
}
1951419518
const runner = this.getLogs(filter).then((logs) => {
1951519519
// Allow the next getLogs
19516-
this._lastFilterComplete = true;
19520+
event._inflight = false;
1951719521
if (logs.length === 0) {
1951819522
return;
1951919523
}
1952019524
logs.forEach((log) => {
1952119525
// Only when we get an event for a given block number
1952219526
// can we trust the events are indexed
19523-
if (log.blockNumber > this._lastFilterBlockNumber) {
19524-
this._lastFilterBlockNumber = log.blockNumber;
19527+
if (log.blockNumber > event._lastBlockNumber) {
19528+
event._lastBlockNumber = log.blockNumber;
1952519529
}
1952619530
// Make sure we stall requests to fetch blocks and txs
1952719531
this._emitted["b:" + log.blockHash] = log.blockNumber;
@@ -19531,7 +19535,7 @@ class BaseProvider extends Provider {
1953119535
}).catch((error) => {
1953219536
this.emit("error", error);
1953319537
// Allow another getLogs (the range was not updated)
19534-
this._lastFilterComplete = true;
19538+
event._inflight = false;
1953519539
});
1953619540
runners.push(runner);
1953719541
}

packages/ethers/dist/ethers.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20970,6 +20970,8 @@
2097020970
(0, lib$3.defineReadOnly)(this, "tag", tag);
2097120971
(0, lib$3.defineReadOnly)(this, "listener", listener);
2097220972
(0, lib$3.defineReadOnly)(this, "once", once);
20973+
this._lastBlockNumber = -2;
20974+
this._inflight = false;
2097320975
}
2097420976
Object.defineProperty(Event.prototype, "event", {
2097520977
get: function () {
@@ -21153,6 +21155,7 @@
2115321155
case 0:
2115421156
tx = {
2115521157
to: this.address,
21158+
ccipReadEnabled: true,
2115621159
data: (0, lib$1.hexConcat)([selector, (0, lib$9.namehash)(this.name), (parameters || "0x")])
2115721160
};
2115821161
parseBytes = false;
@@ -21169,6 +21172,11 @@
2116921172
return [4 /*yield*/, this.provider.call(tx)];
2117021173
case 3:
2117121174
result = _a.sent();
21175+
if (((0, lib$1.arrayify)(result).length % 32) === 4) {
21176+
logger.throwError("resolver threw error", lib.Logger.errors.CALL_EXCEPTION, {
21177+
transaction: tx, data: result
21178+
});
21179+
}
2117221180
if (parseBytes) {
2117321181
result = _parseBytes(result, 0);
2117421182
}
@@ -21178,7 +21186,7 @@
2117821186
if (error_1.code === lib.Logger.errors.CALL_EXCEPTION) {
2117921187
return [2 /*return*/, null];
2118021188
}
21181-
return [2 /*return*/, null];
21189+
throw error_1;
2118221190
case 5: return [2 /*return*/];
2118321191
}
2118421192
});
@@ -21555,8 +21563,6 @@
2155521563
}
2155621564
_this._maxInternalBlockNumber = -1024;
2155721565
_this._lastBlockNumber = -2;
21558-
_this._lastFilterBlockNumber = -2;
21559-
_this._lastFilterComplete = true;
2156021566
_this._maxFilterBlockRange = 10;
2156121567
_this._pollingInterval = 4000;
2156221568
_this._fastQueryDate = 0;
@@ -21838,8 +21844,6 @@
2183821844
// First polling cycle
2183921845
if (this._lastBlockNumber === -2) {
2184021846
this._lastBlockNumber = blockNumber - 1;
21841-
this._lastFilterBlockNumber = blockNumber - 1;
21842-
this._lastFilterComplete = true;
2184321847
}
2184421848
// Find all transaction hashes we are waiting on
2184521849
this._events.forEach(function (event) {
@@ -21859,30 +21863,30 @@
2185921863
}
2186021864
case "filter": {
2186121865
// We only allow a single getLogs to be in-flight at a time
21862-
if (_this._lastFilterComplete) {
21863-
_this._lastFilterComplete = false;
21866+
if (!event._inflight) {
21867+
event._inflight = true;
2186421868
// Filter from the last known event; due to load-balancing
2186521869
// and some nodes returning updated block numbers before
2186621870
// indexing events, a logs result with 0 entries cannot be
2186721871
// trusted and we must retry a range which includes it again
2186821872
var filter_1 = event.filter;
21869-
filter_1.fromBlock = _this._lastFilterBlockNumber + 1;
21873+
filter_1.fromBlock = event._lastBlockNumber + 1;
2187021874
filter_1.toBlock = blockNumber;
2187121875
// Prevent fitler ranges from growing too wild
2187221876
if (filter_1.toBlock - _this._maxFilterBlockRange > filter_1.fromBlock) {
2187321877
filter_1.fromBlock = filter_1.toBlock - _this._maxFilterBlockRange;
2187421878
}
2187521879
var runner = _this.getLogs(filter_1).then(function (logs) {
2187621880
// Allow the next getLogs
21877-
_this._lastFilterComplete = true;
21881+
event._inflight = false;
2187821882
if (logs.length === 0) {
2187921883
return;
2188021884
}
2188121885
logs.forEach(function (log) {
2188221886
// Only when we get an event for a given block number
2188321887
// can we trust the events are indexed
21884-
if (log.blockNumber > _this._lastFilterBlockNumber) {
21885-
_this._lastFilterBlockNumber = log.blockNumber;
21888+
if (log.blockNumber > event._lastBlockNumber) {
21889+
event._lastBlockNumber = log.blockNumber;
2188621890
}
2188721891
// Make sure we stall requests to fetch blocks and txs
2188821892
_this._emitted["b:" + log.blockHash] = log.blockNumber;
@@ -21892,7 +21896,7 @@
2189221896
}).catch(function (error) {
2189321897
_this.emit("error", error);
2189421898
// Allow another getLogs (the range was not updated)
21895-
_this._lastFilterComplete = true;
21899+
event._inflight = false;
2189621900
});
2189721901
runners.push(runner);
2189821902
}

packages/ethers/dist/ethers.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)