Skip to content

Commit

Permalink
admin: updated dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Mar 9, 2022
1 parent fa4a290 commit dfaa8ee
Show file tree
Hide file tree
Showing 25 changed files with 131 additions and 103 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ Changelog
This change log is managed by `admin/cmds/update-versions` but may be manually updated.


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

- 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))
- Tweaked test case to re-order transaction after event listeners added. ([fa4a290](https://github.com/ethers-io/ethers.js/commit/fa4a29028d97d598b43b2f5ff98077e8cadf56a4))
- Ignore errors when resolving ENS resolver properties. ([d160bac](https://github.com/ethers-io/ethers.js/commit/d160bac273775f928a9441b0275dbdb6032368fa))
- 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))
- 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))
- Added defaultProvider option to omit specific Providers. ([bae215e](https://github.com/ethers-io/ethers.js/commit/bae215eb7fb3efea8473a544579abac1bebb7ef0))
- 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))
- 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))
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions packages/ethers/dist/ethers.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -18754,6 +18754,8 @@ class Event {
defineReadOnly(this, "tag", tag);
defineReadOnly(this, "listener", listener);
defineReadOnly(this, "once", once);
this._lastBlockNumber = -2;
this._inflight = false;
}
get event() {
switch (this.type) {
Expand Down Expand Up @@ -18915,6 +18917,7 @@ class Resolver {
// e.g. keccak256("addr(bytes32,uint256)")
const tx = {
to: this.address,
ccipReadEnabled: true,
data: hexConcat([selector, namehash(this.name), (parameters || "0x")])
};
// Wildcard support; use EIP-2544 to resolve the request
Expand All @@ -18926,6 +18929,11 @@ class Resolver {
}
try {
let result = yield this.provider.call(tx);
if ((arrayify(result).length % 32) === 4) {
logger$t.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, {
transaction: tx, data: result
});
}
if (parseBytes) {
result = _parseBytes(result, 0);
}
Expand All @@ -18935,7 +18943,7 @@ class Resolver {
if (error.code === Logger.errors.CALL_EXCEPTION) {
return null;
}
return null;
throw error;
}
});
}
Expand Down Expand Up @@ -19248,8 +19256,6 @@ class BaseProvider extends Provider {
}
this._maxInternalBlockNumber = -1024;
this._lastBlockNumber = -2;
this._lastFilterBlockNumber = -2;
this._lastFilterComplete = true;
this._maxFilterBlockRange = 10;
this._pollingInterval = 4000;
this._fastQueryDate = 0;
Expand Down Expand Up @@ -19477,8 +19483,6 @@ class BaseProvider extends Provider {
// First polling cycle
if (this._lastBlockNumber === -2) {
this._lastBlockNumber = blockNumber - 1;
this._lastFilterBlockNumber = blockNumber - 1;
this._lastFilterComplete = true;
}
// Find all transaction hashes we are waiting on
this._events.forEach((event) => {
Expand All @@ -19498,30 +19502,30 @@ class BaseProvider extends Provider {
}
case "filter": {
// We only allow a single getLogs to be in-flight at a time
if (this._lastFilterComplete) {
this._lastFilterComplete = false;
if (!event._inflight) {
event._inflight = true;
// Filter from the last known event; due to load-balancing
// and some nodes returning updated block numbers before
// indexing events, a logs result with 0 entries cannot be
// trusted and we must retry a range which includes it again
const filter = event.filter;
filter.fromBlock = this._lastFilterBlockNumber + 1;
filter.fromBlock = event._lastBlockNumber + 1;
filter.toBlock = blockNumber;
// Prevent fitler ranges from growing too wild
if (filter.toBlock - this._maxFilterBlockRange > filter.fromBlock) {
filter.fromBlock = filter.toBlock - this._maxFilterBlockRange;
}
const runner = this.getLogs(filter).then((logs) => {
// Allow the next getLogs
this._lastFilterComplete = true;
event._inflight = false;
if (logs.length === 0) {
return;
}
logs.forEach((log) => {
// Only when we get an event for a given block number
// can we trust the events are indexed
if (log.blockNumber > this._lastFilterBlockNumber) {
this._lastFilterBlockNumber = log.blockNumber;
if (log.blockNumber > event._lastBlockNumber) {
event._lastBlockNumber = log.blockNumber;
}
// Make sure we stall requests to fetch blocks and txs
this._emitted["b:" + log.blockHash] = log.blockNumber;
Expand All @@ -19531,7 +19535,7 @@ class BaseProvider extends Provider {
}).catch((error) => {
this.emit("error", error);
// Allow another getLogs (the range was not updated)
this._lastFilterComplete = true;
event._inflight = false;
});
runners.push(runner);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.esm.min.js.map

Large diffs are not rendered by default.

28 changes: 16 additions & 12 deletions packages/ethers/dist/ethers.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -20970,6 +20970,8 @@
(0, lib$3.defineReadOnly)(this, "tag", tag);
(0, lib$3.defineReadOnly)(this, "listener", listener);
(0, lib$3.defineReadOnly)(this, "once", once);
this._lastBlockNumber = -2;
this._inflight = false;
}
Object.defineProperty(Event.prototype, "event", {
get: function () {
Expand Down Expand Up @@ -21153,6 +21155,7 @@
case 0:
tx = {
to: this.address,
ccipReadEnabled: true,
data: (0, lib$1.hexConcat)([selector, (0, lib$9.namehash)(this.name), (parameters || "0x")])
};
parseBytes = false;
Expand All @@ -21169,6 +21172,11 @@
return [4 /*yield*/, this.provider.call(tx)];
case 3:
result = _a.sent();
if (((0, lib$1.arrayify)(result).length % 32) === 4) {
logger.throwError("resolver threw error", lib.Logger.errors.CALL_EXCEPTION, {
transaction: tx, data: result
});
}
if (parseBytes) {
result = _parseBytes(result, 0);
}
Expand All @@ -21178,7 +21186,7 @@
if (error_1.code === lib.Logger.errors.CALL_EXCEPTION) {
return [2 /*return*/, null];
}
return [2 /*return*/, null];
throw error_1;
case 5: return [2 /*return*/];
}
});
Expand Down Expand Up @@ -21555,8 +21563,6 @@
}
_this._maxInternalBlockNumber = -1024;
_this._lastBlockNumber = -2;
_this._lastFilterBlockNumber = -2;
_this._lastFilterComplete = true;
_this._maxFilterBlockRange = 10;
_this._pollingInterval = 4000;
_this._fastQueryDate = 0;
Expand Down Expand Up @@ -21838,8 +21844,6 @@
// First polling cycle
if (this._lastBlockNumber === -2) {
this._lastBlockNumber = blockNumber - 1;
this._lastFilterBlockNumber = blockNumber - 1;
this._lastFilterComplete = true;
}
// Find all transaction hashes we are waiting on
this._events.forEach(function (event) {
Expand All @@ -21859,30 +21863,30 @@
}
case "filter": {
// We only allow a single getLogs to be in-flight at a time
if (_this._lastFilterComplete) {
_this._lastFilterComplete = false;
if (!event._inflight) {
event._inflight = true;
// Filter from the last known event; due to load-balancing
// and some nodes returning updated block numbers before
// indexing events, a logs result with 0 entries cannot be
// trusted and we must retry a range which includes it again
var filter_1 = event.filter;
filter_1.fromBlock = _this._lastFilterBlockNumber + 1;
filter_1.fromBlock = event._lastBlockNumber + 1;
filter_1.toBlock = blockNumber;
// Prevent fitler ranges from growing too wild
if (filter_1.toBlock - _this._maxFilterBlockRange > filter_1.fromBlock) {
filter_1.fromBlock = filter_1.toBlock - _this._maxFilterBlockRange;
}
var runner = _this.getLogs(filter_1).then(function (logs) {
// Allow the next getLogs
_this._lastFilterComplete = true;
event._inflight = false;
if (logs.length === 0) {
return;
}
logs.forEach(function (log) {
// Only when we get an event for a given block number
// can we trust the events are indexed
if (log.blockNumber > _this._lastFilterBlockNumber) {
_this._lastFilterBlockNumber = log.blockNumber;
if (log.blockNumber > event._lastBlockNumber) {
event._lastBlockNumber = log.blockNumber;
}
// Make sure we stall requests to fetch blocks and txs
_this._emitted["b:" + log.blockHash] = log.blockNumber;
Expand All @@ -21892,7 +21896,7 @@
}).catch(function (error) {
_this.emit("error", error);
// Allow another getLogs (the range was not updated)
_this._lastFilterComplete = true;
event._inflight = false;
});
runners.push(runner);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/dist/ethers.umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ethers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"sideEffects": false,
"tarballHash": "0xde258a41bb37aa169c4a16d7f4e1fd098fca5de1954ddf37f27317483a43afd4",
"tarballHash": "0xbf8af0bc133a052a3e410a1d9c98b59b2785ed29e27243c76db9011df98067a0",
"types": "./lib/index.d.ts",
"version": "5.6.0"
}
4 changes: 2 additions & 2 deletions packages/providers/lib.esm/base-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export declare class Event {
readonly listener: Listener;
readonly once: boolean;
readonly tag: string;
_lastBlockNumber: number;
_inflight: boolean;
constructor(tag: string, listener: Listener, once: boolean);
get event(): EventType;
get type(): string;
Expand Down Expand Up @@ -63,8 +65,6 @@ export declare class BaseProvider extends Provider implements EnsProvider {
_poller: NodeJS.Timer;
_bootstrapPoll: NodeJS.Timer;
_lastBlockNumber: number;
_lastFilterBlockNumber: number;
_lastFilterComplete: boolean;
_maxFilterBlockRange: number;
_fastBlockNumber: number;
_fastBlockNumberPromise: Promise<number>;
Expand Down
Loading

0 comments on commit dfaa8ee

Please sign in to comment.