Skip to content

Commit f6d155c

Browse files
committed
admin: update dist files
1 parent 1802215 commit f6d155c

34 files changed

+594
-96
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Change Log
33

44
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
55

6+
ethers/v6.9.1 (2023-12-19 04:53)
7+
--------------------------------
8+
9+
- Fix uncatchable issue when sending transactions over JSON-RPC and provide some retry-recovery for missing v ([#4513](https://github.com/ethers-io/ethers.js/issues/4513); [1802215](https://github.com/ethers-io/ethers.js/commit/180221574c5d2af9ad85404af4fab8752d3d5029)).
10+
611
ethers/v6.9.0 (2023-11-27 06:15)
712
--------------------------------
813

dist/ethers.js

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
33
/**
44
* The current version of Ethers.
55
*/
6-
const version = "6.9.0";
6+
const version = "6.9.1";
77

88
/**
99
* Property helper functions.
@@ -18048,16 +18048,19 @@ class AbstractProvider {
1804818048
// No explicit network was set and this is our first time
1804918049
if (this.#networkPromise == null) {
1805018050
// Detect the current network (shared with all calls)
18051-
const detectNetwork = this._detectNetwork().then((network) => {
18052-
this.emit("network", network, null);
18053-
return network;
18054-
}, (error) => {
18055-
// Reset the networkPromise on failure, so we will try again
18056-
if (this.#networkPromise === detectNetwork) {
18057-
this.#networkPromise = null;
18051+
const detectNetwork = (async () => {
18052+
try {
18053+
const network = await this._detectNetwork();
18054+
this.emit("network", network, null);
18055+
return network;
1805818056
}
18059-
throw error;
18060-
});
18057+
catch (error) {
18058+
if (this.#networkPromise === detectNetwork) {
18059+
this.#networkPromise = null;
18060+
}
18061+
throw error;
18062+
}
18063+
})();
1806118064
this.#networkPromise = detectNetwork;
1806218065
return (await detectNetwork).clone();
1806318066
}
@@ -19444,12 +19447,45 @@ class JsonRpcSigner extends AbstractSigner {
1944419447
// for it; it should show up very quickly
1944519448
return await (new Promise((resolve, reject) => {
1944619449
const timeouts = [1000, 100];
19450+
let invalids = 0;
1944719451
const checkTx = async () => {
19448-
// Try getting the transaction
19449-
const tx = await this.provider.getTransaction(hash);
19450-
if (tx != null) {
19451-
resolve(tx.replaceableTransaction(blockNumber));
19452-
return;
19452+
try {
19453+
// Try getting the transaction
19454+
const tx = await this.provider.getTransaction(hash);
19455+
if (tx != null) {
19456+
resolve(tx.replaceableTransaction(blockNumber));
19457+
return;
19458+
}
19459+
}
19460+
catch (error) {
19461+
// If we were cancelled: stop polling.
19462+
// If the data is bad: the node returns bad transactions
19463+
// If the network changed: calling again will also fail
19464+
// If unsupported: likely destroyed
19465+
if (isError(error, "CANCELLED") || isError(error, "BAD_DATA") ||
19466+
isError(error, "NETWORK_ERROR" )) {
19467+
if (error.info == null) {
19468+
error.info = {};
19469+
}
19470+
error.info.sendTransactionHash = hash;
19471+
reject(error);
19472+
return;
19473+
}
19474+
// Stop-gap for misbehaving backends; see #4513
19475+
if (isError(error, "INVALID_ARGUMENT")) {
19476+
invalids++;
19477+
if (error.info == null) {
19478+
error.info = {};
19479+
}
19480+
error.info.sendTransactionHash = hash;
19481+
if (invalids > 10) {
19482+
reject(error);
19483+
return;
19484+
}
19485+
}
19486+
// Notify anyone that cares; but we will try again, since
19487+
// it is likely an intermittent service error
19488+
this.provider.emit("error", makeError("failed to fetch transation after sending (will try again)", "UNKNOWN_ERROR", { error }));
1945319489
}
1945419490
// Wait another 4 seconds
1945519491
this.provider._setTimeout(() => { checkTx(); }, timeouts.pop() || 4000);
@@ -19527,7 +19563,7 @@ class JsonRpcApiProvider extends AbstractProvider {
1952719563
if (this.#drainTimer) {
1952819564
return;
1952919565
}
19530-
// If we aren't using batching, no hard in sending it immeidately
19566+
// If we aren't using batching, no harm in sending it immediately
1953119567
const stallTime = (this._getOption("batchMaxCount") === 1) ? 0 : this._getOption("batchStallTime");
1953219568
this.#drainTimer = setTimeout(() => {
1953319569
this.#drainTimer = null;
@@ -19690,9 +19726,15 @@ class JsonRpcApiProvider extends AbstractProvider {
1969019726
// If we are ready, use ``send``, which enabled requests to be batched
1969119727
if (this.ready) {
1969219728
this.#pendingDetectNetwork = (async () => {
19693-
const result = Network.from(getBigInt(await this.send("eth_chainId", [])));
19694-
this.#pendingDetectNetwork = null;
19695-
return result;
19729+
try {
19730+
const result = Network.from(getBigInt(await this.send("eth_chainId", [])));
19731+
this.#pendingDetectNetwork = null;
19732+
return result;
19733+
}
19734+
catch (error) {
19735+
this.#pendingDetectNetwork = null;
19736+
throw error;
19737+
}
1969619738
})();
1969719739
return await this.#pendingDetectNetwork;
1969819740
}

dist/ethers.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.

dist/ethers.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.

dist/ethers.umd.js

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
99
/**
1010
* The current version of Ethers.
1111
*/
12-
const version = "6.9.0";
12+
const version = "6.9.1";
1313

1414
/**
1515
* Property helper functions.
@@ -18054,16 +18054,19 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
1805418054
// No explicit network was set and this is our first time
1805518055
if (this.#networkPromise == null) {
1805618056
// Detect the current network (shared with all calls)
18057-
const detectNetwork = this._detectNetwork().then((network) => {
18058-
this.emit("network", network, null);
18059-
return network;
18060-
}, (error) => {
18061-
// Reset the networkPromise on failure, so we will try again
18062-
if (this.#networkPromise === detectNetwork) {
18063-
this.#networkPromise = null;
18057+
const detectNetwork = (async () => {
18058+
try {
18059+
const network = await this._detectNetwork();
18060+
this.emit("network", network, null);
18061+
return network;
1806418062
}
18065-
throw error;
18066-
});
18063+
catch (error) {
18064+
if (this.#networkPromise === detectNetwork) {
18065+
this.#networkPromise = null;
18066+
}
18067+
throw error;
18068+
}
18069+
})();
1806718070
this.#networkPromise = detectNetwork;
1806818071
return (await detectNetwork).clone();
1806918072
}
@@ -19450,12 +19453,45 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
1945019453
// for it; it should show up very quickly
1945119454
return await (new Promise((resolve, reject) => {
1945219455
const timeouts = [1000, 100];
19456+
let invalids = 0;
1945319457
const checkTx = async () => {
19454-
// Try getting the transaction
19455-
const tx = await this.provider.getTransaction(hash);
19456-
if (tx != null) {
19457-
resolve(tx.replaceableTransaction(blockNumber));
19458-
return;
19458+
try {
19459+
// Try getting the transaction
19460+
const tx = await this.provider.getTransaction(hash);
19461+
if (tx != null) {
19462+
resolve(tx.replaceableTransaction(blockNumber));
19463+
return;
19464+
}
19465+
}
19466+
catch (error) {
19467+
// If we were cancelled: stop polling.
19468+
// If the data is bad: the node returns bad transactions
19469+
// If the network changed: calling again will also fail
19470+
// If unsupported: likely destroyed
19471+
if (isError(error, "CANCELLED") || isError(error, "BAD_DATA") ||
19472+
isError(error, "NETWORK_ERROR" )) {
19473+
if (error.info == null) {
19474+
error.info = {};
19475+
}
19476+
error.info.sendTransactionHash = hash;
19477+
reject(error);
19478+
return;
19479+
}
19480+
// Stop-gap for misbehaving backends; see #4513
19481+
if (isError(error, "INVALID_ARGUMENT")) {
19482+
invalids++;
19483+
if (error.info == null) {
19484+
error.info = {};
19485+
}
19486+
error.info.sendTransactionHash = hash;
19487+
if (invalids > 10) {
19488+
reject(error);
19489+
return;
19490+
}
19491+
}
19492+
// Notify anyone that cares; but we will try again, since
19493+
// it is likely an intermittent service error
19494+
this.provider.emit("error", makeError("failed to fetch transation after sending (will try again)", "UNKNOWN_ERROR", { error }));
1945919495
}
1946019496
// Wait another 4 seconds
1946119497
this.provider._setTimeout(() => { checkTx(); }, timeouts.pop() || 4000);
@@ -19533,7 +19569,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
1953319569
if (this.#drainTimer) {
1953419570
return;
1953519571
}
19536-
// If we aren't using batching, no hard in sending it immeidately
19572+
// If we aren't using batching, no harm in sending it immediately
1953719573
const stallTime = (this._getOption("batchMaxCount") === 1) ? 0 : this._getOption("batchStallTime");
1953819574
this.#drainTimer = setTimeout(() => {
1953919575
this.#drainTimer = null;
@@ -19696,9 +19732,15 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
1969619732
// If we are ready, use ``send``, which enabled requests to be batched
1969719733
if (this.ready) {
1969819734
this.#pendingDetectNetwork = (async () => {
19699-
const result = Network.from(getBigInt(await this.send("eth_chainId", [])));
19700-
this.#pendingDetectNetwork = null;
19701-
return result;
19735+
try {
19736+
const result = Network.from(getBigInt(await this.send("eth_chainId", [])));
19737+
this.#pendingDetectNetwork = null;
19738+
return result;
19739+
}
19740+
catch (error) {
19741+
this.#pendingDetectNetwork = null;
19742+
throw error;
19743+
}
1970219744
})();
1970319745
return await this.#pendingDetectNetwork;
1970419746
}

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.

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.

dist/wordlists-extra.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.

dist/wordlists-extra.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.

dist/wordlists-extra.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.

0 commit comments

Comments
 (0)